mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Also hold a pointer to the struct picture on the model.
Changes to hold a pointer to the struct picture on the model, so we can use it to determine the correct positioning of the image on the profile. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
43cf9fdb7a
commit
b1847f9ebb
2 changed files with 23 additions and 8 deletions
|
@ -6,6 +6,12 @@
|
|||
#include <QListView>
|
||||
#include <QThread>
|
||||
|
||||
struct picture;
|
||||
struct PhotoHelper{
|
||||
QImage image;
|
||||
struct picture *picture;
|
||||
};
|
||||
|
||||
class DivePictureModel : public QAbstractTableModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
@ -20,7 +26,7 @@ private:
|
|||
// Currently, load the images on the fly
|
||||
// Later, use a thread to load the images
|
||||
// Later, save the thumbnails so we don't need to reopen every time.
|
||||
QHash<QString, QImage> stringPixmapCache;
|
||||
QHash<QString, PhotoHelper> stringPixmapCache;
|
||||
};
|
||||
|
||||
class DivePictureDelegate : QStyledItemDelegate {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue