KDEGames
kgamethemeprovider.h
33 Q_PROPERTY(const KGameTheme *currentTheme READ currentTheme WRITE setCurrentTheme NOTIFY currentThemeChanged)
45 explicit KGameThemeProvider(const QByteArray &configKey = QByteArrayLiteral("Theme"), QObject *parent = nullptr);
85 /// QStandardPaths::locateAll(QStandardPaths::AppDataLocation, directory, QStandardPaths::LocateDirectory)
100 void discoverThemes(const QString &directory, const QString &defaultThemeName = QStringLiteral("default"), const QMetaObject *themeClass = nullptr);
A theme provider manages KGameTheme instances, and maintains a selection of the currentTheme().
Definition kgamethemeprovider.h:31
QList< const KGameTheme * > themes() const
Definition kgamethemeprovider.cpp:95
void currentThemeChanged(const KGameTheme *theme)
Emitted when the current theme changes.
void nameChanged(const QString &name)
Emitted when the name of the provider changes.
void rediscoverThemes()
After this provider has been set up with discoverThemes(), this method may be used to read additional...
Definition kgamethemeprovider.cpp:206
void discoverThemes(const QString &directory, const QString &defaultThemeName=QStringLiteral("default"), const QMetaObject *themeClass=nullptr)
This method reads theme description files from a standard location.
Definition kgamethemeprovider.cpp:177
virtual QPixmap generatePreview(const KGameTheme *theme, QSize size)
Generate a preview pixmap for the given theme.
Definition kgamethemeprovider.cpp:330
void currentThemeNameChanged(const QString &themeName)
Emitted when the name of the current theme changes.
void setDefaultTheme(const KGameTheme *theme)
Definition kgamethemeprovider.cpp:123
void setDeclarativeEngine(const QString &name, QQmlEngine *engine)
Registers this KGameThemeProvider with engine's root context with ID name and constructs a KGameImage...
Definition kgamethemeprovider.cpp:338
void setCurrentTheme(const KGameTheme *theme)
Select a new theme.
Definition kgamethemeprovider.cpp:159
const KGameTheme * defaultTheme() const
Definition kgamethemeprovider.cpp:116
KGameThemeProvider(const QByteArray &configKey=QByteArrayLiteral("Theme"), QObject *parent=nullptr)
Constructor.
Definition kgamethemeprovider.cpp:55
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:50:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.