37#ifndef QVTKOpenGLWindow_h
38#define QVTKOpenGLWindow_h
40#include <QOpenGLWindow>
41#include <QScopedPointer>
44#include "vtkGUISupportQtModule.h"
48VTK_ABI_NAMESPACE_BEGIN
57 typedef QOpenGLWindow Superclass;
61 QOpenGLWindow::UpdateBehavior updateBehavior = NoPartialUpdate, QWindow* parent =
nullptr);
63 QOpenGLWindow::UpdateBehavior updateBehavior = NoPartialUpdate, QWindow* parent =
nullptr);
65 QOpenGLWindow::UpdateBehavior updateBehavior = NoPartialUpdate, QWindow* parent =
nullptr);
67 QOpenGLWindow::UpdateBehavior updateBehavior = NoPartialUpdate, QWindow* parent =
nullptr);
180 double CustomDevicePixelRatio;
181 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)
QScopedPointer< QVTKRenderWindowAdapter > RenderWindowAdapter
void windowEvent(QEvent *e)
Signal emitted when any event has been receive, with the corresponding event as argument.
void setEnableHiDPI(bool enable)
Enable or disable support for HiDPI displays.
int unscaledDPI() const
Set/Get unscaled DPI value.
void cleanupContext()
Called as a response to QOpenGLContext::aboutToBeDestroyed.
void setDefaultCursor(const QCursor &cursor)
Set/get the default cursor to use for this widget.
vtkSmartPointer< vtkGenericOpenGLRenderWindow > RenderWindow
void initializeGL() override
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.
void resizeGL(int w, int h) override
static QSurfaceFormat defaultFormat(bool stereo_capable=false)
Returns a QSurfaceFormat suitable for surfaces that intend to be used for VTK rendering.
bool event(QEvent *evt) override
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.
platform independent render window
create a window for renderers to draw into
Computes the portion of a dataset which is inside a selection.
Hold a reference to a vtkObjectBase instance.