VTK
9.5.2
Main Page
Related Pages
Topics
Namespaces
Classes
Files
Examples
File List
File Members
GUISupport
Qt
vtkQWidgetTexture.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
3
#ifndef vtkQWidgetTexture_h
4
#define vtkQWidgetTexture_h
5
6
#include "vtkGUISupportQtModule.h"
// For export macro
7
#include "
vtkTextureObject.h
"
8
#include <array>
// for ivar
9
#include <functional>
// for ivar
10
11
class
QGraphicsScene;
12
class
QWidget;
13
14
VTK_ABI_NAMESPACE_BEGIN
15
23
class
VTKGUISUPPORTQT_EXPORT
vtkQWidgetTexture
:
public
vtkTextureObject
24
{
25
public
:
26
static
vtkQWidgetTexture
*
New
();
27
vtkTypeMacro(
vtkQWidgetTexture
,
vtkTextureObject
);
28
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
29
31
34
void
SetWidget
(QWidget* w);
35
QWidget*
GetWidget
() {
return
this->
Widget
; }
37
42
QGraphicsScene*
GetScene
() {
return
this->
Scene
; }
43
48
void
Activate
()
override
;
49
53
void
ReleaseGraphicsResources
(
vtkWindow
* win)
override
;
54
55
protected
:
56
vtkQWidgetTexture
();
57
~vtkQWidgetTexture
()
override
;
58
59
QGraphicsScene*
Scene
;
60
QWidget*
Widget
;
61
62
// method called when the widget needs repainting
63
std::function<void()>
RedrawMethod
;
64
65
// internal method to setup the scene/framebuffer/etc
66
void
AllocateFromWidget
();
67
68
unsigned
char
*
ImageBuffer
;
69
std::array<int, 2>
ImageBufferDimensions
;
70
71
private
:
72
vtkQWidgetTexture
(
const
vtkQWidgetTexture
&) =
delete
;
73
void
operator=(
const
vtkQWidgetTexture
&) =
delete
;
74
};
75
76
VTK_ABI_NAMESPACE_END
77
#endif
vtkIndent
a simple class to control print indentation
Definition
vtkIndent.h:29
vtkQWidgetTexture::Activate
void Activate() override
Activate and Bind the texture.
vtkQWidgetTexture::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *win) override
Free resources.
vtkQWidgetTexture::Widget
QWidget * Widget
Definition
vtkQWidgetTexture.h:60
vtkQWidgetTexture::ImageBufferDimensions
std::array< int, 2 > ImageBufferDimensions
Definition
vtkQWidgetTexture.h:69
vtkQWidgetTexture::vtkQWidgetTexture
vtkQWidgetTexture()
vtkQWidgetTexture::Scene
QGraphicsScene * Scene
Definition
vtkQWidgetTexture.h:59
vtkQWidgetTexture::GetWidget
QWidget * GetWidget()
Set/Get the QWidget that this TextureObject will render/use.
Definition
vtkQWidgetTexture.h:35
vtkQWidgetTexture::AllocateFromWidget
void AllocateFromWidget()
vtkQWidgetTexture::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkQWidgetTexture::SetWidget
void SetWidget(QWidget *w)
Set/Get the QWidget that this TextureObject will render/use.
vtkQWidgetTexture::New
static vtkQWidgetTexture * New()
vtkQWidgetTexture::GetScene
QGraphicsScene * GetScene()
get the QScene used for rendering, this is where events will be forwarded to.
Definition
vtkQWidgetTexture.h:42
vtkQWidgetTexture::RedrawMethod
std::function< void()> RedrawMethod
Definition
vtkQWidgetTexture.h:63
vtkQWidgetTexture::~vtkQWidgetTexture
~vtkQWidgetTexture() override
vtkQWidgetTexture::ImageBuffer
unsigned char * ImageBuffer
Definition
vtkQWidgetTexture.h:68
vtkTextureObject
In case DepthTextureCompare is true, specify the comparison function in use.
Definition
vtkTextureObject.h:34
vtkWindow
window superclass for vtkRenderWindow
Definition
vtkWindow.h:26
vtkTextureObject.h
Generated on
for VTK by
1.15.0