subtitles: implemented very basic renderer
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "node/color/colormanager/colormanager.h"
|
||||
#include "node/node.h"
|
||||
#include "node/output/track/tracklist.h"
|
||||
#include "render/color.h"
|
||||
#include "tool/tool.h"
|
||||
#include "viewerplaybacktimer.h"
|
||||
@@ -72,6 +73,7 @@ public:
|
||||
void SetGizmos(Node* node);
|
||||
void SetVideoParams(const VideoParams ¶ms);
|
||||
void SetTime(const rational& time);
|
||||
void SetSubtitleTracks(Sequence *list);
|
||||
|
||||
void SetShowWidgetBackground(bool e)
|
||||
{
|
||||
@@ -97,6 +99,9 @@ public:
|
||||
return show_fps_;
|
||||
}
|
||||
|
||||
bool GetShowSubtitles() const { return show_subtitles_; }
|
||||
void SetShowSubtitles(bool e) { show_subtitles_ = e; update(); }
|
||||
|
||||
void IncrementSkippedFrames();
|
||||
|
||||
void IncrementFrameCount()
|
||||
@@ -239,7 +244,7 @@ private:
|
||||
QPointF GetTexturePosition(const QSize& size);
|
||||
QPointF GetTexturePosition(const double& x, const double& y);
|
||||
|
||||
static void DrawTextWithCrudeShadow(QPainter* painter, const QRect& rect, const QString& text);
|
||||
static void DrawTextWithCrudeShadow(QPainter* painter, const QRect& rect, const QString& text, const QTextOption &opt = QTextOption());
|
||||
|
||||
rational GetGizmoTime();
|
||||
|
||||
@@ -312,6 +317,9 @@ private:
|
||||
NodeGizmo *current_gizmo_;
|
||||
bool gizmo_drag_started_;
|
||||
|
||||
bool show_subtitles_;
|
||||
Sequence *subtitle_tracks_;
|
||||
|
||||
rational time_;
|
||||
|
||||
/**
|
||||
@@ -365,6 +373,8 @@ private slots:
|
||||
|
||||
void TextEditChanged();
|
||||
|
||||
void SubtitlesChanged(const TimeRange &r);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user