QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SubtitleTrack Class Reference

#include <SubtitleTrack.h>

Inheritance diagram for SubtitleTrack:
Collaboration diagram for SubtitleTrack:

Signals

void sourceChanged ()
void positionChanged ()
void eventsChanged ()

Public Member Functions

 SubtitleTrack (QObject *parent=nullptr)
QUrl source () const
 A local file; empty for none.
void setSource (const QUrl &source)
qint64 position () const
 Milliseconds from the start of the recording.
void setPosition (qint64 position)
int playResX () const
int playResY () const
double fontSize () const
QVariantList events () const

Detailed Description

A recording's telemetry subtitle file, read for display over the video: the events shown at the playback position, in the file's own coordinates (playResX × playResY).

Reads the Advanced SubStation Alpha subset SubtitleWriter writes: the Default style's font size, alignment and margins, and Dialogue events with {\anN} and {\pos(x,y)} overrides and \N line breaks. Other override tags are dropped.

Definition at line 16 of file SubtitleTrack.h.

Constructor & Destructor Documentation

◆ SubtitleTrack()

SubtitleTrack::SubtitleTrack ( QObject * parent = nullptr)
explicit

Definition at line 63 of file SubtitleTrack.cc.

Member Function Documentation

◆ events()

QVariantList SubtitleTrack::events ( ) const
inline

The events shown at position(), in the file's order, each as a map: "text" (lines apart by '
'), "x" and "y", the point the text is anchored at, and "alignment", which side of the text the point is on, numbered as a numeric keypad (1 bottom left ... 9 top right).

Definition at line 50 of file SubtitleTrack.h.

◆ eventsChanged

void SubtitleTrack::eventsChanged ( )
signal

◆ fontSize()

double SubtitleTrack::fontSize ( ) const
inline

Definition at line 45 of file SubtitleTrack.h.

◆ playResX()

int SubtitleTrack::playResX ( ) const
inline

Definition at line 41 of file SubtitleTrack.h.

◆ playResY()

int SubtitleTrack::playResY ( ) const
inline

Definition at line 43 of file SubtitleTrack.h.

◆ position()

qint64 SubtitleTrack::position ( ) const
inline

Milliseconds from the start of the recording.

Definition at line 37 of file SubtitleTrack.h.

Referenced by setPosition().

◆ positionChanged

void SubtitleTrack::positionChanged ( )
signal

Referenced by setPosition().

◆ setPosition()

void SubtitleTrack::setPosition ( qint64 position)

Definition at line 88 of file SubtitleTrack.cc.

References position(), and positionChanged().

◆ setSource()

void SubtitleTrack::setSource ( const QUrl & source)

Definition at line 67 of file SubtitleTrack.cc.

References source(), and sourceChanged().

◆ source()

QUrl SubtitleTrack::source ( ) const
inline

A local file; empty for none.

Definition at line 32 of file SubtitleTrack.h.

Referenced by setSource().

◆ sourceChanged

void SubtitleTrack::sourceChanged ( )
signal

Referenced by setSource().


The documentation for this class was generated from the following files: