1 | // Copyright (C) 2020 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 DECLARATIVECHARTNODE_P_H |
14 | #define DECLARATIVECHARTNODE_P_H |
15 | |
16 | #include <QtCharts/QChartGlobal> |
17 | #include <QtQuick/QSGNode> |
18 | #include <QtQuick/QQuickWindow> |
19 | #include <QtQuick/QSGImageNode> |
20 | #include <QtCore/private/qglobal_p.h> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | class DeclarativeAbstractRenderNode; |
25 | class DeclarativeChartNode : public QSGRootNode |
26 | { |
27 | public: |
28 | DeclarativeChartNode(QQuickWindow *window); |
29 | ~DeclarativeChartNode(); |
30 | |
31 | void createTextureFromImage(const QImage &chartImage); |
32 | DeclarativeAbstractRenderNode *renderNode() const { return m_renderNode; } |
33 | |
34 | void setRect(const QRectF &rect); |
35 | |
36 | private: |
37 | QRectF m_rect; |
38 | QQuickWindow *m_window; |
39 | DeclarativeAbstractRenderNode *m_renderNode; |
40 | QSGImageNode *m_imageNode; |
41 | }; |
42 | |
43 | QT_END_NAMESPACE |
44 | |
45 | #endif // DECLARATIVECHARTNODE_P_H |
46 |