summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-10-04 16:08:10 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-10-04 16:08:10 (GMT)
commit8ca471e7304e813fa55ebf512a8f30f146fe6b41 (patch)
treee962968f1f7afc0bc6c73a776e3ee75e8c7deaba /Swift/QtUI/Roster
parent026e8a67d871d99f4f0c0bddb6d16d12521f1e1c (diff)
downloadswift-8ca471e7304e813fa55ebf512a8f30f146fe6b41.zip
swift-8ca471e7304e813fa55ebf512a8f30f146fe6b41.tar.bz2
Assign contacts to groups.
Another patch will follow shortly to stop them appearing offline after a roster change like this. Resolves: #272 Release-Notes: It's now possible to assign your contacts to groups.
Diffstat (limited to 'Swift/QtUI/Roster')
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.cpp1
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidget.cpp b/Swift/QtUI/Roster/QtTreeWidget.cpp
index 6ace3df..885cba6 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.cpp
+++ b/Swift/QtUI/Roster/QtTreeWidget.cpp
@@ -46,6 +46,7 @@ QtTreeWidget::~QtTreeWidget() {
}
void QtTreeWidget::setRosterModel(Roster* roster) {
+ roster_ = roster;
model_->setRoster(roster);
expandAll();
}
diff --git a/Swift/QtUI/Roster/QtTreeWidget.h b/Swift/QtUI/Roster/QtTreeWidget.h
index 796afed..838c453 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.h
+++ b/Swift/QtUI/Roster/QtTreeWidget.h
@@ -26,6 +26,7 @@ class QtTreeWidget : public QTreeView{
QtTreeWidgetItem* getRoot();
void setContextMenu(QtContextMenu* contextMenu);
void setRosterModel(Roster* roster);
+ Roster* getRoster() {return roster_;}
private slots:
void handleItemActivated(const QModelIndex&);
void handleModelItemExpanded(const QModelIndex&, bool expanded);
@@ -38,6 +39,7 @@ class QtTreeWidget : public QTreeView{
private:
void drawBranches(QPainter*, const QRect&, const QModelIndex&) const;
RosterModel* model_;
+ Roster* roster_;
RosterDelegate* delegate_;
QtTreeWidgetItem* treeRoot_;
QtContextMenu* contextMenu_;