diff options
Diffstat (limited to 'src/themes')
-rw-r--r-- | src/themes/charttheme_p.h | 93 | ||||
-rw-r--r-- | src/themes/chartthemebluecerulean_p.h | 70 | ||||
-rw-r--r-- | src/themes/chartthemeblueicy_p.h | 72 | ||||
-rw-r--r-- | src/themes/chartthemebluencs_p.h | 71 | ||||
-rw-r--r-- | src/themes/chartthemebrownsand_p.h | 71 | ||||
-rw-r--r-- | src/themes/chartthemedark_p.h | 71 | ||||
-rw-r--r-- | src/themes/chartthemehighcontrast_p.h | 73 | ||||
-rw-r--r-- | src/themes/chartthemelight_p.h | 73 | ||||
-rw-r--r-- | src/themes/chartthemeqt_p.h | 74 | ||||
-rw-r--r-- | src/themes/chartthemesystem_p.h | 177 | ||||
-rw-r--r-- | src/themes/themes.pri | 14 |
11 files changed, 0 insertions, 859 deletions
diff --git a/src/themes/charttheme_p.h b/src/themes/charttheme_p.h deleted file mode 100644 index 6161e37c..00000000 --- a/src/themes/charttheme_p.h +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEME_H -#define CHARTTHEME_H - -#include "chartthememanager_p.h" -#include <QColor> -#include <QGradientStops> - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartTheme -{ - -public: - enum BackgroundShadesMode { - BackgroundShadesNone = 0, - BackgroundShadesVertical, - BackgroundShadesHorizontal, - BackgroundShadesBoth - }; - -protected: - explicit ChartTheme(QChart::ChartTheme id = QChart::ChartThemeLight):m_id(id), - m_backgroundShadesBrush(Qt::SolidPattern), - m_backgroundShades(BackgroundShadesNone), - m_backgroundDropShadowEnabled(false) - {}; -public: - QChart::ChartTheme id() const { return m_id; } - QList<QGradient> seriesGradients() const { return m_seriesGradients; } - QList<QColor> seriesColors() const { return m_seriesColors; } - QLinearGradient chartBackgroundGradient() const { return m_chartBackgroundGradient; } - QFont masterFont() const { return m_masterFont; } - QFont labelFont() const { return m_labelFont; } - QBrush labelBrush() const { return m_labelBrush; } - QPen axisLinePen() const { return m_axisLinePen; } - QPen backgroundShadesPen() const { return m_backgroundShadesPen; } - QPen outlinePen() const { return m_outlinePen; } - QBrush backgroundShadesBrush() const { return m_backgroundShadesBrush; } - BackgroundShadesMode backgroundShades() const { return m_backgroundShades; } - bool isBackgroundDropShadowEnabled() const { return m_backgroundDropShadowEnabled; } - QPen girdLinePen() const { return m_gridLinePen; } - -protected: - QChart::ChartTheme m_id; - QList<QColor> m_seriesColors; - QList<QGradient> m_seriesGradients; - QLinearGradient m_chartBackgroundGradient; - - QFont m_masterFont; - QFont m_labelFont; - QBrush m_labelBrush; - QPen m_axisLinePen; - QPen m_backgroundShadesPen; - QPen m_outlinePen; - QBrush m_backgroundShadesBrush; - BackgroundShadesMode m_backgroundShades; - bool m_backgroundDropShadowEnabled; - QPen m_gridLinePen; - -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif // CHARTTHEME_H diff --git a/src/themes/chartthemebluecerulean_p.h b/src/themes/chartthemebluecerulean_p.h deleted file mode 100644 index 788d6161..00000000 --- a/src/themes/chartthemebluecerulean_p.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMEBLUECERULEAN_P_H -#define CHARTTHEMEBLUECERULEAN_P_H - -#include "charttheme_p.h" - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeBlueCerulean: public ChartTheme -{ -public: - ChartThemeBlueCerulean() : ChartTheme(QChart::ChartThemeBlueCerulean) { - // Series colors - m_seriesColors << QRgb(0xc7e85b); - m_seriesColors << QRgb(0x1cb54f); - m_seriesColors << QRgb(0x5cbf9b); - m_seriesColors << QRgb(0x009fbf); - m_seriesColors << QRgb(0xee7392); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient(0.5, 0.0, 0.5, 1.0); - backgroundGradient.setColorAt(0.0, QRgb(0x056189)); - backgroundGradient.setColorAt(1.0, QRgb(0x101a31)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - - // Axes and other - m_labelBrush = QBrush(QRgb(0xffffff)); - m_axisLinePen = QPen(QRgb(0xd6d6d6)); - m_axisLinePen.setWidth(2); - m_gridLinePen = QPen(QRgb(0x84a2b0)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - m_outlinePen = QPen(QRgb(0xebebeb)); - m_outlinePen.setWidthF(2.0); - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif diff --git a/src/themes/chartthemeblueicy_p.h b/src/themes/chartthemeblueicy_p.h deleted file mode 100644 index 3ab15214..00000000 --- a/src/themes/chartthemeblueicy_p.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMEBLUEICY_P_H -#define CHARTTHEMEBLUEICY_P_H - -#include "charttheme_p.h" - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeBlueIcy: public ChartTheme -{ -public: - ChartThemeBlueIcy() : ChartTheme(QChart::ChartThemeBlueIcy) - { - // Series colors - m_seriesColors << QRgb(0x3daeda); - m_seriesColors << QRgb(0x2685bf); - m_seriesColors << QRgb(0x0c2673); - m_seriesColors << QRgb(0x5f3dba); - m_seriesColors << QRgb(0x2fa3b4); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient(0.5, 0.0, 0.5, 1.0); - backgroundGradient.setColorAt(0.0, QRgb(0xffffff)); - backgroundGradient.setColorAt(1.0, QRgb(0xffffff)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - m_backgroundDropShadowEnabled = true; - - // Axes and other - m_labelBrush = QBrush(QRgb(0x404044)); - m_axisLinePen = QPen(QRgb(0xd6d6d6)); - m_axisLinePen.setWidth(2); - m_gridLinePen = QPen(QRgb(0xe2e2e2)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - m_outlinePen = QPen(QRgb(0x474747)); - m_outlinePen.setWidthF(2.0); - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif diff --git a/src/themes/chartthemebluencs_p.h b/src/themes/chartthemebluencs_p.h deleted file mode 100644 index 310e7f08..00000000 --- a/src/themes/chartthemebluencs_p.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMEBLUENCS_P_H -#define CHARTTHEMEBLUENCS_P_H - -#include "charttheme_p.h" - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeBlueNcs: public ChartTheme -{ -public: - ChartThemeBlueNcs() : ChartTheme(QChart::ChartThemeBlueNcs) - { - // Series colors - m_seriesColors << QRgb(0x1db0da); - m_seriesColors << QRgb(0x1341a6); - m_seriesColors << QRgb(0x88d41e); - m_seriesColors << QRgb(0xff8e1a); - m_seriesColors << QRgb(0x398ca3); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient; - backgroundGradient.setColorAt(0.0, QRgb(0xffffff)); - backgroundGradient.setColorAt(1.0, QRgb(0xffffff)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - - // Axes and other - m_labelBrush = QBrush(QRgb(0x404044)); - m_axisLinePen = QPen(QRgb(0xd6d6d6)); - m_axisLinePen.setWidth(2); - m_gridLinePen = QPen(QRgb(0xe2e2e2)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - m_outlinePen = QPen(QRgb(0x474747)); - m_outlinePen.setWidthF(2.0); - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif diff --git a/src/themes/chartthemebrownsand_p.h b/src/themes/chartthemebrownsand_p.h deleted file mode 100644 index fd717e31..00000000 --- a/src/themes/chartthemebrownsand_p.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMEBROWNSAND_P_H -#define CHARTTHEMEBROWNSAND_P_H - -#include "charttheme_p.h" - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeBrownSand: public ChartTheme -{ -public: - ChartThemeBrownSand() : ChartTheme(QChart::ChartThemeBrownSand) - { - // Series colors - m_seriesColors << QRgb(0xb39b72); - m_seriesColors << QRgb(0xb3b376); - m_seriesColors << QRgb(0xc35660); - m_seriesColors << QRgb(0x536780); - m_seriesColors << QRgb(0x494345); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient; - backgroundGradient.setColorAt(0.0, QRgb(0xf3ece0)); - backgroundGradient.setColorAt(1.0, QRgb(0xf3ece0)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - - // Axes and other - m_labelBrush = QBrush(QRgb(0x404044)); - m_axisLinePen = QPen(QRgb(0xb5b0a7)); - m_axisLinePen.setWidth(2); - m_gridLinePen = QPen(QRgb(0xd4cec3)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - m_outlinePen = QPen(QRgb(0x222222)); - m_outlinePen.setWidthF(2.0); - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif diff --git a/src/themes/chartthemedark_p.h b/src/themes/chartthemedark_p.h deleted file mode 100644 index 714ced39..00000000 --- a/src/themes/chartthemedark_p.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMEDARK_P_H -#define CHARTTHEMEDARK_P_H - -#include "charttheme_p.h" - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeDark : public ChartTheme -{ -public: - ChartThemeDark() : ChartTheme(QChart::ChartThemeDark) - { - // Series colors - m_seriesColors << QRgb(0x38ad6b); - m_seriesColors << QRgb(0x3c84a7); - m_seriesColors << QRgb(0xeb8817); - m_seriesColors << QRgb(0x7b7f8c); - m_seriesColors << QRgb(0xbf593e); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient(0.5, 0.0, 0.5, 1.0); - backgroundGradient.setColorAt(0.0, QRgb(0x2e303a)); - backgroundGradient.setColorAt(1.0, QRgb(0x121218)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - - // Axes and other - m_labelBrush = QBrush(QRgb(0xffffff)); - m_axisLinePen = QPen(QRgb(0x86878c)); - m_axisLinePen.setWidth(2); - m_gridLinePen = QPen(QRgb(0x86878c)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - m_outlinePen = QPen(QRgb(0xd6d6d6)); - m_outlinePen.setWidthF(2.0); - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif diff --git a/src/themes/chartthemehighcontrast_p.h b/src/themes/chartthemehighcontrast_p.h deleted file mode 100644 index 57e6a050..00000000 --- a/src/themes/chartthemehighcontrast_p.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMEHIGHCONTRAST_P_H -#define CHARTTHEMEHIGHCONTRAST_P_H - -#include "charttheme_p.h" - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeHighContrast : public ChartTheme -{ -public: - ChartThemeHighContrast() : ChartTheme(QChart::ChartThemeHighContrast) - { - // Series colors - m_seriesColors << QRgb(0x202020); - m_seriesColors << QRgb(0x596a74); - m_seriesColors << QRgb(0xffab03); - m_seriesColors << QRgb(0x038e9b); - m_seriesColors << QRgb(0xff4a41); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient(0.5, 0.0, 0.5, 1.0); - backgroundGradient.setColorAt(0.0, QRgb(0xffffff)); - backgroundGradient.setColorAt(1.0, QRgb(0xffffff)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - m_backgroundDropShadowEnabled = true; - - // Axes and other - m_labelBrush = QBrush(QRgb(0x181818)); - m_axisLinePen = QPen(QRgb(0x8c8c8c)); - m_axisLinePen.setWidth(2); - m_gridLinePen = QPen(QRgb(0x8c8c8c)); - m_gridLinePen.setWidth(1); - m_backgroundShadesBrush = QBrush(QRgb(0xffeecd)); - m_backgroundShades = BackgroundShadesHorizontal; - m_outlinePen = QPen(QColor(Qt::black)); - m_outlinePen.setWidthF(2.0); - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif diff --git a/src/themes/chartthemelight_p.h b/src/themes/chartthemelight_p.h deleted file mode 100644 index 72d9e02e..00000000 --- a/src/themes/chartthemelight_p.h +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMELIGHT_P_H -#define CHARTTHEMELIGHT_P_H - -#include "charttheme_p.h" - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeLight: public ChartTheme -{ -public: - ChartThemeLight() : ChartTheme(QChart::ChartThemeLight) - { - // Series colors - m_seriesColors << QRgb(0x209fdf); - m_seriesColors << QRgb(0x99ca53); - m_seriesColors << QRgb(0xf6a625); - m_seriesColors << QRgb(0x6d5fd5); - m_seriesColors << QRgb(0xbf593e); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient; - backgroundGradient.setColorAt(0.0, QRgb(0xffffff)); - backgroundGradient.setColorAt(1.0, QRgb(0xffffff)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - // There is a performance issue in the drop shadow implementation, so disabled for now -// m_backgroundDropShadowEnabled = true; - - // Axes and other - m_axisLinePen = QPen(0xd6d6d6); - m_axisLinePen.setWidth(1); - m_labelBrush = QBrush(QRgb(0x404044)); - m_gridLinePen = QPen(QRgb(0xe2e2e2)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - m_outlinePen = QPen(0x4d4d4d); - m_outlinePen.setWidthF(2.0); - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif diff --git a/src/themes/chartthemeqt_p.h b/src/themes/chartthemeqt_p.h deleted file mode 100644 index bc92d5fb..00000000 --- a/src/themes/chartthemeqt_p.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMEQT_P_H -#define CHARTTHEMEQT_P_H - -#include "charttheme_p.h" - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeQt : public ChartTheme -{ -public: - ChartThemeQt() : ChartTheme(QChart::ChartThemeQt) - { - // Series colors - m_seriesColors << QRgb(0x80c342); - m_seriesColors << QRgb(0x328930); - m_seriesColors << QRgb(0x006325); - m_seriesColors << QRgb(0x35322f); - m_seriesColors << QRgb(0x5d5b59); - m_seriesColors << QRgb(0x868482); - m_seriesColors << QRgb(0xaeadac); - m_seriesColors << QRgb(0xd7d6d5); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient(0.5, 0.0, 0.5, 1.0); - backgroundGradient.setColorAt(0.0, QRgb(0xffffff)); - backgroundGradient.setColorAt(1.0, QRgb(0xffffff)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - - // Axes and other - m_labelBrush = QBrush(QRgb(0x35322f)); - m_axisLinePen = QPen(QRgb(0xd7d6d5)); - m_axisLinePen.setWidth(1); - m_gridLinePen = QPen(QRgb(0xd7d6d5)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - m_outlinePen = QPen(QRgb(0x35322f)); - m_outlinePen.setWidthF(2.0); - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif diff --git a/src/themes/chartthemesystem_p.h b/src/themes/chartthemesystem_p.h deleted file mode 100644 index e0d21efe..00000000 --- a/src/themes/chartthemesystem_p.h +++ /dev/null @@ -1,177 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2014 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 Qt Enterprise Charts Add-on. -** -** $QT_BEGIN_LICENSE$ -** 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 -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// W A R N I N G -// ------------- -// -// This file is not part of the Qt Enterprise Chart 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 CHARTTHEMESYSTEM_P_H -#define CHARTTHEMESYSTEM_P_H - -#include "charttheme_p.h" -#ifdef Q_OS_WIN -#include <windows.h> -#include <stdio.h> -#endif - -QTCOMMERCIALCHART_BEGIN_NAMESPACE - -class ChartThemeSystem: public ChartTheme -{ -public: - // System theme not used at the moment (the user is not able to select this theme) - ChartThemeSystem() : ChartTheme(QChart::ChartThemeLight /*QChart::ChartThemeSystem*/) - { -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) - // We could also use theme specific window frame color as a series base color (it would give more - // variation to the base colors in addition to the blue and black used now) - - // First series base color from COLOR_HIGHLIGHT - DWORD colorHighlight; - colorHighlight = GetSysColor(COLOR_HIGHLIGHT); - m_seriesColors.append(QColor(GetRValue(colorHighlight), - GetGValue(colorHighlight), - GetBValue(colorHighlight))); - - // Second series base color from COLOR_WINDOWFRAME - DWORD colorWindowFrame; - colorWindowFrame = GetSysColor(COLOR_WINDOWFRAME); - m_seriesColors.append(QColor(GetRValue(colorWindowFrame), - GetGValue(colorWindowFrame), - GetBValue(colorWindowFrame))); - - // Third series base color from the middle of the COLOR_ACTIVECAPTION / - // COLOR_GRADIENTACTIVECAPTION gradient - DWORD colorGradientActiveCaptionLeft; - colorGradientActiveCaptionLeft = GetSysColor(COLOR_ACTIVECAPTION); - DWORD colorGradientActiveCaptionRight; - colorGradientActiveCaptionRight = GetSysColor(COLOR_GRADIENTACTIVECAPTION); - QLinearGradient g; - QColor start = QColor(GetRValue(colorGradientActiveCaptionLeft), - GetGValue(colorGradientActiveCaptionLeft), - GetBValue(colorGradientActiveCaptionLeft)); - g.setColorAt(0.0, start); - QColor end = QColor(GetRValue(colorGradientActiveCaptionRight), - GetGValue(colorGradientActiveCaptionRight), - GetBValue(colorGradientActiveCaptionRight)); - g.setColorAt(1.0, end); - m_seriesColors.append(ChartThemeManager::colorAt(g, 0.5)); - - // Generate gradients from the base colors - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background fill color from COLOR_WINDOW - QLinearGradient backgroundGradient; - DWORD colorWindow; - colorWindow = GetSysColor(COLOR_WINDOW); - backgroundGradient.setColorAt(0.0, QColor(GetRValue(colorWindow), - GetGValue(colorWindow), - GetBValue(colorWindow))); - backgroundGradient.setColorAt(1.0, QColor(GetRValue(colorWindow), - GetGValue(colorWindow), - GetBValue(colorWindow))); - // Axes and other - m_axisLinePen = QPen(0xd6d6d6); - m_axisLinePen.setWidth(1); - m_labelBrush = QBrush(QRgb(0x404044)); - m_gridLinePen = QPen(QRgb(0xe2e2e2)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - -#elif defined(Q_OS_LINUX) - // Using a hard coded theme for Linux system theme - m_seriesColors << QRgb(0x60a6e6); - m_seriesColors << QRgb(0x92ca66); - m_seriesColors << QRgb(0xeba85f); - m_seriesColors << QRgb(0xfc5751); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient; - backgroundGradient.setColorAt(0.0, QRgb(0xffffff)); - backgroundGradient.setColorAt(1.0, QRgb(0xffffff)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - - // Axes and other - m_axisLinePen = QPen(0xd6d6d6); - m_axisLinePen.setWidth(1); - m_labelBrush = QBrush(QRgb(0x404044)); - m_gridLinePen = QPen(QRgb(0xe2e2e2)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - -#elif defined(Q_OS_MAC) - // Using a hard coded theme for OSX system theme; the colors match the OSX 10.7 colors - m_seriesColors << QRgb(0x60a6e6); - m_seriesColors << QRgb(0x92ca66); - m_seriesColors << QRgb(0xeba85f); - m_seriesColors << QRgb(0xfc5751); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient; - backgroundGradient.setColorAt(0.0, QRgb(0xffffff)); - backgroundGradient.setColorAt(1.0, QRgb(0xffffff)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - - // Axes and other - m_axisLinePen = QPen(0xd6d6d6); - m_axisLinePen.setWidth(1); - m_labelBrush = QBrush(QRgb(0x404044)); - m_gridLinePen = QPen(QRgb(0xe2e2e2)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; - -#else - // Hard coded theme - m_seriesColors << QRgb(0x60a6e6); - m_seriesColors << QRgb(0x92ca66); - m_seriesColors << QRgb(0xeba85f); - m_seriesColors << QRgb(0xfc5751); - m_seriesGradients = ChartThemeManager::generateSeriesGradients(m_seriesColors); - - // Background - QLinearGradient backgroundGradient; - backgroundGradient.setColorAt(0.0, QRgb(0xffffff)); - backgroundGradient.setColorAt(1.0, QRgb(0xffffff)); - backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode); - m_chartBackgroundGradient = backgroundGradient; - - // Axes and other - m_axisLinePen = QPen(0xd6d6d6); - m_axisLinePen.setWidth(1); - m_labelBrush = QBrush(QRgb(0x404044)); - m_gridLinePen = QPen(QRgb(0xe2e2e2)); - m_gridLinePen.setWidth(1); - m_backgroundShades = BackgroundShadesNone; -#endif - } -}; - -QTCOMMERCIALCHART_END_NAMESPACE - -#endif // CHARTTHEMESYSTEM_P_H diff --git a/src/themes/themes.pri b/src/themes/themes.pri deleted file mode 100644 index 656552af..00000000 --- a/src/themes/themes.pri +++ /dev/null @@ -1,14 +0,0 @@ -INCLUDEPATH += $$PWD -DEPENDPATH += $$PWD - -THEMES += \ - $$PWD/charttheme_p.h \ - $$PWD/chartthemesystem_p.h \ - $$PWD/chartthemelight_p.h \ - $$PWD/chartthemebluecerulean_p.h \ - $$PWD/chartthemedark_p.h \ - $$PWD/chartthemebrownsand_p.h \ - $$PWD/chartthemebluencs_p.h \ - $$PWD/chartthemehighcontrast_p.h \ - $$PWD/chartthemeblueicy_p.h \ - $$PWD/chartthemeqt_p.h |