MythTV  master
Classes | Macros | Functions | Variables
subtitlescreen.cpp File Reference
#include <QFontMetrics>
#include "mythlogging.h"
#include "mythfontproperties.h"
#include "mythuisimpletext.h"
#include "mythuishape.h"
#include "mythuiimage.h"
#include "mythpainter.h"
#include "subtitlescreen.h"
Include dependency graph for subtitlescreen.cpp:

Go to the source code of this file.

Classes

class  SubWrapper
 
class  SubSimpleText
 
class  SubShape
 
class  SubImage
 
class  SubtitleFormat
 

Macros

#define LOC   QString("Subtitles: ")
 
#define LOC_WARN   QString("Subtitles Warning: ")
 

Functions

static const QString kSubProvider ("provider")
 
static const QString kSubFileName ("osd_subtitle.xml")
 
static const QString kSubWindowName ("osd_subtitle")
 
static const QString kSubFamily608 ("608")
 
static const QString kSubFamily708 ("708")
 
static const QString kSubFamilyText ("text")
 
static const QString kSubFamilyAV ("AV")
 
static const QString kSubFamilyTeletext ("teletext")
 
static const QString kSubAttrItalics ("italics")
 
static const QString kSubAttrBold ("bold")
 
static const QString kSubAttrUnderline ("underline")
 
static const QString kSubAttrPixelsize ("pixelsize")
 
static const QString kSubAttrColor ("color")
 
static const QString kSubAttrBGfill ("bgfill")
 
static const QString kSubAttrShadow ("shadow")
 
static const QString kSubAttrShadowoffset ("shadowoffset")
 
static const QString kSubAttrShadowcolor ("shadowcolor")
 
static const QString kSubAttrShadowalpha ("shadowalpha")
 
static const QString kSubAttrOutline ("outline")
 
static const QString kSubAttrOutlinecolor ("outlinecolor")
 
static const QString kSubAttrOutlinesize ("outlinesize")
 
static const QString kSubAttrOutlinealpha ("outlinealpha")
 
static QString srtColorString (const QColor &color)
 
static QString fontToString (MythFontProperties *f)
 
static QColor differentColor (const QColor &color)
 
static QString extract_cc608 (QString &text, int &color, bool &isItalic, bool &isUnderline)
 Extract everything from the text buffer up until the next format control character. More...
 
static QSize CalcShadowOffsetPadding (MythFontProperties *mythfont)
 
static void myth_libass_log (int level, const char *fmt, va_list vl, void *)
 

Variables

static const float LINE_SPACING = (20.0 / 17.0)
 
static const float PAD_WIDTH = 0.5
 
static const float PAD_HEIGHT = 0.04
 

Macro Definition Documentation

◆ LOC

#define LOC   QString("Subtitles: ")

Definition at line 11 of file subtitlescreen.cpp.

◆ LOC_WARN

#define LOC_WARN   QString("Subtitles Warning: ")

Definition at line 12 of file subtitlescreen.cpp.

Function Documentation

◆ kSubProvider()

static const QString kSubProvider ( "provider"  )
static

◆ kSubFileName()

static const QString kSubFileName ( "osd_subtitle.xml"  )
static

Referenced by SubtitleFormat::Load().

◆ kSubWindowName()

static const QString kSubWindowName ( "osd_subtitle"  )
static

Referenced by SubtitleFormat::Load().

◆ kSubFamily608()

static const QString kSubFamily608 ( "608"  )
static

◆ kSubFamily708()

static const QString kSubFamily708 ( "708"  )
static

◆ kSubFamilyText()

static const QString kSubFamilyText ( "text"  )
static

◆ kSubFamilyAV()

static const QString kSubFamilyAV ( "AV"  )
static

◆ kSubFamilyTeletext()

static const QString kSubFamilyTeletext ( "teletext"  )
static

◆ kSubAttrItalics()

static const QString kSubAttrItalics ( "italics"  )
static

◆ kSubAttrBold()

static const QString kSubAttrBold ( "bold"  )
static

◆ kSubAttrUnderline()

static const QString kSubAttrUnderline ( "underline"  )
static

◆ kSubAttrPixelsize()

static const QString kSubAttrPixelsize ( "pixelsize"  )
static

◆ kSubAttrColor()

static const QString kSubAttrColor ( "color"  )
static

◆ kSubAttrBGfill()

static const QString kSubAttrBGfill ( "bgfill"  )
static

◆ kSubAttrShadow()

static const QString kSubAttrShadow ( "shadow"  )
static

Referenced by SubtitleFormat::Diff().

◆ kSubAttrShadowoffset()

static const QString kSubAttrShadowoffset ( "shadowoffset"  )
static

◆ kSubAttrShadowcolor()

static const QString kSubAttrShadowcolor ( "shadowcolor"  )
static

◆ kSubAttrShadowalpha()

static const QString kSubAttrShadowalpha ( "shadowalpha"  )
static

◆ kSubAttrOutline()

static const QString kSubAttrOutline ( "outline"  )
static

Referenced by SubtitleFormat::Diff().

◆ kSubAttrOutlinecolor()

static const QString kSubAttrOutlinecolor ( "outlinecolor"  )
static

◆ kSubAttrOutlinesize()

static const QString kSubAttrOutlinesize ( "outlinesize"  )
static

◆ kSubAttrOutlinealpha()

static const QString kSubAttrOutlinealpha ( "outlinealpha"  )
static

◆ srtColorString()

static QString srtColorString ( const QColor &  color)
static

◆ fontToString()

static QString fontToString ( MythFontProperties f)
static

Definition at line 212 of file subtitlescreen.cpp.

Referenced by SubtitleFormat::GetFont(), and SubtitleFormat::Load().

◆ differentColor()

static QColor differentColor ( const QColor &  color)
static

Definition at line 420 of file subtitlescreen.cpp.

Referenced by SubtitleFormat::Complement().

◆ extract_cc608()

static QString extract_cc608 ( QString &  text,
int &  color,
bool isItalic,
bool isUnderline 
)
static

Extract everything from the text buffer up until the next format control character.

Return that substring, and remove it from the input string. Bogus control characters are left unchanged. If the buffer starts with a valid control character, the output parameters are corresondingly updated (and the control character is stripped).

Definition at line 1112 of file subtitlescreen.cpp.

Referenced by FormattedTextSubtitle608::Init().

◆ CalcShadowOffsetPadding()

static QSize CalcShadowOffsetPadding ( MythFontProperties mythfont)
static

◆ myth_libass_log()

static void myth_libass_log ( int  level,
const char *  fmt,
va_list  vl,
void *   
)
static

Definition at line 2308 of file subtitlescreen.cpp.

Referenced by SubtitleScreen::InitialiseAssLibrary().

Variable Documentation

◆ LINE_SPACING

const float LINE_SPACING = (20.0 / 17.0)
static

◆ PAD_WIDTH

const float PAD_WIDTH = 0.5
static

Definition at line 769 of file subtitlescreen.cpp.

Referenced by SubtitleScreen::CalcPadding().

◆ PAD_HEIGHT

const float PAD_HEIGHT = 0.04
static

Definition at line 770 of file subtitlescreen.cpp.

Referenced by SubtitleScreen::CalcTextSize().