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 DECLARATIVEABSTRACTRENDERNODE_H
14#define DECLARATIVEABSTRACTRENDERNODE_H
15
16#include <QtCharts/QChartGlobal>
17#include <QtQuick/QSGNode>
18#include <QtQuick/QQuickWindow>
19#include <private/glxyseriesdata_p.h>
20#include <private/declarativechartglobal_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class Q_CHARTSQML_PRIVATE_EXPORT MouseEventResponse {
25public:
26 enum MouseEventType {
27 None,
28 Pressed,
29 Released,
30 Clicked,
31 DoubleClicked,
32 HoverEnter,
33 HoverLeave
34 };
35
36 MouseEventResponse()
37 : type(None),
38 series(nullptr) {}
39 MouseEventResponse(MouseEventType t, const QPoint &p, const QXYSeries *s)
40 : type(t),
41 point(p),
42 series(s) {}
43 MouseEventType type;
44 QPoint point;
45 const QXYSeries *series;
46};
47
48class Q_CHARTSQML_PRIVATE_EXPORT DeclarativeAbstractRenderNode : public QSGRootNode
49{
50public:
51 DeclarativeAbstractRenderNode() {}
52
53 virtual void setTextureSize(const QSize &textureSize) = 0;
54 virtual QSize textureSize() const = 0;
55 virtual void setRect(const QRectF &rect) = 0;
56 virtual void setSeriesData(bool mapDirty, const GLXYDataMap &dataMap) = 0;
57 virtual void setAntialiasing(bool enable) = 0;
58 virtual void addMouseEvents(const QList<QMouseEvent *> &events) = 0;
59 virtual void takeMouseEventResponses(QList<MouseEventResponse> &responses) = 0;
60};
61
62QT_END_NAMESPACE
63
64
65#endif // DECLARATIVEABSTRACTRENDERNODE_H
66

source code of qtcharts/src/chartsqml2/declarativeabstractrendernode_p.h