27 #ifndef __QVTKQuickItem_h
28 #define __QVTKQuickItem_h
30 #include <QQuickFramebufferObject>
32 #include <QOpenGLShaderProgram>
34 #include "vtkSmartPointer.h"
42 class QOpenGLFramebufferObject;
46 class vtkEventQtSlotConnect;
47 class vtkOpenGLRenderWindow;
61 Renderer *createRenderer()
const;
65 vtkOpenGLRenderWindow* GetRenderWindow()
const;
70 QVTKInteractor* GetInteractor()
const;
76 virtual void IsCurrent(vtkObject* caller,
unsigned long vtk_event,
void* client_data,
void* call_data);
78 virtual void IsDirect(vtkObject* caller,
unsigned long vtk_event,
void* client_data,
void* call_data);
80 virtual void SupportsOpenGL(vtkObject* caller,
unsigned long vtk_event,
void* client_data,
void* call_data);
81 void onTextureFollowsItemSizeChanged(
bool follows);
87 virtual bool prepareForRender();
89 virtual void cleanupAfterRender();
92 virtual void keyPressEvent(QKeyEvent* e);
93 virtual void keyReleaseEvent(QKeyEvent* e);
96 virtual void mousePressEvent(QMouseEvent* e);
97 virtual void mouseReleaseEvent(QMouseEvent* e);
98 virtual void mouseDoubleClickEvent(QMouseEvent* e);
99 virtual void mouseMoveEvent(QMouseEvent* e);
100 virtual void geometryChanged(
const QRectF & newGeometry,
const QRectF & oldGeometry);
101 virtual void wheelEvent(QWheelEvent* e);
102 virtual void hoverEnterEvent(QHoverEvent* e);
103 virtual void hoverLeaveEvent(QHoverEvent* e);
104 virtual void hoverMoveEvent(QHoverEvent* e);
105 QSGNode* updatePaintNode(QSGNode *node, QQuickItem::UpdatePaintNodeData *nodeData);
108 vtkOpenGLRenderWindow *m_win;
109 vtkSmartPointer<QVTKInteractor> m_interactor;
111 vtkSmartPointer<vtkEventQtSlotConnect> m_connect;
#define MITKOPENVIEWCORE_EXPORT