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 CHARTCONFIG_H
14#define CHARTCONFIG_H
15
16#include <QtCharts/QChartGlobal>
17#include <QtCharts/private/qchartglobal_p.h>
18
19QT_BEGIN_NAMESPACE
20
21class Q_CHARTS_PRIVATE_EXPORT ChartConfig
22{
23private:
24 ChartConfig() {
25 m_instance = this;
26 }
27public:
28 static ChartConfig *instance() {
29 if (!m_instance) {
30 m_instance = new ChartConfig();
31 }
32 return m_instance;
33 }
34
35private:
36 static ChartConfig *m_instance;
37};
38
39
40ChartConfig *ChartConfig::m_instance = 0;
41
42QT_END_NAMESPACE
43
44#endif
45

source code of qtcharts/src/charts/chartconfig_p.h