From 8674307d6bafabfcaedfe175b883313f0e7d88b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= Date: Thu, 16 Jan 2014 13:33:57 +0200 Subject: Reintroduced namespace macros Task-number: QTRD-2594 Change-Id: I31e1ea20fd590d7bdf3d1218d696915c22c3426b Change-Id: I31e1ea20fd590d7bdf3d1218d696915c22c3426b Reviewed-by: Miikka Heikkinen --- src/datavisualization/theme/builtin3dthemes.cpp | 230 ------------------------ src/datavisualization/theme/builtin3dthemes_p.h | 87 --------- src/datavisualization/theme/q3dtheme.cpp | 17 +- src/datavisualization/theme/q3dtheme.h | 4 +- src/datavisualization/theme/q3dtheme_p.h | 4 +- src/datavisualization/theme/thememanager.cpp | 9 +- src/datavisualization/theme/thememanager_p.h | 4 +- 7 files changed, 12 insertions(+), 343 deletions(-) delete mode 100644 src/datavisualization/theme/builtin3dthemes.cpp delete mode 100644 src/datavisualization/theme/builtin3dthemes_p.h (limited to 'src/datavisualization/theme') diff --git a/src/datavisualization/theme/builtin3dthemes.cpp b/src/datavisualization/theme/builtin3dthemes.cpp deleted file mode 100644 index 9848e6e5..00000000 --- a/src/datavisualization/theme/builtin3dthemes.cpp +++ /dev/null @@ -1,230 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtDataVisualization module. -** -** Licensees holding valid Qt Enterprise licenses may use this file in -** accordance with the Qt Enterprise License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** -****************************************************************************/ - -#include "builtin3dthemes_p.h" - -QT_DATAVISUALIZATION_BEGIN_NAMESPACE - -BuiltIn3DThemeQt::BuiltIn3DThemeQt() - : Q3DTheme(QDataVis::ThemeQt) -{ - setBaseColor(QColor(QRgb(0x80c342))); - setBackgroundColor(QColor(QRgb(0xffffff))); - setWindowColor(QColor(QRgb(0xffffff))); - setTextColor(QColor(QRgb(0x35322f))); - setTextBackgroundColor(QColor(0xff, 0xff, 0xff, 0x99)); - setGridLineColor(QColor(QRgb(0xd7d6d5))); - setSingleHighlightColor(QColor(QRgb(0x14aaff))); - setMultiHighlightColor(QColor(QRgb(0x6400aa))); - setLightStrength(5.0f); - setAmbientLightStrength(0.5f); - setHighlightLightStrength(5.0f); - setLabelBorderEnabled(true); - setColorStyle(QDataVis::ColorStyleUniform); -} - -BuiltIn3DThemePrimaryColors::BuiltIn3DThemePrimaryColors() - : Q3DTheme(QDataVis::ThemePrimaryColors) -{ - setBaseColor(QColor(QRgb(0xffe400))); - setBackgroundColor(QColor(QRgb(0xffffff))); - setWindowColor(QColor(QRgb(0xffffff))); - setTextColor(QColor(QRgb(0x000000))); - setTextBackgroundColor(QColor(0xff, 0xff, 0xff, 0x99)); - setGridLineColor(QColor(QRgb(0xd7d6d5))); - setSingleHighlightColor(QColor(QRgb(0x27beee))); - setMultiHighlightColor(QColor(QRgb(0xee1414))); - setLightStrength(5.0f); - setAmbientLightStrength(0.5f); - setHighlightLightStrength(5.0f); - setLabelBorderEnabled(false); - setColorStyle(QDataVis::ColorStyleUniform); -} - -BuiltIn3DThemeDigia::BuiltIn3DThemeDigia() - : Q3DTheme(QDataVis::ThemeDigia) -{ - setBackgroundColor(QColor(QRgb(0xffffff))); - setWindowColor(QColor(QRgb(0xffffff))); - setTextColor(QColor(QRgb(0x000000))); - setTextBackgroundColor(QColor(0xff, 0xff, 0xff, 0x80)); - setGridLineColor(QColor(QRgb(0xd7d6d5))); - setSingleHighlightColor(QColor(QRgb(0xfa0000))); - setMultiHighlightColor(QColor(QRgb(0x555555))); - setLightStrength(5.0f); - setAmbientLightStrength(0.5f); - setHighlightLightStrength(5.0f); - setLabelBorderEnabled(false); - setColorStyle(QDataVis::ColorStyleObjectGradient); - QLinearGradient gradient = QLinearGradient(qreal(gradientTextureWidth), - qreal(gradientTextureHeight), - 0.0, 0.0); - QColor color; - color.setRed(0xcc * 0.7); - color.setGreen(0xcc * 0.7); - color.setBlue(0xcc * 0.7); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0xcccccc))); - setBaseGradient(gradient); - color.setRed(0xfa * 0.7); - color.setGreen(0x00); - color.setBlue(0x00); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0xfa0000))); - setSingleHighlightGradient(gradient); - color.setRed(0x55 * 0.7); - color.setGreen(0x55 * 0.7); - color.setBlue(0x55 * 0.7); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0x555555))); - setMultiHighlightGradient(gradient); -} - -BuiltIn3DThemeStoneMoss::BuiltIn3DThemeStoneMoss() - : Q3DTheme(QDataVis::ThemeStoneMoss) -{ - setBaseColor(QColor(QRgb(0xbeb32b))); - setBackgroundColor(QColor(QRgb(0x4d4d4f))); - setWindowColor(QColor(QRgb(0x4d4d4f))); - setTextColor(QColor(QRgb(0xffffff))); - setTextBackgroundColor(QColor(0x4d, 0x4d, 0x4f, 0xcd)); - setGridLineColor(QColor(QRgb(0x3e3e40))); - setSingleHighlightColor(QColor(QRgb(0xfbf6d6))); - setMultiHighlightColor(QColor(QRgb(0x442f20))); - setLightStrength(5.0f); - setAmbientLightStrength(0.5f); - setHighlightLightStrength(5.0f); - setLabelBorderEnabled(true); - setColorStyle(QDataVis::ColorStyleUniform); -} - -BuiltIn3DThemeArmyBlue::BuiltIn3DThemeArmyBlue() - : Q3DTheme(QDataVis::ThemeArmyBlue) -{ - setBackgroundColor(QColor(QRgb(0xd5d6d7))); - setWindowColor(QColor(QRgb(0xd5d6d7))); - setTextColor(QColor(QRgb(0x000000))); - setTextBackgroundColor(QColor(0xd5, 0xd6, 0xd7, 0xcd)); - setGridLineColor(QColor(QRgb(0xaeadac))); - setSingleHighlightColor(QColor(QRgb(0x2aa2f9))); - setMultiHighlightColor(QColor(QRgb(0x103753))); - setLightStrength(5.0f); - setAmbientLightStrength(0.5f); - setHighlightLightStrength(5.0f); - setLabelBorderEnabled(false); - setColorStyle(QDataVis::ColorStyleObjectGradient); - QLinearGradient gradient = QLinearGradient(qreal(gradientTextureWidth), - qreal(gradientTextureHeight), - 0.0, 0.0); - QColor color; - color.setRed(0x49 * 0.7); - color.setGreen(0x5f * 0.7); - color.setBlue(0x76 * 0.7); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0x495f76))); - setBaseGradient(gradient); - color.setRed(0x2a * 0.7); - color.setGreen(0xa2 * 0.7); - color.setBlue(0xf9 * 0.7); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0x2aa2f9))); - setSingleHighlightGradient(gradient); - color.setRed(0x10 * 0.7); - color.setGreen(0x37 * 0.7); - color.setBlue(0x53 * 0.7); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0x103753))); - setMultiHighlightGradient(gradient); -} - -BuiltIn3DThemeRetro::BuiltIn3DThemeRetro() - : Q3DTheme(QDataVis::ThemeRetro) -{ - setBackgroundColor(QColor(QRgb(0xe9e2ce))); - setWindowColor(QColor(QRgb(0xe9e2ce))); - setTextColor(QColor(QRgb(0x000000))); - setTextBackgroundColor(QColor(0xe9, 0xe2, 0xce, 0xc0)); - setGridLineColor(QColor(QRgb(0xd0c0b0))); - setSingleHighlightColor(QColor(QRgb(0x8ea317))); - setMultiHighlightColor(QColor(QRgb(0xc25708))); - setLightStrength(5.0f); - setAmbientLightStrength(0.5f); - setHighlightLightStrength(5.0f); - setLabelBorderEnabled(false); - setColorStyle(QDataVis::ColorStyleObjectGradient); - QLinearGradient gradient = QLinearGradient(qreal(gradientTextureWidth), - qreal(gradientTextureHeight), - 0.0, 0.0); - QColor color; - color.setRed(0x53 * 0.7); - color.setGreen(0x3b * 0.7); - color.setBlue(0x23 * 0.7); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0x533b23))); - setBaseGradient(gradient); - color.setRed(0x8e * 0.7); - color.setGreen(0xa3 * 0.7); - color.setBlue(0x17 * 0.7); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0x8ea317))); - setSingleHighlightGradient(gradient); - color.setRed(0xc2 * 0.7); - color.setGreen(0x57 * 0.7); - color.setBlue(0x08 * 0.7); - gradient.setColorAt(0.0, color); - gradient.setColorAt(1.0, QColor(QRgb(0xc25708))); - setMultiHighlightGradient(gradient); -} - -BuiltIn3DThemeEbony::BuiltIn3DThemeEbony() - : Q3DTheme(QDataVis::ThemeEbony) -{ - setBaseColor(QColor(QRgb(0xffffff))); - setBackgroundColor(QColor(QRgb(0x000000))); - setWindowColor(QColor(QRgb(0x000000))); - setTextColor(QColor(QRgb(0xaeadac))); - setTextBackgroundColor(QColor(0x00, 0x00, 0x00, 0xcd)); - setGridLineColor(QColor(QRgb(0x35322f))); - setSingleHighlightColor(QColor(QRgb(0xf5dc0d))); - setMultiHighlightColor(QColor(QRgb(0xd72222))); - setLightStrength(5.0f); - setAmbientLightStrength(0.5f); - setHighlightLightStrength(5.0f); - setLabelBorderEnabled(false); - setColorStyle(QDataVis::ColorStyleUniform); -} - -BuiltIn3DThemeIsabelle::BuiltIn3DThemeIsabelle() - : Q3DTheme(QDataVis::ThemeIsabelle) -{ - setBaseColor(QColor(QRgb(0xf9d900))); - setBackgroundColor(QColor(QRgb(0x000000))); - setWindowColor(QColor(QRgb(0x000000))); - setTextColor(QColor(QRgb(0xaeadac))); - setTextBackgroundColor(QColor(0x00, 0x00, 0x00, 0xc0)); - setGridLineColor(QColor(QRgb(0x35322f))); - setSingleHighlightColor(QColor(QRgb(0xfff7cc))); - setMultiHighlightColor(QColor(QRgb(0xde0a0a))); - setLightStrength(5.0f); - setAmbientLightStrength(0.5f); - setHighlightLightStrength(5.0f); - setLabelBorderEnabled(false); - setColorStyle(QDataVis::ColorStyleUniform); -} - -QT_DATAVISUALIZATION_END_NAMESPACE diff --git a/src/datavisualization/theme/builtin3dthemes_p.h b/src/datavisualization/theme/builtin3dthemes_p.h deleted file mode 100644 index 8f2c3d04..00000000 --- a/src/datavisualization/theme/builtin3dthemes_p.h +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc -** All rights reserved. -** For any questions to Digia, please use contact form at http://qt.digia.com -** -** This file is part of the QtDataVisualization module. -** -** Licensees holding valid Qt Enterprise licenses may use this file in -** accordance with the Qt Enterprise License Agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. -** -** If you have questions regarding the use of this file, please use -** contact form at http://qt.digia.com -** -****************************************************************************/ - -// -// W A R N I N G -// ------------- -// -// This file is not part of the QtDataVisualization API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. - -#ifndef BUILTIN3DTHEMES_P_H -#define BUILTIN3DTHEMES_P_H - -#include "datavisualizationglobal_p.h" -#include "q3dtheme_p.h" - -QT_DATAVISUALIZATION_BEGIN_NAMESPACE - -class BuiltIn3DThemeQt : public Q3DTheme -{ -public: - BuiltIn3DThemeQt(); -}; - -class BuiltIn3DThemePrimaryColors : public Q3DTheme -{ -public: - BuiltIn3DThemePrimaryColors(); -}; - -class BuiltIn3DThemeDigia : public Q3DTheme -{ -public: - BuiltIn3DThemeDigia(); -}; - -class BuiltIn3DThemeStoneMoss : public Q3DTheme -{ -public: - BuiltIn3DThemeStoneMoss(); -}; - -class BuiltIn3DThemeArmyBlue : public Q3DTheme -{ -public: - BuiltIn3DThemeArmyBlue(); -}; - -class BuiltIn3DThemeRetro : public Q3DTheme -{ -public: - BuiltIn3DThemeRetro(); -}; - -class BuiltIn3DThemeEbony : public Q3DTheme -{ -public: - BuiltIn3DThemeEbony(); -}; - -class BuiltIn3DThemeIsabelle : public Q3DTheme -{ -public: - BuiltIn3DThemeIsabelle(); -}; - -QT_DATAVISUALIZATION_END_NAMESPACE - -#endif diff --git a/src/datavisualization/theme/q3dtheme.cpp b/src/datavisualization/theme/q3dtheme.cpp index c1915073..b35afb5f 100644 --- a/src/datavisualization/theme/q3dtheme.cpp +++ b/src/datavisualization/theme/q3dtheme.cpp @@ -19,10 +19,10 @@ #include "q3dtheme_p.h" #include "thememanager_p.h" -namespace QtDataVisualization { +QT_BEGIN_NAMESPACE_DATAVISUALIZATION /*! - * \class QtDataVisualization::Q3DTheme + * \class Q3DTheme * \inmodule QtDataVisualization * \brief Q3DTheme class provides a visual style for graphs. * \since Qt Data Visualization 1.0 @@ -208,17 +208,12 @@ namespace QtDataVisualization { * A user-defined theme. See \l {Properties controlled by theme} for theme defaults. */ -/*! - * \class QtDataVisualization::Q3DThemeDirtyBitField - * \internal - */ - /*! * \qmltype Theme3D * \inqmlmodule QtDataVisualization * \since QtDataVisualization 1.0 * \ingroup datavisualization_qml - * \instantiates QtDataVisualization::Q3DTheme + * \instantiates Q3DTheme * \brief A visual style for graphs. * * This type is used to specify visual properties that affect the whole graph. There are several @@ -895,10 +890,6 @@ Q3DTheme::Theme Q3DTheme::type() const // Q3DThemePrivate -/*! - * \class QtDataVisualization::Q3DThemePrivate - * \internal - */ Q3DThemePrivate::Q3DThemePrivate(Q3DTheme *q) : QObject(0), m_themeId(Q3DTheme::ThemeUserDefined), @@ -1081,4 +1072,4 @@ bool Q3DThemePrivate::sync(Q3DThemePrivate &other) return changed; } -} +QT_END_NAMESPACE_DATAVISUALIZATION diff --git a/src/datavisualization/theme/q3dtheme.h b/src/datavisualization/theme/q3dtheme.h index 632beb47..9baec05d 100644 --- a/src/datavisualization/theme/q3dtheme.h +++ b/src/datavisualization/theme/q3dtheme.h @@ -25,7 +25,7 @@ #include #include -namespace QtDataVisualization { +QT_BEGIN_NAMESPACE_DATAVISUALIZATION class Q3DThemePrivate; @@ -184,6 +184,6 @@ private: Q_DISABLE_COPY(Q3DTheme) }; -} +QT_END_NAMESPACE_DATAVISUALIZATION #endif diff --git a/src/datavisualization/theme/q3dtheme_p.h b/src/datavisualization/theme/q3dtheme_p.h index 0180ddc3..6307d44d 100644 --- a/src/datavisualization/theme/q3dtheme_p.h +++ b/src/datavisualization/theme/q3dtheme_p.h @@ -32,7 +32,7 @@ #include "datavisualizationglobal_p.h" #include "q3dtheme.h" -namespace QtDataVisualization { +QT_BEGIN_NAMESPACE_DATAVISUALIZATION struct Q3DThemeDirtyBitField { bool baseColorDirty : 1; @@ -144,6 +144,6 @@ protected: Q3DTheme *q_ptr; }; -} +QT_END_NAMESPACE_DATAVISUALIZATION #endif diff --git a/src/datavisualization/theme/thememanager.cpp b/src/datavisualization/theme/thememanager.cpp index c695bd76..2d79e239 100644 --- a/src/datavisualization/theme/thememanager.cpp +++ b/src/datavisualization/theme/thememanager.cpp @@ -19,12 +19,7 @@ #include "thememanager_p.h" #include "q3dtheme_p.h" -namespace QtDataVisualization { - -/*! - * \class QtDataVisualization::ThemeManager - * \internal - */ +QT_BEGIN_NAMESPACE_DATAVISUALIZATION const float defaultBuiltInColorLevel = 0.7f; // for built-in gradient themes const float defaultColorLevel = 0.5f; // for built-in uniform themes @@ -595,4 +590,4 @@ void ThemeManager::setColorStyle(Q3DTheme *theme, Q3DTheme::ColorStyle style) theme->setColorStyle(style); } -} +QT_END_NAMESPACE_DATAVISUALIZATION diff --git a/src/datavisualization/theme/thememanager_p.h b/src/datavisualization/theme/thememanager_p.h index 343cf8a5..fce2cf49 100644 --- a/src/datavisualization/theme/thememanager_p.h +++ b/src/datavisualization/theme/thememanager_p.h @@ -33,7 +33,7 @@ #include "abstract3dcontroller_p.h" #include "q3dtheme.h" -namespace QtDataVisualization { +QT_BEGIN_NAMESPACE_DATAVISUALIZATION class ThemeManager : public QObject { @@ -81,6 +81,6 @@ private: Abstract3DController *m_controller; }; -} +QT_END_NAMESPACE_DATAVISUALIZATION #endif -- cgit v1.2.3