129#ifndef QQuickVTKRenderItem_h
130#define QQuickVTKRenderItem_h
133#include <QOpenGLFunctions>
141#include "vtkGUISupportQtQuickModule.h"
152 ,
protected QOpenGLFunctions
155 typedef QQuickItem Superclass;
251#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
252 void geometryChanged(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
254 void geometryChange(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
QQuickItem subclass to render a VTK scene in a QtQuick/QML application.
virtual void removeWidgetByName(QString name)
Get/Remove widgets from the view by their object name.
virtual void handleWindowChanged(QQuickWindow *w)
QQuickVTKRenderItem(QQuickItem *parent=nullptr)
virtual QQuickVTKInteractiveWidget * widgetByName(QString name) const
Get/Remove widgets from the view by their object name.
virtual void init()
Initialize the graphics resources required for this render item.
virtual void sync()
This is the function called on the QtQuick render thread before the scenegraph state is synchronized.
vtkNew< vtkRenderer > m_renderer
QQuickVTKRenderWindow * renderWindow() const
Set/Get the render window for the item.
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
virtual void setRenderWindow(QQuickVTKRenderWindow *w)
Set/Get the render window for the item.
bool event(QEvent *ev) override
~QQuickVTKRenderItem()=default
virtual vtkSmartPointer< vtkImageData > captureScreenshot()
Capture a screenshot of the view.
QVector< QQuickVTKInteractiveWidget * > m_widgets
virtual void setViewport(const QRectF &rect)
Set the viewport for this item.
virtual void removeWidget(QQuickVTKInteractiveWidget *w)
Add/Remove widgets to/from the view.
vtkRenderer * renderer() const
Get access to the renderer.
virtual void cleanup()
This is the function called on the QtQuick render thread when the scenegraph is invalidated.
virtual void addWidget(QQuickVTKInteractiveWidget *w)
Add/Remove widgets to/from the view.
virtual void paint()
This is the function called on the QtQuick render thread right before the scenegraph is rendered.
QQuickItem subclass that manages the vtkRenderWindow and, in turn, the OpenGL context of the QML appl...
topologically and geometrically regular array of data
Allocate and hold a VTK object.
abstract specification for renderers
Hold a reference to a vtkObjectBase instance.