#include <kgametheme.h>

Public Member Functions | |
| KGameTheme (const QString &themeGroup=QLatin1String("KGameTheme")) | |
| virtual | ~KGameTheme () |
| virtual bool | loadDefault () |
| Load the default theme file. | |
| virtual bool | load (const QString &file) |
| Load a specific theme file. | |
| QString | path () const |
| |
| QString | fileName () const |
| |
| virtual QString | graphics () const |
| |
| QString (const QString &key) const | |
| |
| QPixmap | preview () const |
| |
| virtual QString | themeProperty (const QString &key) const |
Possible keys:
| |
Friends | |
| class | KGameThemePrivate |
For more advanced feaures like dynamic themes or custom game rules, it will likely be necessary to derive from this class
Definition at line 40 of file kgametheme.h.
| KGameTheme::KGameTheme | ( | const QString & | themeGroup = QLatin1String("KGameTheme") |
) |
| KGameTheme::~KGameTheme | ( | ) | [virtual] |
Definition at line 53 of file kgametheme.cpp.
| bool KGameTheme::loadDefault | ( | ) | [virtual] |
Load the default theme file.
Called "default.desktop"
Definition at line 57 of file kgametheme.cpp.
References load().

| bool KGameTheme::load | ( | const QString & | file | ) | [virtual] |
Load a specific theme file.
Note that although theme could be successfully loaded, no check on the validity of theme's SVG file contents is done. Application writers will need to perform this check manually e.g. by calling KSvgRenderer::isValid()
| file | the name of the theme file relative to the share/apps/appname directory. e.g. "themes/classic.desktop" |
Definition at line 64 of file kgametheme.cpp.
References KGameThemePrivate::fileName, KGameThemePrivate::fullPath, KGameThemePrivate::graphics, kThemeVersionFormat, KGameThemePrivate::loaded, KGameThemePrivate::prefix, KGameThemePrivate::preview, QString(), KGameThemePrivate::themeGroup, and KGameThemePrivate::themeproperties.
Referenced by loadDefault(), and KGameThemeSelector::KGameThemeSelectorPrivate::setupData().

| QString KGameTheme::path | ( | ) | const |
Definition at line 138 of file kgametheme.cpp.
References KGameThemePrivate::fullPath, KGameThemePrivate::loaded, and QString().
Referenced by KGameThemeSelector::KGameThemeSelectorPrivate::_k_updatePreview().

| QString KGameTheme::fileName | ( | ) | const |
Definition at line 147 of file kgametheme.cpp.
References KGameThemePrivate::fileName, KGameThemePrivate::loaded, and QString().
Referenced by KGameThemeSelector::KGameThemeSelectorPrivate::_k_updatePreview().

| QString KGameTheme::graphics | ( | ) | const [virtual] |
Definition at line 156 of file kgametheme.cpp.
References KGameThemePrivate::graphics, KGameThemePrivate::loaded, and QString().

| KGameTheme::QString | ( | const QString & | key | ) | const |
Referenced by fileName(), graphics(), load(), path(), and themeProperty().
| QPixmap KGameTheme::preview | ( | ) | const |
Definition at line 165 of file kgametheme.cpp.
References KGameThemePrivate::loaded, and KGameThemePrivate::preview.
Referenced by KGameThemeSelector::KGameThemeSelectorPrivate::_k_updatePreview().
| QString KGameTheme::themeProperty | ( | const QString & | key | ) | const [virtual] |
Possible keys:
| key | the key of the wanted property |
Definition at line 174 of file kgametheme.cpp.
References KGameThemePrivate::loaded, QString(), and KGameThemePrivate::themeproperties.
Referenced by KGameThemeSelector::KGameThemeSelectorPrivate::_k_updatePreview(), and KGameThemeSelector::KGameThemeSelectorPrivate::setupData().

friend class KGameThemePrivate [friend] |
Definition at line 84 of file kgametheme.h.
1.5.3