aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divepicturewidget.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-06-03 19:04:50 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 16:40:01 -0700
commiteb24d90c8e0aae60c0f0af4a9c7894007be47269 (patch)
tree9fe95c0c1d8397136be531adac73d211cd29dac5 /qt-ui/divepicturewidget.h
parentf53b5c4d3f5bcf396d9abaa72f0be31a3d5512dc (diff)
downloadsubsurface-eb24d90c8e0aae60c0f0af4a9c7894007be47269.tar.gz
Add a static 'instance()' member for the Photos model.
This will make referencing it from a few places more easy. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divepicturewidget.h')
-rw-r--r--qt-ui/divepicturewidget.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/divepicturewidget.h b/qt-ui/divepicturewidget.h
index 4660bd070..351ae445c 100644
--- a/qt-ui/divepicturewidget.h
+++ b/qt-ui/divepicturewidget.h
@@ -9,12 +9,13 @@
class DivePictureModel : public QAbstractTableModel {
Q_OBJECT
public:
- DivePictureModel(QObject *parent);
+ static DivePictureModel *instance();
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
void updateDivePictures(int divenr);
private:
+ DivePictureModel();
int numberOfPictures;
// Currently, load the images on the fly
// Later, use a thread to load the images