VTK
9.1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
GUISupport
Qt
vtkQWidgetWidget.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
5
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6
All rights reserved.
7
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notice for more information.
12
13
=========================================================================*/
30
#ifndef vtkQWidgetWidget_h
31
#define vtkQWidgetWidget_h
32
33
#include "
vtkAbstractWidget.h
"
34
#include "vtkGUISupportQtModule.h"
// For export macro
35
#include <QPointF>
// for ivar
36
37
class
QWidget;
38
class
vtkQWidgetRepresentation
;
39
40
class
VTKGUISUPPORTQT_EXPORT
vtkQWidgetWidget
:
public
vtkAbstractWidget
41
{
42
friend
class
vtkInteractionCallback;
43
44
public
:
48
static
vtkQWidgetWidget
*
New
();
49
51
54
vtkTypeMacro(
vtkQWidgetWidget
,
vtkAbstractWidget
);
55
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
57
63
void
SetRepresentation
(
vtkQWidgetRepresentation
* rep);
64
65
// Description:
66
// Disable/Enable the widget if needed.
67
// Unobserved the camera if the widget is disabled.
68
void
SetEnabled
(
int
enabling)
override
;
69
73
vtkQWidgetRepresentation
*
GetQWidgetRepresentation
();
74
78
void
CreateDefaultRepresentation
()
override
;
79
83
void
SetWidget
(QWidget* w);
84
QWidget*
GetWidget
() {
return
this->Widget; }
85
86
protected
:
87
vtkQWidgetWidget
();
88
~vtkQWidgetWidget
()
override
;
89
90
// Manage the state of the widget
91
int
WidgetState
;
92
enum
_WidgetState
93
{
94
Start = 0,
95
Active
96
};
97
98
QWidget*
Widget
;
99
QPointF
LastWidgetCoordinates
;
100
QPointF
SteadyWidgetCoordinates
;
101
double
SelectStartTime
;
102
103
// These methods handle events
104
static
void
SelectAction3D
(
vtkAbstractWidget
*);
105
static
void
EndSelectAction3D
(
vtkAbstractWidget
*);
106
static
void
MoveAction3D
(
vtkAbstractWidget
*);
107
108
private
:
109
vtkQWidgetWidget
(
const
vtkQWidgetWidget
&) =
delete
;
110
void
operator=(
const
vtkQWidgetWidget
&) =
delete
;
111
};
112
113
#endif
vtkAbstractWidget
define the API for widget / widget representation
Definition:
vtkAbstractWidget.h:66
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkQWidgetRepresentation
a class defining the representation for a vtkQWidgetWidget
Definition:
vtkQWidgetRepresentation.h:41
vtkQWidgetWidget
3D VTK widget for a QWidget
Definition:
vtkQWidgetWidget.h:41
vtkQWidgetWidget::New
static vtkQWidgetWidget * New()
Instantiate the object.
vtkQWidgetWidget::~vtkQWidgetWidget
~vtkQWidgetWidget() override
vtkQWidgetWidget::GetWidget
QWidget * GetWidget()
Definition:
vtkQWidgetWidget.h:84
vtkQWidgetWidget::SteadyWidgetCoordinates
QPointF SteadyWidgetCoordinates
Definition:
vtkQWidgetWidget.h:100
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:98
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:99
vtkQWidgetWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkQWidgetWidget::SelectStartTime
double SelectStartTime
Definition:
vtkQWidgetWidget.h:101
vtkQWidgetWidget::_WidgetState
_WidgetState
Definition:
vtkQWidgetWidget.h:93
vtkQWidgetWidget::WidgetState
int WidgetState
Definition:
vtkQWidgetWidget.h:91
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 turning the interactor observer on and off, and determining its state.
vtkQWidgetWidget::GetQWidgetRepresentation
vtkQWidgetRepresentation * GetQWidgetRepresentation()
Return the representation as a vtkQWidgetRepresentation.
vtkAbstractWidget.h
Generated on Fri Apr 21 2023 10:28:49 for VTK by
1.9.6