#include <mmsthememanager.h>
Public Member Functions | |
MMSThemeManager (string themepath, string globalThemeName=DEFAULT_THEME) | |
MMSThemeManager () | |
~MMSThemeManager () | |
MMSTheme * | loadLocalTheme (string path, string themeName="") |
void | deleteLocalTheme (string path, string themeName) |
void | deleteLocalTheme (MMSTheme **theme) |
void | setTheme (string themeName) |
Change the theme. | |
void | setTheme (string themeName, bool fadein) |
Change the theme. | |
Static Public Attributes | |
static sigc::signal< void, string, bool > | onThemeChanged |
Set one or more callbacks for the onThemeChanged event. | |
Private Member Functions | |
void | throughFile (MMSTaffFile *tafff, MMSTheme *theme) |
void | getThemeValues (MMSTaffFile *tafff, MMSTheme *theme) |
void | getDescriptionValues (MMSTaffFile *tafff, MMSTheme *theme) |
void | getTemplateValues (MMSTaffFile *tafff, MMSTemplateClass *themeClass) |
void | getMainWindowValues (MMSTaffFile *tafff, MMSMainWindowClass *themeClass, MMSTheme *theme) |
void | getPopupWindowValues (MMSTaffFile *tafff, MMSPopupWindowClass *themeClass, MMSTheme *theme) |
void | getRootWindowValues (MMSTaffFile *tafff, MMSRootWindowClass *themeClass, MMSTheme *theme) |
void | getChildWindowValues (MMSTaffFile *tafff, MMSChildWindowClass *themeClass, MMSTheme *theme) |
void | getLabelWidgetValues (MMSTaffFile *tafff, MMSLabelWidgetClass *themeClass, MMSTheme *theme) |
void | getImageWidgetValues (MMSTaffFile *tafff, MMSImageWidgetClass *themeClass, MMSTheme *theme) |
void | getCanvasWidgetValues (MMSTaffFile *tafff, MMSCanvasWidgetClass *themeClass, MMSTheme *theme) |
void | getButtonWidgetValues (MMSTaffFile *tafff, MMSButtonWidgetClass *themeClass, MMSTheme *theme) |
void | getProgressBarWidgetValues (MMSTaffFile *tafff, MMSProgressBarWidgetClass *themeClass, MMSTheme *theme) |
void | getSliderWidgetValues (MMSTaffFile *tafff, MMSSliderWidgetClass *themeClass, MMSTheme *theme) |
void | getMenuWidgetValues (MMSTaffFile *tafff, MMSMenuWidgetClass *themeClass, MMSTheme *theme) |
void | getTextBoxWidgetValues (MMSTaffFile *tafff, MMSTextBoxWidgetClass *themeClass, MMSTheme *theme) |
void | getArrowWidgetValues (MMSTaffFile *tafff, MMSArrowWidgetClass *themeClass, MMSTheme *theme) |
void | getInputWidgetValues (MMSTaffFile *tafff, MMSInputWidgetClass *themeClass, MMSTheme *theme) |
void | getCheckBoxWidgetValues (MMSTaffFile *tafff, MMSCheckBoxWidgetClass *themeClass, MMSTheme *theme) |
void | getTemplateClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getMainWindowClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getPopupWindowClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getRootWindowClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getChildWindowClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getLabelWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getImageWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getCanvasWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getButtonWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getProgressBarWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getSliderWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getMenuWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getTextBoxWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getArrowWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getInputWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | getCheckBoxWidgetClassValues (MMSTaffFile *tafff, MMSTheme *theme, string className) |
void | loadTheme (string path, string themeName, MMSTheme *theme) |
void | loadGlobalTheme (string themeName) |
void | loadLocalTheme (MMSTheme *theme, string path, string themeName="") |
Static Private Attributes | |
static bool | initialized = false |
first static object initialized? | |
static string | themepath |
path to the theme | |
static vector< MMSTheme * > | localThemes |
additional application (e.g. plugin) specific themes |
During mmsInit() the first instance will be created which loads the global theme. You can instantiate a separate object to interact with the theme manager.
Definition at line 47 of file mmsthememanager.h.
MMSThemeManager::MMSThemeManager | ( | string | themepath, | |
string | globalThemeName = DEFAULT_THEME | |||
) |
Definition at line 45 of file mmsthememanager.cpp.
MMSThemeManager::MMSThemeManager | ( | ) |
Definition at line 54 of file mmsthememanager.cpp.
MMSThemeManager::~MMSThemeManager | ( | ) |
Definition at line 59 of file mmsthememanager.cpp.
void MMSThemeManager::throughFile | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme | |||
) | [private] |
Definition at line 272 of file mmsthememanager.cpp.
void MMSThemeManager::getThemeValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme | |||
) | [private] |
Definition at line 402 of file mmsthememanager.cpp.
void MMSThemeManager::getDescriptionValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme | |||
) | [private] |
Definition at line 418 of file mmsthememanager.cpp.
void MMSThemeManager::getTemplateValues | ( | MMSTaffFile * | tafff, | |
MMSTemplateClass * | themeClass | |||
) | [private] |
Definition at line 424 of file mmsthememanager.cpp.
void MMSThemeManager::getMainWindowValues | ( | MMSTaffFile * | tafff, | |
MMSMainWindowClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 431 of file mmsthememanager.cpp.
void MMSThemeManager::getPopupWindowValues | ( | MMSTaffFile * | tafff, | |
MMSPopupWindowClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 444 of file mmsthememanager.cpp.
void MMSThemeManager::getRootWindowValues | ( | MMSTaffFile * | tafff, | |
MMSRootWindowClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 457 of file mmsthememanager.cpp.
void MMSThemeManager::getChildWindowValues | ( | MMSTaffFile * | tafff, | |
MMSChildWindowClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 471 of file mmsthememanager.cpp.
void MMSThemeManager::getLabelWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSLabelWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 485 of file mmsthememanager.cpp.
void MMSThemeManager::getImageWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSImageWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 498 of file mmsthememanager.cpp.
void MMSThemeManager::getCanvasWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSCanvasWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 511 of file mmsthememanager.cpp.
void MMSThemeManager::getButtonWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSButtonWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 523 of file mmsthememanager.cpp.
void MMSThemeManager::getProgressBarWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSProgressBarWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 536 of file mmsthememanager.cpp.
void MMSThemeManager::getSliderWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSSliderWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 549 of file mmsthememanager.cpp.
void MMSThemeManager::getMenuWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSMenuWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 562 of file mmsthememanager.cpp.
void MMSThemeManager::getTextBoxWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSTextBoxWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 577 of file mmsthememanager.cpp.
void MMSThemeManager::getArrowWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSArrowWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 590 of file mmsthememanager.cpp.
void MMSThemeManager::getInputWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSInputWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 603 of file mmsthememanager.cpp.
void MMSThemeManager::getCheckBoxWidgetValues | ( | MMSTaffFile * | tafff, | |
MMSCheckBoxWidgetClass * | themeClass, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 616 of file mmsthememanager.cpp.
void MMSThemeManager::getTemplateClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 630 of file mmsthememanager.cpp.
void MMSThemeManager::getMainWindowClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 646 of file mmsthememanager.cpp.
void MMSThemeManager::getPopupWindowClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 662 of file mmsthememanager.cpp.
void MMSThemeManager::getRootWindowClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 678 of file mmsthememanager.cpp.
void MMSThemeManager::getChildWindowClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 694 of file mmsthememanager.cpp.
void MMSThemeManager::getLabelWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 710 of file mmsthememanager.cpp.
void MMSThemeManager::getImageWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 726 of file mmsthememanager.cpp.
void MMSThemeManager::getCanvasWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 742 of file mmsthememanager.cpp.
void MMSThemeManager::getButtonWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 758 of file mmsthememanager.cpp.
void MMSThemeManager::getProgressBarWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 774 of file mmsthememanager.cpp.
void MMSThemeManager::getSliderWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 790 of file mmsthememanager.cpp.
void MMSThemeManager::getMenuWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 806 of file mmsthememanager.cpp.
void MMSThemeManager::getTextBoxWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 822 of file mmsthememanager.cpp.
void MMSThemeManager::getArrowWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 838 of file mmsthememanager.cpp.
void MMSThemeManager::getInputWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 854 of file mmsthememanager.cpp.
void MMSThemeManager::getCheckBoxWidgetClassValues | ( | MMSTaffFile * | tafff, | |
MMSTheme * | theme, | |||
string | className | |||
) | [private] |
Definition at line 870 of file mmsthememanager.cpp.
void MMSThemeManager::loadTheme | ( | string | path, | |
string | themeName, | |||
MMSTheme * | theme | |||
) | [private] |
Definition at line 62 of file mmsthememanager.cpp.
void MMSThemeManager::loadGlobalTheme | ( | string | themeName | ) | [private] |
Definition at line 106 of file mmsthememanager.cpp.
void MMSThemeManager::loadLocalTheme | ( | MMSTheme * | theme, | |
string | path, | |||
string | themeName = "" | |||
) | [private] |
Definition at line 128 of file mmsthememanager.cpp.
MMSTheme * MMSThemeManager::loadLocalTheme | ( | string | path, | |
string | themeName = "" | |||
) |
Definition at line 166 of file mmsthememanager.cpp.
void MMSThemeManager::deleteLocalTheme | ( | string | path, | |
string | themeName | |||
) |
Definition at line 191 of file mmsthememanager.cpp.
void MMSThemeManager::deleteLocalTheme | ( | MMSTheme ** | theme | ) |
Definition at line 201 of file mmsthememanager.cpp.
void MMSThemeManager::setTheme | ( | string | themeName | ) |
Change the theme.
The fadein effect switcher will be used from the theme.xml definition. For that, you can set the attribute "fadein" for the tag <mmstheme> to "true" or "false". The default is "false".
themeName | name of the new theme to be activated |
If fails, an MMSError exception will be throw.
Definition at line 213 of file mmsthememanager.cpp.
void MMSThemeManager::setTheme | ( | string | themeName, | |
bool | fadein | |||
) |
Change the theme.
You can switch on/off the fading animation during the theme switch.
themeName | name of the new theme to be activated | |
fadein | the new theme should fade in? |
Definition at line 242 of file mmsthememanager.cpp.
bool MMSThemeManager::initialized = false [static, private] |
string MMSThemeManager::themepath [static, private] |
vector< MMSTheme * > MMSThemeManager::localThemes [static, private] |
additional application (e.g. plugin) specific themes
Definition at line 56 of file mmsthememanager.h.
sigc::signal< void, string, bool > MMSThemeManager::onThemeChanged [static] |
Set one or more callbacks for the onThemeChanged event.
The connected callbacks will be called during setTheme().
A callback method must be defined like this:
void myclass::mycallbackmethod(string themeName, bool fadein);
themeName | name of the new theme | |
fadein | the new theme should fade in? |
sigc::connection connection; connection = mywindow->onThemeChanged->connect(sigc::mem_fun(myobject,&myclass::mycallbackmethod));
To disconnect your callback do this:
connection.disconnect();
Please note:
You HAVE TO disconnect myobject from onThemeChanged BEFORE myobject will be deleted!!! Else an abnormal program termination can occur. You HAVE TO call the disconnect() method of sigc::connection explicitly. The destructor will NOT do this!!!
Definition at line 158 of file mmsthememanager.h.