Mercurial > hg > easyhg
diff changesetitem.h @ 119:005a54380502
* Make scene remember which item has its details showing, and remove the previous one when a new one is clicked
author | Chris Cannam |
---|---|
date | Sun, 28 Nov 2010 21:52:00 +0000 |
parents | d5db15bf250c |
children | fcaf09ee825d |
line wrap: on
line diff
--- a/changesetitem.h Fri Nov 26 23:49:48 2010 +0000 +++ b/changesetitem.h Sun Nov 28 21:52:00 2010 +0000 @@ -24,8 +24,11 @@ class Changeset; class ChangesetDetailItem; -class ChangesetItem : public QGraphicsItem +class ChangesetItem : public QObject, public QGraphicsItem { + Q_OBJECT + Q_INTERFACES(QGraphicsItem) + public: ChangesetItem(Changeset *cs); @@ -45,6 +48,14 @@ bool shouldShowBranch() const { return m_showBranch; } void setShowBranch(bool s) { m_showBranch = s; } +signals: + void detailShown(); + void detailHidden(); + +public slots: + void showDetail(); + void hideDetail(); + protected: virtual void mousePressEvent(QGraphicsSceneMouseEvent *);