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>
This commit is contained in:
Berthold Stoeger 2018-06-30 11:36:37 +02:00 committed by Dirk Hohndel
parent b28dba6087
commit 3d7865cf26
6 changed files with 94 additions and 81 deletions

View file

@ -31,9 +31,9 @@ public:
static Thumbnailer *instance();
// Schedule a thumbnail for fetching or calculation.
// Returns a placehlder thumbnail. The actual thumbnail will be sent
// Returns a placeholder thumbnail. The actual thumbnail will be sent
// via a signal later.
QImage fetchThumbnail(PictureEntry &entry);
QImage fetchThumbnail(const QString &filename);
// Schedule multiple thumbnails for forced recalculation
void calculateThumbnails(const QVector<QString> &filenames);