VTK  9.2.6
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=========================================================================*/
27#ifndef vtkQWidgetWidget_h
28#define vtkQWidgetWidget_h
29
30#include "vtkAbstractWidget.h"
31#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
32#include "vtkGUISupportQtModule.h" // For export macro
33#include <QPointF> // for ivar
34
35class QWidget;
37
38class VTKGUISUPPORTQT_EXPORT vtkQWidgetWidget : public vtkAbstractWidget
39{
40 friend class vtkInteractionCallback;
41
42public:
47
49
53 void PrintSelf(ostream& os, vtkIndent indent) override;
55
62
63 // Description:
64 // Disable/Enable the widget if needed.
65 // Unobserved the camera if the widget is disabled.
66 void SetEnabled(int enabling) override;
67
72
77
81 void SetWidget(QWidget* w);
82 QWidget* GetWidget() { return this->Widget; }
83
84protected:
87
88 // Manage the state of the widget
91 {
92 Start = 0,
93 Active
94 };
95#if !defined(VTK_LEGACY_REMOVE)
96 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
98#endif
99
100 QWidget* Widget;
104
105 // These methods handle events
109
110private:
111 vtkQWidgetWidget(const vtkQWidgetWidget&) = delete;
112 void operator=(const vtkQWidgetWidget&) = delete;
113};
114
115#endif
define the API for widget / widget representation
a simple class to control print indentation
Definition vtkIndent.h:34
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.
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)