From 611dfce313e6b1998b8d7afc49d63beac90b42e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Mon, 23 Sep 2013 06:13:23 +0300 Subject: Removed old themes Task-number: QTRD-2319 Change-Id: I90e6add03fdca157fec6aa2398488982ab05d104 Reviewed-by: Miikka Heikkinen --- .../engine/abstract3dcontroller.cpp | 2 +- src/datavisualization/engine/q3dbars.cpp | 2 +- src/datavisualization/engine/q3dscatter.cpp | 2 +- src/datavisualization/engine/q3dsurface.cpp | 2 +- src/datavisualization/engine/theme.cpp | 230 --------------------- src/datavisualization/engine/theme_p.h | 2 +- .../global/qdatavisualizationenums.h | 8 - .../global/qtdatavisualizationenums.qdoc | 8 - 8 files changed, 5 insertions(+), 251 deletions(-) (limited to 'src/datavisualization') 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 -- cgit v1.2.3