VTK  9.5.20250802
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 "vtkGUISupportQtModule.h" // For export macro
18
19class QWidget;
20
21VTK_ABI_NAMESPACE_BEGIN
22class vtkActor;
23class vtkCellPicker;
25class vtkPlaneSource;
29
30class VTKGUISUPPORTQT_EXPORT vtkQWidgetRepresentation : public vtkWidgetRepresentation
31{
32public:
37
39
43 void PrintSelf(ostream& os, vtkIndent indent) override;
45
51
57
59
62 void PlaceWidget(double bounds[6]) override;
63 void BuildRepresentation() override;
65 unsigned long event, void* calldata, int modify = 0) override;
67
69
72 double* GetBounds() VTK_SIZEHINT(6) override;
73 void GetActors(vtkPropCollection* pc) override;
74 void ReleaseGraphicsResources(vtkWindow*) override;
75 int RenderOpaqueGeometry(vtkViewport*) override;
76 int RenderTranslucentPolygonalGeometry(vtkViewport*) override;
77 vtkTypeBool HasTranslucentPolygonalGeometry() override;
79
80 // Manage the state of the widget
82 {
83 Outside = 0,
84 Inside
85 };
86
88
97 vtkSetClampMacro(InteractionState, int, Outside, Inside);
99
103 void SetWidget(QWidget* w);
104
108 vtkGetObjectMacro(QWidgetTexture, vtkQWidgetTexture);
109
114 vtkGetObjectMacro(PlaneSource, vtkPlaneSource);
115
120 vtkGetVector2Macro(WidgetCoordinates, float);
121
122protected:
125
126 float WidgetCoordinates[2];
127
133
135
136 // Register internal Pickers within PickingManager
137 void RegisterPickers() override;
138
139private:
141 void operator=(const vtkQWidgetRepresentation&) = delete;
142};
143
144VTK_ABI_NAMESPACE_END
145#endif
define the API for widget / widget representation
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:151
ray-cast cell picker for all kinds of Prop3Ds
a simple class to control print indentation
Definition vtkIndent.h:108
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:66
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)