diff options
author | Kevin Smith <git@kismith.co.uk> | 2011-03-04 16:02:25 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2011-03-04 16:02:25 (GMT) |
commit | 3f06fdbf826d8d1c1e243cff5fcbf27870f4f0f8 (patch) | |
tree | 1f86916268e3fe659537e1733d4880542967e2a1 /Swift/QtUI/Roster/QtTreeWidget.h | |
parent | 0070f96a4ab8770f45a09f5285f427357b955fe2 (diff) | |
download | swift-contrib-3f06fdbf826d8d1c1e243cff5fcbf27870f4f0f8.zip swift-contrib-3f06fdbf826d8d1c1e243cff5fcbf27870f4f0f8.tar.bz2 |
Create an edit contact menu item.
Resolves: #769
Release-notes: It is now possible to edit contacts from the standard menus (without needing to right-click on the item).
Diffstat (limited to 'Swift/QtUI/Roster/QtTreeWidget.h')
-rw-r--r-- | Swift/QtUI/Roster/QtTreeWidget.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Swift/QtUI/Roster/QtTreeWidget.h b/Swift/QtUI/Roster/QtTreeWidget.h index ce2351b..1ab8c8e 100644 --- a/Swift/QtUI/Roster/QtTreeWidget.h +++ b/Swift/QtUI/Roster/QtTreeWidget.h @@ -25,6 +25,12 @@ class QtTreeWidget : public QTreeView{ Roster* getRoster() {return roster_;} void setEditable(bool b) { editable_ = b; } + signals: + void onSomethingSelectedChanged(bool); + + public slots: + void handleEditUserActionTriggered(bool checked); + private slots: void handleItemActivated(const QModelIndex&); void handleModelItemExpanded(const QModelIndex&, bool expanded); @@ -33,8 +39,11 @@ class QtTreeWidget : public QTreeView{ void handleClicked(const QModelIndex&); protected: void contextMenuEvent(QContextMenuEvent* event); + protected slots: + virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous); private: + void renameGroup(GroupRosterItem* group); void drawBranches(QPainter*, const QRect&, const QModelIndex&) const; RosterModel* model_; Roster* roster_; |