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 widgetEvent(QEvent* e);
200 virtual bool isValid();
206 virtual bool isCurrent();
212 virtual void ResizeToVTKWindow();
218 virtual void initializeGL();
219 virtual void paintGL();
220 virtual void moveEvent(QMoveEvent* event);
221 virtual bool event(QEvent* e);
222 virtual void mousePressEvent(QMouseEvent* event);
223 virtual void mouseMoveEvent(QMouseEvent* event);
224 virtual void mouseReleaseEvent(QMouseEvent* event);
225 virtual void mouseDoubleClickEvent(QMouseEvent* event);
226 virtual void keyPressEvent(QKeyEvent* event);
227 virtual void keyReleaseEvent(QKeyEvent* event);
228 virtual void enterEvent(QEvent*);
229 virtual void leaveEvent(QEvent*);
230 virtual void wheelEvent(QWheelEvent*);
247 QOffscreenSurface* OffscreenSurface;
250 #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