diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-07-29 21:56:45 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-30 12:34:39 -0700 |
commit | 75aafdc7152747f423e0dacc524c61c5619382e8 (patch) | |
tree | 980c106896bce9e09f3fef57d0e1d29805630249 /qt-ui/profile/divepixmapitem.h | |
parent | 7f4b05f19483424be537899fb37baa960bba4976 (diff) | |
download | subsurface-75aafdc7152747f423e0dacc524c61c5619382e8.tar.gz |
Added a button to hide a picture from the dive.
This patch hides a picture from the dive, it should actually
remove it, but because I didn't found a quick way to remove
a picture from the dive yet, it just hides it.
To remove a picture from the dive, the DivePictureItem has to
remember the QUrl of the original file, to remove that from the
model, and currently it only has the QPixmap.
this can be for 4.2.1 or we can postpone 4.2 a tiny bit since this
is a important feature.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divepixmapitem.h')
-rw-r--r-- | qt-ui/profile/divepixmapitem.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/qt-ui/profile/divepixmapitem.h b/qt-ui/profile/divepixmapitem.h index 950b211d2..b5bed37ce 100644 --- a/qt-ui/profile/divepixmapitem.h +++ b/qt-ui/profile/divepixmapitem.h @@ -22,6 +22,7 @@ public: void setPixmap(const QPixmap& pix); public slots: void settingsChanged(); + void removePicture(); protected: void hoverEnterEvent(QGraphicsSceneHoverEvent *event); void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); @@ -30,4 +31,23 @@ private: int rowOnModel; }; +class DiveButtonItem : public DivePixmapItem { + Q_OBJECT +public: + DiveButtonItem(QObject *parent = 0); +protected: + virtual void mousePressEvent(QGraphicsSceneMouseEvent *event); +signals: + void clicked(); +}; + +class CloseButtonItem : public DiveButtonItem { + Q_OBJECT +public: + CloseButtonItem(QObject *parent = 0); +public slots: + void hide(); + void show(); +}; + #endif // DIVEPIXMAPITEM_H |