mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
c742885984
commit
b3feaa80e2
9 changed files with 163 additions and 76 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue