VTK
9.2.6
GUISupport
QtQuick
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
=========================================================================*/
22
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
35
class
vtkAbstractWidget
;
36
class
vtkRenderer
;
37
38
class
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
45
public
:
46
QQuickVTKInteractiveWidget
(QObject* parent =
nullptr
);
47
~QQuickVTKInteractiveWidget
() =
default
;
48
50
53
void
setWidget
(
vtkAbstractWidget
* w);
54
vtkAbstractWidget
*
widget
()
const
;
56
58
61
void
setEnabled
(
bool
e);
62
bool
enabled
()
const
;
64
65
public
Q_SLOTS:
66
virtual
void
sync
(
vtkRenderer
* ren);
67
68
Q_SIGNALS:
69
void
enabledChanged
(
bool
e);
70
71
protected
:
72
// Helper members
73
vtkWeakPointer<vtkAbstractWidget>
m_widget
;
74
75
// Enabled/disabled
76
bool
m_enabled
=
false
;
77
78
private
:
79
QQuickVTKInteractiveWidget
(
const
QQuickVTKInteractiveWidget
&) =
delete
;
80
void
operator=(
const
QQuickVTKInteractiveWidget
) =
delete
;
81
};
82
83
#endif
// QQuickVTKInteractiveWidget_h
QQuickVTKInteractiveWidget::widget
vtkAbstractWidget * widget() const
Set/Get the widget reference.
QQuickVTKInteractiveWidget::QQuickVTKInteractiveWidget
QQuickVTKInteractiveWidget(QObject *parent=nullptr)
QQuickVTKInteractiveWidget::setWidget
void setWidget(vtkAbstractWidget *w)
Set/Get the widget reference.
QQuickVTKInteractiveWidget::enabled
bool enabled
Definition
QQuickVTKInteractiveWidget.h:43
QQuickVTKInteractiveWidget::sync
virtual void sync(vtkRenderer *ren)
QQuickVTKInteractiveWidget::m_widget
vtkWeakPointer< vtkAbstractWidget > m_widget
Definition
QQuickVTKInteractiveWidget.h:73
QQuickVTKInteractiveWidget::enabledChanged
void enabledChanged(bool e)
QQuickVTKInteractiveWidget::m_enabled
bool m_enabled
Definition
QQuickVTKInteractiveWidget.h:76
QQuickVTKInteractiveWidget::enabled
bool enabled() const
Set/Get whether the widget is enabled.
QQuickVTKInteractiveWidget::~QQuickVTKInteractiveWidget
~QQuickVTKInteractiveWidget()=default
QQuickVTKInteractiveWidget::setEnabled
void setEnabled(bool e)
Set/Get whether the widget is enabled.
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:66
vtkRenderer
abstract specification for renderers
Definition
vtkRenderer.h:73
vtkWeakPointer
a weak reference to a vtkObject.
Definition
vtkWeakPointer.h:59
vtkWeakPointer.h
Generated on Fri Nov 8 2024 00:00:00 for VTK by
1.13.1