VTK
9.1.0
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 <array>
// for ivar
21
#include <functional>
// for ivar
22
23
class
QGraphicsScene;
24
class
QWidget;
25
33
class
VTKGUISUPPORTQT_EXPORT
vtkQWidgetTexture
:
public
vtkTextureObject
34
{
35
public
:
36
static
vtkQWidgetTexture
*
New
();
37
vtkTypeMacro(
vtkQWidgetTexture
,
vtkTextureObject
);
38
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
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
QWidget*
Widget
;
71
72
// method called when the widget needs repainting
73
std::function
<void()>
RedrawMethod
;
74
75
// internal method to setup the scene/framebuffer/etc
76
void
AllocateFromWidget
();
77
78
unsigned
char
*
ImageBuffer
;
79
std::array<int, 2>
ImageBufferDimensions
;
80
81
private
:
82
vtkQWidgetTexture
(
const
vtkQWidgetTexture
&) =
delete
;
83
void
operator=(
const
vtkQWidgetTexture
&) =
delete
;
84
};
85
86
#endif
vtkQWidgetTexture::ImageBufferDimensions
std::array< int, 2 > ImageBufferDimensions
Definition:
vtkQWidgetTexture.h:79
vtkX3D::function
@ function
Definition:
vtkX3D.h:255
vtkQWidgetTexture::Widget
QWidget * Widget
Definition:
vtkQWidgetTexture.h:70
vtkQWidgetTexture::vtkQWidgetTexture
vtkQWidgetTexture()
vtkQWidgetTexture
Allows a QWidget to be used as a texture in VTK with OpenGL.
Definition:
vtkQWidgetTexture.h:34
vtkWindow
window superclass for vtkRenderWindow
Definition:
vtkWindow.h:39
vtkQWidgetTexture::ImageBuffer
unsigned char * ImageBuffer
Definition:
vtkQWidgetTexture.h:78
vtkQWidgetTexture::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *win) override
Free resources.
vtkIndent
a simple class to control print indentation
Definition:
vtkIndent.h:113
vtkQWidgetTexture::~vtkQWidgetTexture
~vtkQWidgetTexture() override
vtkTextureObject
abstracts an OpenGL texture object.
Definition:
vtkTextureObject.h:60
vtkTextureObject.h
vtkX3D::Scene
@ Scene
Definition:
vtkX3D.h:160
vtkQWidgetTexture::SetWidget
void SetWidget(QWidget *w)
Set/Get the QWidget that this TextureObject will render/use.
vtkQWidgetTexture::GetWidget
QWidget * GetWidget()
Set/Get the QWidget that this TextureObject will render/use.
Definition:
vtkQWidgetTexture.h:45
vtkQWidgetTexture::AllocateFromWidget
void AllocateFromWidget()
vtkQWidgetTexture::GetScene
QGraphicsScene * GetScene()
get the QScene used for rendering, this is where events will be forwarded to.
Definition:
vtkQWidgetTexture.h:52
vtkQWidgetTexture::Activate
void Activate() override
Activate and Bind the texture.
vtkQWidgetTexture::New
static vtkQWidgetTexture * New()
vtkQWidgetTexture::Scene
QGraphicsScene * Scene
Definition:
vtkQWidgetTexture.h:69
vtkQWidgetTexture::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkQWidgetTexture::RedrawMethod
std::function< void()> RedrawMethod
Definition:
vtkQWidgetTexture.h:73
Generated on Fri Nov 5 2021 00:11:08 for VTK by
1.8.20