Dive pictures: Scale thumbnails on demand

To potentially conserve memory, don't keep copies of scaled thumbnails.
Scale the thumbnails on demand.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-04-11 06:56:46 +02:00 committed by Dirk Hohndel
parent 6b4e830670
commit c0bca3ad04
2 changed files with 19 additions and 14 deletions

View file

@ -10,7 +10,6 @@ struct PictureEntry {
struct picture *picture;
QString filename;
QImage image;
QImage imageProfile; // For the profile widget keep a copy of a constant sized image
int offsetSeconds;
};
@ -31,7 +30,10 @@ private:
DivePictureModel();
QList<PictureEntry> pictures;
double zoomLevel; // -1.0: minimum, 0.0: standard, 1.0: maximum
int defaultSize;
int size;
void updateThumbnails();
void updateZoom();
};
#endif