VTK  9.1.0
vtkQWidgetRepresentation.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkQWidgetRepresentation.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
25#ifndef vtkQWidgetRepresentation_h
26#define vtkQWidgetRepresentation_h
27
28#include "vtkGUISupportQtModule.h" // For export macro
30
31class QWidget;
32class vtkActor;
33class vtkCellPicker;
35class vtkPlaneSource;
39
40class VTKGUISUPPORTQT_EXPORT vtkQWidgetRepresentation : public vtkWidgetRepresentation
41{
42public:
47
49
53 void PrintSelf(ostream& os, vtkIndent indent) override;
55
61
66 void UpdatePlacement(void);
67
69
72 void PlaceWidget(double bounds[6]) override;
73 void BuildRepresentation() override;
75 unsigned long event, void* calldata, int modify = 0) override;
77
79
82 double* GetBounds() VTK_SIZEHINT(6) override;
83 void GetActors(vtkPropCollection* pc) override;
84 void ReleaseGraphicsResources(vtkWindow*) override;
85 int RenderOpaqueGeometry(vtkViewport*) override;
86 int RenderTranslucentPolygonalGeometry(vtkViewport*) override;
87 vtkTypeBool HasTranslucentPolygonalGeometry() override;
89
90 // Manage the state of the widget
92 {
93 Outside = 0,
94 Inside
95 };
96
98
107 vtkSetClampMacro(InteractionState, int, Outside, Inside);
109
113 void SetWidget(QWidget* w);
114
118 vtkGetObjectMacro(QWidgetTexture, vtkQWidgetTexture);
119
124 vtkGetObjectMacro(PlaneSource, vtkPlaneSource);
125
130 vtkGetVector2Macro(WidgetCoordinates, float);
131
132protected:
135
136 float WidgetCoordinates[2];
137
143
145
146 // Register internal Pickers within PickingManager
147 void RegisterPickers() override;
148
149private:
151 void operator=(const vtkQWidgetRepresentation&) = delete;
152};
153
154#endif
define the API for widget / widget representation
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
ray-cast cell picker for all kinds of Prop3Ds
Definition: vtkCellPicker.h:96
a simple class to control print indentation
Definition: vtkIndent.h:113
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 PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for the class.
void SetWidget(QWidget *w)
Set the QWidget this representation will render.
void UpdatePlacement(void)
Satisfies the superclass API.
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:47
abstract class defines interface between the widget and widget representation classes
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_SIZEHINT(...)