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 =========================================================================*/
24 #ifndef vtkQWidgetWidget_h
25 #define vtkQWidgetWidget_h
26 
27 #include "vtkAbstractWidget.h"
28 #include "vtkGUISupportQtModule.h" // For export macro
29 #include <QPointF> // for ivar
30 
31 class QWidget;
33 
34 class VTKGUISUPPORTQT_EXPORT vtkQWidgetWidget : public vtkAbstractWidget
35 {
36  friend class vtkInteractionCallback;
37 
38 public:
42  static vtkQWidgetWidget* New();
43 
45 
49  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
58 
59  // Description:
60  // Disable/Enable the widget if needed.
61  // Unobserved the camera if the widget is disabled.
62  void SetEnabled(int enabling) override;
63 
68 
72  void CreateDefaultRepresentation() override;
73 
77  void SetWidget(QWidget* w);
78 
79 protected:
81  ~vtkQWidgetWidget() override;
82 
83  // Manage the state of the widget
86  {
87  Start = 0,
88  Active
89  };
90 
91  QWidget* Widget;
93 
94  // These methods handle events
98 
99 private:
100  vtkQWidgetWidget(const vtkQWidgetWidget&) = delete;
101  void operator=(const vtkQWidgetWidget&) = delete;
102 };
103 
104 #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
~vtkQWidgetWidget() override
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
Methods invoked by print to print information about the object including superclasses.
vtkQWidgetRepresentation * GetQWidgetRepresentation()
Return the representation as a vtkQWidgetRepresentation.
QPointF LastWidgetCoordinates
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static vtkQWidgetWidget * New()
Instantiate the object.
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 turning the interactor observer on and off, and determining its state.