VTK  9.1.0
QQuickVTKInteractiveWidget.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: QQuickVTKInteractiveWidget.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
23#ifndef QQuickVTKInteractiveWidget_h
24#define QQuickVTKInteractiveWidget_h
25
26// Qt includes
27#include <QObject>
28
29// vtk includes
30#include "vtkWeakPointer.h" // For vtkWeakPointer
31
32#include "vtkGUISupportQtQuickModule.h" // for export macro
33
34// Forward declarations
36class vtkRenderer;
37
38class VTKGUISUPPORTQTQUICK_EXPORT QQuickVTKInteractiveWidget : public QObject
39{
40 Q_OBJECT
41 typedef QObject Superclass;
42
43 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged);
44
45public:
46 QQuickVTKInteractiveWidget(QObject* parent = nullptr);
48
50
56
58
61 void setEnabled(bool e);
62 bool enabled() const;
64
65public Q_SLOTS:
66 virtual void sync(vtkRenderer* ren);
67
68Q_SIGNALS:
69 void enabledChanged(bool e);
70
71protected:
72 // Helper members
74
75 // Enabled/disabled
76 bool m_enabled = false;
77
78private:
80 void operator=(const QQuickVTKInteractiveWidget) = delete;
81};
82
83#endif // QQuickVTKInteractiveWidget_h
QObject that manages a VTK interactive widget to ensure that it behaves as per the QtQuick threaded r...
vtkAbstractWidget * widget() const
Set/Get the widget reference.
QQuickVTKInteractiveWidget(QObject *parent=nullptr)
void setWidget(vtkAbstractWidget *w)
Set/Get the widget reference.
virtual void sync(vtkRenderer *ren)
vtkWeakPointer< vtkAbstractWidget > m_widget
bool enabled() const
Set/Get whether the widget is enabled.
~QQuickVTKInteractiveWidget()=default
void setEnabled(bool e)
Set/Get whether the widget is enabled.
define the API for widget / widget representation
abstract specification for renderers
Definition: vtkRenderer.h:173
@ enabled
Definition: vtkX3D.h:265