MythTV master
|
#include <libmythui/mythfontproperties.h>
Public Member Functions | |
MythFontProperties (void) | |
QFont * | GetFace (void) |
void | SetFace (const QFont &face) |
void | SetColor (const QColor &color) |
void | SetShadow (bool on, QPoint offset, const QColor &color, int alpha) |
void | SetOutline (bool on, const QColor &color, int size, int alpha) |
QFont | face (void) const |
QColor | color (void) const |
QBrush | GetBrush (void) const |
bool | hasShadow (void) const |
void | GetShadow (QPoint &offset, QColor &color, int &alpha) const |
bool | hasOutline (void) const |
void | GetOutline (QColor &color, int &size, int &alpha) const |
QString | GetHash (void) const |
void | SetRelativeSize (float rSize) |
float | GetRelativeSize (void) const |
void | SetPixelSize (float size) |
void | SetPointSize (uint points) |
void | Rescale (void) |
void | Rescale (int height) |
void | AdjustStretch (int stretch) |
Static Public Member Functions | |
static MythFontProperties * | ParseFromXml (const QString &filename, const QDomElement &element, MythUIType *parent=nullptr, bool addToGlobal=false, bool showWarnings=true) |
static void | Zoom (void) |
static void | SetZoom (uint zoom_percent) |
![]() | |
static QString | getFirstText (QDomElement &element) |
static bool | parseBool (const QString &text) |
static bool | parseBool (QDomElement &element) |
static MythPoint | parsePoint (const QString &text, bool normalize=true) |
static MythPoint | parsePoint (QDomElement &element, bool normalize=true) |
static QSize | parseSize (const QString &text, bool normalize=true) |
static QSize | parseSize (QDomElement &element, bool normalize=true) |
static MythRect | parseRect (const QString &text, bool normalize=true) |
static MythRect | parseRect (QDomElement &element, bool normalize=true) |
static int | parseAlignment (const QString &text) |
static int | parseAlignment (QDomElement &element) |
static QBrush | parseGradient (const QDomElement &element) |
static QString | parseText (QDomElement &element) |
static MythUIType * | GetGlobalObjectStore (void) |
static void | ClearGlobalObjectStore (void) |
static void | ParseChildren (const QString &filename, QDomElement &element, MythUIType *parent, bool showWarnings) |
static MythUIType * | ParseUIType (const QString &filename, QDomElement &element, const QString &type, MythUIType *parent, MythScreenType *screen, bool showWarnings, QMap< QString, QString > &parentDependsMap) |
static bool | WindowExists (const QString &xmlfile, const QString &windowname) |
static bool | LoadWindowFromXML (const QString &xmlfile, const QString &windowname, MythUIType *parent) |
static bool | LoadBaseTheme (void) |
static bool | LoadBaseTheme (const QString &baseTheme) |
static bool | CopyWindowFromBase (const QString &windowname, MythScreenType *win) |
Private Member Functions | |
void | Freeze (void) |
void | Unfreeze (void) |
void | CalcHash (void) |
Private Attributes | |
QFont | m_face |
QBrush | m_brush {Qt::white} |
bool | m_hasShadow {false} |
QPoint | m_shadowOffset |
QColor | m_shadowColor |
int | m_shadowAlpha {255} |
bool | m_hasOutline {false} |
QColor | m_outlineColor |
int | m_outlineSize {0} |
int | m_outlineAlpha {255} |
float | m_relativeSize {0.5F} |
QString | m_hash |
bool | m_bFreeze {false} |
int | m_stretch {100} |
Static Private Attributes | |
static QMutex | s_zoomLock |
static uint | s_zoomPercent = 0 |
Friends | |
class | FontMap |
Definition at line 13 of file mythfontproperties.h.
MythFontProperties::MythFontProperties | ( | void | ) |
Definition at line 28 of file mythfontproperties.cpp.
Referenced by ParseFromXml().
void MythFontProperties::AdjustStretch | ( | int | stretch | ) |
Definition at line 139 of file mythfontproperties.cpp.
Referenced by MythUIGuideGrid::ParseElement(), and MythUIText::ParseElement().
|
private |
Definition at line 89 of file mythfontproperties.cpp.
Referenced by MythFontProperties(), SetColor(), SetFace(), SetOutline(), SetShadow(), and Unfreeze().
|
inline |
Definition at line 26 of file mythfontproperties.h.
Referenced by SubtitleFormat::Complement(), SubtitleFormat::Diff(), TeletextScreen::DrawCharacter(), mythburn.FontDef::drawText(), MythPainter::DrawTextPriv(), fontToString(), MythPainter::GetImageFromString(), GetOutline(), GetShadow(), MythUIText::Pulse(), SetColor(), SetOutline(), and SetShadow().
QFont MythFontProperties::face | ( | void | ) | const |
Definition at line 40 of file mythfontproperties.cpp.
Referenced by TeletextScreen::DrawCharacter(), MythPainter::DrawTextPriv(), face(), MythUIText::FormatTemplate(), MythPainter::GetImageFromTextLayout(), SubtitleScreen::GetTeletextFontName(), TeletextScreen::InitialiseFont(), MythUIText::LayoutParagraphs(), ParseFromXml(), SetFace(), and MythUITextEdit::SetInitialStates().
|
private |
Definition at line 162 of file mythfontproperties.cpp.
|
inline |
Definition at line 27 of file mythfontproperties.h.
Referenced by MythPainter::DrawTextPriv(), MythUIText::FormatTemplate(), and MythPainter::GetImageFromTextLayout().
|
inline |
Definition at line 18 of file mythfontproperties.h.
Referenced by SubtitleScreen::CalcPadding(), SubtitleScreen::CalcTextSize(), SubtitleFormat::Complement(), SubtitleFormat::Diff(), TeletextScreen::DrawCharacter(), fontToString(), SubtitleFormat::GetFont(), FormattedTextSubtitle608::Init(), SubtitleFormat::Load(), FormattedTextChunk::PreRender(), and TeletextScreen::Pulse().
|
inline |
Definition at line 35 of file mythfontproperties.h.
Referenced by MythPainter::GetImageFromString(), MythPainter::GetImageFromTextLayout(), MythUIText::SetFontProperties(), and MythUIText::SetFontState().
void MythFontProperties::GetOutline | ( | QColor & | color, |
int & | size, | ||
int & | alpha | ||
) | const |
Definition at line 82 of file mythfontproperties.cpp.
Referenced by CalcShadowOffsetPadding(), SubtitleFormat::Complement(), SubtitleFormat::Diff(), MythUIText::DrawSelf(), MythPainter::DrawTextPriv(), fontToString(), MythUIText::FormatTemplate(), SubtitleFormat::GetFont(), and SubtitleFormat::Load().
|
inline |
Definition at line 43 of file mythfontproperties.h.
void MythFontProperties::GetShadow | ( | QPoint & | offset, |
QColor & | color, | ||
int & | alpha | ||
) | const |
Definition at line 75 of file mythfontproperties.cpp.
Referenced by CalcShadowOffsetPadding(), SubtitleFormat::Complement(), SubtitleFormat::Diff(), MythUIText::DrawSelf(), MythPainter::DrawTextPriv(), fontToString(), SubtitleFormat::GetFont(), MythPainter::GetImageFromTextLayout(), and SubtitleFormat::Load().
|
inline |
Definition at line 32 of file mythfontproperties.h.
Referenced by CalcShadowOffsetPadding(), SubtitleFormat::Complement(), SubtitleFormat::Diff(), MythPainter::DrawTextPriv(), fontToString(), and SubtitleFormat::GetFont().
|
inline |
Definition at line 29 of file mythfontproperties.h.
Referenced by CalcShadowOffsetPadding(), SubtitleFormat::Complement(), SubtitleFormat::Diff(), MythPainter::DrawTextPriv(), fontToString(), SubtitleFormat::GetFont(), and MythPainter::GetImageFromTextLayout().
|
static |
Definition at line 173 of file mythfontproperties.cpp.
Referenced by XMLParseBase::doLoad(), XMLParseBase::ParseChildren(), and XMLParseBase::ParseUIType().
void MythFontProperties::Rescale | ( | int | height | ) |
Definition at line 128 of file mythfontproperties.cpp.
void MythFontProperties::Rescale | ( | void | ) |
Definition at line 133 of file mythfontproperties.cpp.
Referenced by MythUIGuideGrid::ParseElement(), MythUIText::ParseElement(), and Rescale().
void MythFontProperties::SetColor | ( | const QColor & | color | ) |
Definition at line 49 of file mythfontproperties.cpp.
Referenced by SubtitleFormat::Complement(), MythUIType::Draw(), SubtitleFormat::GetFont(), MythUIText::Pulse(), TeletextScreen::SetForegroundColor(), and MythUIText::StopCycling().
void MythFontProperties::SetFace | ( | const QFont & | face | ) |
Definition at line 34 of file mythfontproperties.cpp.
Referenced by MythUIType::Draw().
void MythFontProperties::SetOutline | ( | bool | on, |
const QColor & | color, | ||
int | size, | ||
int | alpha | ||
) |
Definition at line 65 of file mythfontproperties.cpp.
Referenced by SubtitleFormat::Complement(), and SubtitleFormat::GetFont().
void MythFontProperties::SetPixelSize | ( | float | size | ) |
Definition at line 149 of file mythfontproperties.cpp.
Referenced by SetPointSize().
void MythFontProperties::SetPointSize | ( | uint | points | ) |
Definition at line 156 of file mythfontproperties.cpp.
Referenced by MythUIType::Draw().
|
inline |
Definition at line 42 of file mythfontproperties.h.
void MythFontProperties::SetShadow | ( | bool | on, |
QPoint | offset, | ||
const QColor & | color, | ||
int | alpha | ||
) |
Definition at line 55 of file mythfontproperties.cpp.
Referenced by SubtitleFormat::Complement(), and SubtitleFormat::GetFont().
|
static |
Definition at line 120 of file mythfontproperties.cpp.
|
private |
Definition at line 167 of file mythfontproperties.cpp.
|
static |
Definition at line 113 of file mythfontproperties.cpp.
Referenced by MythFontProperties().
|
friend |
Definition at line 83 of file mythfontproperties.h.
Definition at line 76 of file mythfontproperties.h.
Referenced by CalcHash(), Freeze(), and Unfreeze().
|
private |
Definition at line 60 of file mythfontproperties.h.
Referenced by FontMap::AddFont(), CalcHash(), and SetColor().
|
private |
Definition at line 59 of file mythfontproperties.h.
Referenced by FontMap::AddFont(), AdjustStretch(), CalcHash(), face(), Rescale(), SetFace(), and SetPixelSize().
|
private |
Definition at line 74 of file mythfontproperties.h.
Referenced by CalcHash().
Definition at line 67 of file mythfontproperties.h.
Referenced by CalcHash(), and SetOutline().
Definition at line 62 of file mythfontproperties.h.
Referenced by FontMap::AddFont(), CalcHash(), and SetShadow().
|
private |
Definition at line 70 of file mythfontproperties.h.
Referenced by CalcHash(), GetOutline(), and SetOutline().
|
private |
Definition at line 68 of file mythfontproperties.h.
Referenced by CalcHash(), GetOutline(), and SetOutline().
|
private |
Definition at line 69 of file mythfontproperties.h.
Referenced by CalcHash(), GetOutline(), and SetOutline().
|
private |
Definition at line 72 of file mythfontproperties.h.
Referenced by Rescale(), and SetPixelSize().
|
private |
Definition at line 65 of file mythfontproperties.h.
Referenced by CalcHash(), GetShadow(), and SetShadow().
|
private |
Definition at line 64 of file mythfontproperties.h.
Referenced by FontMap::AddFont(), CalcHash(), GetShadow(), and SetShadow().
|
private |
Definition at line 63 of file mythfontproperties.h.
Referenced by FontMap::AddFont(), CalcHash(), GetShadow(), and SetShadow().
|
private |
Definition at line 78 of file mythfontproperties.h.
Referenced by AdjustStretch().
|
staticprivate |
Definition at line 80 of file mythfontproperties.h.
|
staticprivate |
Definition at line 81 of file mythfontproperties.h.
Referenced by CalcHash(), face(), SetZoom(), and Zoom().