From 23052d3f50764e3d6a0def345d09c9a78d38857a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Wed, 2 Oct 2013 10:26:46 +0300 Subject: Refactored ColorTheme -> Theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTRD-2362 Change-Id: I042e57a2307f7465588ff3475a659e0483a45da8 Change-Id: I042e57a2307f7465588ff3475a659e0483a45da8 Reviewed-by: Tomi Korpipää --- src/datavisualization/engine/abstract3dcontroller.cpp | 6 +++--- src/datavisualization/engine/abstract3dcontroller_p.h | 2 +- src/datavisualization/engine/q3dbars.cpp | 6 +++--- src/datavisualization/engine/q3dbars.h | 2 +- src/datavisualization/engine/q3dscatter.cpp | 6 +++--- src/datavisualization/engine/q3dscatter.h | 2 +- src/datavisualization/engine/q3dsurface.cpp | 10 +++++----- src/datavisualization/engine/q3dsurface.h | 6 +++--- src/datavisualization/engine/theme.cpp | 12 ++++++------ src/datavisualization/engine/theme_p.h | 6 +++--- 10 files changed, 29 insertions(+), 29 deletions(-) (limited to 'src/datavisualization/engine') diff --git a/src/datavisualization/engine/abstract3dcontroller.cpp b/src/datavisualization/engine/abstract3dcontroller.cpp index f49d4d2f..fb4d7744 100644 --- a/src/datavisualization/engine/abstract3dcontroller.cpp +++ b/src/datavisualization/engine/abstract3dcontroller.cpp @@ -54,7 +54,7 @@ Abstract3DController::Abstract3DController(QRect boundRect, QObject *parent) : m_data(0), m_renderPending(false) { - m_theme.useColorTheme(QDataVis::ThemeQt); + m_theme.useTheme(QDataVis::ThemeQt); // Populate the scene m_scene->activeLight()->setPosition(defaultLightPos); @@ -685,9 +685,9 @@ QColor Abstract3DController::objectColor() const return m_theme.m_baseColor; } -void Abstract3DController::setColorTheme(QDataVis::ColorTheme colorTheme) +void Abstract3DController::setTheme(QDataVis::Theme theme) { - m_theme.useColorTheme(colorTheme); + m_theme.useTheme(theme); m_changeTracker.themeChanged = true; emitNeedRender(); diff --git a/src/datavisualization/engine/abstract3dcontroller_p.h b/src/datavisualization/engine/abstract3dcontroller_p.h index 2c1867b1..3ccd12f5 100644 --- a/src/datavisualization/engine/abstract3dcontroller_p.h +++ b/src/datavisualization/engine/abstract3dcontroller_p.h @@ -255,7 +255,7 @@ public: // Set theme (bar colors, shaders, window color, background colors, light intensity and text // colors are affected) - virtual void setColorTheme(QDataVis::ColorTheme colorTheme); + virtual void setTheme(QDataVis::Theme theme); virtual Theme theme(); // Set font diff --git a/src/datavisualization/engine/q3dbars.cpp b/src/datavisualization/engine/q3dbars.cpp index d99ece1a..0efd076e 100644 --- a/src/datavisualization/engine/q3dbars.cpp +++ b/src/datavisualization/engine/q3dbars.cpp @@ -275,7 +275,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::ThemeQt by + * Sets a predefined \a theme from \c QDataVis::Theme. 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. * @@ -283,9 +283,9 @@ void Q3DBars::setCameraPosition(qreal horizontal, qreal vertical, int distance) * * \warning This method is subject to change. */ -void Q3DBars::setTheme(QDataVis::ColorTheme theme) +void Q3DBars::setTheme(QDataVis::Theme theme) { - d_ptr->m_shared->setColorTheme(theme); + d_ptr->m_shared->setTheme(theme); } /*! diff --git a/src/datavisualization/engine/q3dbars.h b/src/datavisualization/engine/q3dbars.h index e4c1d785..957c69b8 100644 --- a/src/datavisualization/engine/q3dbars.h +++ b/src/datavisualization/engine/q3dbars.h @@ -62,7 +62,7 @@ public: void setCameraPosition(qreal horizontal, qreal vertical, int distance = 100); - void setTheme(QDataVis::ColorTheme theme); + void setTheme(QDataVis::Theme theme); void setBarThickness(qreal thicknessRatio); qreal barThickness(); diff --git a/src/datavisualization/engine/q3dscatter.cpp b/src/datavisualization/engine/q3dscatter.cpp index 816849fe..c7359c55 100644 --- a/src/datavisualization/engine/q3dscatter.cpp +++ b/src/datavisualization/engine/q3dscatter.cpp @@ -214,7 +214,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::ThemeQt by + * Sets a predefined \a theme from \c QDataVis::Theme. 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. * @@ -222,9 +222,9 @@ void Q3DScatter::setCameraPosition(qreal horizontal, qreal vertical, int distanc * * \warning This method is subject to change. */ -void Q3DScatter::setTheme(QDataVis::ColorTheme theme) +void Q3DScatter::setTheme(QDataVis::Theme theme) { - d_ptr->m_shared->setColorTheme(theme); + d_ptr->m_shared->setTheme(theme); } /*! diff --git a/src/datavisualization/engine/q3dscatter.h b/src/datavisualization/engine/q3dscatter.h index 33e74d7d..3799c325 100644 --- a/src/datavisualization/engine/q3dscatter.h +++ b/src/datavisualization/engine/q3dscatter.h @@ -59,7 +59,7 @@ public: void setCameraPosition(qreal horizontal, qreal vertical, int distance = 100); - void setTheme(QDataVis::ColorTheme theme); + void setTheme(QDataVis::Theme theme); void setObjectColor(const QColor &baseColor, bool uniform = true); QColor objectColor() const; diff --git a/src/datavisualization/engine/q3dsurface.cpp b/src/datavisualization/engine/q3dsurface.cpp index 8522eb81..c809fedc 100644 --- a/src/datavisualization/engine/q3dsurface.cpp +++ b/src/datavisualization/engine/q3dsurface.cpp @@ -202,20 +202,20 @@ bool Q3DSurface::isBackgroundVisible() const /*! * \property Q3DSurface::theme * - * A predefined \a theme from \c QDataVis::ColorTheme. It is preset to \c QDataVis::ThemeQt by + * A predefined \a theme from \c QDataVis::Theme. 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. * * \warning This property is subject to change. */ -void Q3DSurface::setTheme(QDataVis::ColorTheme theme) +void Q3DSurface::setTheme(QDataVis::Theme theme) { - d_ptr->m_shared->setColorTheme(theme); + d_ptr->m_shared->setTheme(theme); } -QDataVis::ColorTheme Q3DSurface::theme() const +QDataVis::Theme Q3DSurface::theme() const { - return d_ptr->m_shared->theme().colorTheme(); + return d_ptr->m_shared->theme().theme(); } /*! diff --git a/src/datavisualization/engine/q3dsurface.h b/src/datavisualization/engine/q3dsurface.h index 97b0dde0..a51112e6 100644 --- a/src/datavisualization/engine/q3dsurface.h +++ b/src/datavisualization/engine/q3dsurface.h @@ -35,7 +35,7 @@ class QT_DATAVISUALIZATION_EXPORT Q3DSurface : public Q3DWindow Q_OBJECT Q_PROPERTY(QtDataVisualization::QDataVis::SelectionMode selectionMode READ selectionMode WRITE setSelectionMode) Q_PROPERTY(QtDataVisualization::QDataVis::LabelTransparency labelTransparency READ labelTransparency WRITE setLabelTransparency) - Q_PROPERTY(QtDataVisualization::QDataVis::ColorTheme theme READ theme WRITE setTheme) + Q_PROPERTY(QtDataVisualization::QDataVis::Theme theme READ theme WRITE setTheme) Q_PROPERTY(QtDataVisualization::QDataVis::ShadowQuality shadowQuality READ shadowQuality WRITE setShadowQuality) Q_PROPERTY(QtDataVisualization::QDataVis::CameraPreset cameraPreset READ cameraPreset WRITE setCameraPreset) Q_PROPERTY(bool gridVisible READ isGridVisible WRITE setGridVisible) @@ -59,8 +59,8 @@ public: void setBackgroundVisible(bool visible); bool isBackgroundVisible() const; - void setTheme(QDataVis::ColorTheme theme); - QDataVis::ColorTheme theme() const; + void setTheme(QDataVis::Theme theme); + QDataVis::Theme theme() const; void setShadowQuality(QDataVis::ShadowQuality quality); QDataVis::ShadowQuality shadowQuality() const; diff --git a/src/datavisualization/engine/theme.cpp b/src/datavisualization/engine/theme.cpp index 38a54196..d9f2974a 100644 --- a/src/datavisualization/engine/theme.cpp +++ b/src/datavisualization/engine/theme.cpp @@ -51,15 +51,15 @@ Theme::~Theme() { } -QDataVis::ColorTheme Theme::colorTheme() +QDataVis::Theme Theme::theme() { - return m_colorTheme; + return m_theme; } -void Theme::useColorTheme(QDataVis::ColorTheme colorTheme) +void Theme::useTheme(QDataVis::Theme theme) { - m_colorTheme = colorTheme; - switch (colorTheme) { + m_theme = theme; + switch (theme) { case QDataVis::ThemeQt: { m_baseColor = QColor(QRgb(0x80c342)); //m_heightColor = QColor(QRgb(0x)); @@ -227,7 +227,7 @@ void Theme::useColorTheme(QDataVis::ColorTheme colorTheme) void Theme::setFromTheme(Theme &theme) { - m_colorTheme = theme.m_colorTheme; + m_theme = theme.m_theme; m_baseColor = theme.m_baseColor; m_heightColor = theme.m_heightColor; m_depthColor = theme.m_depthColor; diff --git a/src/datavisualization/engine/theme_p.h b/src/datavisualization/engine/theme_p.h index e8e7231a..ec689f63 100644 --- a/src/datavisualization/engine/theme_p.h +++ b/src/datavisualization/engine/theme_p.h @@ -43,8 +43,8 @@ public: explicit Theme(); ~Theme(); - void useColorTheme(QDataVis::ColorTheme theme); - QDataVis::ColorTheme colorTheme(); + void useTheme(QDataVis::Theme theme); + QDataVis::Theme theme(); void setFromTheme(Theme &theme); private: @@ -57,7 +57,7 @@ private: friend class SelectionPointer; friend class Drawer; - QDataVis::ColorTheme m_colorTheme; + QDataVis::Theme m_theme; QColor m_baseColor; QColor m_heightColor; QColor m_depthColor; -- cgit v1.2.3