summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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_;
+ };
+}
+