MythThemedMenuState Class Reference

Inheritance diagram for MythThemedMenuState:

XMLParseBase

List of all members.


Detailed Description

Definition at line 96 of file myththemedmenu.cpp.


Public Member Functions

 MythThemedMenuState ()
 ~MythThemedMenuState ()
bool parseSettings (const QString &dir, const QString &menuname)
 Parse the menu from the given dir for background, button, logo, arrow, and font settings.
void parseBackground (const QString &dir, QDomElement &element)
 Parse through the element's tags and set the button's area, spread, center, rows, columns and visible lower limit.
void parseLogo (const QString &dir, QDomElement &element)
 Parse through the element's tags and set the logo's image and position.
void parseArrow (const QString &dir, QDomElement &element, bool up)
 Parse through the element's tags to set the arrows image and position.
void parseTitle (const QString &dir, QDomElement &element)
 Parse through the element's tags and set the title's image (and subsequent mode) and position.
void parseButtonDefinition (const QString &dir, QDomElement &element)
void parseButton (const QString &dir, QDomElement &element)
 Parse through the element's tags and set the button's definition as normal, active, text, or activetext.
void parseText (TextAttributes &attributes, QDomElement &element)
 Parse through the element's tags and set the text's area, fontsize, fontname, positioning, and decorations.
void parseOutline (TextAttributes &attributes, QDomElement &element)
 Parse through the element's tags and set the outline's color and size.
void parseShadow (TextAttributes &attributes, QDomElement &element)
 Parse through the element's tags and set the shadow's color, offset, and alpha.
void Reset (void)
void setDefaults (void)
 Set buttons, logo, title icons and text, arrows and watermarks back to the defaults.
ButtonIcongetButtonIcon (const QString &type)

Public Attributes

QRect buttonArea
QRect logoRect
MythImagelogo
MythImagebuttonnormal
MythImagebuttonactive
QMap< QString, ButtonIconallButtonIcons
TextAttributes normalAttributes
TextAttributes activeAttributes
void(* callback )(void *, QString &)
void * callbackdata
bool killable
bool balancerows
bool spreadbuttons
bool buttoncenter
QMap< QString, MythImage * > titleIcons
QMap< QString, MythImage * > m_loadedImages
QString titleText
QPoint titlePos
MythImagebuttonBackground
MythImageuparrow
QRect uparrowRect
MythImagedownarrow
QRect downarrowRect
QPoint watermarkPos
QRect watermarkRect
bool allowreorder
int maxColumns
int visiblerowlimit
bool loaded
QString themeDir

Static Public Attributes

static bool parseFonts = true

Constructor & Destructor Documentation

MythThemedMenuState::MythThemedMenuState (  ) 

Definition at line 246 of file myththemedmenu.cpp.

MythThemedMenuState::~MythThemedMenuState (  ) 

Definition at line 265 of file myththemedmenu.cpp.


Member Function Documentation

bool MythThemedMenuState::parseSettings ( const QString &  dir,
const QString &  menuname 
)

Parse the menu from the given dir for background, button, logo, arrow, and font settings.

Parameters:
dir directory where setting may be found
menuname file name of menu file from which settings are parsed
Returns:
true iff file exists, opens, and parses correctly

Definition at line 1165 of file myththemedmenu.cpp.

Referenced by MythThemedMenu::Init(), and MythThemedMenuPrivate::ReloadTheme().

void MythThemedMenuState::parseBackground ( const QString &  dir,
QDomElement &  element 
)

Parse through the element's tags and set the button's area, spread, center, rows, columns and visible lower limit.

Parameters:
dir the directory path of background
element QDomElement with information about the background

Definition at line 330 of file myththemedmenu.cpp.

Referenced by parseSettings().

void MythThemedMenuState::parseLogo ( const QString &  dir,
QDomElement &  element 
)

Parse through the element's tags and set the logo's image and position.

Parameters:
dir directory where logo images may be found
element DOM element whose nodes describe the logo

Definition at line 800 of file myththemedmenu.cpp.

Referenced by parseSettings().

void MythThemedMenuState::parseArrow ( const QString &  dir,
QDomElement &  element,
bool  up 
)

Parse through the element's tags to set the arrows image and position.

