canvascv::ThemeRepository Class Reference
The ThemeRepository is used to add and get themes for Widget and Shape objects. More...
#include <themerepository.h>
Static Public Member Functions | |
static bool | addTheme (const std::string &name, Theme *theme) |
addTheme add a Theme to the repository More... | |
static void | setCurrentTheme (const std::string &name) |
setCurrentTheme sets a previously added theme More... | |
static Theme * | getCurrentTheme () |
returns the current theme | |
static std::string | getCurrentThemeName () |
returns the current theme name | |
static void | applyCurrentTheme (Shape *shape) |
used automatically by the ShapeFactory when creating a shape | |
static void | applyCurrentTheme (Widget *widget) |
used automatically by the WidgetFactory when creating a widget | |
static std::vector< std::string > | availThemes () |
get a list of available theme names | |
Detailed Description
This class must have at least a single theme. Themes can be a part of this library, or external to it, suplied by the user and added with ThemeRepository::addTheme()
Member Function Documentation
|
static |
- Parameters
-
name is the name of the theme (to overide a theme, add something instead with the same name) theme is the theme associated with this name
- Returns
- true if theme is not null
- Note
- that you cannot delete the Theme pointer while it's in use.
- See also
- setCurrentTheme()
|
static |
- Parameters
-
name is the name of the Theme to set as default
- Note
- if the theme doesn't exist then nothing happens
The documentation for this class was generated from the following file:
- CanvasCV-doxygen/src/canvascv/themes/themerepository.h
Generated by 1.8.11