#include <thememanager.h>
Public Member Functions | |
| ThemeManager (QString themefile, QObject *parent, int initialSize=1) | |
| Constructor for the theme manager. | |
| const QPixmap | getPixmap (QString svgid, QSize size) |
| Load a pixmap from the SVG theme file. | |
| const QPixmap | getPixmap (QString svgid, double width) |
| Load a pixmap from the SVG theme file. | |
| const QPixmap | getPixmap (QString svgid, QString svgref, double refwidth) |
| Load a pixmap from the SVG theme file. | |
| double | getScale () |
| Retreive the current scale of the theme. | |
| KConfigGroup | config (QString id) |
| Retrieve the current theme configuration object. | |
| void | registerTheme (Themable *ob) |
| Register an object with the theme manager. | |
| void | unregisterTheme (Themable *ob) |
| Unregister an object with the theme manager. | |
| void | updateTheme (Themable *ob) |
| Forces an update to a theme objects. | |
| void | updateTheme (QString themefile) |
| Forces an update to all theme objects. | |
| void | rescale (int scale) |
| Change the scale of the theme and update all registered theme objects. | |
The theme manager holds a list of all Themable objects and notifies them in the event of a theme change so that the objects can then redraw. It also allows access to the theme configuration file and reads pixmaps from an SVG file given a certain size or scale. The pixmaps are cached so that the same pixmap is retrieved from the cache on not rendered again.
Definition at line 105 of file thememanager.h.
|
||||||||||||||||
|
Constructor for the theme manager.
Definition at line 39 of file thememanager.cpp. References updateTheme(). Here is the call graph for this function: ![]() |
|
|
Retrieve the current theme configuration object.
Definition at line 130 of file thememanager.cpp. Referenced by ScoreSprite::changeTheme(), PixmapSprite::changeTheme(), DisplayGame::changeTheme(), DisplayGame::displayHint(), DisplayGame::displayPiece(), DisplayGame::displayStar(), PixmapSprite::getDoubleValue(), ScoreSprite::setTurn(), DisplayGame::start(), and updateTheme(). |
|
||||||||||||||||
|
Load a pixmap from the SVG theme file. Its filename is given in the "general" section of the theme file as "svgfile". The pixmap is scaled with reference to another SVG item. This allows to generate a set of pixmaps with related sizes.
Definition at line 183 of file thememanager.cpp. References getPixmap(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Load a pixmap from the SVG theme file. Its filename is given in the "general" section of the theme file as "svgfile". The pixmap is scaled to the given width. The height is relative to the width as given in the SVG file.
Definition at line 172 of file thememanager.cpp. References getPixmap(). Here is the call graph for this function: ![]() |
|
||||||||||||
|
Load a pixmap from the SVG theme file. Its filename is given in the "general" section of the theme file as "svgfile". The pixmap is scaled to the given size.
Definition at line 138 of file thememanager.cpp. Referenced by DisplayGame::changeTheme(), and getPixmap(). |
|
|
Retreive the current scale of the theme.
Definition at line 123 of file thememanager.cpp. Referenced by PixmapSprite::changeTheme(). |
|
|
Register an object with the theme manager.
Definition at line 48 of file thememanager.cpp. Referenced by Themable::Themable(). |
|
|
Change the scale of the theme and update all registered theme objects. If the scale did not change no action is performed!
Definition at line 106 of file thememanager.cpp. References Themable::changeTheme(). Referenced by KWin4View::KWin4View(), and KWin4View::resizeEvent(). Here is the call graph for this function: ![]() |
|
|
Unregister an object with the theme manager.
Definition at line 55 of file thememanager.cpp. Referenced by Themable::~Themable(). |
|
|
Forces an update to all theme objects. That is their changeTheme() method is called. Before this a (new) theme file is loaded and all cached pixmaps deleted. This is used to really change one theme over to another one.
Definition at line 70 of file thememanager.cpp. References Themable::changeTheme(), and config(). Here is the call graph for this function: ![]() |
|
|
Forces an update to a theme objects. That is its changeTheme() method is called.
Definition at line 62 of file thememanager.cpp. References Themable::changeTheme(). Referenced by KWin4App::changeTheme(), IntroSprite::IntroSprite(), PieceSprite::PieceSprite(), PixmapSprite::PixmapSprite(), and ThemeManager(). Here is the call graph for this function: ![]() |
1.4.6