summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-07 20:21:28 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-07 20:21:28 (GMT)
commit4636fb155afcb2d7084e7a0debfa093780488f22 (patch)
treed5c5f26b4e0377c3e44732d8ad019bfbde17f422 /Swift/QtUI/QtContactEditWidget.h
parenta21d013c029bdeef960dad9327a3d07dfdcdaa30 (diff)
downloadswift-contrib-4636fb155afcb2d7084e7a0debfa093780488f22.zip
swift-contrib-4636fb155afcb2d7084e7a0debfa093780488f22.tar.bz2
Split contact editing out into separate widget.
Diffstat (limited to 'Swift/QtUI/QtContactEditWidget.h')
-rw-r--r--Swift/QtUI/QtContactEditWidget.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/Swift/QtUI/QtContactEditWidget.h b/Swift/QtUI/QtContactEditWidget.h
new file mode 100644
index 0000000..b855b6c
--- /dev/null
+++ b/Swift/QtUI/QtContactEditWidget.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2010 Kevin Smith
+ * Licensed under the GNU General Public License v3.
+ * See Documentation/Licenses/GPLv3.txt for more information.
+ */
+
+#pragma once
+
+#include <map>
+#include <set>
+#include <boost/shared_ptr.hpp>
+
+#include <QWidget>
+
+#include <Swiften/Base/String.h>
+
+class QLineEdit;
+class QCheckBox;
+
+namespace Swift {
+ class QtContactEditWidget : public QWidget {
+ Q_OBJECT
+
+ public:
+ QtContactEditWidget(const std::set<String>& allGroups, QWidget* parent);
+
+ void setName(const String&);
+ String getName() const;
+
+ void setSelectedGroups(const std::vector<String>& groups);
+ std::set<String> getSelectedGroups() const;
+
+ private:
+ typedef std::map<String, QCheckBox*> CheckBoxMap;
+ CheckBoxMap checkBoxes_;
+ QLineEdit* name_;
+ QWidget* groups_;
+ QCheckBox* newGroup_;
+ QLineEdit* newGroupName_;
+ };
+}
+