1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QABSTRACTSERIES_P_H
5#define QABSTRACTSERIES_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the QtGraphs API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16
17#include "graphs2d/qabstractseries.h"
18#include <QtGraphs/qabstractseries.h>
19#include <private/qobject_p.h>
20#include <QtCore/qloggingcategory.h>
21
22QT_BEGIN_NAMESPACE
23
24Q_DECLARE_LOGGING_CATEGORY(lcSeries2D)
25Q_DECLARE_LOGGING_CATEGORY(lcProperties2D)
26
27class QAbstractAxis;
28class QGraphsView;
29
30class QAbstractSeriesPrivate : public QObjectPrivate
31{
32 Q_DECLARE_PUBLIC(QAbstractSeries)
33public:
34 static QAbstractSeriesPrivate *get(QAbstractSeries *item) { return item->d_func(); }
35 static const QAbstractSeriesPrivate *get(const QAbstractSeries *item) { return item->d_func(); }
36
37 explicit QAbstractSeriesPrivate(QAbstractSeries::SeriesType type);
38 ~QAbstractSeriesPrivate() override;
39
40 void setLegendData(const QList<QLegendData> &legendData);
41 void clearLegendData();
42 QAbstractSeries::SeriesType type() { return m_type; }
43
44 static void appendSeriesChildren(QQmlListProperty<QObject> *list, QObject *element);
45
46protected:
47 QGraphsView *m_graph = nullptr;
48
49private:
50 QString m_name;
51 bool m_visible = true;
52 bool m_loaded = false;
53 bool m_selectable = false;
54 bool m_hoverable = false;
55 bool m_hovered = false;
56 qreal m_opacity = 1.0;
57 qreal m_valuesMultiplier = 1.0;
58 QList<QLegendData> m_legendData;
59 int m_drawOrder = 0;
60
61 QAbstractAxis *m_axisX = nullptr;
62 QAbstractAxis *m_axisY = nullptr;
63
64 QAbstractSeries::SeriesType m_type;
65};
66
67QT_END_NAMESPACE
68
69#endif
70

source code of qtgraphs/src/graphs2d/qabstractseries_p.h