Parameters:
dir directory where arrow images may be found
element DOM element dealing with arrow image and position

Definition at line 939 of file myththemedmenu.cpp.

Referenced by parseSettings().

void MythThemedMenuState::parseTitle ( const QString &  dir,
QDomElement &  element 
)

Parse through the element's tags and set the title's image (and subsequent mode) and position.

Parameters:
dir directory where title images may be found
element DOM element dealing with the title

Definition at line 858 of file myththemedmenu.cpp.

Referenced by parseSettings().

void MythThemedMenuState::parseButtonDefinition ( const QString &  dir,
QDomElement &  element 
)

Definition at line 703 of file myththemedmenu.cpp.

Referenced by parseSettings().

void MythThemedMenuState::parseButton ( const QString &  dir,
QDomElement &  element 
)

Parse through the element's tags and set the button's definition as normal, active, text, or activetext.

Parameters:
dir directory where the button images may be found
element DOM element whose nodes define Buttons

Definition at line 1008 of file myththemedmenu.cpp.

Referenced by parseSettings().

void MythThemedMenuState::parseText ( TextAttributes attributes,
QDomElement &  element 
)

Parse through the element's tags and set the text's area, fontsize, fontname, positioning, and decorations.

Parameters:
attributes text attributes whose font face will be set
element DOM element dealing with text

Definition at line 533 of file myththemedmenu.cpp.

Referenced by parseButtonDefinition().

void MythThemedMenuState::parseOutline ( TextAttributes attributes,
QDomElement &  element 
)

Parse through the element's tags and set the outline's color and size.

Parameters:
attributes text attributes whose font outline will be set
element DOM element dealing with outline

Definition at line 476 of file myththemedmenu.cpp.

Referenced by parseText().

void MythThemedMenuState::parseShadow ( TextAttributes attributes,
QDomElement &  element 
)

Parse through the element's tags and set the shadow's color, offset, and alpha.

Parameters:
attributes text attributes whose font shadow will be set
element DOM dealing with shadow

Definition at line 407 of file myththemedmenu.cpp.

Referenced by parseText().

void MythThemedMenuState::Reset ( void   ) 

Definition at line 270 of file myththemedmenu.cpp.

Referenced by MythThemedMenuPrivate::ReloadTheme(), and ~MythThemedMenuState().

void MythThemedMenuState::setDefaults ( void   ) 

Set buttons, logo, title icons and text, arrows and watermarks back to the defaults.

Definition at line 1142 of file myththemedmenu.cpp.

Referenced by parseSettings(), and Reset().

ButtonIcon * MythThemedMenuState::getButtonIcon ( const QString &  type  ) 

Definition at line 318 of file myththemedmenu.cpp.

Referenced by MythThemedMenuPrivate::addButton().


Member Data Documentation

Definition at line 122 of file myththemedmenu.cpp.

Referenced by parseLogo(), and MythThemedMenuPrivate::SetupUITypes().

void(* MythThemedMenuState::callback)(void *, QString &)

Definition at line 139 of file myththemedmenu.cpp.

Referenced by parseBackground(), and MythThemedMenuPrivate::positionButtons().

Definition at line 140 of file myththemedmenu.cpp.

Referenced by parseBackground(), and MythThemedMenuPrivate::positionButtons().

Definition at line 143 of file myththemedmenu.cpp.

Referenced by parseButton(), parseTitle(), and Reset().

Definition at line 144 of file myththemedmenu.cpp.

Referenced by setDefaults().

Definition at line 145 of file myththemedmenu.cpp.

Referenced by parseTitle(), and MythThemedMenuPrivate::SetupUITypes().

Definition at line 150 of file myththemedmenu.cpp.

Referenced by parseArrow(), and MythThemedMenuPrivate::SetupUITypes().

Definition at line 152 of file myththemedmenu.cpp.

Referenced by parseArrow(), and MythThemedMenuPrivate::SetupUITypes().

Definition at line 154 of file myththemedmenu.cpp.

Referenced by parseButtonDefinition(), and setDefaults().

Definition at line 167 of file myththemedmenu.cpp.

Referenced by parseSettings(), and MythThemedMenuPrivate::ReloadTheme().


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

Generated on Sat Dec 18 05:16:08 2010 for MythTV by  doxygen 1.5.5