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 QABSTRACTSERIES_P_H |
14 | #define QABSTRACTSERIES_P_H |
15 | |
16 | #include <QtCharts/QAbstractSeries> |
17 | #include <QtCharts/QChart> |
18 | #include <private/abstractdomain_p.h> |
19 | #include <QtCharts/private/qchartglobal_p.h> |
20 | |
21 | #include <memory> |
22 | |
23 | QT_BEGIN_NAMESPACE |
24 | class QGraphicsItem; |
25 | QT_END_NAMESPACE |
26 | |
27 | QT_BEGIN_NAMESPACE |
28 | |
29 | class ChartPresenter; |
30 | class ChartElement; |
31 | class LegendMarker; |
32 | class QLegend; |
33 | class ChartDataSet; |
34 | class QAbstractAxis; |
35 | class QLegendMarker; |
36 | class ChartTheme; |
37 | class ChartAnimation; |
38 | class ChartItem; |
39 | class BoxPlotChartItem; |
40 | |
41 | class Q_CHARTS_PRIVATE_EXPORT QAbstractSeriesPrivate : public QObject |
42 | { |
43 | Q_OBJECT |
44 | public: |
45 | QAbstractSeriesPrivate(QAbstractSeries *q); |
46 | ~QAbstractSeriesPrivate(); |
47 | |
48 | virtual void initializeDomain() = 0; |
49 | virtual void initializeAxes() = 0; |
50 | virtual void initializeTheme(int index, ChartTheme* theme, bool forced = false) = 0; |
51 | virtual void initializeGraphics(QGraphicsItem* parent) = 0; |
52 | virtual void initializeAnimations(QChart::AnimationOptions options, int duration, |
53 | QEasingCurve &curve) = 0; |
54 | |
55 | virtual QList<QLegendMarker*> createLegendMarkers(QLegend* legend) = 0; |
56 | |
57 | virtual QAbstractAxis::AxisType defaultAxisType(Qt::Orientation) const = 0; |
58 | virtual QAbstractAxis* createDefaultAxis(Qt::Orientation) const = 0; |
59 | |
60 | ChartItem* chartItem() { return m_item.get(); } |
61 | |
62 | virtual void setDomain(AbstractDomain* domain); |
63 | AbstractDomain* domain() { return m_domain.data(); } |
64 | |
65 | virtual void setPresenter(ChartPresenter *presenter); |
66 | ChartPresenter *presenter() const; |
67 | |
68 | QChart* chart() { return m_chart; } |
69 | |
70 | void setBlockOpenGL(bool enable); |
71 | |
72 | Q_SIGNALS: |
73 | void countChanged(); |
74 | |
75 | protected: |
76 | QAbstractSeries *q_ptr; |
77 | QChart *m_chart; |
78 | std::unique_ptr<ChartItem> m_item; |
79 | QList<QAbstractAxis*> m_axes; |
80 | |
81 | private: |
82 | QScopedPointer<AbstractDomain> m_domain; |
83 | QString m_name; |
84 | bool m_visible; |
85 | qreal m_opacity; |
86 | ChartPresenter *m_presenter; |
87 | bool m_useOpenGL; |
88 | bool m_blockOpenGL; |
89 | |
90 | friend class QAbstractSeries; |
91 | friend class ChartDataSet; |
92 | friend class ChartPresenter; |
93 | friend class QLegendPrivate; |
94 | friend class BoxPlotChartItem; |
95 | }; |
96 | |
97 | QT_END_NAMESPACE |
98 | |
99 | #endif |
100 |