| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | // W A R N I N G |
| 5 | // ------------- |
| 6 | // |
| 7 | // This file is not part of the Qt Chart API. It exists purely as an |
| 8 | // implementation detail. This header file may change from version to |
| 9 | // version without notice, or even be removed. |
| 10 | // |
| 11 | // We mean it. |
| 12 | |
| 13 | #ifndef CHARTTHEME_H |
| 14 | #define CHARTTHEME_H |
| 15 | |
| 16 | #include <private/chartthememanager_p.h> |
| 17 | #include <QtGui/QColor> |
| 18 | #include <QtGui/QGradientStops> |
| 19 | #include <QtCharts/private/qchartglobal_p.h> |
| 20 | |
| 21 | QT_BEGIN_NAMESPACE |
| 22 | |
| 23 | class Q_CHARTS_EXPORT ChartTheme |
| 24 | { |
| 25 | |
| 26 | public: |
| 27 | enum BackgroundShadesMode { |
| 28 | BackgroundShadesNone = 0, |
| 29 | BackgroundShadesVertical, |
| 30 | BackgroundShadesHorizontal, |
| 31 | BackgroundShadesBoth |
| 32 | }; |
| 33 | |
| 34 | protected: |
| 35 | explicit ChartTheme(QChart::ChartTheme id = QChart::ChartThemeLight):m_id(id), |
| 36 | m_backgroundShadesBrush(Qt::SolidPattern), |
| 37 | m_backgroundShades(BackgroundShadesNone), |
| 38 | m_backgroundDropShadowEnabled(false) |
| 39 | {}; |
| 40 | public: |
| 41 | QChart::ChartTheme id() const { return m_id; } |
| 42 | QList<QGradient> seriesGradients() const { return m_seriesGradients; } |
| 43 | QList<QColor> seriesColors() const { return m_seriesColors; } |
| 44 | QLinearGradient chartBackgroundGradient() const { return m_chartBackgroundGradient; } |
| 45 | QFont masterFont() const { return m_masterFont; } |
| 46 | QFont labelFont() const { return m_labelFont; } |
| 47 | QBrush labelBrush() const { return m_labelBrush; } |
| 48 | QPen axisLinePen() const { return m_axisLinePen; } |
| 49 | QPen backgroundShadesPen() const { return m_backgroundShadesPen; } |
| 50 | QPen outlinePen() const { return m_outlinePen; } |
| 51 | QBrush backgroundShadesBrush() const { return m_backgroundShadesBrush; } |
| 52 | BackgroundShadesMode backgroundShades() const { return m_backgroundShades; } |
| 53 | bool isBackgroundDropShadowEnabled() const { return m_backgroundDropShadowEnabled; } |
| 54 | QPen gridLinePen() const { return m_gridLinePen; } |
| 55 | QPen minorGridLinePen() const { return m_minorGridLinePen; } |
| 56 | |
| 57 | protected: |
| 58 | QChart::ChartTheme m_id; |
| 59 | QList<QColor> m_seriesColors; |
| 60 | QList<QGradient> m_seriesGradients; |
| 61 | QLinearGradient m_chartBackgroundGradient; |
| 62 | |
| 63 | QFont m_masterFont; |
| 64 | QFont m_labelFont; |
| 65 | QBrush m_labelBrush; |
| 66 | QPen m_axisLinePen; |
| 67 | QPen m_backgroundShadesPen; |
| 68 | QPen m_outlinePen; |
| 69 | QBrush m_backgroundShadesBrush; |
| 70 | BackgroundShadesMode m_backgroundShades; |
| 71 | bool m_backgroundDropShadowEnabled; |
| 72 | QPen m_gridLinePen; |
| 73 | QPen m_minorGridLinePen; |
| 74 | |
| 75 | }; |
| 76 | |
| 77 | QT_END_NAMESPACE |
| 78 | |
| 79 | #endif // CHARTTHEME_H |
| 80 |
