subsurface/desktop-widgets/tab-widgets/TabDivePhotos.h
Robert C. Helling 52105e5217 Write dive data as video subtitles
This commit adds an entry to the dive media context
menu which offers to write a subtitle file. This
creates an .ass file for the selected videos.

In an attempt to to clutter the screen too much, don't
show irrelevant entries (zero temperature or
NDL and show TTS only for dives with stops).

VLC is able to show these subtitles directly, they
can be integrated into the video file with ffmpeg.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2019-04-16 20:38:19 +02:00

40 lines
796 B
C++

// SPDX-License-Identifier: GPL-2.0
#ifndef TAB_DIVE_PHOTOS_H
#define TAB_DIVE_PHOTOS_H
#include "TabBase.h"
namespace Ui {
class TabDivePhotos;
};
class DivePictureModel;
class TabDivePhotos : public TabBase {
Q_OBJECT
public:
TabDivePhotos(QWidget *parent = 0);
~TabDivePhotos();
void updateData() override;
void clear() override;
protected:
void contextMenuEvent(QContextMenuEvent *ev) override;
private slots:
void addPhotosFromFile();
void addPhotosFromURL();
void removeAllPhotos();
void removeSelectedPhotos();
void recalculateSelectedThumbnails();
void openFolderOfSelectedFiles();
void changeZoomLevel(int delta);
void saveSubtitles();
private:
Ui::TabDivePhotos *ui;
DivePictureModel *divePictureModel;
QVector<QString> getSelectedFilenames() const;
};
#endif