Dive pictures: give user option to recalculate thumbnails

Even though hashes of image contents are calculated, the hashes are
not compared to actual file contents in routine-operation. Therefore
give the user the option to recalculate thumbnails, should they have
edited the picture.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-05-27 14:03:29 +02:00 committed by Lubomir I. Ivanov
parent f265504dab
commit 23d38a982d
4 changed files with 52 additions and 7 deletions

View file

@ -34,6 +34,9 @@ public:
// via a signal later.
QImage fetchThumbnail(PictureEntry &entry);
// Schedule multiple thumbnails for forced recalculation
void calculateThumbnails(const QVector<QString> &filenames);
// If we change dive, clear all unfinished thumbnail creations
void clearWorkQueue();
static int maxThumbnailSize();
@ -46,6 +49,7 @@ signals:
void thumbnailChanged(QString filename, QImage thumbnail);
private:
Thumbnailer();
void recalculate(QString filename);
void processItem(QString filename, bool tryDownload);
mutable QMutex lock;