diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-06-08 12:43:04 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-08 12:42:51 -0700 |
commit | e14a15e61c6fa5529f33de410bfc6e0ad351a7af (patch) | |
tree | 168daf4927e48f4b51dbfd6a0e8136518e99a9c6 /qt-ui/profile/divepixmapitem.h | |
parent | 38ac6ed35fc4e3a99cbf1ea1ae271ddea7a06661 (diff) | |
download | subsurface-e14a15e61c6fa5529f33de410bfc6e0ad351a7af.tar.gz |
Subtle animation when the picture gets hovered with the mouse.
This patch adds a subtle animation when the picture gets hovered
with the mouse, and restored to it's original size when mouse exits
the image area.
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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qt-ui/profile/divepixmapitem.h b/qt-ui/profile/divepixmapitem.h index aa2563877..a0f542ea0 100644 --- a/qt-ui/profile/divepixmapitem.h +++ b/qt-ui/profile/divepixmapitem.h @@ -14,4 +14,15 @@ public: DivePixmapItem(QObject *parent = 0); }; +class DivePictureItem : public DivePixmapItem { + Q_OBJECT + Q_PROPERTY(qreal scale WRITE setScale READ scale) +public: + DivePictureItem(QObject *parent = 0); + void setPixmap(const QPixmap& pix); +protected: + void hoverEnterEvent(QGraphicsSceneHoverEvent *event); + void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); +}; + #endif // DIVEPIXMAPITEM_H |