libplasma
Plasma::Theme Class Reference
#include <theme.h>
Inheritance diagram for Plasma::Theme:

Detailed Description
Interface to the Plasma theme.Accessed via Plasma::Theme::defaultTheme() e.g:
QString imagePath = Plasma::Theme::defaultTheme()->imagePath("widgets/clock")
Plasma::Theme provides access to a common and standardized set of graphic elements stored in SVG format. This allows artists to create single packages of SVGs that will affect the look and feel of all workspace components.
Plasma::Svg uses Plasma::Theme internally to locate and load the appropriate SVG data. Alternatively, Plasma::Theme can be used directly to retrieve file system paths to SVGs by name.
Definition at line 53 of file theme.h.
Public Types | |
enum | ColorRole { TextColor = 0, HighlightColor = 1, BackgroundColor = 2 } |
enum | FontRole { DefaultFont = 0 } |
Public Slots | |
void | settingsChanged () |
Signals | |
void | themeChanged () |
Public Member Functions | |
Q_INVOKABLE QColor | color (ColorRole role) const |
Q_INVOKABLE KSharedConfigPtr | colorScheme () const |
Q_INVOKABLE bool | currentThemeHasImage (const QString &name) const |
Q_INVOKABLE QFont | font (FontRole role) const |
Q_INVOKABLE QFontMetrics | fontMetrics () const |
Q_INVOKABLE QString | imagePath (const QString &name) const |
Q_INVOKABLE void | setFont (const QFont &font, FontRole role=DefaultFont) |
void | setThemeName (const QString &themeName) |
void | setUseGlobalSettings (bool useGlobal) |
Theme (QObject *parent=0) | |
QString | themeName () const |
bool | useGlobalSettings () const |
Q_INVOKABLE QString | wallpaperPath (const QSize &size=QSize()) const |
Q_INVOKABLE bool | windowTranslucencyEnabled () const |
~Theme () | |
Static Public Member Functions | |
static Theme * | defaultTheme () |
static PackageStructure::Ptr | packageStructure () |
Properties | |
QString | themeName |
Member Enumeration Documentation
Constructor & Destructor Documentation
Plasma::Theme::Theme | ( | QObject * | parent = 0 |
) | [explicit] |
Member Function Documentation
KSharedConfigPtr Plasma::Theme::colorScheme | ( | ) | const |
bool Plasma::Theme::currentThemeHasImage | ( | const QString & | name | ) | const |
Theme * Plasma::Theme::defaultTheme | ( | ) | [static] |
QFontMetrics Plasma::Theme::fontMetrics | ( | ) | const |
PackageStructure::Ptr Plasma::Theme::packageStructure | ( | ) | [static] |
void Plasma::Theme::setThemeName | ( | const QString & | themeName | ) |
void Plasma::Theme::settingsChanged | ( | ) | [slot] |
void Plasma::Theme::setUseGlobalSettings | ( | bool | useGlobal | ) |
void Plasma::Theme::themeChanged | ( | ) | [signal] |
Emitted when the user changes the theme.
SVGs should be reloaded at that point
QString Plasma::Theme::themeName | ( | ) | const |
- Returns:
- the name of the theme.
bool Plasma::Theme::useGlobalSettings | ( | ) | const |
bool Plasma::Theme::windowTranslucencyEnabled | ( | ) | const |
Property Documentation
The documentation for this class was generated from the following files: