summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-04-27 20:42:11 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-04-27 20:58:17 (GMT)
commitf48dbee2fb5acf7c0abc9d7897d736233b1f0d2f (patch)
tree512879020dc60ecb0b0b5e70219bf588c5a2f5af /Swift/QtUI/ChatList/ChatListGroupItem.h
parent73c97d9222040b6160321a32e55a5a3913923e5e (diff)
downloadswift-f48dbee2fb5acf7c0abc9d7897d736233b1f0d2f.zip
swift-f48dbee2fb5acf7c0abc9d7897d736233b1f0d2f.tar.bz2
Start on recent chats list
Diffstat (limited to 'Swift/QtUI/ChatList/ChatListGroupItem.h')
-rw-r--r--Swift/QtUI/ChatList/ChatListGroupItem.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/QtUI/ChatList/ChatListGroupItem.h b/Swift/QtUI/ChatList/ChatListGroupItem.h
index cc4d4af..2fb2284 100644
--- a/Swift/QtUI/ChatList/ChatListGroupItem.h
+++ b/Swift/QtUI/ChatList/ChatListGroupItem.h
@@ -13,8 +13,8 @@
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); qStableSort(items_.begin(), items_.end(), pointerItemLessThan);};
+ ChatListGroupItem(const QString& name, ChatListGroupItem* parent, bool sorted = true) : ChatListItem(parent), name_(name), sorted_(sorted) {};
+ void addItem(ChatListItem* item) {items_.push_back(item); if (sorted_) {qStableSort(items_.begin(), items_.end(), pointerItemLessThan);}};
void remove(int index) {items_.removeAt(index);};
int rowCount() {return items_.size();};
ChatListItem* item(int i) {return items_[i];};
@@ -30,5 +30,6 @@ namespace Swift {
QString name_;
QList<ChatListItem*> items_;
+ bool sorted_;
};
}