2017-09-28 10:12:30 +00:00
|
|
|
#ifndef QTMATERIALTHEME_H
|
|
|
|
#define QTMATERIALTHEME_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QScopedPointer>
|
|
|
|
#include <QColor>
|
2017-09-28 21:28:08 +00:00
|
|
|
#include <QIcon>
|
2021-06-30 09:30:12 +00:00
|
|
|
#include "qtmaterialconst.h"
|
2021-07-01 10:04:11 +00:00
|
|
|
#include <QtUiPlugin/QDesignerExportWidget>
|
2017-09-28 10:12:30 +00:00
|
|
|
|
|
|
|
class QtMaterialThemePrivate;
|
|
|
|
|
2021-07-01 10:04:11 +00:00
|
|
|
class QDESIGNER_WIDGET_EXPORT QtMaterialTheme : public QObject
|
2017-09-28 10:12:30 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit QtMaterialTheme(QObject *parent = 0);
|
|
|
|
~QtMaterialTheme();
|
|
|
|
|
|
|
|
QColor getColor(const QString &key) const;
|
|
|
|
|
|
|
|
void setColor(const QString &key, const QColor &color);
|
2021-06-30 09:30:12 +00:00
|
|
|
void setColor(const QString &key, MaterialConst::Color color);
|
2017-09-28 10:12:30 +00:00
|
|
|
|
2017-09-28 21:28:08 +00:00
|
|
|
static QIcon icon(QString category, QString icon);
|
|
|
|
|
2017-09-28 10:12:30 +00:00
|
|
|
protected:
|
|
|
|
const QScopedPointer<QtMaterialThemePrivate> d_ptr;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY(QtMaterialTheme)
|
|
|
|
Q_DECLARE_PRIVATE(QtMaterialTheme)
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // QTMATERIALTHEME_H
|