MythThemedMenu Class Reference

#include <myththemedmenu.h>

Inheritance diagram for MythThemedMenu:

MythScreenType MythUIType XMLParseBase

List of all members.


Detailed Description

Themed menu class, used for main menus in MythTV frontend.

Definition at line 11 of file myththemedmenu.h.


Public Member Functions

 MythThemedMenu (const char *cdir, const char *menufile, MythScreenStack *parent, const char *name, bool allowreorder=true, MythThemedMenuState *state=NULL)
 Creates a themed menu.
 ~MythThemedMenu ()
bool foundTheme (void)
 Returns true iff a theme has been found by a previous call to Init(const char*,const char*) or ReloadTheme().
void setCallback (void(*lcallback)(void *, QString &), void *data)
 Set the themed menus callback function and data for that function.
void setKillable (void)
QString getSelection (void)
void ReloadTheme (void)
 Reset and reparse everything, check foundTheme(void) for success.
void ReloadExitKey (void)
 Looks at "AllowQuitShutdown" setting in DB, in order to determine what to show to user on exit from the frontend.
virtual void aboutToShow (void)

Protected Member Functions

virtual bool keyPressEvent (QKeyEvent *e)
 keyboard/LIRC event handler.
virtual void gestureEvent (MythUIType *origtype, MythGestureEvent *ge)
 Interprets mouse gestures as MythTV action events.

Private Member Functions

void Init (const char *cdir, const char *menufile)
 Loads the main UI theme, and a menu theme.

Private Attributes

MythThemedMenuPrivated

Constructor & Destructor Documentation

MythThemedMenu::MythThemedMenu ( const char *  cdir,
const char *  menufile,
MythScreenStack parent,
const char *  name,
bool  allowreorder = true,
MythThemedMenuState state = NULL 
)

Creates a themed menu.

Parameters:
cdir directory where theme is stored
menufile file name of menu definition file
parent the screen stack that owns this UI type
name the name of this UI type
allowreorder will buttons be inserted into new rows or pushed back
state theme state associated with this menu

Definition at line 2444 of file myththemedmenu.cpp.

MythThemedMenu::~MythThemedMenu ( void   ) 

Definition at line 2488 of file myththemedmenu.cpp.


Member Function Documentation

bool MythThemedMenu::foundTheme ( void   ) 

Returns true iff a theme has been found by a previous call to Init(const char*,const char*) or ReloadTheme().

Definition at line 2496 of file myththemedmenu.cpp.

Referenced by mythplugin_config(), reloadTheme(), runFormatMenu(), runMenu(), RunMenu(), runSelectMenu(), and SetupMenu().

void MythThemedMenu::setCallback ( void(*)(void *, QString &)  lcallback,
void *  data 
)

Set the themed menus callback function and data for that function.

Definition at line 2502 of file myththemedmenu.cpp.

Referenced by mythplugin_config(), runFormatMenu(), runMenu(), RunMenu(), runSelectMenu(), and SetupMenu().

void MythThemedMenu::setKillable ( void   ) 

QString MythThemedMenu::getSelection ( void   ) 

Definition at line 2513 of file myththemedmenu.cpp.

void MythThemedMenu::ReloadTheme ( void   ) 

Reset and reparse everything, check foundTheme(void) for success.

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 2542 of file myththemedmenu.cpp.

Referenced by reloadTheme().

void MythThemedMenu::ReloadExitKey ( void   ) 

Looks at "AllowQuitShutdown" setting in DB, in order to determine what to show to user on exit from the frontend.

Definition at line 2521 of file myththemedmenu.cpp.

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

void MythThemedMenu::aboutToShow ( void   )  [virtual]

Reimplemented from MythScreenType.

Definition at line 2591 of file myththemedmenu.cpp.

bool MythThemedMenu::keyPressEvent ( QKeyEvent *  e  )  [protected, virtual]

keyboard/LIRC event handler.

This translates key presses through the "menu" context into MythTV actions and then handles them as appropriate.

Reimplemented from MythUIType.

Definition at line 2553 of file myththemedmenu.cpp.

void MythThemedMenu::gestureEvent ( MythUIType origtype,
MythGestureEvent ge 
) [protected, virtual]

Interprets mouse gestures as MythTV action events.

Parameters:
origtype originating element type from the screen
ge mouse gesture event

Reimplemented from MythUIType.

Definition at line 2580 of file myththemedmenu.cpp.

void MythThemedMenu::Init ( const char *  cdir,
const char *  menufile 
) [private]

Loads the main UI theme, and a menu theme.

See also foundTheme(void), it will return true when called after this method if this method was successful.

See also ReloadTheme(void) which you can use to load a generic theme, if foundTheme(void) returns false after calling this.

Parameters:
cdir directory where theme.xml is stored
menufile name of menu item xml file

Definition at line 2466 of file myththemedmenu.cpp.

Referenced by MythThemedMenu().


Member Data Documentation


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

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