MythThemedMenuPrivate Class Reference

Inheritance diagram for MythThemedMenuPrivate:

XMLParseBase

List of all members.


Detailed Description

Definition at line 172 of file myththemedmenu.cpp.


Public Member Functions

 MythThemedMenuPrivate (MythThemedMenu *lparent, const char *cdir, MythThemedMenuState *lstate)
 Constructor, Init() must be called before class can be used.
 ~MythThemedMenuPrivate ()
bool keyPressHandler (QKeyEvent *e)
 Delegate key event to appropriate action for keyHandler().
bool keyHandler (QStringList &actions, bool fullexit)
 Interpret key presses on the menu into the appropriate actions.
bool ReloadTheme (void)
 Reset and reparse everything.
bool parseMenu (const QString &menuname)
 Parse the themebuttons to be added based on the name of the menu file provided.
void parseThemeButton (QDomElement &element)
 Parses the element's tags and set the ThemeButton's type, text, depends, and action, then adds the button.
void addButton (const QString &type, const QString &text, const QString &alttext, const QStringList &action)
 Create a new MythThemedButton based on the MythThemedMenuState m_state and the type, text, alt-text and action provided in the parameters.
bool layoutButtons (void)
 Properly lay out all of the buttons that were added with addButton.
void positionButtons (bool resetpos)
 Place buttons in position and set them visible and active.
bool makeRowVisible (int newrow, int oldrow)
bool handleAction (const QString &action)
 Handle a MythTV action for the Menus.
bool findDepends (const QString &fileList)
QString findMenuFile (const QString &menuname)
 Locates the appropriate menu file from which to parse the menu.
void checkScrollArrows (void)
 Add or remove scroll arrows as needed.
bool checkPinCode (const QString &timestamp_setting, const QString &password_setting, const QString &text)
 Queries the user for a password to enter a part of MythTV restricted by a password.
void SetupBackground ()
 Sets up menu background, must be done before the buttons are parsed.
void SetupUITypes ()
 Sets up UI according to the corresponding mythThemedMenuState.
bool gestureEvent (MythUIType *origtype, MythGestureEvent *ge)
 Interprets mouse gestures as MythTV action events.
void updateLCD (void)

Public Attributes

MythThemedMenuparent
MythThemedMenuStatem_state
bool allocedstate
vector< ThemedButton * > buttonList
ThemedButtonactivebutton
int currentrow
int currentcolumn
vector< MenuRowbuttonRows
QString selection
bool foundtheme
int exitModifier
bool ignorekeys
int maxrows
int visiblerows
int columns
bool wantpop
QString titleText
QString menumode
MythUIStateTypewatermark
MythUIImageuparrow
MythUIImagedownarrow

Constructor & Destructor Documentation

MythThemedMenuPrivate::MythThemedMenuPrivate ( MythThemedMenu lparent,
const char *  cdir,
MythThemedMenuState lstate 
)

Constructor, Init() must be called before class can be used.

Parameters:
lparent menu that owns this instance
cdir directory where theme is stored
lstate corresponding settings of the theme

Definition at line 1281 of file myththemedmenu.cpp.

MythThemedMenuPrivate::~MythThemedMenuPrivate (  ) 

Definition at line 1304 of file myththemedmenu.cpp.


Member Function Documentation

bool MythThemedMenuPrivate::keyPressHandler ( QKeyEvent *  e  ) 

Delegate key event to appropriate action for keyHandler().

Returns:
true iff key event was properly handled

Definition at line 1974 of file myththemedmenu.cpp.

Referenced by MythThemedMenu::keyPressEvent().

bool MythThemedMenuPrivate::keyHandler ( QStringList &  actions,
bool  fullexit 
)

Interpret key presses on the menu into the appropriate actions.

Parameters:
actions list of MythTV actions to be handled.

Definition at line 1986 of file myththemedmenu.cpp.

Referenced by gestureEvent(), and keyPressHandler().

bool MythThemedMenuPrivate::ReloadTheme ( void   ) 

Reset and reparse everything.

Note: this does not use the theme or menu file chosen in Init(), but instead uses defaults which should work if MythTV was properly installed.

Definition at line 1948 of file myththemedmenu.cpp.

Referenced by MythThemedMenu::ReloadTheme().

bool MythThemedMenuPrivate::parseMenu ( const QString &  menuname  ) 

Parse the themebuttons to be added based on the name of the menu file provided.

If the menu to be parsed is the main menu and this fails to find the XML file this will simply return false. Otherwise if it fails to find the menu it will pop up an error dialog and then return false.

The idea behind this is that if we can't parse the main menu we have to exit from the fronend entirely. But in all other cases we can simply return to the main menu and hope that it is a non-essential portion of MythTV which the theme does not support.

Definition at line 1423 of file myththemedmenu.cpp.

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

void MythThemedMenuPrivate::parseThemeButton ( QDomElement &  element  ) 

Parses the element's tags and set the ThemeButton's type, text, depends, and action, then adds the button.

Parameters:
element DOM element describing features of the themeButton

Definition at line 1315 of file myththemedmenu.cpp.

Referenced by parseMenu().

void MythThemedMenuPrivate::addButton ( const QString &  type,
const QString &  text,
const QString &  alttext,
const QStringList &  action 
)

Create a new MythThemedButton based on the MythThemedMenuState m_state and the type, text, alt-text and action provided in the parameters.

