49#ifndef QVTKOpenGLWindow_h
50#define QVTKOpenGLWindow_h
52#include <QOpenGLWindow>
53#include <QScopedPointer>
57#include "vtkGUISupportQtModule.h"
69 typedef QOpenGLWindow Superclass;
73 QOpenGLWindow::UpdateBehavior updateBehavior = NoPartialUpdate, QWindow* parent =
nullptr);
75 QOpenGLWindow::UpdateBehavior updateBehavior = NoPartialUpdate, QWindow* parent =
nullptr);
77 QOpenGLWindow::UpdateBehavior updateBehavior = NoPartialUpdate, QWindow* parent =
nullptr);
79 QOpenGLWindow::UpdateBehavior updateBehavior = NoPartialUpdate, QWindow* parent =
nullptr);
189 void setQVTKCursor(const QCursor& cursor);
195 void setDefaultQVTKCursor(const QCursor& cursor);
202 void windowEvent(QEvent* e);
210 void cleanupContext();
222 bool event(QEvent* evt) override;
223 void initializeGL() override;
224 void paintGL() override;
225 void resizeGL(
int w,
int h) override;
235 double CustomDevicePixelRatio;
236 QCursor DefaultCursor;
an interactor for QVTKOpenGLNativeWidget (and QVTKWiget).
display a vtkGenericOpenGLRenderWindow in a Qt QOpenGLWindow.
void setRenderWindow(vtkGenericOpenGLRenderWindow *win)
Set a render window to use.
bool enableHiDPI() const
Enable or disable support for HiDPI displays.
const QCursor & defaultCursor() const
Set/get the default cursor to use for this widget.
QVTKOpenGLWindow(vtkGenericOpenGLRenderWindow *renderWindow, QOpenGLContext *shareContext, QOpenGLWindow::UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=nullptr)
~QVTKOpenGLWindow() override
QVTKOpenGLWindow(QOpenGLContext *shareContext, QOpenGLWindow::UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=nullptr)
double effectiveDevicePixelRatio() const
Set/Get a custom device pixel ratio to use to map Qt sizes to VTK (or OpenGL) sizes.
void setUnscaledDPI(int)
Set/Get unscaled DPI value.
vtkRenderWindow * renderWindow() const
Returns the render window that is being shown in this widget.
QVTKInteractor * interactor() const
Get the QVTKInteractor that was either created by default or set by the user.
QVTKOpenGLWindow(QOpenGLWindow::UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=nullptr)
void setEnableHiDPI(bool enable)
Enable or disable support for HiDPI displays.
int unscaledDPI() const
Set/Get unscaled DPI value.
void setDefaultCursor(const QCursor &cursor)
Set/get the default cursor to use for this widget.
void setCustomDevicePixelRatio(double cdpr)
Set/Get a custom device pixel ratio to use to map Qt sizes to VTK (or OpenGL) sizes.
void setRenderWindow(vtkRenderWindow *win)
Set a render window to use.
static QSurfaceFormat defaultFormat(bool stereo_capable=false)
Returns a QSurfaceFormat suitable for surfaces that intend to be used for VTK rendering.
double customDevicePixelRatio() const
Set/Get a custom device pixel ratio to use to map Qt sizes to VTK (or OpenGL) sizes.
QVTKOpenGLWindow(vtkGenericOpenGLRenderWindow *renderWindow, QOpenGLWindow::UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=nullptr)
Helper to manage Qt context and other OpenGL components.
vtkFrustumSelector is a vtkSelector that selects elements based on whether they are inside or interse...
platform independent render window
create a window for renderers to draw into
Hold a reference to a vtkObjectBase instance.
#define VTK_DEPRECATED_IN_9_0_0(reason)