aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/qquickmaterialstyle_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 11:02:44 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 11:03:53 +0100
commit5ada1525e03116326a480fb05611904d3484c296 (patch)
treef23822e6b0482012065b9586d95cb8ab5d70c4bf /src/imports/controls/material/qquickmaterialstyle_p.h
parentf4f5e857447d42738b1b60b5c4184f39df2f1593 (diff)
parent4f1fb09ed70c69e73f2e19f28f4299f4cfbc90dc (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: .gitignore src/templates/qquickcombobox_p.h src/templates/qquickmenu_p.h src/templates/qquickmenu_p_p.h src/templates/qquickoverlay_p.h src/templates/qquickpopup.cpp src/templates/qquickpopup_p.h src/templates/qquickstackview_p.cpp Change-Id: I89c7d518697beec0b81ef3a12205286a4f3ccf89
Diffstat (limited to 'src/imports/controls/material/qquickmaterialstyle_p.h')
-rw-r--r--src/imports/controls/material/qquickmaterialstyle_p.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h
index b9236216..00103361 100644
--- a/src/imports/controls/material/qquickmaterialstyle_p.h
+++ b/src/imports/controls/material/qquickmaterialstyle_p.h
@@ -59,7 +59,9 @@ class QQuickMaterialStyle : public QQuickStyle
{
Q_OBJECT
Q_PROPERTY(Theme theme READ theme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL)
+ Q_PROPERTY(QVariant primary READ primary WRITE setPrimary RESET resetPrimary NOTIFY primaryChanged FINAL)
Q_PROPERTY(QVariant accent READ accent WRITE setAccent RESET resetAccent NOTIFY accentChanged FINAL)
+ Q_PROPERTY(QColor primaryColor READ primaryColor NOTIFY primaryChanged FINAL) // TODO: remove?
Q_PROPERTY(QColor accentColor READ accentColor NOTIFY accentChanged FINAL) // TODO: remove?
Q_PROPERTY(QColor backgroundColor READ backgroundColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor primaryTextColor READ primaryTextColor NOTIFY paletteChanged FINAL)
@@ -153,12 +155,19 @@ public:
void propagateTheme();
void resetTheme();
+ QVariant primary() const;
+ void setPrimary(const QVariant &accent);
+ void inheritPrimary(uint primary, bool custom);
+ void propagatePrimary();
+ void resetPrimary();
+
QVariant accent() const;
void setAccent(const QVariant &accent);
void inheritAccent(uint accent, bool custom);
void propagateAccent();
void resetAccent();
+ QColor primaryColor() const;
QColor accentColor() const;
QColor backgroundColor() const;
QColor primaryTextColor() const;
@@ -198,6 +207,7 @@ public:
Q_SIGNALS:
void themeChanged();
+ void primaryChanged();
void accentChanged();
void paletteChanged();
@@ -208,9 +218,12 @@ private:
void init();
bool m_explicitTheme;
+ bool m_explicitPrimary;
bool m_explicitAccent;
+ bool m_customPrimary;
bool m_customAccent;
Theme m_theme;
+ uint m_primary;
uint m_accent;
};