VTK  9.3.0
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
16#ifndef vtkQWidgetWidget_h
17#define vtkQWidgetWidget_h
18
19#include "vtkAbstractWidget.h"
20#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
21#include "vtkGUISupportQtModule.h" // For export macro
22#include <QPointF> // for ivar
23
24class QWidget;
25
26VTK_ABI_NAMESPACE_BEGIN
28
29class VTKGUISUPPORTQT_EXPORT vtkQWidgetWidget : public vtkAbstractWidget
30{
31 friend class vtkInteractionCallback;
32
33public:
38
40
44 void PrintSelf(ostream& os, vtkIndent indent) override;
46
53
54 // Description:
55 // Disable/Enable the widget if needed.
56 // Unobserved the camera if the widget is disabled.
57 void SetEnabled(int enabling) override;
58
63
68
72 void SetWidget(QWidget* w);
73 QWidget* GetWidget() { return this->Widget; }
74
75protected:
78
79 // Manage the state of the widget
82 {
83 Start = 0,
84 Active
85 };
86#if !defined(VTK_LEGACY_REMOVE)
87 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
89#endif
90
91 QWidget* Widget;
95
96 // These methods handle events
100
101private:
102 vtkQWidgetWidget(const vtkQWidgetWidget&) = delete;
103 void operator=(const vtkQWidgetWidget&) = delete;
104};
105
106VTK_ABI_NAMESPACE_END
107#endif
define the API for widget / widget representation
a simple class to control print indentation
Definition vtkIndent.h:29
a class defining the representation for a vtkQWidgetWidget
3D VTK widget for a QWidget
static vtkQWidgetWidget * New()
Instantiate the object.
~vtkQWidgetWidget() override
QWidget * GetWidget()
QPointF SteadyWidgetCoordinates
void SetRepresentation(vtkQWidgetRepresentation *rep)
Specify an instance of vtkQWidgetRepresentation used to represent this widget in the scene.
static void SelectAction3D(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject methods.
QPointF LastWidgetCoordinates
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetWidget(QWidget *w)
Set the QWidget that will receive the events.
static void MoveAction3D(vtkAbstractWidget *)
static void EndSelectAction3D(vtkAbstractWidget *)
void SetEnabled(int enabling) override
Methods for activating this widget.
vtkQWidgetRepresentation * GetQWidgetRepresentation()
Return the representation as a vtkQWidgetRepresentation.
#define VTK_DEPRECATED_IN_9_2_0(reason)