summaryrefslogtreecommitdiffstats
path: root/qt-models/divepicturemodel.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-06-30 11:36:37 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-08 11:00:44 -0700
commit3d7865cf269d8b2f9e06084586ee76e8a44faff1 (patch)
tree0473244d27775664edf717cd45cf2f62613c77b6 /qt-models/divepicturemodel.h
parentb28dba6087f0433af8ece176b64fcac54ca370a4 (diff)
downloadsubsurface-3d7865cf269d8b2f9e06084586ee76e8a44faff1.tar.gz
Dive pictures: detach ProfileWidget2 from DivePictureModel
As long as ProfileWidget2 and DivePictureModel showed the same set of pictures and any change would lead to a full recalculation of the set, it made sense to let ProfileWidget2 use DivePictureModel's data. Recently, keeping the two lists in sync become more and more of a burden. Therefore, disconnect ProfileWidget2 and DivePictureModel. This will lead to some code-duplication and perhaps a temporary drop in UI-performance, but in the end the code is distinctly simpler and also more flexible. Thus, for example the DivePhotoTab could be changed to support headings without having to touch ProfileWidget2 at all. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models/divepicturemodel.h')
-rw-r--r--qt-models/divepicturemodel.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/divepicturemodel.h b/qt-models/divepicturemodel.h
index dd2f9cbd0..427ab0158 100644
--- a/qt-models/divepicturemodel.h
+++ b/qt-models/divepicturemodel.h
@@ -22,8 +22,9 @@ public:
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
virtual void updateDivePictures();
void removePictures(const QVector<QString> &fileUrls);
- int rowDDStart, rowDDEnd;
void updateDivePictureOffset(const QString &filename, int offsetSeconds);
+signals:
+ void picturesRemoved(const QVector<QString> &fileUrls);
public slots:
void setZoomLevel(int level);
void updateThumbnail(QString filename, QImage thumbnail);
@@ -33,7 +34,6 @@ private:
int findPictureId(const QString &filename); // Return -1 if not found
double zoomLevel; // -1.0: minimum, 0.0: standard, 1.0: maximum
int size;
- int defaultSize;
void updateThumbnails();
void updateZoom();
};