mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
52105e5217
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>
40 lines
796 B
C++
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
|