summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-08-08 14:18:43 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-08-08 14:18:43 (GMT)
commit47d75bf5a3f58ce582e5715a9d5ba6e89a38b033 (patch)
tree20345d9b84af4650076440e6a2f57a4661143ca4 /Swift/QtUI/Roster/QtTreeWidget.cpp
parent40d35626023f12d8ebea3a53672968b1b80f5974 (diff)
downloadswift-47d75bf5a3f58ce582e5715a9d5ba6e89a38b033.zip
swift-47d75bf5a3f58ce582e5715a9d5ba6e89a38b033.tar.bz2
Plumbing in place for roster group expansion. \nDoesn't work.
Diffstat (limited to 'Swift/QtUI/Roster/QtTreeWidget.cpp')
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidget.cpp b/Swift/QtUI/Roster/QtTreeWidget.cpp
index 67afd14..18b28d2 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.cpp
+++ b/Swift/QtUI/Roster/QtTreeWidget.cpp
@@ -20,6 +20,7 @@ QtTreeWidget::QtTreeWidget(QWidget* parent) : QTreeView(parent) {
setIndentation(0);
setRootIsDecorated(true);
connect(this, SIGNAL(activated(const QModelIndex&)), this, SLOT(handleItemActivated(const QModelIndex&)));
+ connect(model_, SIGNAL(itemExpanded(const QModelIndex&, bool)), this, SLOT(handleItemExpanded(const QModelIndex&, bool)));
}
QtTreeWidget::~QtTreeWidget() {
@@ -38,6 +39,10 @@ void QtTreeWidget::handleItemActivated(const QModelIndex& index) {
}
}
+void QtTreeWidget::handleItemExpanded(const QModelIndex& index, bool expanded) {
+ setExpanded(index, expanded);
+}
+
void QtTreeWidget::drawBranches(QPainter*, const QRect&, const QModelIndex&) const {
}