VTK
9.0.1
GUISupport
Qt
vtkQWidgetTexture.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkQWidgetTexture.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
=========================================================================*/
15
#ifndef vtkQWidgetTexture_h
16
#define vtkQWidgetTexture_h
17
18
#include "vtkGUISupportQtModule.h"
// For export macro
19
#include "
vtkTextureObject.h
"
20
#include <functional>
// for ivar
21
22
class
QGraphicsScene;
23
class
QOffscreenSurface;
24
class
QOpenGLFramebufferObject;
25
class
QWidget;
26
34
class
VTKGUISUPPORTQT_EXPORT
vtkQWidgetTexture
:
public
vtkTextureObject
35
{
36
public
:
37
static
vtkQWidgetTexture
*
New
();
38
vtkTypeMacro(
vtkQWidgetTexture
,
vtkTextureObject
);
39
41
44
void
SetWidget(QWidget* w);
45
QWidget*
GetWidget
() {
return
this->Widget; }
47
52
QGraphicsScene*
GetScene
() {
return
this->
Scene
; }
53
58
void
Activate
()
override
;
59
63
void
ReleaseGraphicsResources
(
vtkWindow
* win)
override
;
64
65
protected
:
66
vtkQWidgetTexture
();
67
~
vtkQWidgetTexture
()
override
;
68
69
QGraphicsScene*
Scene
;
70
QOffscreenSurface*
OffscreenSurface
;
71
QOpenGLFramebufferObject*
Framebuffer
;
72
QWidget*
Widget
;
73
74
// method called when the widget needs repainting
75
std::function<void()>
RedrawMethod
;
76
77
// internal method to setup the scene/framebuffer/etc
78
void
AllocateFromWidget();
79
80
private
:
81
vtkQWidgetTexture
(
const
vtkQWidgetTexture
&) =
delete
;
82
void
operator=(
const
vtkQWidgetTexture
&) =
delete
;
83
};
84
85
#endif
vtkTextureObject.h
vtkTextureObject::ReleaseGraphicsResources
virtual void ReleaseGraphicsResources(vtkWindow *win)
Deactivate and UnBind the texture.
vtkQWidgetTexture::Scene
QGraphicsScene * Scene
Definition:
vtkQWidgetTexture.h:69
vtkQWidgetTexture::Widget
QWidget * Widget
Definition:
vtkQWidgetTexture.h:72
vtkQWidgetTexture::Framebuffer
QOpenGLFramebufferObject * Framebuffer
Definition:
vtkQWidgetTexture.h:71
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:37
vtkQWidgetTexture::OffscreenSurface
QOffscreenSurface * OffscreenSurface
Definition:
vtkQWidgetTexture.h:70
vtkX3D::Scene
Definition:
vtkX3D.h:160
vtkQWidgetTexture::GetScene
QGraphicsScene * GetScene()
get the QScene used for rendering, this is where events will be forwarded to.
Definition:
vtkQWidgetTexture.h:52
vtkQWidgetTexture::GetWidget
QWidget * GetWidget()
Set/Get the QWidget that this TextureObject will render/use.
Definition:
vtkQWidgetTexture.h:45
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:40
vtkTextureObject::New
static vtkTextureObject * New()
vtkQWidgetTexture
Allows a QWidget to be used as a texture in VTK with OpenGL.
Definition:
vtkQWidgetTexture.h:34
vtkTextureObject::Activate
virtual void Activate()
Activate and Bind the texture.
vtkQWidgetTexture::RedrawMethod
std::function< void()> RedrawMethod
Definition:
vtkQWidgetTexture.h:75
Generated on Fri Jan 7 2022 00:38:51 for VTK by
1.8.14