VTK
9.4.20250102
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
GUISupport
Qt
vtkQWidgetWidget.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
19
#ifndef vtkQWidgetWidget_h
20
#define vtkQWidgetWidget_h
21
22
#include "
vtkAbstractWidget.h
"
23
#include "vtkGUISupportQtModule.h"
// For export macro
24
#include <QPointF>
// for ivar
25
26
class
QWidget;
27
28
VTK_ABI_NAMESPACE_BEGIN
29
class
vtkQWidgetRepresentation
;
30
31
class
VTKGUISUPPORTQT_EXPORT
vtkQWidgetWidget
:
public
vtkAbstractWidget
32
{
33
friend
class
vtkInteractionCallback;
34
35
public
:
39
static
vtkQWidgetWidget
*
New
();
40
42
45
vtkTypeMacro(
vtkQWidgetWidget
,
vtkAbstractWidget
);
46
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
48
54
void
SetRepresentation
(
vtkQWidgetRepresentation
* rep);
55
56
// Description:
57
// Disable/Enable the widget if needed.
58
// Unobserved the camera if the widget is disabled.
59
void
SetEnabled
(
int
enabling)
override
;
60
64
vtkQWidgetRepresentation
*
GetQWidgetRepresentation
();
65
69
void
CreateDefaultRepresentation
()
override
;
70
74
void
SetWidget
(QWidget* w);
75
QWidget*
GetWidget
() {
return
this->Widget; }
76
77
protected
:
78
vtkQWidgetWidget
();
79
~vtkQWidgetWidget
()
override
;
80
81
// Manage the state of the widget
82
int
WidgetState
;
83
enum
WidgetStateType
84
{
85
Start = 0,
86
Active
87
};
88
89
QWidget*
Widget
;
90
QPointF
LastWidgetCoordinates
;
91
QPointF
SteadyWidgetCoordinates
;
92
double
SelectStartTime
;
93
94
// These methods handle events
95
static
void
SelectAction3D
(
vtkAbstractWidget
*);
96
static
void
EndSelectAction3D
(
vtkAbstractWidget
*);
97
static
void
MoveAction3D
(
vtkAbstractWidget
*);
98
99
private
:
100
vtkQWidgetWidget
(
const
vtkQWidgetWidget
&) =
delete
;
101
void
operator=(
const
vtkQWidgetWidget
&) =
delete
;
102
};
103
104
VTK_ABI_NAMESPACE_END
105
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition
vtkAbstractWidget.h:86
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:108
vtkQWidgetRepresentation
a class defining the representation for a vtkQWidgetWidget
Definition
vtkQWidgetRepresentation.h:31
vtkQWidgetWidget
3D VTK widget for a QWidget
Definition
vtkQWidgetWidget.h:32
vtkQWidgetWidget::New
static vtkQWidgetWidget * New()
Instantiate the object.
vtkQWidgetWidget::~vtkQWidgetWidget
~vtkQWidgetWidget() override
vtkQWidgetWidget::GetWidget
QWidget * GetWidget()
Definition
vtkQWidgetWidget.h:75
vtkQWidgetWidget::SteadyWidgetCoordinates
QPointF SteadyWidgetCoordinates
Definition
vtkQWidgetWidget.h:91
vtkQWidgetWidget::SetRepresentation
void SetRepresentation(vtkQWidgetRepresentation *rep)
Specify an instance of vtkQWidgetRepresentation used to represent this widget in the scene.
vtkQWidgetWidget::Widget
QWidget * Widget
Definition
vtkQWidgetWidget.h:89
vtkQWidgetWidget::SelectAction3D
static void SelectAction3D(vtkAbstractWidget *)
vtkQWidgetWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject methods.
vtkQWidgetWidget::LastWidgetCoordinates
QPointF LastWidgetCoordinates
Definition
vtkQWidgetWidget.h:90
vtkQWidgetWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkQWidgetWidget::WidgetStateType
WidgetStateType
Definition
vtkQWidgetWidget.h:84
vtkQWidgetWidget::SelectStartTime
double SelectStartTime
Definition
vtkQWidgetWidget.h:92
vtkQWidgetWidget::WidgetState
int WidgetState
Definition
vtkQWidgetWidget.h:82
vtkQWidgetWidget::SetWidget
void SetWidget(QWidget *w)
Set the QWidget that will receive the events.
vtkQWidgetWidget::MoveAction3D
static void MoveAction3D(vtkAbstractWidget *)
vtkQWidgetWidget::EndSelectAction3D
static void EndSelectAction3D(vtkAbstractWidget *)
vtkQWidgetWidget::vtkQWidgetWidget
vtkQWidgetWidget()
vtkQWidgetWidget::SetEnabled
void SetEnabled(int enabling) override
Methods for activating this widget.
vtkQWidgetWidget::GetQWidgetRepresentation
vtkQWidgetRepresentation * GetQWidgetRepresentation()
Return the representation as a vtkQWidgetRepresentation.
vtkAbstractWidget.h
Generated on Thu Jan 2 2025 09:03:55 for VTK by
1.9.7