diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-14 22:07:00 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-06 13:58:09 -0700 |
commit | e61641c79cd57bfa55d2371615a7eef7c73b4eb7 (patch) | |
tree | 85333dfed1630b1d968498495d1d1c151570e015 /qt-models/divepicturemodel.h | |
parent | ebdb3e3c3029d3762207e8dcadfa3a61bf0a9293 (diff) | |
download | subsurface-e61641c79cd57bfa55d2371615a7eef7c73b4eb7.tar.gz |
undo: implement undo of setting a picture time by drag&drop
Even though the functionality is seemingly trivial, this is a bit
invasive, as the code has to be split into two distinct parts:
1) Post undo command
2) React to changes to the divelist
Don't compile that code on mobile.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divepicturemodel.h')
-rw-r--r-- | qt-models/divepicturemodel.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-models/divepicturemodel.h b/qt-models/divepicturemodel.h index 1ed5e8095..2d628f429 100644 --- a/qt-models/divepicturemodel.h +++ b/qt-models/divepicturemodel.h @@ -18,6 +18,7 @@ struct PictureEntry { duration_t length; }; +struct dive; class DivePictureModel : public QAbstractTableModel { Q_OBJECT public: @@ -27,12 +28,12 @@ public: int rowCount(const QModelIndex &parent = QModelIndex()) const override; void updateDivePictures(); void removePictures(const QVector<QString> &fileUrls); - void updateDivePictureOffset(int diveId, const QString &filename, int offsetSeconds); signals: void picturesRemoved(const QVector<QString> &fileUrls); public slots: void setZoomLevel(int level); void updateThumbnail(QString filename, QImage thumbnail, duration_t duration); + void pictureOffsetChanged(dive *d, const QString filename, offset_t offset); private: DivePictureModel(); QVector<PictureEntry> pictures; |