summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2014-06-02 19:50:42 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 00:05:24 -0700
commit3595ad029408cae855dcf3d7fdbb03c1a02a6714 (patch)
tree003ac4c63c74a500528c487b06794a41873310f5 /qt-ui/maintab.cpp
parent2cded299ace9dd5d312956dd3c65509971ded9b6 (diff)
downloadsubsurface-3595ad029408cae855dcf3d7fdbb03c1a02a6714.tar.gz
Make the new picture widget display the pictures.
Small changes in the model to display the pictures of the dives. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index e08ba8426..7c28a4972 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -16,6 +16,7 @@
#include "divelist.h"
#include "qthelper.h"
#include "display.h"
+#include "divepicturewidget.h"
#include <QLabel>
#include <QCompleter>
@@ -29,7 +30,8 @@
MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
weightModel(new WeightModel(this)),
cylindersModel(CylindersModel::instance()),
- editMode(NONE)
+ editMode(NONE),
+ divePictureModel(new DivePictureModel(this))
{
ui.setupUi(this);
@@ -37,6 +39,7 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.cylinders->setModel(cylindersModel);
ui.weights->setModel(weightModel);
+ ui.photosView->setModel(divePictureModel);
closeMessage();
QAction *action = new QAction(tr("Save"), this);
@@ -371,6 +374,7 @@ void MainTab::updateDiveInfo(int dive)
process_selected_dives();
process_all_dives(d, &prevd);
+ divePictureModel->updateDivePictures(dive);
UPDATE_TEXT(d, notes);
UPDATE_TEXT(d, location);
UPDATE_TEXT(d, suit);