aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickicon_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-02-20 11:00:11 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2017-02-20 14:52:32 +0000
commitf6b79da50c5823005759965620593bd4b4873ec6 (patch)
tree246d3ec9ea4254e34da559ab0e2c884bd27db26e /src/quicktemplates2/qquickicon_p.h
parent20a7378c8ff930571cc3fce81f1ae67cf1d4a5fe (diff)
Add QQuickIcon::color
This will be used by the built-in styles to visualize various states (gray when disabled, accent color when active...) and can be also set or overridden by the users. Change-Id: I293348415d7e66dea163190cdf35d60ce5407b5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickicon_p.h')
-rw-r--r--src/quicktemplates2/qquickicon_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickicon_p.h b/src/quicktemplates2/qquickicon_p.h
index 02714d2b..8dae6d25 100644
--- a/src/quicktemplates2/qquickicon_p.h
+++ b/src/quicktemplates2/qquickicon_p.h
@@ -50,6 +50,7 @@
#include <QtCore/qobject.h>
#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
+#include <QtGui/qcolor.h>
QT_BEGIN_NAMESPACE
@@ -62,6 +63,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickIcon : public QObject
Q_PROPERTY(QString source READ source WRITE setSource NOTIFY sourceChanged FINAL)
Q_PROPERTY(int width READ width WRITE setWidth NOTIFY widthChanged FINAL)
Q_PROPERTY(int height READ height WRITE setHeight NOTIFY heightChanged FINAL)
+ Q_PROPERTY(QColor color READ color WRITE setColor RESET resetColor NOTIFY colorChanged FINAL)
public:
explicit QQuickIcon(QObject *parent = nullptr);
@@ -78,11 +80,16 @@ public:
int height() const;
void setHeight(int height);
+ QColor color() const;
+ void setColor(const QColor &color);
+ void resetColor();
+
Q_SIGNALS:
void nameChanged();
void sourceChanged();
void widthChanged();
void heightChanged();
+ void colorChanged();
private:
Q_DISABLE_COPY(QQuickIcon)