VTK  9.3.0
QQuickVTKInteractiveWidget.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
11#ifndef QQuickVTKInteractiveWidget_h
12#define QQuickVTKInteractiveWidget_h
13
14// Qt includes
15#include <QObject>
16
17// vtk includes
18#include "vtkDeprecation.h"
19#include "vtkGUISupportQtQuickModule.h" // for export macro
20#include "vtkWeakPointer.h" // For vtkWeakPointer
21
22// Forward declarations
23VTK_ABI_NAMESPACE_BEGIN
25class vtkRenderer;
26
28 "Use QQuickVTKItem instead") VTKGUISUPPORTQTQUICK_EXPORT QQuickVTKInteractiveWidget
29 : public QObject
30{
31 Q_OBJECT
32 typedef QObject Superclass;
33
34 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged);
35
36public:
37 QQuickVTKInteractiveWidget(QObject* parent = nullptr);
38 ~QQuickVTKInteractiveWidget() override = default;
39
41
47
49
52 void setEnabled(bool e);
53 bool enabled() const;
55
56public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
57 virtual void sync(vtkRenderer* ren);
58
59Q_SIGNALS:
60 void enabledChanged(bool e);
61
62protected:
63 // Helper members
65
66 // Enabled/disabled
67 bool m_enabled = false;
68
69private:
71 void operator=(const QQuickVTKInteractiveWidget) = delete;
72};
73
74VTK_ABI_NAMESPACE_END
75#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() override=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:59
a weak reference to a vtkObject.
#define VTK_DEPRECATED_IN_9_3_0(reason)