diff options
author | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-23 06:13:23 +0300 |
---|---|---|
committer | Tomi Korpipää <tomi.korpipaa@digia.com> | 2013-09-23 08:04:47 +0300 |
commit | 611dfce313e6b1998b8d7afc49d63beac90b42e9 (patch) | |
tree | 347f07b62df67e71612277400ed0b07308c68b13 /src | |
parent | d57aabe85e6b4012f93348884df16262889906d8 (diff) |
Removed old themes
Task-number: QTRD-2319
Change-Id: I90e6add03fdca157fec6aa2398488982ab05d104
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/datavisualization/engine/abstract3dcontroller.cpp | 2 | ||||
-rw-r--r-- | src/datavisualization/engine/q3dbars.cpp | 2 | ||||
-rw-r--r-- | src/datavisualization/engine/q3dscatter.cpp | 2 | ||||
-rw-r--r-- | src/datavisualization/engine/q3dsurface.cpp | 2 | ||||
-rw-r--r-- | src/datavisualization/engine/theme.cpp | 230 | ||||
-rw-r--r-- | src/datavisualization/engine/theme_p.h | 2 | ||||
-rw-r--r-- | src/datavisualization/global/qdatavisualizationenums.h | 8 | ||||
-rw-r--r-- | src/datavisualization/global/qtdatavisualizationenums.qdoc | 8 | ||||
-rw-r--r-- | src/datavisualizationqml2/declarativebars.cpp | 8 | ||||
-rw-r--r-- | src/datavisualizationqml2/declarativebars_p.h | 1 | ||||
-rw-r--r-- | src/datavisualizationqml2/declarativescatter.cpp | 13 | ||||
-rw-r--r-- | src/datavisualizationqml2/declarativescatter_p.h | 1 | ||||
-rw-r--r-- | src/datavisualizationqml2/declarativesurface.cpp | 8 | ||||
-rw-r--r-- | src/datavisualizationqml2/declarativesurface_p.h | 1 |
14 files changed, 14 insertions, 274 deletions
diff --git a/src/datavisualization/engine/abstract3dcontroller.cpp b/src/datavisualization/engine/abstract3dcontroller.cpp index 7c98f804..b5bd04d5 100644 --- a/src/datavisualization/engine/abstract3dcontroller.cpp +++ b/src/datavisualization/engine/abstract3dcontroller.cpp @@ -59,7 +59,7 @@ Abstract3DController::Abstract3DController(QRect boundRect, QObject *parent) : m_data(0), m_renderPending(false) { - m_theme.useColorTheme(QDataVis::ThemeSystem); + m_theme.useColorTheme(QDataVis::ThemeQt); // Populate the scene m_scene->activeLight()->setPosition(defaultLightPos); diff --git a/src/datavisualization/engine/q3dbars.cpp b/src/datavisualization/engine/q3dbars.cpp index 15f8cc32..a60fe190 100644 --- a/src/datavisualization/engine/q3dbars.cpp +++ b/src/datavisualization/engine/q3dbars.cpp @@ -432,7 +432,7 @@ void Q3DBars::setCameraPosition(qreal horizontal, qreal vertical, int distance) } /*! - * Sets a predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeSystem by + * Sets a predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeQt by * default. Theme affects bar colors, label colors, text color, background color, window color and * grid color. Lighting is also adjusted by themes. * diff --git a/src/datavisualization/engine/q3dscatter.cpp b/src/datavisualization/engine/q3dscatter.cpp index a3503ef1..715f2b18 100644 --- a/src/datavisualization/engine/q3dscatter.cpp +++ b/src/datavisualization/engine/q3dscatter.cpp @@ -341,7 +341,7 @@ void Q3DScatter::setCameraPosition(qreal horizontal, qreal vertical, int distanc } /*! - * Sets a predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeSystem by + * Sets a predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeQt by * default. Theme affects bar colors, label colors, text color, background color, window color and * grid color. Lighting is also adjusted by themes. * diff --git a/src/datavisualization/engine/q3dsurface.cpp b/src/datavisualization/engine/q3dsurface.cpp index fe4d4b61..23a1b14b 100644 --- a/src/datavisualization/engine/q3dsurface.cpp +++ b/src/datavisualization/engine/q3dsurface.cpp @@ -315,7 +315,7 @@ bool Q3DSurface::isBackgroundVisible() const } /*! - * Sets a predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeSystem by + * Sets a predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeQt by * default. Theme affects label colors, text color, background color, window color and * grid color. Lighting is also adjusted by themes. * diff --git a/src/datavisualization/engine/theme.cpp b/src/datavisualization/engine/theme.cpp index 23dc6705..dfa189a4 100644 --- a/src/datavisualization/engine/theme.cpp +++ b/src/datavisualization/engine/theme.cpp @@ -60,236 +60,6 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme) { m_colorTheme = colorTheme; switch (colorTheme) { - case QDataVis::ThemeSystem: { -#ifdef Q_OS_WIN - DWORD colorHighlight; - colorHighlight = GetSysColor(COLOR_HIGHLIGHT); - m_baseColor = QColor(GetRValue(colorHighlight), - GetGValue(colorHighlight), - GetBValue(colorHighlight)); - DWORD colorWindowFrame; - colorWindowFrame = GetSysColor(COLOR_WINDOWFRAME); - m_heightColor = QColor(GetRValue(colorWindowFrame), - GetGValue(colorWindowFrame), - GetBValue(colorWindowFrame)); - m_depthColor = QColor(Qt::black); - DWORD colorWindow; - colorWindow = GetSysColor(COLOR_WINDOW); - m_backgroundColor = QColor(GetRValue(colorWindow), - GetGValue(colorWindow), - GetBValue(colorWindow)); - m_windowColor = QColor(GetRValue(colorWindow), - GetGValue(colorWindow), - GetBValue(colorWindow)); - m_textColor = QColor(QRgb(0x404044)); - m_textBackgroundColor = QColor(0xd6, 0xd6, 0xd6, 0xa0); - m_gridLine = QColor(QRgb(0xe2e2e2)); - m_highlightBarColor = QColor(QRgb(0xe2e2e2)); - m_highlightRowColor = QColor(QRgb(0xf2f2f2)); - m_highlightColumnColor = QColor(QRgb(0xf2f2f2)); - m_lightStrength = 4.0f; - m_ambientStrength = 0.3f; - m_highlightLightStrength = 6.0f; -#elif defined(Q_OS_LINUX) - m_baseColor = QColor(QRgb(0x60a6e6)); - m_heightColor = QColor(QRgb(0xfc5751)); - m_depthColor = QColor(QRgb(0x92ca66)); - m_backgroundColor = QColor(QRgb(0xffffff)); - m_windowColor = QColor(QRgb(0xffffff)); - m_textColor = QColor(QRgb(0x404044)); - m_textBackgroundColor = QColor(0xd6, 0xd6, 0xd6, 0xa0); - m_gridLine = QColor(QRgb(0xe2e2e2)); - m_highlightBarColor = QColor(QRgb(0xeba85f)); - m_highlightRowColor = QColor(QRgb(0xfc5751)); - m_highlightColumnColor = QColor(QRgb(0xfc5751)); - m_lightStrength = 4.0f; - m_ambientStrength = 0.3f; - m_highlightLightStrength = 6.0f; -#elif defined(Q_OS_MAC) - m_baseColor = QColor(QRgb(0x60a6e6)); - m_heightColor = QColor(QRgb(0xfc5751)); - m_depthColor = QColor(QRgb(0x92ca66)); - m_backgroundColor = QColor(QRgb(0xffffff)); - m_windowColor = QColor(QRgb(0xffffff)); - m_textColor = QColor(QRgb(0x404044)); - m_textBackgroundColor = QColor(0xd6, 0xd6, 0xd6, 0xa0); - m_gridLine = QColor(QRgb(0xe2e2e2)); - m_highlightBarColor = QColor(QRgb(0xeba85f)); - m_highlightRowColor = QColor(QRgb(0xfc5751)); - m_highlightColumnColor = QColor(QRgb(0xfc5751)); - m_lightStrength = 4.0f; - m_ambientStrength = 0.3f; - m_highlightLightStrength = 6.0f; -#else - m_baseColor = QColor(QRgb(0x60a6e6)); - m_heightColor = QColor(QRgb(0xfc5751)); - m_depthColor = QColor(QRgb(0x92ca66)); - m_backgroundColor = QColor(QRgb(0xffffff)); - m_windowColor = QColor(QRgb(0xffffff)); - m_textColor = QColor(QRgb(0x404044)); - m_textBackgroundColor = QColor(0xd6, 0xd6, 0xd6, 0xa0); - m_gridLine = QColor(QRgb(0xe2e2e2)); - m_highlightBarColor = QColor(QRgb(0xeba85f)); - m_highlightRowColor = QColor(QRgb(0xfc5751)); - m_highlightColumnColor = QColor(QRgb(0xfc5751)); - m_lightStrength = 4.0f; - m_ambientStrength = 0.3f; - m_highlightLightStrength = 6.0f; -#endif - m_uniformColor = true; - m_labelBorders = true; - break; - } - case QDataVis::ThemeBlueCerulean: { - m_baseColor = QColor(QRgb(0xc7e85b)); - m_heightColor = QColor(QRgb(0xee7392)); - m_depthColor = QColor(QRgb(0x1cb54f)); - m_backgroundColor = QColor(QRgb(0x056189)); - m_windowColor = QColor(QRgb(0x101a31)); - m_textColor = QColor(QRgb(0xffffff)); - m_textBackgroundColor = QColor(0x05, 0x61, 0x89, 0xa0); - m_gridLine = QColor(QRgb(0xee7392)); - //m_gridLine = QColor(QRgb(0x84a2b0)); - m_highlightBarColor = QColor(QRgb(0x5cbf9b)); - m_highlightRowColor = QColor(QRgb(0x009fbf)); - m_highlightColumnColor = QColor(QRgb(0x009fbf)); - m_lightStrength = 5.0f; - m_ambientStrength = 0.2f; - m_highlightLightStrength = 10.0f; - m_uniformColor = true; - m_labelBorders = false; - break; - } - case QDataVis::ThemeBlueIcy: { - m_baseColor = QRgb(0x3daeda); - m_heightColor = QRgb(0x2fa3b4); - m_depthColor = QColor(QRgb(0x2685bf)); - m_backgroundColor = QColor(QRgb(0x2fa3b4)); - //m_backgroundColor = QColor(QRgb(0xffffff)); - m_windowColor = QColor(QRgb(0xffffff)); - m_textColor = QColor(QRgb(0x404044)); - m_textBackgroundColor = QColor(0x26, 0x85, 0xbf, 0xa0); - //m_textBackgroundColor = QColor(0xff, 0xff, 0xff, 0x80); - m_gridLine = QColor(QRgb(0x2685bf)); - //m_gridLine = QColor(QRgb(0xe2e2e2)); - m_highlightBarColor = QColor(QRgb(0x0c2673)); - m_highlightRowColor = QColor(QRgb(0x5f3dba)); - m_highlightColumnColor = QColor(QRgb(0x5f3dba)); - m_lightStrength = 5.0f; - m_ambientStrength = 0.3f; - m_highlightLightStrength = 8.0f; - m_uniformColor = true; - m_labelBorders = false; - break; - } - case QDataVis::ThemeBlueNcs: { - m_baseColor = QColor(QRgb(0x1db0da)); - m_heightColor = QColor(QRgb(0x398ca3)); - m_depthColor = QColor(QRgb(0x1341a6)); - m_backgroundColor = QColor(QRgb(0x398ca3)); - //m_backgroundColor = QColor(QRgb(0xffffff)); - m_windowColor = QColor(QRgb(0xffffff)); - m_textColor = QColor(QRgb(0x404044)); - m_textBackgroundColor = QColor(0x1d, 0xb0, 0xda, 0xa0); - //m_textBackgroundColor = QColor(0xff, 0xff, 0xff, 0x80); - m_gridLine = QColor(QRgb(0x1341a6)); - //m_gridLine = QColor(QRgb(0xe2e2e2)); - m_highlightBarColor = QColor(QRgb(0x88d41e)); - m_highlightRowColor = QColor(QRgb(0xff8e1a)); - m_highlightColumnColor = QColor(QRgb(0xff8e1a)); - m_lightStrength = 4.0f; - m_ambientStrength = 0.2f; - m_highlightLightStrength = 6.0f; - m_uniformColor = true; - m_labelBorders = false; - break; - } - case QDataVis::ThemeBrownSand: { - m_baseColor = QColor(QRgb(0xb39b72)); - m_heightColor = QColor(QRgb(0x494345)); - m_depthColor = QColor(QRgb(0xb3b376)); - m_backgroundColor = QColor(QRgb(0x494345)); - //m_backgroundColor = QColor(QRgb(0xf3ece0)); - m_windowColor = QColor(QRgb(0xf3ece0)); - m_textColor = QColor(QRgb(0x404044)); - m_textBackgroundColor = QColor(0xb5, 0xb0, 0xa7, 0xa0); - m_gridLine = QColor(QRgb(0xb3b376)); - //m_gridLine = QColor(QRgb(0xd4cec3)); - m_highlightBarColor = QColor(QRgb(0xc35660)); - m_highlightRowColor = QColor(QRgb(0x536780)); - m_highlightColumnColor = QColor(QRgb(0x536780)); - m_lightStrength = 6.0f; - m_ambientStrength = 0.3f; - m_highlightLightStrength = 8.0f; - m_uniformColor = false; - m_labelBorders = false; - break; - } - case QDataVis::ThemeDark: { - m_baseColor = QColor(QRgb(0x38ad6b)); // charts: series color 1 - m_heightColor = QColor(QRgb(0xbf593e)); // charts: series color 5 - m_depthColor = QColor(QRgb(0x3c84a7)); // charts: series color 2 - m_backgroundColor = QColor(QRgb(0x2e303a)); // charts: background color 1 - m_windowColor = QColor(QRgb(0x121218)); // charts: background color 2 - m_textColor = QColor(QRgb(0xffffff)); // charts: label color - m_textBackgroundColor = QColor(0x86, 0x87, 0x8c, 0xa0); // charts: axis line pen OR background color 2 - m_gridLine = QColor(QRgb(0xbf593e)); // charts: grid line color - //m_gridLine = QColor(QRgb(0x86878c)); // charts: grid line color - m_highlightBarColor = QColor(QRgb(0xeb8817)); // charts: series color 3 - m_highlightRowColor = QColor(QRgb(0x7b7f8c)); // charts: series color 4 - m_highlightColumnColor = QColor(QRgb(0x7b7f8c)); // charts: series color 4 - m_lightStrength = 6.0f; - m_ambientStrength = 0.2f; - m_highlightLightStrength = 8.0f; - m_uniformColor = false; - m_labelBorders = true; - break; - } - case QDataVis::ThemeHighContrast: { - m_baseColor = QColor(QRgb(0xff4a41)); - m_heightColor = QColor(QRgb(0x202020)); - m_depthColor = QColor(QRgb(0x596a74)); - m_backgroundColor = QColor(QRgb(0x596a74)); - //m_backgroundColor = QColor(QRgb(0xffffff)); - m_windowColor = QColor(QRgb(0x000000)); - m_textColor = QColor(QRgb(0xffffff)); - m_textBackgroundColor = QColor(0x20, 0x20, 0x20, 0xa0); - //m_textColor = QColor(QRgb(0x181818)); - //m_textBackgroundColor = QColor(0xff, 0xff, 0xff, 0xa0); - m_gridLine = QColor(QRgb(0xffab03)); - //m_gridLine = QColor(QRgb(0x8c8c8c)); - m_highlightBarColor = QColor(QRgb(0xffab03)); - m_highlightRowColor = QColor(QRgb(0x038e9b)); - m_highlightColumnColor = QColor(QRgb(0x038e9b)); - m_lightStrength = 8.0f; - m_ambientStrength = 0.3f; - m_highlightLightStrength = 10.0f; - m_uniformColor = false; - m_labelBorders = true; - break; - } - case QDataVis::ThemeLight: { - m_baseColor = QColor(QRgb(0x209fdf)); - m_heightColor = QColor(QRgb(0xbf593e)); - m_depthColor = QColor(QRgb(0x99ca53)); - m_backgroundColor = QColor(QRgb(0x99ca53)); - //m_backgroundColor = QColor(QRgb(0xffffff)); - m_windowColor = QColor(QRgb(0xffffff)); - m_textColor = QColor(QRgb(0x404044)); - m_textBackgroundColor = QColor(0xf6, 0xa6, 0x25, 0xa0); - //m_textBackgroundColor = QColor(0xd6, 0xd6, 0xd6, 0xa0); - m_gridLine = QColor(QRgb(0x99ca53)); - //m_gridLine = QColor(QRgb(0xe2e2e2)); - m_highlightBarColor = QColor(QRgb(0xf6a625)); - m_highlightRowColor = QColor(QRgb(0x6d5fd5)); - m_highlightColumnColor = QColor(QRgb(0x6d5fd5)); - m_lightStrength = 6.0f; - m_ambientStrength = 0.3f; - m_highlightLightStrength = 7.0f; - m_uniformColor = true; - m_labelBorders = false; - break; - } case QDataVis::ThemeQt: { m_baseColor = QColor(QRgb(0x80c342)); //m_heightColor = QColor(QRgb(0x)); diff --git a/src/datavisualization/engine/theme_p.h b/src/datavisualization/engine/theme_p.h index 246ebf93..e8e7231a 100644 --- a/src/datavisualization/engine/theme_p.h +++ b/src/datavisualization/engine/theme_p.h @@ -37,7 +37,7 @@ class QColor; QT_DATAVISUALIZATION_BEGIN_NAMESPACE -class Theme +class QT_DATAVISUALIZATION_EXPORT Theme { public: explicit Theme(); diff --git a/src/datavisualization/global/qdatavisualizationenums.h b/src/datavisualization/global/qdatavisualizationenums.h index 06365950..72ae2901 100644 --- a/src/datavisualization/global/qdatavisualizationenums.h +++ b/src/datavisualization/global/qdatavisualizationenums.h @@ -85,14 +85,6 @@ public: enum ColorTheme { ThemeDefault = -1, - ThemeSystem = 0, - ThemeBlueCerulean, - ThemeBlueIcy, - ThemeBlueNcs, - ThemeBrownSand, - ThemeDark, - ThemeHighContrast, - ThemeLight, ThemeQt, ThemePrimaryColors, ThemeDigia, diff --git a/src/datavisualization/global/qtdatavisualizationenums.qdoc b/src/datavisualization/global/qtdatavisualizationenums.qdoc index 6304b85e..c5f48412 100644 --- a/src/datavisualization/global/qtdatavisualizationenums.qdoc +++ b/src/datavisualization/global/qtdatavisualizationenums.qdoc @@ -105,14 +105,6 @@ \value ThemeDefault Used only in QML to indicate a theme has not been set. - \value ThemeSystem - \value ThemeBlueCerulean - \value ThemeBlueIcy - \value ThemeBlueNcs - \value ThemeBrownSand - \value ThemeDark - \value ThemeHighContrast - \value ThemeLight \value ThemeQt \value ThemePrimaryColors \value ThemeDigia diff --git a/src/datavisualizationqml2/declarativebars.cpp b/src/datavisualizationqml2/declarativebars.cpp index dd575d35..c757c804 100644 --- a/src/datavisualizationqml2/declarativebars.cpp +++ b/src/datavisualizationqml2/declarativebars.cpp @@ -20,6 +20,7 @@ #include "declarativebarsrenderer_p.h" #include "q3dvalueaxis.h" #include "qitemmodelbardataproxy.h" +#include "theme_p.h" QT_DATAVISUALIZATION_BEGIN_NAMESPACE @@ -28,8 +29,7 @@ const QString smoothString(QStringLiteral("Smooth")); DeclarativeBars::DeclarativeBars(QQuickItem *parent) : QQuickItem(parent), m_shared(0), - m_initialisedSize(0, 0), - m_theme(QDataVis::ThemeDefault) + m_initialisedSize(0, 0) { setFlags(QQuickItem::ItemHasContents); setAcceptedMouseButtons(Qt::AllButtons); @@ -224,14 +224,12 @@ QDataVis::CameraPreset DeclarativeBars::cameraPreset() void DeclarativeBars::setTheme(QDataVis::ColorTheme theme) { // TODO: Implement correctly once "user-modifiable themes" (QTRD-2120) is implemented - // We need to save this locally, as there are no getters for it in controller - m_theme = theme; m_shared->setColorTheme(theme); } QDataVis::ColorTheme DeclarativeBars::theme() { - return m_theme; + return m_shared->theme().colorTheme(); } void DeclarativeBars::setFont(const QFont &font) diff --git a/src/datavisualizationqml2/declarativebars_p.h b/src/datavisualizationqml2/declarativebars_p.h index b2e64eae..78223773 100644 --- a/src/datavisualizationqml2/declarativebars_p.h +++ b/src/datavisualizationqml2/declarativebars_p.h @@ -182,7 +182,6 @@ protected: private: QSize m_initialisedSize; - QDataVis::ColorTheme m_theme; }; QT_DATAVISUALIZATION_END_NAMESPACE diff --git a/src/datavisualizationqml2/declarativescatter.cpp b/src/datavisualizationqml2/declarativescatter.cpp index 3c3b1371..34a11024 100644 --- a/src/datavisualizationqml2/declarativescatter.cpp +++ b/src/datavisualizationqml2/declarativescatter.cpp @@ -19,6 +19,7 @@ #include "declarativescatter_p.h" #include "declarativescatterrenderer_p.h" #include "qitemmodelscatterdataproxy.h" +#include "theme_p.h" QT_DATAVISUALIZATION_BEGIN_NAMESPACE @@ -27,8 +28,7 @@ const QString smoothString(QStringLiteral("Smooth")); DeclarativeScatter::DeclarativeScatter(QQuickItem *parent) : QQuickItem(parent), m_shared(0), - m_initialisedSize(0, 0), - m_theme(QDataVis::ThemeDefault) + m_initialisedSize(0, 0) { setFlags(QQuickItem::ItemHasContents); setAcceptedMouseButtons(Qt::AllButtons); @@ -189,19 +189,12 @@ QDataVis::CameraPreset DeclarativeScatter::cameraPreset() void DeclarativeScatter::setTheme(QDataVis::ColorTheme theme) { - // TODO: Implement correctly once "user-modifiable themes" (QTRD-2120) is implemented - // We need to save this locally, as there are no getters for it in controller - m_theme = theme; m_shared->setColorTheme(theme); - - // TODO: Investigate why the beforeSynchronizing() signal requires update and is not sent automatically when this value changes, - // but is sent wen e.g. enable/disable background changes. - update(); } QDataVis::ColorTheme DeclarativeScatter::theme() { - return m_theme; + return m_shared->theme().colorTheme(); } void DeclarativeScatter::setFont(const QFont &font) diff --git a/src/datavisualizationqml2/declarativescatter_p.h b/src/datavisualizationqml2/declarativescatter_p.h index 6c70a146..4541df8e 100644 --- a/src/datavisualizationqml2/declarativescatter_p.h +++ b/src/datavisualizationqml2/declarativescatter_p.h @@ -157,7 +157,6 @@ protected: private: QSize m_initialisedSize; - QDataVis::ColorTheme m_theme; }; QT_DATAVISUALIZATION_END_NAMESPACE diff --git a/src/datavisualizationqml2/declarativesurface.cpp b/src/datavisualizationqml2/declarativesurface.cpp index d238c9ad..551f6dbc 100644 --- a/src/datavisualizationqml2/declarativesurface.cpp +++ b/src/datavisualizationqml2/declarativesurface.cpp @@ -20,14 +20,14 @@ #include "declarativesurfacerenderer_p.h" #include "q3dvalueaxis.h" #include "qitemmodelsurfacedataproxy.h" +#include "theme_p.h" QT_DATAVISUALIZATION_BEGIN_NAMESPACE DeclarativeSurface::DeclarativeSurface(QQuickItem *parent) : QQuickItem(parent), m_shared(0), - m_initialisedSize(0, 0), - m_theme(QDataVis::ThemeDefault) + m_initialisedSize(0, 0) { setFlags(QQuickItem::ItemHasContents); setAcceptedMouseButtons(Qt::AllButtons); @@ -137,14 +137,12 @@ void DeclarativeSurface::setAxisZ(Q3DValueAxis *axis) void DeclarativeSurface::setTheme(QDataVis::ColorTheme theme) { // TODO: Implement correctly once "user-modifiable themes" (QTRD-2120) is implemented - // We need to save this locally, as there are no getters for it in controller - m_theme = theme; m_shared->setColorTheme(theme); } QDataVis::ColorTheme DeclarativeSurface::theme() { - return m_theme; + return m_shared->theme().colorTheme(); } void DeclarativeSurface::setFont(const QFont &font) diff --git a/src/datavisualizationqml2/declarativesurface_p.h b/src/datavisualizationqml2/declarativesurface_p.h index cc20449d..7884483b 100644 --- a/src/datavisualizationqml2/declarativesurface_p.h +++ b/src/datavisualizationqml2/declarativesurface_p.h @@ -147,7 +147,6 @@ protected: private: QSize m_initialisedSize; - QDataVis::ColorTheme m_theme; }; QT_DATAVISUALIZATION_END_NAMESPACE |