8#include <dtkwidget_global.h>
9#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
13#include <QGlobalStatic>
16DWIDGET_BEGIN_NAMESPACE
18class DThemeManagerPrivate;
19class LIBDTKWIDGETSHARED_EXPORT D_DECL_DEPRECATED DThemeManager :
public QObject,
public DTK_CORE_NAMESPACE::DObject
24 static DThemeManager *instance();
26 QString theme()
const;
27 QString theme(
const QWidget *widget, QWidget **baseWidget =
nullptr)
const;
28 void setTheme(
const QString theme);
29 void setTheme(QWidget *widget,
const QString theme);
31 QString getQssForWidget(
const QString className,
const QString &theme = QString())
const;
32 QString getQssForWidget(
const QWidget *widget)
const;
34 static void registerWidget(QWidget *widget, QStringList properties = QStringList());
37 static void registerWidget(QWidget *widget,
const QString &filename,
const QStringList &properties = QStringList());
41 void updateThemeOnParentChanged(QWidget *widget);
44 void themeChanged(QString theme);
45 void widgetThemeChanged(QWidget *widget, QString theme);
49 bool eventFilter(QObject *watched, QEvent *event) Q_DECL_OVERRIDE;
52 friend class DApplication;
53 D_DECLARE_PRIVATE(DThemeManager)