MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
MythFontProperties Class Reference

#include <mythfontproperties.h>

Inheritance diagram for MythFontProperties:
Inheritance graph
[legend]
Collaboration diagram for MythFontProperties:
Collaboration graph
[legend]

Public Member Functions

 MythFontProperties (void)
 
QFont * GetFace (void)
 
void SetFace (const QFont &face)
 
void SetColor (const QColor &color)
 
void SetShadow (bool on, const 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 MythFontPropertiesParseFromXml (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 Public Member Functions inherited from XMLParseBase
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 MythUITypeGetGlobalObjectStore (void)
 
static void ClearGlobalObjectStore (void)
 
static void ParseChildren (const QString &filename, QDomElement &element, MythUIType *parent, bool showWarnings)
 
static MythUITypeParseUIType (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 m_zoom_lock
 
static uint m_zoom_percent = 0
 

Friends

class FontMap
 

Detailed Description

Definition at line 13 of file mythfontproperties.h.

Constructor & Destructor Documentation

◆ MythFontProperties()

MythFontProperties::MythFontProperties ( void  )

Definition at line 26 of file mythfontproperties.cpp.

Referenced by ParseFromXml().

Member Function Documentation

◆ GetFace()

QFont* MythFontProperties::GetFace ( void  )
inline

◆ SetFace()

void MythFontProperties::SetFace ( const QFont &  face)

◆ SetColor()

void MythFontProperties::SetColor ( const QColor &  color)

◆ SetShadow()

void MythFontProperties::SetShadow ( bool  on,
const QPoint &  offset,
const QColor &  color,
int  alpha 
)

◆ SetOutline()

void MythFontProperties::SetOutline ( bool  on,
const QColor &  color,
int  size,
int  alpha 
)

◆ face()

QFont MythFontProperties::face ( void  ) const

◆ color()

QColor MythFontProperties::color ( void  ) const
inline

◆ GetBrush()

QBrush MythFontProperties::GetBrush ( void  ) const
inline

◆ hasShadow()

bool MythFontProperties::hasShadow ( void  ) const
inline

◆ GetShadow()

void MythFontProperties::GetShadow ( QPoint &  offset,
QColor &  color,
int &  alpha 
) const

◆ hasOutline()

bool MythFontProperties::hasOutline ( void  ) const
inline

◆ GetOutline()

void MythFontProperties::GetOutline ( QColor &  color,
int &  size,
int &  alpha 
) const

◆ GetHash()

QString MythFontProperties::GetHash ( void  ) const
inline

◆ ParseFromXml()

MythFontProperties * MythFontProperties::ParseFromXml ( const QString &  filename,
const QDomElement &  element,
MythUIType parent = nullptr,
bool  addToGlobal = false,
bool  showWarnings = true 
)
static

◆ SetRelativeSize()

void MythFontProperties::SetRelativeSize ( float  rSize)
inline

Definition at line 42 of file mythfontproperties.h.

◆ GetRelativeSize()

float MythFontProperties::GetRelativeSize ( void  ) const
inline

Definition at line 43 of file mythfontproperties.h.

◆ SetPixelSize()

void MythFontProperties::SetPixelSize ( float  size)

Definition at line 145 of file mythfontproperties.cpp.

Referenced by ParseFromXml(), and SetPointSize().

◆ SetPointSize()

void MythFontProperties::SetPointSize ( uint  points)

Definition at line 152 of file mythfontproperties.cpp.

Referenced by MythUIType::Draw(), and ParseFromXml().

◆ Rescale() [1/2]

void MythFontProperties::Rescale ( void  )

◆ Rescale() [2/2]

void MythFontProperties::Rescale ( int  height)

Definition at line 124 of file mythfontproperties.cpp.

◆ AdjustStretch()

void MythFontProperties::AdjustStretch ( int  stretch)

◆ Zoom()

void MythFontProperties::Zoom ( void  )
static

Definition at line 109 of file mythfontproperties.cpp.

Referenced by MythFontProperties().

◆ SetZoom()

void MythFontProperties::SetZoom ( uint  zoom_percent)
static

Definition at line 116 of file mythfontproperties.cpp.

◆ Freeze()

void MythFontProperties::Freeze ( void  )
private

Definition at line 158 of file mythfontproperties.cpp.

Referenced by ParseFromXml().

◆ Unfreeze()

void MythFontProperties::Unfreeze ( void  )
private

Definition at line 163 of file mythfontproperties.cpp.

Referenced by ParseFromXml().

◆ CalcHash()

void MythFontProperties::CalcHash ( void  )
private

Friends And Related Function Documentation

◆ FontMap

friend class FontMap
friend

Definition at line 83 of file mythfontproperties.h.

Member Data Documentation

◆ m_face

QFont MythFontProperties::m_face
private

◆ m_brush

QBrush MythFontProperties::m_brush {Qt::white}
private

Definition at line 60 of file mythfontproperties.h.

Referenced by FontMap::AddFont(), CalcHash(), ParseFromXml(), and SetColor().

◆ m_hasShadow

bool MythFontProperties::m_hasShadow {false}
private

Definition at line 62 of file mythfontproperties.h.

Referenced by FontMap::AddFont(), CalcHash(), ParseFromXml(), and SetShadow().

◆ m_shadowOffset

QPoint MythFontProperties::m_shadowOffset
private

Definition at line 63 of file mythfontproperties.h.

Referenced by FontMap::AddFont(), CalcHash(), GetShadow(), ParseFromXml(), and SetShadow().

◆ m_shadowColor

QColor MythFontProperties::m_shadowColor
private

Definition at line 64 of file mythfontproperties.h.

Referenced by FontMap::AddFont(), CalcHash(), GetShadow(), ParseFromXml(), and SetShadow().

◆ m_shadowAlpha

int MythFontProperties::m_shadowAlpha {255}
private

Definition at line 65 of file mythfontproperties.h.

Referenced by CalcHash(), GetShadow(), ParseFromXml(), and SetShadow().

◆ m_hasOutline

bool MythFontProperties::m_hasOutline {false}
private

Definition at line 67 of file mythfontproperties.h.

Referenced by CalcHash(), ParseFromXml(), and SetOutline().

◆ m_outlineColor

QColor MythFontProperties::m_outlineColor
private

Definition at line 68 of file mythfontproperties.h.

Referenced by CalcHash(), GetOutline(), ParseFromXml(), and SetOutline().

◆ m_outlineSize

int MythFontProperties::m_outlineSize {0}
private

Definition at line 69 of file mythfontproperties.h.

Referenced by CalcHash(), GetOutline(), ParseFromXml(), and SetOutline().

◆ m_outlineAlpha

int MythFontProperties::m_outlineAlpha {255}
private

Definition at line 70 of file mythfontproperties.h.

Referenced by CalcHash(), GetOutline(), ParseFromXml(), and SetOutline().

◆ m_relativeSize

float MythFontProperties::m_relativeSize {0.5f}
private

Definition at line 72 of file mythfontproperties.h.

Referenced by Rescale(), and SetPixelSize().

◆ m_hash

QString MythFontProperties::m_hash
private

Definition at line 74 of file mythfontproperties.h.

Referenced by CalcHash().

◆ m_bFreeze

bool MythFontProperties::m_bFreeze {false}
private

Definition at line 76 of file mythfontproperties.h.

Referenced by CalcHash(), Freeze(), and Unfreeze().

◆ m_stretch

int MythFontProperties::m_stretch {100}
private

Definition at line 78 of file mythfontproperties.h.

Referenced by AdjustStretch(), and ParseFromXml().

◆ m_zoom_lock

QMutex MythFontProperties::m_zoom_lock
staticprivate

Definition at line 80 of file mythfontproperties.h.

Referenced by SetZoom(), and Zoom().

◆ m_zoom_percent

uint MythFontProperties::m_zoom_percent = 0
staticprivate

Definition at line 81 of file mythfontproperties.h.

Referenced by CalcHash(), face(), SetZoom(), and Zoom().


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