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 CHARTTHEMEQT_P_H
14#define CHARTTHEMEQT_P_H
15
16#include <private/charttheme_p.h>
17#include <QtCharts/private/qchartglobal_p.h>
18
19QT_BEGIN_NAMESPACE
20
21class Q_CHARTS_PRIVATE_EXPORT ChartThemeQt : public ChartTheme
22{
23public:
24 ChartThemeQt() : ChartTheme(QChart::ChartThemeQt)
25 {
26 // Series colors
27 m_seriesColors << QRgb(0x80c342);
28 m_seriesColors << QRgb(0x328930);
29 m_seriesColors << QRgb(0x006325);
30 m_seriesColors << QRgb(0x35322f);
31 m_seriesColors << QRgb(0x5d5b59);
32 m_seriesColors << QRgb(0x868482);
33 m_seriesColors << QRgb(0xaeadac);
34 m_seriesColors << QRgb(0xd7d6d5);
35 m_seriesGradients = ChartThemeManager::generateSeriesGradients(colors: m_seriesColors);
36
37 // Background
38 QLinearGradient backgroundGradient(0.5, 0.0, 0.5, 1.0);
39 backgroundGradient.setColorAt(pos: 0.0, color: QRgb(0xffffff));
40 backgroundGradient.setColorAt(pos: 1.0, color: QRgb(0xffffff));
41 backgroundGradient.setCoordinateMode(QGradient::ObjectBoundingMode);
42 m_chartBackgroundGradient = backgroundGradient;
43
44 // Axes and other
45 m_labelBrush = QBrush(QRgb(0x35322f));
46 m_axisLinePen = QPen(QRgb(0xd7d6d5));
47 m_axisLinePen.setWidth(1);
48 m_gridLinePen = QPen(QRgb(0xd7d6d5));
49 m_gridLinePen.setWidth(1);
50 m_minorGridLinePen = QPen(QRgb(0xd7d6d5));
51 m_minorGridLinePen.setWidth(1);
52 m_minorGridLinePen.setStyle(Qt::DashLine);
53 m_backgroundShades = BackgroundShadesNone;
54 m_outlinePen = QPen(QRgb(0x35322f));
55 m_outlinePen.setWidthF(2.0);
56 }
57};
58
59QT_END_NAMESPACE
60
61#endif
62

source code of qtcharts/src/charts/themes/chartthemeqt_p.h