VTK  9.4.20250102
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
26class QWidget;
27
28VTK_ABI_NAMESPACE_BEGIN
30
31class VTKGUISUPPORTQT_EXPORT vtkQWidgetWidget : public vtkAbstractWidget
32{
33 friend class vtkInteractionCallback;
34
35public:
40
42
46 void PrintSelf(ostream& os, vtkIndent indent) override;
48
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
65
70
74 void SetWidget(QWidget* w);
75 QWidget* GetWidget() { return this->Widget; }
76
77protected:
80
81 // Manage the state of the widget
84 {
85 Start = 0,
86 Active
87 };
88
89 QWidget* Widget;
93
94 // These methods handle events
98
99private:
100 vtkQWidgetWidget(const vtkQWidgetWidget&) = delete;
101 void operator=(const vtkQWidgetWidget&) = delete;
102};
103
104VTK_ABI_NAMESPACE_END
105#endif
define the API for widget / widget representation
a simple class to control print indentation
Definition vtkIndent.h:108
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.