libkdegames
kgthemeprovider.cpp
Go to the documentation of this file.
48 Private(KgThemeProvider *parent, const QByteArray& key) : q(parent), m_configKey(key), m_currentTheme(0), m_defaultTheme(0), m_inRediscover(false) {}
170 void KgThemeProvider::discoverThemes(const QByteArray& resource, const QString& directory, const QString& defaultThemeName, const QMetaObject* themeClass)
void setContextProperty(const QString &name, QObject *value)
void setDefaultTheme(const KgTheme *theme)
Definition: kgthemeprovider.cpp:118
virtual bool readFromDesktopFile(const QString &path)
Initializes a KgTheme instance by reading a description file.
Definition: kgtheme.cpp:84
void rediscoverThemes()
After this provider has been set up with discoverThemes(), this method may be used to read additional...
Definition: kgthemeprovider.cpp:179
A theme provider manages KgTheme instances, and maintains a selection of the currentTheme().
Definition: kgthemeprovider.h:39
QDeclarativeContext * rootContext() const
T value(int i) const
QString name() const
virtual QPixmap generatePreview(const KgTheme *theme, const QSize &size)
Generate a preview pixmap for the given theme.
Definition: kgthemeprovider.cpp:261
void addImageProvider(const QString &providerId, QDeclarativeImageProvider *provider)
int count(const T &value) const
void append(const T &value)
A QDeclarativeImageProvider that renders requested sprites and returns corresponding pixmap to the QM...
Definition: kgimageprovider_p.h:42
QString fileName() const
KDEGAMES_EXPORT const char * name(StandardGameAction id)
This will return the internal name of a given standard action.
Definition: kstandardgameaction.cpp:146
const KgTheme * currentTheme() const
void discoverThemes(const QByteArray &resource, const QString &directory, const QString &defaultThemeName=QLatin1String("default"), const QMetaObject *themeClass=0)
This method reads theme description files from a standard location.
Definition: kgthemeprovider.cpp:170
void setParent(QObject *parent)
const KgTheme * defaultTheme() const
Definition: kgthemeprovider.cpp:113
void setDeclarativeEngine(const QString &name, QDeclarativeEngine *engine)
Registers this KgThemeProvider with.
Definition: kgthemeprovider.cpp:266
QString currentThemeName() const
void prepend(const T &value)
void currentThemeChanged(const KgTheme *theme)
Emitted when the current theme changes.
KgThemeProvider(const QByteArray &configKey=QByteArray("Theme"), QObject *parent=0)
Constructor.
Definition: kgthemeprovider.cpp:56
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject * parent() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.