Parameters:
type type of button to be created
text text to appear on the button
alttext alternate text to appear when required
action actions to be associated with button

Definition at line 1638 of file myththemedmenu.cpp.

Referenced by parseThemeButton().

bool MythThemedMenuPrivate::layoutButtons ( void   ) 

Properly lay out all of the buttons that were added with addButton.

Returns:
true iff there are more than 0 rows or columns

Definition at line 1729 of file myththemedmenu.cpp.

Referenced by parseMenu().

void MythThemedMenuPrivate::positionButtons ( bool  resetpos  ) 

Place buttons in position and set them visible and active.

Parameters:
resetpos whether or not to reset the active button to the first one on the buttonlist.

Definition at line 1815 of file myththemedmenu.cpp.

Referenced by makeRowVisible(), and parseMenu().

bool MythThemedMenuPrivate::makeRowVisible ( int  newrow,
int  oldrow 
)

Definition at line 1893 of file myththemedmenu.cpp.

Referenced by keyHandler().

bool MythThemedMenuPrivate::handleAction ( const QString &  action  ) 

Handle a MythTV action for the Menus.

Parameters:
action single action to be handled
Returns:
true if the action is not to EXEC another program

Definition at line 2240 of file myththemedmenu.cpp.

Referenced by gestureEvent(), and keyHandler().

bool MythThemedMenuPrivate::findDepends ( const QString &  fileList  ) 

Definition at line 2350 of file myththemedmenu.cpp.

Referenced by parseThemeButton().

QString MythThemedMenuPrivate::findMenuFile ( const QString &  menuname  ) 

Locates the appropriate menu file from which to parse the menu.

Parameters:
menuname file name of the menu you want to find
Returns:
the directory in which the menu file is found

Definition at line 2204 of file myththemedmenu.cpp.

Referenced by findDepends(), and parseMenu().

void MythThemedMenuPrivate::checkScrollArrows ( void   ) 

Add or remove scroll arrows as needed.

Definition at line 1929 of file myththemedmenu.cpp.

Referenced by makeRowVisible(), and SetupUITypes().

bool MythThemedMenuPrivate::checkPinCode ( const QString &  timestamp_setting,
const QString &  password_setting,
const QString &  text 
)

Queries the user for a password to enter a part of MythTV restricted by a password.

Parameters:
timestamp_setting time settings to be checked
password_setting password to be checked
text the message text to be displayed
Returns:
true if password checks out or is not needed.

Definition at line 2379 of file myththemedmenu.cpp.

Referenced by handleAction().

void MythThemedMenuPrivate::SetupBackground ( void   ) 

Sets up menu background, must be done before the buttons are parsed.

Definition at line 1536 of file myththemedmenu.cpp.

Referenced by parseMenu().

void MythThemedMenuPrivate::SetupUITypes ( void   ) 

Sets up UI according to the corresponding mythThemedMenuState.

Definition at line 1550 of file myththemedmenu.cpp.

Referenced by parseMenu().

bool MythThemedMenuPrivate::gestureEvent ( MythUIType origtype,
MythGestureEvent ge 
)

Interprets mouse gestures as MythTV action events.

Parameters:
origtype originating element type for the gesture
ge mouse gesture event
Returns:
true iff a gesture was handled here.

Definition at line 2143 of file myththemedmenu.cpp.

Referenced by MythThemedMenu::gestureEvent().

void MythThemedMenuPrivate::updateLCD ( void   ) 

Definition at line 1602 of file myththemedmenu.cpp.

Referenced by MythThemedMenu::aboutToShow(), and keyHandler().


Member Data Documentation

Definition at line 216 of file myththemedmenu.cpp.

Referenced by addButton(), layoutButtons(), parseMenu(), positionButtons(), and ReloadTheme().

Definition at line 218 of file myththemedmenu.cpp.

Referenced by keyHandler(), positionButtons(), and updateLCD().

Definition at line 219 of file myththemedmenu.cpp.

Referenced by keyHandler(), positionButtons(), and updateLCD().

Definition at line 223 of file myththemedmenu.cpp.

Referenced by MythThemedMenu::getSelection(), handleAction(), and parseMenu().

Definition at line 228 of file myththemedmenu.cpp.

Referenced by MythThemedMenu::keyPressEvent(), and MythThemedMenuPrivate().

Definition at line 230 of file myththemedmenu.cpp.

Referenced by layoutButtons().

Definition at line 231 of file myththemedmenu.cpp.

Referenced by layoutButtons(), makeRowVisible(), and positionButtons().

Definition at line 232 of file myththemedmenu.cpp.

Referenced by keyHandler(), and layoutButtons().

Definition at line 236 of file myththemedmenu.cpp.

Referenced by parseMenu(), and updateLCD().

Definition at line 237 of file myththemedmenu.cpp.

Referenced by parseMenu(), and SetupUITypes().

Definition at line 239 of file myththemedmenu.cpp.

Referenced by gestureEvent(), keyHandler(), and SetupUITypes().

Definition at line 240 of file myththemedmenu.cpp.

Referenced by checkScrollArrows(), gestureEvent(), and SetupUITypes().

Definition at line 241 of file myththemedmenu.cpp.

Referenced by checkScrollArrows(), gestureEvent(), and SetupUITypes().


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