summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-03-28 13:36:48 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-03-28 13:36:48 (GMT)
commitdae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8 (patch)
treef01fe3ff891a815b7c7db511ddbabcc67f916445 /Swift/QtUI/ChatList/ChatListGroupItem.h
parenta7d213975040a1130ac136d61a055c5b6f5d41fa (diff)
parenta59af6c6daa72dd491189335cf2d255a788eb0f6 (diff)
downloadswift-contrib-dae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8.zip
swift-contrib-dae28dd45e43fc6e6ef2ec4c6c65d5d736ed86f8.tar.bz2
Merge commit 'origin/master'
Conflicts: BuildTools
Diffstat (limited to 'Swift/QtUI/ChatList/ChatListGroupItem.h')
-rw-r--r--Swift/QtUI/ChatList/ChatListGroupItem.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/Swift/QtUI/ChatList/ChatListGroupItem.h b/Swift/QtUI/ChatList/ChatListGroupItem.h
new file mode 100644
index 0000000..82c9616
--- /dev/null
+++ b/Swift/QtUI/ChatList/ChatListGroupItem.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include <QList>
+
+#include "Swift/QtUI/ChatList/ChatListItem.h"
+
+namespace Swift {
+ class ChatListGroupItem : public ChatListItem {
+ public:
+ ChatListGroupItem(const QString& name, ChatListGroupItem* parent) : ChatListItem(parent), name_(name) {};
+ void addItem(ChatListItem* item) {items_.push_back(item);};
+ void remove(int index) {items_.removeAt(index);};
+ int rowCount() {return items_.size();};
+ ChatListItem* item(int i) {return items_[i];};
+ int row(ChatListItem* item) {return items_.indexOf(item);};
+ QVariant data(int role) {return "Bob";};
+ private:
+ QString name_;
+ QList<ChatListItem*> items_;
+ };
+}