15 #ifndef QVTKOpenGLWindow_H 16 #define QVTKOpenGLWindow_H 18 #include "vtkGUISupportQtModule.h" 20 #include <QOpenGLWindow> 22 class QOffscreenSurface;
81 typedef QOpenGLWindow Superclass;
86 QOpenGLContext *shareContext = QOpenGLContext::currentContext(),
87 UpdateBehavior updateBehavior = NoPartialUpdate,
88 QWindow *parent = Q_NULLPTR);
91 UpdateBehavior updateBehavior = NoPartialUpdate,
92 QWindow *parent = Q_NULLPTR);
109 static void copyFromFormat(
const QSurfaceFormat& format,
vtkRenderWindow* win);
114 static void copyToFormat(
vtkRenderWindow* win, QSurfaceFormat& format);
121 static QSurfaceFormat defaultFormat();
131 virtual void setEnableHiDPI(
bool enable);
137 bool ProcessEvent(QEvent* e);
144 void windowEvent(QEvent* e);
150 virtual void MakeCurrent();
155 virtual void IsCurrent(
vtkObject* caller,
unsigned long vtk_event,
156 void* client_data,
void* call_data);
161 virtual void Frame();
166 virtual void Start();
176 virtual void IsDirect(
vtkObject* caller,
unsigned long vtk_event,
177 void* client_data,
void* call_data);
182 virtual void SupportsOpenGL(
vtkObject* caller,
unsigned long vtk_event,
183 void* client_data,
void* call_data);
188 virtual void UpdateStereoType(
vtkObject* caller,
unsigned long vtk_event,
189 void* client_data,
void* call_data);
194 virtual void ChangeCursor(
vtkObject* caller,
unsigned long vtk_event,
195 void* client_data,
void* call_data);
200 virtual void widgetEvent(QEvent* e);
206 virtual bool isValid();
212 virtual bool isCurrent();
218 virtual void ResizeToVTKWindow();
224 virtual void initializeGL();
225 virtual void paintGL();
226 virtual void moveEvent(QMoveEvent* event);
227 virtual bool event(QEvent* e);
228 virtual void mousePressEvent(QMouseEvent* event);
229 virtual void mouseMoveEvent(QMouseEvent* event);
230 virtual void mouseReleaseEvent(QMouseEvent* event);
231 virtual void mouseDoubleClickEvent(QMouseEvent* event);
232 virtual void keyPressEvent(QKeyEvent* event);
233 virtual void keyReleaseEvent(QKeyEvent* event);
234 virtual void enterEvent(QEvent*);
235 virtual void leaveEvent(QEvent*);
236 virtual void wheelEvent(QWheelEvent*);
253 QOffscreenSurface* OffscreenSurface;
256 #endif // QVTKOpenGLWindow_H
abstract base class for most VTK objects
Manage connections between VTK events and Qt slots.
platform independent render window
display a vtkGenericOpenGLRenderWindow in a Qt QOpenGLWindow.
create a window for renderers to draw into
virtual void End()
slot called when vtk wants to end the render