VTK  9.0.1
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 "vtkGUISupportQtModule.h" // For export macro
32 #include <QPointF> // for ivar
33 
34 class QWidget;
36 
37 class VTKGUISUPPORTQT_EXPORT vtkQWidgetWidget : public vtkAbstractWidget
38 {
39  friend class vtkInteractionCallback;
40 
41 public:
45  static vtkQWidgetWidget* New();
46 
48 
52  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
60  void SetRepresentation(vtkQWidgetRepresentation* rep);
61 
62  // Description:
63  // Disable/Enable the widget if needed.
64  // Unobserved the camera if the widget is disabled.
65  void SetEnabled(int enabling) override;
66 
70  vtkQWidgetRepresentation* GetQWidgetRepresentation();
71 
75  void CreateDefaultRepresentation() override;
76 
80  void SetWidget(QWidget* w);
81 
82 protected:
84  ~vtkQWidgetWidget() override;
85 
86  // Manage the state of the widget
89  {
90  Start = 0,
91  Active
92  };
93 
94  QWidget* Widget;
96 
97  // These methods handle events
98  static void SelectAction3D(vtkAbstractWidget*);
99  static void EndSelectAction3D(vtkAbstractWidget*);
100  static void MoveAction3D(vtkAbstractWidget*);
101 
102 private:
103  vtkQWidgetWidget(const vtkQWidgetWidget&) = delete;
104  void operator=(const vtkQWidgetWidget&) = delete;
105 };
106 
107 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
3D VTK widget for a QWidget
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
a class defining the representation for a vtkQWidgetWidget
a simple class to control print indentation
Definition: vtkIndent.h:33
define the API for widget / widget representation
void SetEnabled(int) override
Methods for activating this widget.
QPointF LastWidgetCoordinates
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...