summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-01 08:48:42 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-01 09:24:28 (GMT)
commit2812bddd81f8a1b804c7460f4e14cd0aa393d129 (patch)
treed46294f35150c4f0f43deaf2d31fceaf945ae715 /UI/Qt/QtTreeWidgetFactory.h
downloadswift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.zip
swift-contrib-2812bddd81f8a1b804c7460f4e14cd0aa393d129.tar.bz2
Import.
Diffstat (limited to 'UI/Qt/QtTreeWidgetFactory.h')
-rw-r--r--UI/Qt/QtTreeWidgetFactory.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/UI/Qt/QtTreeWidgetFactory.h b/UI/Qt/QtTreeWidgetFactory.h
new file mode 100644
index 0000000..61e4993
--- /dev/null
+++ b/UI/Qt/QtTreeWidgetFactory.h
@@ -0,0 +1,36 @@
+#ifndef SWIFT_QtTreeWidgetFactory_H
+#define SWIFT_QtTreeWidgetFactory_H
+
+#include "Swiften/Roster/TreeWidgetFactory.h"
+#include "Swiften/Roster/TreeWidget.h"
+#include "Swiften/Roster/TreeWidgetItem.h"
+#include "UI/Qt/QtTreeWidgetItem.h"
+#include "UI/Qt/QtTreeWidget.h"
+
+namespace Swift {
+
+class QtTreeWidgetFactory : public TreeWidgetFactory {
+ public:
+ QtTreeWidgetFactory() {
+ }
+
+ TreeWidget* createTreeWidget() {
+ return new QtTreeWidget();
+ }
+
+ TreeWidgetItem* createTreeWidgetItem(TreeWidgetItem* item) {
+ QtTreeWidgetItem* qtItem = dynamic_cast<QtTreeWidgetItem*>(item);
+ assert(qtItem);
+ return new QtTreeWidgetItem(qtItem);
+ }
+
+ TreeWidgetItem* createTreeWidgetItem(TreeWidget* item) {
+ QtTreeWidget* qtItem = dynamic_cast<QtTreeWidget*>(item);
+ assert(qtItem);
+ return new QtTreeWidgetItem(qtItem);
+ }
+};
+
+}
+#endif
+