diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-07-29 22:13:14 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-07-30 12:34:43 -0700 |
commit | 1e6986d87010a636d151f77b3da2a40d52a95178 (patch) | |
tree | 72fba4d0f44d5bb4bdfe4c7e7e45477c5c449f98 /qt-ui/profile/divepixmapitem.h | |
parent | 75aafdc7152747f423e0dacc524c61c5619382e8 (diff) | |
download | subsurface-1e6986d87010a636d151f77b3da2a40d52a95178.tar.gz |
Instead of holding the index, hold the URL.
Since the idea is to remove the picture in the future, we need
to not hold the row on the model, as when we delete one, the
other pictures will change the row. but the QUrl is unique.
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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/profile/divepixmapitem.h b/qt-ui/profile/divepixmapitem.h index b5bed37ce..d39f26db6 100644 --- a/qt-ui/profile/divepixmapitem.h +++ b/qt-ui/profile/divepixmapitem.h @@ -18,17 +18,18 @@ class DivePictureItem : public DivePixmapItem { Q_OBJECT Q_PROPERTY(qreal scale WRITE setScale READ scale) public: - DivePictureItem(int row, QObject *parent = 0); + DivePictureItem(QObject *parent = 0); void setPixmap(const QPixmap& pix); public slots: void settingsChanged(); void removePicture(); + void setFileUrl(const QString& s); protected: void hoverEnterEvent(QGraphicsSceneHoverEvent *event); void hoverLeaveEvent(QGraphicsSceneHoverEvent *event); void mousePressEvent(QGraphicsSceneMouseEvent *event); private: - int rowOnModel; + QString fileUrl; }; class DiveButtonItem : public DivePixmapItem { |