summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-07-26 12:39:50 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-07-26 12:39:50 (GMT)
commita28d92f3458218d6effbfdd9a42bf8fbe8b8aa72 (patch)
treef666c221dcc899704bb80f67afe383e58b780669 /Swift/QtUI/Roster/RosterItem.h
parentc4660f404c9a0dbf1c00a20baacfc738d93eaff5 (diff)
downloadswift-a28d92f3458218d6effbfdd9a42bf8fbe8b8aa72.zip
swift-a28d92f3458218d6effbfdd9a42bf8fbe8b8aa72.tar.bz2
Begin to assage Swift model into Qt Model/View.
Diffstat (limited to 'Swift/QtUI/Roster/RosterItem.h')
-rw-r--r--Swift/QtUI/Roster/RosterItem.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/RosterItem.h b/Swift/QtUI/Roster/RosterItem.h
new file mode 100644
index 0000000..f7cd804
--- /dev/null
+++ b/Swift/QtUI/Roster/RosterItem.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <QList>
+
+namespace Swift {
+ class RosterItem {
+ public:
+ RosterItem(RosterItem* parent);
+ ~RosterItem();
+ void addChild(RosterItem* child);
+ RosterItem* getParentItem();
+ int rowCount();
+ int rowOf(RosterItem* item);
+ RosterItem* getItem(int row);
+ private:
+ QList<RosterItem*> children_;
+ RosterItem* parent_;
+ };
+
+} \ No newline at end of file