ThemeChooser Class Reference

View and select installed themes. More...

#include <themechooser.h>

Inheritance diagram for ThemeChooser:
MythScreenType MythUIType XMLParseBase

List of all members.

Signals

void themeChanged (void)

Public Member Functions

 ThemeChooser (MythScreenStack *parent, const QString name="ThemeChooser")
 Creates a new ThemeChooser Screen.
 ~ThemeChooser ()
bool Create (void)
void Load (void)
 Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (See Warning).
void Init (void)
 Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in Load().
bool keyPressEvent (QKeyEvent *)
 Key event handler.
void customEvent (QEvent *e)

Protected Slots

void popupClosed (QString which, int result)
void saveAndReload (void)
void toggleFullscreenPreview (void)
void toggleThemeUpdateNotifications (void)
void refreshDownloadableThemes (void)
void removeTheme (void)

Private Types

enum  DownloadState { dsIdle = 0, dsDownloadingOnBackend, dsDownloadingOnFrontend, dsExtractingTheme }

Private Slots

void itemChanged (MythUIButtonListItem *item)
void saveAndReload (MythUIButtonListItem *item)

Private Member Functions

ThemeInfoloadThemeInfo (QFileInfo &theme)
void showPopupMenu (void)
void updateProgressBar (int bytesReceived, int bytesTotal)
void removeThemeDir (const QString &dirname)

Private Attributes

MythUIButtonListm_themes
MythUIImagem_preview
bool m_fullPreviewShowing
MythUIStateTypem_fullPreviewStateType
MythUITextm_fullScreenName
MythUIImagem_fullScreenPreview
QFileInfoList m_infoList
bool m_refreshDownloadableThemes
QString m_userThemeDir
QMap< QString, ThemeInfo * > m_themeNameInfos
QMap< QString, ThemeInfo * > m_themeFileNameInfos
QMap< QString, QString > m_themeStatuses
ThemeInfom_downloadTheme
QString m_downloadFile
DownloadState m_downloadState
MythDialogBoxm_popupMenu

Detailed Description

View and select installed themes.

Definition at line 27 of file themechooser.h.


Member Enumeration Documentation

Enumerator:
dsIdle 
dsDownloadingOnBackend 
dsDownloadingOnFrontend 
dsExtractingTheme 

Definition at line 58 of file themechooser.h.


Constructor & Destructor Documentation

ThemeChooser::ThemeChooser ( MythScreenStack parent,
const QString  name = "ThemeChooser" 
)

Creates a new ThemeChooser Screen.

Parameters:
parent Pointer to the screen stack
name The name of the window

Definition at line 72 of file themechooser.cpp.

ThemeChooser::~ThemeChooser (  ) 

Definition at line 90 of file themechooser.cpp.


Member Function Documentation

bool ThemeChooser::Create ( void   )  [virtual]

Reimplemented from MythScreenType.

Definition at line 101 of file themechooser.cpp.

Referenced by TVMenuCallback().

void ThemeChooser::Load ( void   )  [virtual]

Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (See Warning).

Warning:
This method should only load data, it should NEVER perform UI routines or segfaults WILL result. This includes assinging data to any widgets, calling methods on a widget or anything else which triggers redraws. The safest and recommended approach is to avoid any interaction with a libmythui class or class member.

Reimplemented from MythScreenType.

Definition at line 145 of file themechooser.cpp.

void ThemeChooser::Init ( void   )  [virtual]

Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in Load().

Warning:
Do NOT confuse this with Load(), they serve very different purposes and most often both should be used when creating a new screen.

Reimplemented from MythScreenType.

Definition at line 334 of file themechooser.cpp.

bool ThemeChooser::keyPressEvent ( QKeyEvent *   )  [virtual]

Key event handler.

Parameters:
event Keypress event

Reimplemented from MythScreenType.

Definition at line 496 of file themechooser.cpp.

void ThemeChooser::customEvent ( QEvent *  e  )  [virtual]

Reimplemented from MythUIType.

Definition at line 701 of file themechooser.cpp.

void ThemeChooser::itemChanged ( MythUIButtonListItem item  )  [private, slot]

