summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/Roster/RosterItem.cpp')
-rw-r--r--Swift/QtUI/Roster/RosterItem.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/RosterItem.cpp b/Swift/QtUI/Roster/RosterItem.cpp
new file mode 100644
index 0000000..14b4525
--- /dev/null
+++ b/Swift/QtUI/Roster/RosterItem.cpp
@@ -0,0 +1,28 @@
+#include "RosterItem.h"
+
+namespace Swift {
+
+RosterItem::RosterItem(RosterItem* parent) {
+ parent_ = parent;
+}
+
+RosterItem* RosterItem::getParentItem() {
+ return parent_;
+}
+
+void RosterItem::addChild(RosterItem* child) {
+ children_.append(child);
+}
+
+int RosterItem::rowCount() {
+ return children_.size();
+}
+
+int RosterItem::rowOf(RosterItem* item) {
+ return children_.indexOf(item);;
+}
+
+RosterItem* RosterItem::getItem(int row) {
+ return children_[row];
+}
+} \ No newline at end of file