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>
This commit is contained in:
Tomaz Canabrava 2014-06-02 19:50:42 -03:00 committed by Dirk Hohndel
parent 2cded299ac
commit 3595ad0294
7 changed files with 19 additions and 19 deletions

View file

@ -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);