aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index a63c83d68..e4cf384cf 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -702,7 +702,7 @@ void ProfileWidget2::setProfileState()
disconnectTemporaryConnections();
connect(DivePictureModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(plotPictures()));
- connect(DivePictureModel::instance(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),this, SLOT(plotPictureS()));
+ connect(DivePictureModel::instance(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),this, SLOT(plotPictures()));
connect(DivePictureModel::instance(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),this, SLOT(plotPictures()));
/* show the same stuff that the profile shows. */
@@ -1050,7 +1050,7 @@ void ProfileWidget2::disconnectTemporaryConnections()
this, SLOT(pointsRemoved(const QModelIndex &, int, int)));
disconnect(DivePictureModel::instance(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(plotPictures()));
- disconnect(DivePictureModel::instance(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),this, SLOT(plotPictureS()));
+ disconnect(DivePictureModel::instance(), SIGNAL(rowsInserted(const QModelIndex &, int, int)),this, SLOT(plotPictures()));
disconnect(DivePictureModel::instance(), SIGNAL(rowsRemoved(const QModelIndex &, int, int)),this, SLOT(plotPictures()));
Q_FOREACH (QAction *action, actionsForKeys.values()) {
@@ -1288,3 +1288,19 @@ void ProfileWidget2::keyEscAction()
if (plannerModel->isPlanner())
plannerModel->cancelPlan();
}
+
+void ProfileWidget2::plotPictures()
+{
+ qDeleteAll(pictures);
+ pictures.clear();
+
+ DivePictureModel *m = DivePictureModel::instance();
+ for(int i = 0; i < m->rowCount(); i++){
+ DivePixmapItem *item = new DivePixmapItem();
+ item->setPixmap(m->index(i,0).data(Qt::DecorationRole).value<QPixmap>());
+ item->setPos(10,10); // TODO: put the item in the correct place.
+ item->setFlag(QGraphicsItem::ItemIgnoresTransformations);
+ scene()->addItem(item);
+ pictures.push_back(item);
+ }
+}