Definition at line 634 of file themechooser.cpp.

Referenced by Create(), and Init().

void ThemeChooser::saveAndReload ( MythUIButtonListItem item  )  [private, slot]

Definition at line 589 of file themechooser.cpp.

void ThemeChooser::popupClosed ( QString  which,
int  result 
) [protected, slot]

Definition at line 488 of file themechooser.cpp.

Referenced by showPopupMenu().

void ThemeChooser::saveAndReload ( void   )  [protected, slot]

Definition at line 582 of file themechooser.cpp.

Referenced by Create(), and showPopupMenu().

void ThemeChooser::toggleFullscreenPreview ( void   )  [protected, slot]

Definition at line 529 of file themechooser.cpp.

Referenced by keyPressEvent(), and showPopupMenu().

void ThemeChooser::toggleThemeUpdateNotifications ( void   )  [protected, slot]

Definition at line 566 of file themechooser.cpp.

Referenced by showPopupMenu().

void ThemeChooser::refreshDownloadableThemes ( void   )  [protected, slot]

Definition at line 574 of file themechooser.cpp.

Referenced by showPopupMenu().

void ThemeChooser::removeTheme ( void   )  [protected, slot]

Definition at line 816 of file themechooser.cpp.

Referenced by keyPressEvent(), and showPopupMenu().

void ThemeChooser::themeChanged ( void   )  [signal]
ThemeInfo * ThemeChooser::loadThemeInfo ( QFileInfo &  theme  )  [private]

Definition at line 401 of file themechooser.cpp.

Referenced by Load().

void ThemeChooser::showPopupMenu ( void   )  [private]

Definition at line 427 of file themechooser.cpp.

Referenced by keyPressEvent().

void ThemeChooser::updateProgressBar ( int  bytesReceived,
int  bytesTotal 
) [private]

Definition at line 688 of file themechooser.cpp.

Referenced by customEvent().

void ThemeChooser::removeThemeDir ( const QString &  dirname  )  [private]

Definition at line 844 of file themechooser.cpp.

Referenced by Load(), and removeTheme().


Member Data Documentation

Definition at line 72 of file themechooser.h.

Referenced by Create(), and itemChanged().

Definition at line 74 of file themechooser.h.

Referenced by itemChanged(), keyPressEvent(), showPopupMenu(), and toggleFullscreenPreview().

Definition at line 75 of file themechooser.h.

Referenced by Create(), itemChanged(), showPopupMenu(), and toggleFullscreenPreview().

Definition at line 76 of file themechooser.h.

Referenced by Create(), itemChanged(), and toggleFullscreenPreview().

Definition at line 77 of file themechooser.h.

Referenced by Create(), itemChanged(), and toggleFullscreenPreview().

QFileInfoList ThemeChooser::m_infoList [private]

Definition at line 79 of file themechooser.h.

Referenced by Init(), and Load().

Definition at line 80 of file themechooser.h.

Referenced by Load(), and refreshDownloadableThemes().

QString ThemeChooser::m_userThemeDir [private]
QMap<QString, ThemeInfo*> ThemeChooser::m_themeNameInfos [private]

Definition at line 83 of file themechooser.h.

Referenced by Load(), and loadThemeInfo().

QMap<QString, ThemeInfo*> ThemeChooser::m_themeFileNameInfos [private]

Definition at line 84 of file themechooser.h.

Referenced by Init(), and loadThemeInfo().

QMap<QString, QString> ThemeChooser::m_themeStatuses [private]

Definition at line 85 of file themechooser.h.

Referenced by Init(), and Load().

Definition at line 86 of file themechooser.h.

Referenced by customEvent(), and saveAndReload().

QString ThemeChooser::m_downloadFile [private]

Definition at line 87 of file themechooser.h.

Referenced by customEvent(), and saveAndReload().

Definition at line 88 of file themechooser.h.

Referenced by customEvent(), and saveAndReload().

Definition at line 90 of file themechooser.h.

Referenced by popupClosed(), and showPopupMenu().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:29 2012 for MythTV by  doxygen 1.6.3