summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-26 14:45:43 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-26 14:45:43 (GMT)
commitf2af88dc39cc0b785be0ef294a4ba2fddbf4401a (patch)
tree7a1e06c6c1f12edbf6cc633a14aa124938700840
parente4807335c4e38dc2f047d400641c65448854b062 (diff)
downloadswift-f2af88dc39cc0b785be0ef294a4ba2fddbf4401a.zip
swift-f2af88dc39cc0b785be0ef294a4ba2fddbf4401a.tar.bz2
Added missing files.
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchDetailsPage.cpp35
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchDetailsPage.h33
2 files changed, 68 insertions, 0 deletions
diff --git a/Swift/QtUI/UserSearch/QtUserSearchDetailsPage.cpp b/Swift/QtUI/UserSearch/QtUserSearchDetailsPage.cpp
new file mode 100644
index 0000000..779e547
--- /dev/null
+++ b/Swift/QtUI/UserSearch/QtUserSearchDetailsPage.cpp
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#include "Swift/QtUI/UserSearch/QtUserSearchDetailsPage.h"
+
+#include <QVBoxLayout>
+
+#include <Swift/QtUI/QtContactEditWidget.h>
+
+namespace Swift {
+
+QtUserSearchDetailsPage::QtUserSearchDetailsPage(const std::set<std::string>& groups) {
+ QVBoxLayout* layout = new QVBoxLayout(this);
+ layout->addWidget(new QLabel(tr("Please choose a name for the contact, and select the groups you want to add the contact to.")));
+ editWidget = new QtContactEditWidget(groups, this);
+ layout->addWidget(editWidget);
+}
+
+std::set<std::string> QtUserSearchDetailsPage::getSelectedGroups() {
+ return editWidget->getSelectedGroups();
+}
+
+std::string QtUserSearchDetailsPage::getName() {
+ return editWidget->getName();
+}
+
+void QtUserSearchDetailsPage::clear() {
+ editWidget->clear();
+}
+
+
+}
diff --git a/Swift/QtUI/UserSearch/QtUserSearchDetailsPage.h b/Swift/QtUI/UserSearch/QtUserSearchDetailsPage.h
new file mode 100644
index 0000000..70afcba
--- /dev/null
+++ b/Swift/QtUI/UserSearch/QtUserSearchDetailsPage.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2011 Remko Tronçon
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <QWizardPage>
+#include <set>
+
+#include <Swift/QtUI/UserSearch/ui_QtUserSearchFieldsPage.h>
+
+namespace Swift {
+ class QtContactEditWidget;
+
+ class QtUserSearchDetailsPage : public QWizardPage {
+ Q_OBJECT
+ public:
+ QtUserSearchDetailsPage(const std::set<std::string>& availableGroups);
+
+ std::set<std::string> getSelectedGroups();
+ std::string getName();
+
+ void clear();
+
+ signals:
+ void onUserTriggersFinish();
+
+ private:
+ QtContactEditWidget* editWidget;
+ };
+}