117 #ifndef QQuickVTKRenderItem_h
118 #define QQuickVTKRenderItem_h
121 #include <QOpenGLFunctions>
122 #include <QQuickItem>
130 #include "vtkGUISupportQtQuickModule.h"
137 VTK_ABI_NAMESPACE_BEGIN
145 ,
protected QOpenGLFunctions
148 typedef QQuickItem Superclass;
244 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
245 void geometryChanged(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
247 void geometryChange(
const QRectF& newGeometry,
const QRectF& oldGeometry)
override;
256 VTK_ABI_NAMESPACE_END
QQuickItem that manages a VTK rendering in the QML scenegraph.
QQuickItem subclass to render a VTK scene in a QtQuick/QML application.
QQuickVTKRenderWindow * renderWindow() const
Set/Get the render window for the item.
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 vtkSmartPointer< vtkImageData > captureScreenshot()
Capture a screenshot of the view.
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.
virtual QQuickVTKInteractiveWidget * widgetByName(QString name) const
Get/Remove widgets from the view by their object name.
vtkNew< vtkRenderer > m_renderer
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
virtual void setRenderWindow(QQuickVTKRenderWindow *w)
Set/Get the render window for the item.
vtkRenderer * renderer() const
Get access to the renderer.
bool event(QEvent *ev) override
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.
virtual void cleanup()
This is the function called on the QtQuick render thread when the scenegraph is invalidated.
~QQuickVTKRenderItem() override=default
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
abstract specification for renderers
#define VTK_DEPRECATED_IN_9_3_0(reason)