VTK  9.3.0
vtkQWidgetRepresentation.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
13#ifndef vtkQWidgetRepresentation_h
14#define vtkQWidgetRepresentation_h
15
16#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
17#include "vtkGUISupportQtModule.h" // For export macro
19
20class QWidget;
21
22VTK_ABI_NAMESPACE_BEGIN
23class vtkActor;
24class vtkCellPicker;
26class vtkPlaneSource;
30
31class VTKGUISUPPORTQT_EXPORT vtkQWidgetRepresentation : public vtkWidgetRepresentation
32{
33public:
38
40
44 void PrintSelf(ostream& os, vtkIndent indent) override;
46
52
58
60
63 void PlaceWidget(double bounds[6]) override;
64 void BuildRepresentation() override;
66 unsigned long event, void* calldata, int modify = 0) override;
68
70
73 double* GetBounds() VTK_SIZEHINT(6) override;
74 void GetActors(vtkPropCollection* pc) override;
75 void ReleaseGraphicsResources(vtkWindow*) override;
76 int RenderOpaqueGeometry(vtkViewport*) override;
77 int RenderTranslucentPolygonalGeometry(vtkViewport*) override;
78 vtkTypeBool HasTranslucentPolygonalGeometry() override;
80
81 // Manage the state of the widget
83 {
84 Outside = 0,
85 Inside
86 };
87#if !defined(VTK_LEGACY_REMOVE)
88 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
90#endif
91
93
102 vtkSetClampMacro(InteractionState, int, Outside, Inside);
104
108 void SetWidget(QWidget* w);
109
113 vtkGetObjectMacro(QWidgetTexture, vtkQWidgetTexture);
114
119 vtkGetObjectMacro(PlaneSource, vtkPlaneSource);
120
125 vtkGetVector2Macro(WidgetCoordinates, float);
126
127protected:
130
131 float WidgetCoordinates[2];
132
138
140
141 // Register internal Pickers within PickingManager
142 void RegisterPickers() override;
143
144private:
146 void operator=(const vtkQWidgetRepresentation&) = delete;
147};
148
149VTK_ABI_NAMESPACE_END
150#endif
define the API for widget / widget representation
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:41
ray-cast cell picker for all kinds of Prop3Ds
a simple class to control print indentation
Definition vtkIndent.h:29
OpenGL texture map.
create an array of quadrilaterals located in a plane
Superclass for algorithms that produce only polydata as output.
map vtkPolyData to graphics primitives
an ordered list of Props
a class defining the representation for a vtkQWidgetWidget
vtkPolyDataAlgorithm * GetPolyDataAlgorithm()
Satisfies superclass API.
static vtkQWidgetRepresentation * New()
Instantiate the class.
void PlaceWidget(double bounds[6]) override
Methods to interface with the vtkImplicitPlaneWidget2.
void RegisterPickers() override
Register internal Pickers in the Picking Manager.
void BuildRepresentation() override
Methods to interface with the vtkImplicitPlaneWidget2.
void UpdatePlacement()
Satisfies the superclass API.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
void SetWidget(QWidget *w)
Set the QWidget this representation will render.
double * GetBounds() override
Methods supporting the rendering process.
int ComputeComplexInteractionState(vtkRenderWindowInteractor *iren, vtkAbstractWidget *widget, unsigned long event, void *calldata, int modify=0) override
Methods to interface with the vtkImplicitPlaneWidget2.
~vtkQWidgetRepresentation() override
Allows a QWidget to be used as a texture in VTK with OpenGL.
platform-independent render window interaction including picking and frame rate control.
abstract specification for Viewports
Definition vtkViewport.h:45
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_2_0(reason)
#define VTK_SIZEHINT(...)