1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QQUICKGRAPHSITEM_H
5#define QQUICKGRAPHSITEM_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 <QtGraphs/qgraphs3dnamespace.h>
18#include "qabstract3daxis.h"
19#include "qabstract3dseries.h"
20#include "qcategory3daxis.h"
21#include "qvalue3daxis.h"
22
23#include <QtQuick3D/private/qquick3dviewport_p.h>
24Q_MOC_INCLUDE(<QtGraphs / q3dscene.h>)
25
26QT_BEGIN_NAMESPACE
27class Q3DScene;
28
29class QAbstract3DAxis;
30class QAbstract3DSeries;
31class QCustom3DItem;
32class QCustom3DVolume;
33class QCustom3DLabel;
34class QGraphsInputHandler;
35class QGraphsTheme;
36class QQuaternion;
37class QQuick3DCustomMaterial;
38class QQuick3DDirectionalLight;
39class QQuick3DPrincipledMaterial;
40class QQuick3DRepeater;
41class QQuick3DPerspectiveCamera;
42class QQuick3DOrthographicCamera;
43
44struct Abstract3DChangeBitField
45{
46 bool themeChanged : 1;
47 bool shadowQualityChanged : 1;
48 bool selectionModeChanged : 1;
49 bool optimizationHintChanged : 1;
50 bool axisXTypeChanged : 1;
51 bool axisYTypeChanged : 1;
52 bool axisZTypeChanged : 1;
53 bool axisXTitleChanged : 1;
54 bool axisYTitleChanged : 1;
55 bool axisZTitleChanged : 1;
56 bool axisXLabelsChanged : 1;
57 bool axisYLabelsChanged : 1;
58 bool axisZLabelsChanged : 1;
59 bool axisXRangeChanged : 1;
60 bool axisYRangeChanged : 1;
61 bool axisZRangeChanged : 1;
62 bool axisXSegmentCountChanged : 1;
63 bool axisYSegmentCountChanged : 1;
64 bool axisZSegmentCountChanged : 1;
65 bool axisXSubSegmentCountChanged : 1;
66 bool axisYSubSegmentCountChanged : 1;
67 bool axisZSubSegmentCountChanged : 1;
68 bool axisXLabelFormatChanged : 1;
69 bool axisYLabelFormatChanged : 1;
70 bool axisZLabelFormatChanged : 1;
71 bool axisXReversedChanged : 1;
72 bool axisYReversedChanged : 1;
73 bool axisZReversedChanged : 1;
74 bool axisXFormatterChanged : 1;
75 bool axisYFormatterChanged : 1;
76 bool axisZFormatterChanged : 1;
77 bool projectionChanged : 1;
78 bool axisXLabelAutoRotationChanged : 1;
79 bool axisYLabelAutoRotationChanged : 1;
80 bool axisZLabelAutoRotationChanged : 1;
81 bool axisXScaleLabelsByCountChanged : 1;
82 bool axisYScaleLabelsByCountChanged : 1;
83 bool axisZScaleLabelsByCountChanged : 1;
84 bool axisXLabelSizeChanged : 1;
85 bool axisYLabelSizeChanged : 1;
86 bool axisZLabelSizeChanged : 1;
87 bool aspectRatioChanged : 1;
88 bool horizontalAspectRatioChanged : 1;
89 bool axisXTitleVisibilityChanged : 1;
90 bool axisYTitleVisibilityChanged : 1;
91 bool axisZTitleVisibilityChanged : 1;
92 bool axisXLabelVisibilityChanged : 1;
93 bool axisYLabelVisibilityChanged : 1;
94 bool axisZLabelVisibilityChanged : 1;
95 bool axisXTitleFixedChanged : 1;
96 bool axisYTitleFixedChanged : 1;
97 bool axisZTitleFixedChanged : 1;
98 bool axisXTitleOffsetChanged : 1;
99 bool axisYTitleOffsetChanged : 1;
100 bool axisZTitleOffsetChanged : 1;
101 bool polarChanged : 1;
102 bool labelMarginChanged : 1;
103 bool radialLabelOffsetChanged : 1;
104 bool marginChanged : 1;
105 bool cameraChanged : 1;
106
107 Abstract3DChangeBitField()
108 : themeChanged(true)
109 , shadowQualityChanged(true)
110 , selectionModeChanged(true)
111 , optimizationHintChanged(true)
112 , axisXTypeChanged(true)
113 , axisYTypeChanged(true)
114 , axisZTypeChanged(true)
115 , axisXTitleChanged(true)
116 , axisYTitleChanged(true)
117 , axisZTitleChanged(true)
118 , axisXLabelsChanged(true)
119 , axisYLabelsChanged(true)
120 , axisZLabelsChanged(true)
121 , axisXRangeChanged(true)
122 , axisYRangeChanged(true)
123 , axisZRangeChanged(true)
124 , axisXSegmentCountChanged(true)
125 , axisYSegmentCountChanged(true)
126 , axisZSegmentCountChanged(true)
127 , axisXSubSegmentCountChanged(true)
128 , axisYSubSegmentCountChanged(true)
129 , axisZSubSegmentCountChanged(true)
130 , axisXLabelFormatChanged(true)
131 , axisYLabelFormatChanged(true)
132 , axisZLabelFormatChanged(true)
133 , axisXReversedChanged(true)
134 , axisYReversedChanged(true)
135 , axisZReversedChanged(true)
136 , axisXFormatterChanged(true)
137 , axisYFormatterChanged(true)
138 , axisZFormatterChanged(true)
139 , projectionChanged(true)
140 , axisXLabelAutoRotationChanged(true)
141 , axisYLabelAutoRotationChanged(true)
142 , axisZLabelAutoRotationChanged(true)
143 , aspectRatioChanged(true)
144 , horizontalAspectRatioChanged(true)
145 , axisXTitleVisibilityChanged(true)
146 , axisYTitleVisibilityChanged(true)
147 , axisZTitleVisibilityChanged(true)
148 , axisXLabelVisibilityChanged(true)
149 , axisYLabelVisibilityChanged(true)
150 , axisZLabelVisibilityChanged(true)
151 , axisXTitleFixedChanged(true)
152 , axisYTitleFixedChanged(true)
153 , axisZTitleFixedChanged(true)
154 , axisXTitleOffsetChanged(true)
155 , axisYTitleOffsetChanged(true)
156 , axisZTitleOffsetChanged(true)
157 , polarChanged(true)
158 , labelMarginChanged(true)
159 , radialLabelOffsetChanged(true)
160 , marginChanged(true)
161 , cameraChanged(true)
162 {}
163};
164
165class Q_GRAPHS_EXPORT QQuickGraphsItem : public QQuick3DViewport
166{
167 Q_OBJECT
168 Q_PROPERTY(QQuick3DNode *rootNode READ rootNode CONSTANT REVISION(6, 9))
169 Q_PROPERTY(QtGraphs3D::SelectionFlags selectionMode READ selectionMode WRITE setSelectionMode
170 NOTIFY selectionModeChanged)
171 Q_PROPERTY(QtGraphs3D::ShadowQuality shadowQuality READ shadowQuality WRITE setShadowQuality
172 NOTIFY shadowQualityChanged)
173 Q_PROPERTY(int msaaSamples READ msaaSamples WRITE setMsaaSamples NOTIFY msaaSamplesChanged)
174 Q_PROPERTY(Q3DScene *scene READ scene NOTIFY sceneChanged)
175 Q_PROPERTY(QGraphsTheme *theme READ theme WRITE setTheme NOTIFY themeChanged)
176 Q_PROPERTY(QtGraphs3D::RenderingMode renderingMode READ renderingMode WRITE setRenderingMode
177 NOTIFY renderingModeChanged)
178 Q_PROPERTY(QtGraphs3D::TransparencyTechnique transparencyTechnique READ transparencyTechnique
179 WRITE setTransparencyTechnique NOTIFY transparencyTechniqueChanged REVISION(6, 9))
180 Q_PROPERTY(bool measureFps READ measureFps WRITE setMeasureFps NOTIFY measureFpsChanged)
181 Q_PROPERTY(int currentFps READ currentFps NOTIFY currentFpsChanged)
182 Q_PROPERTY(QQmlListProperty<QCustom3DItem> customItemList READ customItemList CONSTANT)
183 Q_PROPERTY(bool orthoProjection READ isOrthoProjection WRITE setOrthoProjection NOTIFY
184 orthoProjectionChanged)
185 Q_PROPERTY(
186 QtGraphs3D::ElementType selectedElement READ selectedElement NOTIFY selectedElementChanged)
187 Q_PROPERTY(qreal aspectRatio READ aspectRatio WRITE setAspectRatio NOTIFY aspectRatioChanged)
188 Q_PROPERTY(QtGraphs3D::OptimizationHint optimizationHint READ optimizationHint WRITE
189 setOptimizationHint NOTIFY optimizationHintChanged)
190 Q_PROPERTY(bool polar READ isPolar WRITE setPolar NOTIFY polarChanged)
191 Q_PROPERTY(float labelMargin READ labelMargin WRITE setLabelMargin NOTIFY labelMarginChanged)
192 Q_PROPERTY(float radialLabelOffset READ radialLabelOffset WRITE setRadialLabelOffset NOTIFY
193 radialLabelOffsetChanged)
194 Q_PROPERTY(qreal horizontalAspectRatio READ horizontalAspectRatio WRITE setHorizontalAspectRatio
195 NOTIFY horizontalAspectRatioChanged)
196 Q_PROPERTY(QLocale locale READ locale WRITE setLocale NOTIFY localeChanged)
197 Q_PROPERTY(
198 QVector3D queriedGraphPosition READ queriedGraphPosition NOTIFY queriedGraphPositionChanged)
199 Q_PROPERTY(qreal margin READ margin WRITE setMargin NOTIFY marginChanged)
200 Q_PROPERTY(float cameraXRotation READ cameraXRotation WRITE setCameraXRotation NOTIFY
201 cameraXRotationChanged)
202 Q_PROPERTY(float cameraYRotation READ cameraYRotation WRITE setCameraYRotation NOTIFY
203 cameraYRotationChanged)
204 Q_PROPERTY(float minCameraXRotation READ minCameraXRotation WRITE setMinCameraXRotation NOTIFY
205 minCameraXRotationChanged REVISION(6, 9))
206 Q_PROPERTY(float maxCameraXRotation READ maxCameraXRotation WRITE setMaxCameraXRotation NOTIFY
207 maxCameraXRotationChanged REVISION(6, 9))
208 Q_PROPERTY(float minCameraYRotation READ minCameraYRotation WRITE setMinCameraYRotation NOTIFY
209 minCameraYRotationChanged REVISION(6, 9))
210 Q_PROPERTY(float maxCameraYRotation READ maxCameraYRotation WRITE setMaxCameraYRotation NOTIFY
211 maxCameraYRotationChanged REVISION(6, 9))
212 Q_PROPERTY(float cameraZoomLevel READ cameraZoomLevel WRITE setCameraZoomLevel NOTIFY
213 cameraZoomLevelChanged)
214 Q_PROPERTY(QtGraphs3D::CameraPreset cameraPreset READ cameraPreset WRITE setCameraPreset NOTIFY
215 cameraPresetChanged)
216 Q_PROPERTY(QVector3D cameraTargetPosition READ cameraTargetPosition WRITE
217 setCameraTargetPosition NOTIFY cameraTargetPositionChanged)
218 Q_PROPERTY(float minCameraZoomLevel READ minCameraZoomLevel WRITE setMinCameraZoomLevel NOTIFY
219 minCameraZoomLevelChanged)
220 Q_PROPERTY(float maxCameraZoomLevel READ maxCameraZoomLevel WRITE setMaxCameraZoomLevel NOTIFY
221 maxCameraZoomLevelChanged)
222 Q_PROPERTY(bool wrapCameraXRotation READ wrapCameraXRotation WRITE setWrapCameraXRotation NOTIFY
223 wrapCameraXRotationChanged)
224 Q_PROPERTY(bool wrapCameraYRotation READ wrapCameraYRotation WRITE setWrapCameraYRotation NOTIFY
225 wrapCameraYRotationChanged)
226 Q_PROPERTY(bool rotationEnabled READ rotationEnabled WRITE setRotationEnabled NOTIFY
227 rotationEnabledChanged)
228 Q_PROPERTY(bool zoomAtTargetEnabled READ zoomAtTargetEnabled WRITE setZoomAtTargetEnabled NOTIFY
229 zoomAtTargetEnabledChanged)
230 Q_PROPERTY(bool selectionEnabled READ selectionEnabled WRITE setSelectionEnabled NOTIFY
231 selectionEnabledChanged)
232 Q_PROPERTY(bool zoomEnabled READ zoomEnabled WRITE setZoomEnabled NOTIFY zoomEnabledChanged)
233
234 Q_PROPERTY(QColor lightColor READ lightColor WRITE setLightColor NOTIFY lightColorChanged)
235 Q_PROPERTY(float ambientLightStrength READ ambientLightStrength WRITE setAmbientLightStrength
236 NOTIFY ambientLightStrengthChanged)
237 Q_PROPERTY(
238 float lightStrength READ lightStrength WRITE setLightStrength NOTIFY lightStrengthChanged)
239 Q_PROPERTY(float shadowStrength READ shadowStrength WRITE setShadowStrength NOTIFY
240 shadowStrengthChanged)
241 Q_PROPERTY(QtGraphs3D::GridLineType gridLineType READ gridLineType WRITE setGridLineType NOTIFY
242 gridLineTypeChanged FINAL)
243
244 QML_NAMED_ELEMENT(GraphsItem3D)
245 QML_UNCREATABLE("")
246
247public:
248 explicit QQuickGraphsItem(QQuickItem *parent = 0);
249 ~QQuickGraphsItem() override;
250
251 void markDataDirty();
252 void markSeriesVisualsDirty();
253 void markSeriesItemLabelsDirty();
254 void emitNeedRender();
255
256 void setQueriedGraphPosition(QVector3D position) { m_queriedGraphPosition = position; }
257
258 virtual void handleAxisTitleChangedBySender(QObject *sender);
259 virtual void handleAxisLabelsChangedBySender(QObject *sender);
260 virtual void handleAxisRangeChangedBySender(QObject *sender);
261 virtual void handleAxisSegmentCountChangedBySender(QObject *sender);
262 virtual void handleAxisSubSegmentCountChangedBySender(QObject *sender);
263 virtual void handleAxisAutoAdjustRangeChangedInOrientation(
264 QAbstract3DAxis::AxisOrientation orientation, bool autoAdjust)
265 = 0;
266 virtual void handleAxisLabelFormatChangedBySender(QObject *sender);
267 virtual void handleAxisReversedChangedBySender(QObject *sender);
268 virtual void handleAxisFormatterDirtyBySender(QObject *sender);
269 virtual void handleAxisLabelAutoRotationChangedBySender(QObject *sender);
270 virtual void handleAxisScaleLabelsByCountChangedBySender(QObject *sender);
271 virtual void handleAxisLabelSizeChangedBySender(QObject *sender);
272 virtual void handleAxisTitleVisibilityChangedBySender(QObject *sender);
273 virtual void handleAxisLabelVisibilityChangedBySender(QObject *sender);
274 virtual void handleAxisTitleFixedChangedBySender(QObject *sender);
275 virtual void handleAxisTitleOffsetChangedBySender(QObject *sender);
276 virtual void handleSeriesVisibilityChangedBySender(QObject *sender);
277 virtual void handleLightingModeChanged() = 0;
278 virtual void adjustAxisRanges() = 0;
279
280 bool graphPositionQueryPending() const { return m_graphPositionQueryPending; }
281 void setGraphPositionQueryPending(const bool &pending)
282 {
283 m_graphPositionQueryPending = pending;
284 }
285
286 virtual void addSeriesInternal(QAbstract3DSeries *series);
287 void insertSeries(qsizetype index, QAbstract3DSeries *series);
288 virtual void removeSeriesInternal(QAbstract3DSeries *series);
289 QList<QAbstract3DSeries *> seriesList();
290
291 void setAxisX(QAbstract3DAxis *axis);
292 QAbstract3DAxis *axisX() const;
293 void setAxisY(QAbstract3DAxis *axis);
294 QAbstract3DAxis *axisY() const;
295 void setAxisZ(QAbstract3DAxis *axis);
296 QAbstract3DAxis *axisZ() const;
297 virtual void addAxis(QAbstract3DAxis *axis);
298 virtual void releaseAxis(QAbstract3DAxis *axis);
299 virtual QList<QAbstract3DAxis *> axes() const; // Omits default axes
300
301 virtual void setRenderingMode(QtGraphs3D::RenderingMode mode);
302 virtual QtGraphs3D::RenderingMode renderingMode() const;
303
304 virtual void setTransparencyTechnique(QtGraphs3D::TransparencyTechnique technique);
305 virtual QtGraphs3D::TransparencyTechnique transparencyTechnique() const;
306
307 virtual void setSelectionMode(QtGraphs3D::SelectionFlags mode);
308 virtual QtGraphs3D::SelectionFlags selectionMode() const;
309
310 void doSetShadowQuality(QtGraphs3D::ShadowQuality quality);
311 virtual void setShadowQuality(QtGraphs3D::ShadowQuality quality);
312 virtual QtGraphs3D::ShadowQuality shadowQuality() const;
313
314 virtual QtGraphs3D::ElementType selectedElement() const;
315
316 virtual void setMsaaSamples(int samples);
317 virtual int msaaSamples() const;
318
319 void addTheme(QGraphsTheme *theme);
320 void releaseTheme(QGraphsTheme *theme);
321 void setTheme(QGraphsTheme *theme);
322 QGraphsTheme *theme() const;
323 QList<QGraphsTheme *> themes() const;
324
325 bool isSlicingActive() const;
326 void setSlicingActive(bool isSlicing);
327
328 bool isCustomDataDirty() const { return m_isCustomDataDirty; }
329 void setCustomDataDirty(bool dirty) { m_isCustomDataDirty = dirty; }
330 bool isCustomItemDirty() const { return m_isCustomItemDirty; }
331 void setCustomItemDirty(bool dirty) { m_isCustomItemDirty = dirty; }
332 bool isCustomLabelItem(QCustom3DItem *item) const;
333 bool isCustomVolumeItem(QCustom3DItem *item) const;
334 QImage customTextureImage(QCustom3DItem *item);
335 Q3DScene *scene();
336
337 Q_INVOKABLE virtual bool hasSeries(QAbstract3DSeries *series);
338 Q_INVOKABLE virtual void clearSelection() = 0;
339
340 void deleteCustomItems();
341 void deleteCustomItem(QCustom3DItem *item);
342 void deleteCustomItem(QVector3D position);
343 QList<QCustom3DItem *> customItems() const;
344
345 Q_INVOKABLE virtual qsizetype addCustomItem(QCustom3DItem *item);
346 Q_INVOKABLE virtual void removeCustomItems();
347 Q_INVOKABLE virtual void removeCustomItem(QCustom3DItem *item);
348 Q_INVOKABLE virtual void removeCustomItemAt(QVector3D position);
349 Q_INVOKABLE virtual void releaseCustomItem(QCustom3DItem *item);
350
351 Q_INVOKABLE virtual int selectedLabelIndex() const;
352 Q_INVOKABLE virtual QAbstract3DAxis *selectedAxis() const;
353
354 Q_INVOKABLE virtual qsizetype selectedCustomItemIndex() const;
355 Q_INVOKABLE virtual QCustom3DItem *selectedCustomItem() const;
356
357 QQmlListProperty<QCustom3DItem> customItemList();
358 static void appendCustomItemFunc(QQmlListProperty<QCustom3DItem> *list, QCustom3DItem *item);
359 static qsizetype countCustomItemFunc(QQmlListProperty<QCustom3DItem> *list);
360 static QCustom3DItem *atCustomItemFunc(QQmlListProperty<QCustom3DItem> *list, qsizetype index);
361 static void clearCustomItemFunc(QQmlListProperty<QCustom3DItem> *list);
362
363 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
364
365 void resizeViewports(QSizeF viewportSize);
366
367 void checkWindowList(QQuickWindow *window);
368
369 void setMeasureFps(bool enable);
370 bool measureFps() const;
371 int currentFps() const;
372
373 void setOrthoProjection(bool enable);
374 bool isOrthoProjection() const;
375
376 void setAspectRatio(qreal ratio);
377 qreal aspectRatio() const;
378
379 void setOptimizationHint(QtGraphs3D::OptimizationHint hint);
380 QtGraphs3D::OptimizationHint optimizationHint() const;
381
382 void setPolar(bool enable);
383 bool isPolar() const;
384
385 void setLabelMargin(float offset);
386 float labelMargin() const;
387
388 void setRadialLabelOffset(float offset);
389 float radialLabelOffset() const;
390
391 void setHorizontalAspectRatio(qreal ratio);
392 qreal horizontalAspectRatio() const;
393
394 void setLocale(const QLocale &locale);
395 QLocale locale() const;
396
397 QVector3D queriedGraphPosition() const;
398
399 void setMargin(qreal margin);
400 qreal margin() const;
401
402 QMutex *mutex() { return &m_mutex; }
403
404 bool isReady() { return isComponentComplete(); }
405 QQuick3DNode *rootNode() const;
406
407 QQuick3DNode *cameraTarget() { return m_cameraTarget; }
408 void setCameraTarget(QQuick3DNode *target) { m_cameraTarget = target; }
409
410 QQuick3DModel *background() const { return m_background; }
411 void setBackground(QQuick3DModel *newBackground) { m_background = newBackground; }
412 QQuick3DModel *backgroundBB() const { return m_backgroundBB; }
413
414 QQuick3DDirectionalLight *light() const;
415 QQuick3DCustomMaterial *createQmlCustomMaterial(const QString &fileName);
416 QQuick3DPrincipledMaterial *createPrincipledMaterial();
417
418 QQuickItem *itemLabel() { return m_itemLabel; }
419 QQuick3DNode *sliceItemLabel() { return m_sliceItemLabel; }
420
421 QQuick3DModel *m_targetVisualizer;
422
423 QQuick3DRepeater *repeaterX() const { return m_repeaterX; }
424 QQuick3DRepeater *repeaterY() const { return m_repeaterY; }
425 QQuick3DRepeater *repeaterZ() const { return m_repeaterZ; }
426
427 QQuick3DNode *titleLabelX() const { return m_titleLabelX; }
428 QQuick3DNode *titleLabelY() const { return m_titleLabelY; }
429 QQuick3DNode *titleLabelZ() const { return m_titleLabelZ; }
430
431 bool isXFlipped() const { return m_xFlipped; }
432 void setXFlipped(bool xFlipped) { m_xFlipped = xFlipped; }
433 bool isYFlipped() const { return m_yFlipped; }
434 void setYFlipped(bool yFlipped) { m_yFlipped = yFlipped; }
435 bool isZFlipped() const { return m_zFlipped; }
436 void setZFlipped(bool zFlipped) { m_zFlipped = zFlipped; }
437 QVector3D scaleWithBackground() const { return m_scaleWithBackground; }
438 QVector3D backgroundScaleMargin() const { return m_backgroundScaleMargin; }
439 void setScaleWithBackground(QVector3D scale) { m_scaleWithBackground = scale; }
440 void setBackgroundScaleMargin(QVector3D margin) { m_backgroundScaleMargin = margin; }
441 QVector3D rotation() const { return m_rot; }
442 void setRotation(QVector3D rotation) { m_rot = rotation; }
443 QVector3D scale() const { return m_scale; }
444 void setScale(QVector3D scale) { m_scale = scale; }
445 QVector3D translate() const { return m_translate; }
446 void setTranslate(QVector3D translate) { m_translate = translate; }
447
448 float lineLengthScaleFactor() const { return m_lineLengthScaleFactor; }
449 void setLineLengthScaleFactor(float scaleFactor) { m_lineLengthScaleFactor = scaleFactor; }
450 float lineWidthScaleFactor() const { return m_lineWidthScaleFactor; }
451 void setLineWidthScaleFactor(float scaleFactor) { m_lineWidthScaleFactor = scaleFactor; }
452 float gridOffset() const { return m_gridOffset; }
453
454 QtGraphs3D::CameraPreset cameraPreset() const;
455 void setCameraPreset(QtGraphs3D::CameraPreset preset);
456
457 float cameraXRotation() const { return m_xRotation; }
458 void setCameraXRotation(float rotation);
459 float cameraYRotation() const { return m_yRotation; }
460 void setCameraYRotation(float rotation);
461
462 float minCameraXRotation() const { return m_minXRotation; }
463 void setMinCameraXRotation(float rotation);
464 float maxCameraXRotation() const { return m_maxXRotation; }
465 void setMaxCameraXRotation(float rotation);
466
467 float minCameraYRotation() const { return m_minYRotation; }
468 void setMinCameraYRotation(float rotation);
469 float maxCameraYRotation() const { return m_maxYRotation; }
470 void setMaxCameraYRotation(float rotation);
471
472 void setZoomAtTargetEnabled(bool enable);
473 bool zoomAtTargetEnabled();
474 void setZoomEnabled(bool enable);
475 bool zoomEnabled();
476 void setSelectionEnabled(bool enable);
477 bool selectionEnabled();
478 void setRotationEnabled(bool enable);
479 bool rotationEnabled();
480
481 Q_INVOKABLE void setDefaultInputHandler();
482 Q_INVOKABLE void unsetDefaultInputHandler();
483 Q_INVOKABLE void unsetDefaultTapHandler();
484 Q_INVOKABLE void unsetDefaultDragHandler();
485 Q_INVOKABLE void unsetDefaultWheelHandler();
486 Q_INVOKABLE void unsetDefaultPinchHandler();
487 Q_INVOKABLE void setDragButton(Qt::MouseButtons button);
488
489 float cameraZoomLevel() const { return m_zoomLevel; }
490 void setCameraZoomLevel(float level);
491
492 float minCameraZoomLevel() const { return m_minZoomLevel; }
493 void setMinCameraZoomLevel(float level);
494
495 float maxCameraZoomLevel() const { return m_maxZoomLevel; }
496 void setMaxCameraZoomLevel(float level);
497
498 void setCameraTargetPosition(QVector3D target);
499 QVector3D cameraTargetPosition() const { return m_requestedTarget; }
500
501 bool wrapCameraXRotation() const { return m_wrapXRotation; }
502 void setWrapCameraXRotation(bool wrap);
503
504 bool wrapCameraYRotation() const { return m_wrapYRotation; }
505 void setWrapCameraYRotation(bool wrap);
506
507 QVector3D graphPositionAt(QPoint point);
508 void setCameraPosition(float horizontal, float vertical, float zoom = 100.0f);
509
510 void changeLabelBackgroundColor(QQuick3DRepeater *repeater, QColor color);
511 void changeLabelBackgroundVisible(QQuick3DRepeater *repeater, const bool &visible);
512 void changeLabelBorderVisible(QQuick3DRepeater *repeater, const bool &visible);
513 void changeLabelTextColor(QQuick3DRepeater *repeater, QColor color);
514 void changeLabelFont(QQuick3DRepeater *repeater, const QFont &font);
515 void changeLabelsVisible(QQuick3DRepeater *repeater, const bool &visible);
516 void changeGridLineColor(QQuick3DRepeater *repeater, QColor color);
517 void updateTitleLabels();
518 virtual void updateSelectionMode(QtGraphs3D::SelectionFlags newMode);
519
520 void setSliceActivatedChanged(bool changed) { m_sliceActivatedChanged = changed; }
521
522 Q_INVOKABLE virtual bool doPicking(QPointF point);
523
524 Q_REVISION(6, 9) Q_INVOKABLE virtual bool doRayPicking(QVector3D origin,
525 QVector3D direction);
526
527 void minimizeMainGraph();
528
529 int horizontalFlipFactor() const;
530 void setHorizontalFlipFactor(int newHorizontalFlipFactor);
531
532 float ambientLightStrength() const;
533 void setAmbientLightStrength(float newAmbientLightStrength);
534 float lightStrength() const;
535 void setLightStrength(float newLightStrength);
536 float shadowStrength() const;
537 void setShadowStrength(float newShadowStrength);
538 QColor lightColor() const;
539 void setLightColor(QColor newLightColor);
540 QtGraphs3D::GridLineType gridLineType() const;
541 void setGridLineType(const QtGraphs3D::GridLineType &gridLineType);
542
543public Q_SLOTS:
544 virtual void handleAxisXChanged(QAbstract3DAxis *axis) = 0;
545 virtual void handleAxisYChanged(QAbstract3DAxis *axis) = 0;
546 virtual void handleAxisZChanged(QAbstract3DAxis *axis) = 0;
547 void handleFpsChanged();
548 void windowDestroyed(QObject *obj);
549
550 void handleAxisTitleChanged(const QString &title);
551 void handleAxisLabelsChanged();
552 void handleAxisRangeChanged(float min, float max);
553 void handleAxisSegmentCountChanged(qsizetype count);
554 void handleAxisSubSegmentCountChanged(qsizetype count);
555 void handleAxisAutoAdjustRangeChanged(bool autoAdjust);
556 void handleAxisScaleLabelsByCountChanged(bool adjust);
557 void handleAxisLabelSizeChanged(qreal size);
558 void handleAxisLabelFormatChanged(const QString &format);
559 void handleAxisReversedChanged(bool enable);
560 void handleAxisFormatterDirty();
561 void handleAxisLabelAutoRotationChanged(float angle);
562 void handleAxisTitleVisibilityChanged(bool visible);
563 void handleAxisLabelVisibilityChanged(bool visible);
564 void handleAxisTitleFixedChanged(bool fixed);
565 void handleAxisTitleOffsetChanged(float offset);
566 void handleInputPositionChanged(QPoint position);
567 void handleSeriesVisibilityChanged(bool visible);
568
569 void handleThemeColorStyleChanged(QGraphsTheme::ColorStyle style);
570 void handleThemeBaseColorsChanged(const QList<QColor> &color);
571 void handleThemeBaseGradientsChanged(const QList<QLinearGradient> &gradient);
572 void handleThemeSingleHighlightColorChanged(QColor color);
573 void handleThemeSingleHighlightGradientChanged(const QLinearGradient &gradient);
574 void handleThemeMultiHighlightColorChanged(QColor color);
575 void handleThemeMultiHighlightGradientChanged(const QLinearGradient &gradient);
576 void handleThemeTypeChanged(QGraphsTheme::Theme theme);
577
578 void handleRequestShadowQuality(QtGraphs3D::ShadowQuality quality);
579
580 void updateCustomItem();
581
582Q_SIGNALS:
583 void selectionModeChanged(QtGraphs3D::SelectionFlags mode);
584 void shadowQualityChanged(QtGraphs3D::ShadowQuality quality);
585 void shadowsSupportedChanged(bool supported);
586 void msaaSamplesChanged(int samples);
587 void themeChanged(QGraphsTheme *theme);
588 void renderingModeChanged(QtGraphs3D::RenderingMode mode);
589 Q_REVISION(6, 9) void transparencyTechniqueChanged(QtGraphs3D::TransparencyTechnique technique);
590 void measureFpsChanged(bool enabled);
591 void currentFpsChanged(int fps);
592 void selectedElementChanged(QtGraphs3D::ElementType type);
593 void orthoProjectionChanged(bool enabled);
594 void aspectRatioChanged(qreal ratio);
595 void optimizationHintChanged(QtGraphs3D::OptimizationHint hint);
596 void polarChanged(bool enabled);
597 void labelMarginChanged(float margin);
598 void radialLabelOffsetChanged(float offset);
599 void horizontalAspectRatioChanged(qreal ratio);
600 void localeChanged(const QLocale &locale);
601 void queriedGraphPositionChanged(QVector3D data);
602 void marginChanged(qreal margin);
603 void cameraPresetChanged(QtGraphs3D::CameraPreset preset);
604 void cameraXRotationChanged(float rotation);
605 void cameraYRotationChanged(float rotation);
606 void cameraZoomLevelChanged(float zoomLevel);
607 void cameraTargetPositionChanged(QVector3D target);
608 void minCameraZoomLevelChanged(float zoomLevel);
609 void maxCameraZoomLevelChanged(float zoomLevel);
610 Q_REVISION(6, 9) void minCameraXRotationChanged(float rotation);
611 Q_REVISION(6, 9) void minCameraYRotationChanged(float rotation);
612 Q_REVISION(6, 9) void maxCameraXRotationChanged(float rotation);
613 Q_REVISION(6, 9) void maxCameraYRotationChanged(float rotation);
614 void wrapCameraXRotationChanged(bool wrap);
615 void wrapCameraYRotationChanged(bool wrap);
616 void needRender();
617 void themeTypeChanged();
618 void axisXChanged(QAbstract3DAxis *axis);
619 void axisYChanged(QAbstract3DAxis *axis);
620 void axisZChanged(QAbstract3DAxis *axis);
621 void activeThemeChanged(QGraphsTheme *activeTheme);
622
623 void tapped(QEventPoint eventPoint, Qt::MouseButton button);
624 void doubleTapped(QEventPoint eventPoint, Qt::MouseButton button);
625 void longPressed();
626 void dragged(QVector2D delta);
627 void wheel(QQuickWheelEvent *event);
628 void pinch(qreal delta);
629 void mouseMove(QPoint mousePos);
630
631 void zoomEnabledChanged(bool enable);
632 void zoomAtTargetEnabledChanged(bool enable);
633 void rotationEnabledChanged(bool enable);
634 void selectionEnabledChanged(bool enable);
635
636 void ambientLightStrengthChanged();
637 void lightStrengthChanged();
638 void shadowStrengthChanged();
639 void lightColorChanged();
640 void gridLineTypeChanged();
641
642protected:
643 bool event(QEvent *event) override;
644
645 void setParentNode(QQuick3DNode *node);
646 virtual void handleWindowChanged(/*QQuickWindow *win*/);
647 void itemChange(ItemChange change, const ItemChangeData &value) override;
648 virtual void updateWindowParameters();
649 virtual void handleSelectionModeChange(QtGraphs3D::SelectionFlags mode);
650 virtual void handleShadowQualityChange(QtGraphs3D::ShadowQuality quality);
651 virtual void handleSelectedElementChange(QtGraphs3D::ElementType type);
652 virtual void handleOptimizationHintChange(QtGraphs3D::OptimizationHint hint);
653 void keyPressEvent(QKeyEvent *ev) override;
654 virtual void handleThemeTypeChange();
655 virtual void handleParentWidthChange();
656 virtual void handleParentHeightChange();
657 void componentComplete() override;
658 void checkSliceEnabled();
659 bool isUserCameraRotationRange() { return m_userRotationRange; };
660 void setUserCameraRotationRange(bool userRotationRange)
661 {
662 m_userRotationRange = userRotationRange;
663 };
664
665 virtual void createSliceView();
666 QQuick3DViewport *createOffscreenSliceView(QtGraphs3D::SliceCaptureType sliceType);
667
668 void handleQueryPositionChanged(QPoint position);
669
670 void handlePrimarySubViewportChanged(const QRect rect);
671 void handleSecondarySubViewportChanged(const QRect rect);
672
673 QQuick3DNode *graphNode() { return m_graphNode; }
674 QQuick3DViewport *sliceView() { return m_sliceView; }
675
676 QQmlComponent *createRepeaterDelegateComponent(const QString &fileName);
677 QQuick3DRepeater *createRepeater(QQuick3DNode *parent = nullptr);
678 QQuick3DNode *createTitleLabel(QQuick3DNode *parent = nullptr);
679 void createItemLabel();
680 QAbstract3DSeries::SeriesType m_graphType = QAbstract3DSeries::SeriesType::None;
681
682 void updateXTitle(QVector3D labelRotation,
683 QVector3D labelTrans,
684 const QQuaternion &totalRotation,
685 float labelsMaxWidth,
686 QVector3D scale);
687 void updateYTitle(QVector3D sideLabelRotation,
688 QVector3D backLabelRotation,
689 QVector3D sideLabelTrans,
690 QVector3D backLabelTrans,
691 const QQuaternion &totalSideRotation,
692 const QQuaternion &totalBackRotation,
693 float labelsMaxWidth,
694 QVector3D scale);
695 void updateZTitle(QVector3D labelRotation,
696 QVector3D labelTrans,
697 const QQuaternion &totalRotation,
698 float labelsMaxWidth,
699 QVector3D scale);
700
701 virtual void calculateSceneScalingFactors() = 0;
702 void positionAndScaleLine(QQuick3DNode *lineNode, QVector3D scale, QVector3D position);
703 int findLabelsMaxWidth(const QStringList &labels);
704 virtual QVector3D calculateCategoryLabelPosition(QAbstract3DAxis *axis,
705 QVector3D labelPosition,
706 int index);
707 virtual float calculateCategoryGridLinePosition(QAbstract3DAxis *axis, int index);
708 float calculatePolarBackgroundMargin();
709 void setFloorGridInRange(bool inRange) { m_isFloorGridInRange = inRange; }
710 void setVerticalSegmentLine(bool hasVerticalLine)
711 {
712 m_hasVerticalSegmentLine = hasVerticalLine;
713 }
714 void updateGrid();
715 void updateGridLineType();
716 void updateLabels();
717 void updateSliceGrid(
718 QQuick3DModel *sliceGrid = nullptr,
719 QtGraphs3D::SliceCaptureType selectedFlag = QtGraphs3D::SliceCaptureType::NoImage);
720 void updateSliceLabels(
721 QQuick3DRepeater *horizontalLabel = nullptr,
722 QQuick3DRepeater *verticalLabel = nullptr,
723 QQuick3DNode *horizontalTitle = nullptr,
724 QQuick3DNode *verticalTitle = nullptr,
725 QQuick3DNode *itemLabel = nullptr,
726 QtGraphs3D::SliceCaptureType selectedFlag = QtGraphs3D::SliceCaptureType::NoImage);
727 void updateBackgroundColor();
728 void setItemSelected(bool selected);
729 virtual void updateShadowQuality(QtGraphs3D::ShadowQuality quality);
730 void updateItemLabel(QVector3D position);
731 virtual void updateSliceItemLabel(const QString &label, QVector3D position);
732
733 struct Volume
734 {
735 QQuick3DModel *model = nullptr;
736 QQuick3DTexture *texture = nullptr;
737 QQuick3DTextureData *textureData = nullptr;
738 QQuick3DTexture *colorTexture = nullptr;
739 QQuick3DTextureData *colorTextureData = nullptr;
740 bool updateTextureData = false;
741 bool updateColorTextureData = false;
742 bool useHighDefShader = false;
743 bool drawSlices = false;
744 bool drawSliceFrames = false;
745 QQuick3DModel *sliceFrameX = nullptr;
746 QQuick3DModel *sliceFrameY = nullptr;
747 QQuick3DModel *sliceFrameZ = nullptr;
748 QQuick3DTexture *sliceFrameTexture = nullptr;
749 };
750
751 virtual void synchData();
752 virtual void updateGraph() {}
753
754 bool isSliceEnabled() const { return m_sliceEnabled; }
755 void setSliceEnabled(bool enabled) { m_sliceEnabled = enabled; }
756 bool isSliceActivatedChanged() const { return m_sliceActivatedChanged; }
757 virtual void toggleSliceGraph();
758 void createSliceCamera(QQuick3DViewport *sliceView);
759 bool isSliceOrthoProjection() const { return m_sliceUseOrthoProjection; }
760 void setSliceOrthoProjection(bool enable) { m_sliceUseOrthoProjection = enable; }
761
762 virtual void updateAxisRange(float min, float max);
763 virtual void updateAxisReversed(bool enable);
764 virtual void updateSingleHighlightColor() {}
765 virtual void updateLightStrength() {}
766
767 virtual void handleLabelCountChanged(QQuick3DRepeater *repeater, QColor axisLabelColor);
768
769 bool isGridUpdated() { return m_gridUpdated; }
770 void setGridUpdated(bool updated) { m_gridUpdated = updated; }
771
772 QGraphsInputHandler *graphsInputHandler() const { return m_inputHandler; }
773
774 virtual QAbstract3DAxis *createDefaultAxis(QAbstract3DAxis::AxisOrientation orientation);
775 QValue3DAxis *createDefaultValueAxis();
776 QCategory3DAxis *createDefaultCategoryAxis();
777 void setAxisHelper(QAbstract3DAxis::AxisOrientation orientation,
778 QAbstract3DAxis *axis,
779 QAbstract3DAxis **axisPtr);
780 virtual void startRecordingRemovesAndInserts();
781
782 QSharedPointer<QMutex> m_nodeMutex;
783
784 QMap<QCustom3DVolume *, Volume> m_customVolumes;
785
786 Q3DScene *m_scene = nullptr;
787 // Active axes
788 QAbstract3DAxis *m_axisX = nullptr;
789 QAbstract3DAxis *m_axisY = nullptr;
790 QAbstract3DAxis *m_axisZ = nullptr;
791
792 QList<QAbstract3DAxis *> m_axes; // List of all added axes
793 bool m_isDataDirty = true;
794 bool m_isCustomDataDirty = true;
795 bool m_isCustomItemDirty = true;
796 bool m_isSeriesVisualsDirty = true;
797 bool m_renderPending = false;
798 bool m_isPolar = false;
799 float m_radialLabelOffset = 1.0f;
800 float m_polarRadius = 2.0f;
801 bool m_userRotationRange = false;
802
803 QList<QAbstract3DSeries *> m_seriesList;
804
805 QList<QAbstract3DSeries *> m_changedSeriesList;
806
807 QList<QCustom3DItem *> m_customItems;
808
809 QtGraphs3D::ElementType m_clickedType = QtGraphs3D::ElementType::None;
810 int m_selectedLabelIndex = -1;
811 qsizetype m_selectedCustomItemIndex = -1;
812 qreal m_margin = -1.0;
813
814 QMutex m_renderMutex;
815 QQuickGraphsItem *m_qml = nullptr;
816
817 QQuick3DViewport *m_customView = nullptr;
818 QQuick3DNode *m_parentNode = nullptr;
819
820private:
821 // This is the same as the minimum bound of GridLine model.
822 const float angularLineOffset = -49.98f;
823 const float rotationOffset = 90.0f;
824
825 QQuick3DModel *m_gridGeometryModel = nullptr;
826 QQuick3DModel *m_subgridGeometryModel = nullptr;
827 QQuick3DModel *m_sliceGridGeometryModel = nullptr;
828 Abstract3DChangeBitField m_changeTracker;
829 QtGraphs3D::SelectionFlags m_selectionMode = QtGraphs3D::SelectionFlag::Item;
830 QtGraphs3D::ShadowQuality m_shadowQuality = QtGraphs3D::ShadowQuality::Medium;
831 bool m_useOrthoProjection = false;
832 qreal m_aspectRatio = 2.0;
833 qreal m_horizontalAspectRatio = 0.0;
834 QtGraphs3D::OptimizationHint m_optimizationHint = QtGraphs3D::OptimizationHint::Default;
835 QLocale m_locale;
836 QVector3D m_queriedGraphPosition;
837 bool m_graphPositionQueryPending = false;
838
839 QQuick3DNode *m_graphNode = nullptr;
840 QQuick3DModel *m_background = nullptr;
841 QQuick3DModel *m_backgroundBB = nullptr;
842 QQuick3DNode *m_backgroundScale = nullptr;
843 QQuick3DNode *m_backgroundRotation = nullptr;
844
845 QQuick3DRepeater *m_repeaterX = nullptr;
846 QQuick3DRepeater *m_repeaterY = nullptr;
847 QQuick3DRepeater *m_repeaterZ = nullptr;
848 std::unique_ptr<QQmlComponent> m_delegateModelX;
849 std::unique_ptr<QQmlComponent> m_delegateModelY;
850 std::unique_ptr<QQmlComponent> m_delegateModelZ;
851
852 QQuick3DNode *m_titleLabelX = nullptr;
853 QQuick3DNode *m_titleLabelY = nullptr;
854 QQuick3DNode *m_titleLabelZ = nullptr;
855
856 QQuickItem *m_itemLabel = nullptr;
857 QQuick3DNode *m_sliceItemLabel = nullptr;
858
859 QQuick3DViewport *m_sliceView = nullptr;
860
861 QQuick3DRepeater *m_sliceHorizontalLabelRepeater = nullptr;
862 QQuick3DRepeater *m_sliceVerticalLabelRepeater = nullptr;
863 std::unique_ptr<QQmlComponent> m_labelDelegate;
864
865 QQuick3DNode *m_sliceHorizontalTitleLabel = nullptr;
866 QQuick3DNode *m_sliceVerticalTitleLabel = nullptr;
867
868 QQuick3DNode *m_cameraTarget = nullptr;
869 QQuick3DDirectionalLight *m_light = nullptr;
870 QQuick3DPerspectiveCamera *m_pCamera = nullptr;
871 QQuick3DOrthographicCamera *m_oCamera = nullptr;
872 QRectF m_cachedGeometry;
873 QtGraphs3D::RenderingMode m_renderMode = QtGraphs3D::RenderingMode::DirectToBackground;
874 QtGraphs3D::TransparencyTechnique m_transparencyTechnique
875 = QtGraphs3D::TransparencyTechnique::Default;
876 int m_samples = 0;
877 int m_windowSamples = 0;
878 QSize m_initialisedSize = QSize(0, 0);
879 bool m_runningInDesigner;
880 QMutex m_mutex;
881
882 bool m_xFlipped = false;
883 bool m_yFlipped = false;
884 bool m_zFlipped = false;
885
886 bool m_flipScales;
887 int m_horizontalFlipFactor = 1;
888
889 bool m_isFloorGridInRange = false;
890 bool m_hasVerticalSegmentLine = true;
891
892 QVector3D m_scaleWithBackground = QVector3D(1.0f, 1.0f, 1.0f);
893 QVector3D m_backgroundScaleMargin = QVector3D(0.0f, 0.0f, 0.0f);
894
895 QVector3D m_rot = QVector3D(1.0f, 1.0f, 1.0f);
896
897 QVector3D m_scale = QVector3D(1.0f, 1.0f, 1.0f);
898
899 QVector3D m_translate = QVector3D(1.0f, 1.0f, 1.0f);
900
901 QVector3D m_labelScale = QVector3D(0.01f, 0.01f, 0.0f);
902
903 float m_gridOffset = 0.002f;
904 float m_lineWidthScaleFactor = 0.0001f;
905 float m_lineLengthScaleFactor = 0.02f;
906
907 float m_labelMargin = .1f;
908
909 bool m_itemSelected = false;
910 bool m_sliceEnabled = false;
911 bool m_sliceActivatedChanged = false;
912 QRect m_primarySubView;
913 QRect m_secondarySubView;
914
915 bool m_gridUpdated = false;
916
917 QtGraphs3D::GridLineType m_gridLineType = QtGraphs3D::GridLineType::Geometry;
918 bool m_gridLineTypeDirty = false;
919
920 bool m_validVolumeSlice = false;
921
922 QVector3D m_labelPosition = QVector3D();
923 QVector3D m_fontScaled = QVector3D();
924 bool m_labelsNeedupdate = false;
925
926 float m_initialZoomLevel = -1.0f;
927 void setUpCamera();
928 void setUpLight();
929 void updateCamera();
930 void updateRadialLabelOffset();
931 QVector3D calculateLabelRotation(float labelAutoAngle);
932 void updateCustomData();
933 void updateCustomLabelsRotation();
934 float fontScaleFactor(float pointSize);
935 float labelAdjustment(float width);
936 void gridLineCountHelper(QAbstract3DAxis *axis, qsizetype &lineCount, qsizetype &sublineCount);
937 QVector3D graphPosToAbsolute(QVector3D position);
938
939 void createVolumeMaterial(QCustom3DVolume *volume, Volume &volumeItem);
940 QQuick3DModel *createSliceFrame(Volume &volumeItem);
941 void updateSliceFrameMaterials(QCustom3DVolume *volume, Volume &volumeItem);
942 void updateSubViews();
943 void updateCustomVolumes();
944
945 bool m_sliceUseOrthoProjection = false;
946
947 QHash<QQuickGraphsItem *, QQuickWindow *> m_graphWindowList = {};
948 QHash<QCustom3DLabel *, QQuick3DNode *> m_customLabelList = {};
949 QHash<QCustom3DItem *, QQuick3DModel *> m_customItemList = {};
950 QList<QCustom3DItem *> m_pendingCustomItemList = {};
951
952 int m_currentFps = -1;
953 bool m_measureFps = false;
954
955 QtGraphs3D::CameraPreset m_activePreset = QtGraphs3D::CameraPreset::NoPreset;
956 float m_xRotation = 0.0f;
957 float m_yRotation = 0.0f;
958 float m_minXRotation = -180.0f;
959 float m_maxXRotation = 180.0f;
960 float m_minYRotation = 0.0f;
961 float m_maxYRotation = 90.0f;
962 bool m_wrapXRotation = true;
963 bool m_wrapYRotation = false;
964
965 float m_zoomLevel = 100.0f;
966 float m_minZoomLevel = 10.0f;
967 float m_maxZoomLevel = 500.0f;
968
969 QColor m_lightColor = QColor(Qt::white);
970 float m_ambientLightStrength = 0.25f;
971 float m_lightStrength = 5.0f;
972 float m_shadowStrength = 25.0f;
973 bool m_lightColorDirty = false;
974 bool m_ambientLightStrengthDirty = false;
975 bool m_lightStrengthDirty = false;
976 bool m_shadowStrengthDirty = false;
977
978 bool m_gridUpdate = false;
979
980 QVector3D m_requestedTarget = QVector3D();
981
982 QGraphsInputHandler *m_inputHandler = nullptr;
983
984 QList<QGraphsTheme *> m_themes;
985 QGraphsTheme *m_activeTheme = nullptr;
986
987 friend class Q3DGraphsWidgetItem;
988 friend class QQuickGraphsNode;
989};
990
991QT_END_NAMESPACE
992
993#endif
994

source code of qtgraphs/src/graphs3d/qml/qquickgraphsitem_p.h