summaryrefslogtreecommitdiffstats
path: root/src/graphs2d/qabstractseries_p.h
blob: e3fd9d0e424014efb8ddefa06a9eacb7db91ff9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef QABSTRACTSERIES_P_H
#define QABSTRACTSERIES_P_H

//
//  W A R N I N G
//  -------------
//
// This file is not part of the QtGraphs API.  It exists purely as an
// implementation detail.  This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.

#include <QtGraphs/qabstractseries.h>
#include <memory>
#include <private/qobject_p.h>
#include <QtCore/qloggingcategory.h>

QT_BEGIN_NAMESPACE

Q_DECLARE_LOGGING_CATEGORY(lcSeries2D)
Q_DECLARE_LOGGING_CATEGORY(lcProperties2D)

class QAbstractAxis;
class QGraphsView;

class QAbstractSeriesPrivate : public QObjectPrivate
{
    Q_DECLARE_PUBLIC(QAbstractSeries)
public:
    explicit QAbstractSeriesPrivate();
    ~QAbstractSeriesPrivate() override;

    void setLegendData(const QList<QLegendData> &legendData);
    void clearLegendData();

    static void appendSeriesChildren(QQmlListProperty<QObject> *list, QObject *element);

protected:
    QGraphsView *m_graph = nullptr;

private:
    QString m_name;
    bool m_visible = true;
    bool m_loaded = false;
    bool m_selectable = false;
    bool m_hoverable = false;
    bool m_hovered = false;
    qreal m_opacity = 1.0;
    qreal m_valuesMultiplier = 1.0;
    QList<QLegendData> m_legendData;

    QAbstractAxis *m_axisX = nullptr;
    QAbstractAxis *m_axisY = nullptr;
};

QT_END_NAMESPACE

#endif