QtlMovie 1.12 (A specialized FFmpeg front-end)
QtlSubStationAlphaStyle Class Reference

Description of a style of Sub Station Alpha (SSA/ASS) subtitles. More...

Public Member Functions

 QtlSubStationAlphaStyle (const QString &definition=QString(), const QStringList &format=QStringList())
 Constructor. More...
 
quint32 color () const
 Get the font color in RGB format. More...
 
QString getInfo (const QString &name, const QString &defaultValue=QString()) const
 Get one field of the style. More...
 
bool isBold () const
 Check if the style is bold. More...
 
bool isItalic () const
 Check if the style is italic. More...
 
bool isUnderline () const
 Check if the style is underline. More...
 
QString name () const
 Get the style name. More...
 

Static Public Member Functions

static quint32 toRgbColor (const QString &value, quint32 defaultColor=0x00FFFFFF)
 Interpret a string as an RGB color specification. More...
 

Private Attributes

quint32 _color
 Primary color. More...
 
QMap< QString, QString > _info
 Map of style info, using normalized type names as keys. More...
 
bool _isBold
 Style is bold. More...
 
bool _isItalic
 Style is italic. More...
 
bool _isUnderline
 Style is underline. More...
 
QString _name
 Style name. More...
 

Detailed Description

Description of a style of Sub Station Alpha (SSA/ASS) subtitles.

Constructor & Destructor Documentation

◆ QtlSubStationAlphaStyle()

QtlSubStationAlphaStyle::QtlSubStationAlphaStyle ( const QString &  definition = QString(),
const QStringList &  format = QStringList() 
)

Constructor.

Parameters
[in]definitionDefinition the style as in a "Style:" line in a SSA/ASS file.
[in]formatList of style fields, as in a "Format:" line, with normalized names.

Member Function Documentation

◆ name()

QString QtlSubStationAlphaStyle::name ( ) const
inline

Get the style name.

Returns
The style name.

◆ isBold()

bool QtlSubStationAlphaStyle::isBold ( ) const
inline

Check if the style is bold.

Returns
True if the style is bold.

◆ isItalic()

bool QtlSubStationAlphaStyle::isItalic ( ) const
inline

Check if the style is italic.

Returns
True if the style is italic.

◆ isUnderline()

bool QtlSubStationAlphaStyle::isUnderline ( ) const
inline

Check if the style is underline.

Returns
True if the style is underline.

◆ color()

quint32 QtlSubStationAlphaStyle::color ( ) const
inline

Get the font color in RGB format.

Returns
The font color in RGB format.

◆ getInfo()

QString QtlSubStationAlphaStyle::getInfo ( const QString &  name,
const QString &  defaultValue = QString() 
) const

Get one field of the style.

Parameters
[in]nameField name, as specified in the "Format:" line.
[in]defaultValueDefault value if the field is not found.
Returns
The field value as a string.

◆ toRgbColor()

quint32 QtlSubStationAlphaStyle::toRgbColor ( const QString &  value,
quint32  defaultColor = 0x00FFFFFF 
)
static

Interpret a string as an RGB color specification.

Parameters
[in]valueA string value, typically a field of the style.
[in]defaultColorThe default color if value is incorrect, white by default.
Returns
The color specification.

Member Data Documentation

◆ _name

QString QtlSubStationAlphaStyle::_name
private

Style name.

◆ _isBold

bool QtlSubStationAlphaStyle::_isBold
private

Style is bold.

◆ _isItalic

bool QtlSubStationAlphaStyle::_isItalic
private

Style is italic.

◆ _isUnderline

bool QtlSubStationAlphaStyle::_isUnderline
private

Style is underline.

◆ _color

quint32 QtlSubStationAlphaStyle::_color
private

Primary color.

◆ _info

QMap<QString,QString> QtlSubStationAlphaStyle::_info
private

Map of style info, using normalized type names as keys.


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