 |
VTK
9.1.0
|
Go to the documentation of this file.
116 #ifndef QQuickVTKRenderWindow_h
117 #define QQuickVTKRenderWindow_h
123 #include <QOpenGLFunctions>
125 #include <QQuickItem>
127 #include "vtkGUISupportQtQuickModule.h"
142 ,
protected QOpenGLFunctions
145 typedef QQuickItem Superclass;
271 bool m_initialized =
false;
274 bool m_screenshotScheduled =
false;
279 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
280 void geometryChanged(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
282 void geometryChange(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
295 #endif // QQuickVTKRenderWindow_h
vtkSmartPointer< vtkGenericOpenGLRenderWindow > m_renderWindow
virtual void render()
Schedule a scenegraph update.
vtkRenderWindow * renderWindow() const
Set/Get the vtkRenderWindow for the view.
~QQuickVTKRenderWindow()
Destructor.
virtual void cleanup()
This is the function called on the QtQuick render thread when the scenegraph is invalidated.
QQuickVTKRenderWindow(QQuickItem *parent=nullptr)
Constructor Creates a QQuickVTKRenderWindow with:
virtual bool isInitialized() const
Get whether the render window is initialized Used internally to determine if the OpenGL context,...
virtual void sync()
This is the function called on the QtQuick render thread before the scenegraph state is synchronized.
void setRenderWindow(vtkGenericOpenGLRenderWindow *renWin)
Set/Get the vtkRenderWindow for the view.
Use a vtkWindow as input to image pipeline.
platform independent render window
virtual void mapToViewport(const QRectF &rect, double viewport[4])
Map a Qt item rect to viewport coordinates.
Intermediate class that handles relaying Qt events to VTK.
QPointer< QQuickVTKInteractorAdapter > interactorAdapter() const
Get access to the interactor adapter.
virtual vtkSmartPointer< vtkImageData > captureScreenshot(double *viewport)
Capture a screenshot of the window.
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
QQuickItem subclass that manages the vtkRenderWindow and, in turn, the OpenGL context of the QML appl...
virtual void handleWindowChanged(QQuickWindow *w)
bool checkGraphicsBackend()
Check the scenegraph backend and graphics API being used.
topologically and geometrically regular array of data
QPointer< QQuickVTKInteractorAdapter > m_interactorAdapter
virtual vtkSmartPointer< vtkImageData > captureScreenshot()
Capture a screenshot of the window.
virtual void renderNow()
Convenience method that schedules a scenegraph update and waits for the update.
vtkNew< vtkRenderer > m_dummyRenderer
virtual void paint()
This is the function called on the QtQuick render thread right before the scenegraph is rendered.
abstract specification for renderers
virtual void init()
Initialize the VTK render window for OpenGL based on the context created by QtQuick.
create a window for renderers to draw into
vtkNew< vtkWindowToImageFilter > m_screenshotFilter
static void setupGraphicsBackend()
Set up the graphics surface format and api.
void setRenderWindow(vtkRenderWindow *renWin)
Set/Get the vtkRenderWindow for the view.