19 #ifndef Q_VTK_WIDGET2_H 20 #define Q_VTK_WIDGET2_H 22 #include "vtkGUISupportQtOpenGLModule.h" 23 #include <QtOpenGL/QGLWidget> 24 #include "vtkSetGet.h" 35 #include "vtkTDxConfigure.h" 50 class VTKGUISUPPORTQTOPENGL_EXPORT
QVTKWidget2 :
public QGLWidget
53 typedef QGLWidget Superclass;
56 VTK_LEGACY(
QVTKWidget2(QWidget* parent =
nullptr,
const QGLWidget* shareWidget=0, Qt::WindowFlags f = 0));
58 VTK_LEGACY(
QVTKWidget2(QGLContext* ctx, QWidget* parent =
nullptr,
const QGLWidget* shareWidget=0, Qt::WindowFlags f = 0));
59 VTK_LEGACY(
QVTKWidget2(
const QGLFormat& fmt, QWidget* parent =
nullptr,
const QGLWidget* shareWidget=0, Qt::WindowFlags f = 0));
77 virtual int GetMultiSamples()
const;
86 void SetUseTDx(
bool useTDx);
87 bool GetUseTDx()
const;
91 void setAutoBufferSwap(
bool);
92 bool autoBufferSwap()
const;
97 void mouseEvent(QMouseEvent* e);
105 void setDevice(vtkTDxDevice *device);
110 virtual void MakeCurrent();
112 virtual void IsCurrent(
vtkObject* caller,
unsigned long vtk_event,
void* client_data,
void* call_data);
114 virtual void Frame();
116 virtual void Start();
120 virtual void IsDirect(
vtkObject* caller,
unsigned long vtk_event,
void* client_data,
void* call_data);
122 virtual void SupportsOpenGL(
vtkObject* caller,
unsigned long vtk_event,
void* client_data,
void* call_data);
126 virtual void initializeGL();
128 virtual void resizeGL(
int,
int);
130 virtual void paintGL();
132 virtual void moveEvent(QMoveEvent* event);
135 virtual bool event(QEvent* e);
137 virtual void mousePressEvent(QMouseEvent* event);
139 virtual void mouseMoveEvent(QMouseEvent* event);
141 virtual void mouseReleaseEvent(QMouseEvent* event);
143 virtual void keyPressEvent(QKeyEvent* event);
145 virtual void keyReleaseEvent(QKeyEvent* event);
147 virtual void enterEvent(QEvent*);
149 virtual void leaveEvent(QEvent*);
151 virtual void wheelEvent(QWheelEvent*);
154 virtual void contextMenuEvent(QContextMenuEvent*);
156 virtual void dragEnterEvent(QDragEnterEvent*);
158 virtual void dragMoveEvent(QDragMoveEvent*);
160 virtual void dragLeaveEvent(QDragLeaveEvent*);
162 virtual void dropEvent(QDropEvent*);
165 virtual bool focusNextPrevChild(
bool);
abstract base class for most VTK objects
an interactor for QVTKOpenGLNativeWidget (and QVTKWiget).
Manage connections between VTK events and Qt slots.
platform independent render window