aboutsummaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-07-15 17:56:18 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-23 15:58:55 -0700
commitb3feaa80e26510928c73e92049ec346841f6093a (patch)
tree1a1f002959ea09aa5a16a5cc04ace06326941377 /qt-models
parentc7428859840bfcf973a14f27c6376e39e915cb29 (diff)
downloadsubsurface-b3feaa80e26510928c73e92049ec346841f6093a.tar.gz
Dive video: paint duration-bar above thumbnail in profile plot
Paint a rectangle on top of thumbnails indicating the run-time of the video. Use the z=100.0-101.0 range for painting the thumbnails, whereby the z-value increases uniformly from first to last thumbnail (sorted by timestamp). The duration-bars are placed at z-values midway between those of the thumbnails. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divepicturemodel.cpp2
-rw-r--r--qt-models/divepicturemodel.h4
2 files changed, 4 insertions, 2 deletions
diff --git a/qt-models/divepicturemodel.cpp b/qt-models/divepicturemodel.cpp
index c881ce5bf..f0b5eff47 100644
--- a/qt-models/divepicturemodel.cpp
+++ b/qt-models/divepicturemodel.cpp
@@ -165,7 +165,7 @@ int DivePictureModel::findPictureId(const QString &filename)
return -1;
}
-void DivePictureModel::updateThumbnail(QString filename, QImage thumbnail)
+void DivePictureModel::updateThumbnail(QString filename, QImage thumbnail, duration_t)
{
int i = findPictureId(filename);
if (i >= 0) {
diff --git a/qt-models/divepicturemodel.h b/qt-models/divepicturemodel.h
index 6dc633fb2..3bd872d6a 100644
--- a/qt-models/divepicturemodel.h
+++ b/qt-models/divepicturemodel.h
@@ -2,6 +2,8 @@
#ifndef DIVEPICTUREMODEL_H
#define DIVEPICTUREMODEL_H
+#include "core/units.h"
+
#include <QAbstractTableModel>
#include <QImage>
#include <QFuture>
@@ -28,7 +30,7 @@ signals:
void picturesRemoved(const QVector<QString> &fileUrls);
public slots:
void setZoomLevel(int level);
- void updateThumbnail(QString filename, QImage thumbnail);
+ void updateThumbnail(QString filename, QImage thumbnail, duration_t duration);
private:
DivePictureModel();
QVector<PictureEntry> pictures;