Go to the documentation of this file.
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);
156 void* client_data,
void* call_data);
177 void* client_data,
void* call_data);
183 void* client_data,
void* call_data);
189 void* client_data,
void* call_data);
195 void* client_data,
void* call_data);
218 virtual void ResizeToVTKWindow();
253 QOffscreenSurface* OffscreenSurface;
256 #endif // QVTKOpenGLWindow_H
virtual void wheelEvent(QWheelEvent *)
virtual void initializeGL()
Override event handler.
virtual vtkGenericOpenGLRenderWindow * GetRenderWindow()
Get the VTK render window used for rendering.
virtual void enterEvent(QEvent *)
virtual bool event(QEvent *e)
virtual void leaveEvent(QEvent *)
virtual bool isValid()
Returns true if the internal QOpenGLWindow's is valid, i.e.
display a vtkGenericOpenGLRenderWindow in a Qt QOpenGLWindow.
virtual void UpdateStereoType(vtkObject *caller, unsigned long vtk_event, void *client_data, void *call_data)
slot called when the stereo type of the render window changed
Manage connections between VTK events and Qt slots.
virtual void SupportsOpenGL(vtkObject *caller, unsigned long vtk_event, void *client_data, void *call_data)
slot called when vtk wants to know if a window supports OpenGL
virtual void Start()
slot called when vtk wants to start the render
virtual void keyPressEvent(QKeyEvent *event)
static void copyFromFormat(const QSurfaceFormat &format, vtkRenderWindow *win)
Sets up vtkRenderWindow ivars using QSurfaceFormat.
platform independent render window
abstract base class for most VTK objects
virtual void mousePressEvent(QMouseEvent *event)
virtual void moveEvent(QMoveEvent *event)
QVTKOpenGLWindow(QOpenGLContext *shareContext, UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=Q_NULLPTR)
static void copyToFormat(vtkRenderWindow *win, QSurfaceFormat &format)
Using the vtkRenderWindow, setup QSurfaceFormat.
virtual void End()
slot called when vtk wants to end the render
virtual void mouseReleaseEvent(QMouseEvent *event)
virtual bool isCurrent()
Returns true if the internal OpenGL contect is the actual current OpenGL context, false otherwise.
virtual void Frame()
slot called when vtk wants to frame the window
virtual void mouseDoubleClickEvent(QMouseEvent *event)
virtual void keyReleaseEvent(QKeyEvent *event)
bool ProcessEvent(QEvent *e)
Process a QEvent and send it to the internal render window interactor returns whether the event was r...
virtual void mouseMoveEvent(QMouseEvent *event)
virtual void IsCurrent(vtkObject *caller, unsigned long vtk_event, void *client_data, void *call_data)
slot called when vtk wants to know if the context is current
static QSurfaceFormat defaultFormat()
Returns a typical QSurfaceFormat suitable for most applications using QVTKOpenGLWidget.
virtual void IsDirect(vtkObject *caller, unsigned long vtk_event, void *client_data, void *call_data)
slot called when vtk wants to know if a window is direct
QVTKOpenGLWindow(vtkGenericOpenGLRenderWindow *w, QOpenGLContext *shareContext=QOpenGLContext::currentContext(), UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=Q_NULLPTR)
virtual void setEnableHiDPI(bool enable)
Enable or disable support for HiDPI displays.
virtual void widgetEvent(QEvent *e)
slot to process events coming from the widget containing this window
virtual void ChangeCursor(vtkObject *caller, unsigned long vtk_event, void *client_data, void *call_data)
virtual QVTKInteractorAdapter * GetInteractorAdapter()
Get the QEvent to VTK events translator.
void windowEvent(QEvent *e)
Signal emitted when a QMouseEvent has been receive, with the corresponding event as argument.
create a window for renderers to draw into
virtual void SetRenderWindow(vtkGenericOpenGLRenderWindow *)
Set the VTK render window used for rendering.
virtual void MakeCurrent()
slot to make this vtk render window current