36 #ifndef CX_Q_VTK_WIDGET_H
37 #define CX_Q_VTK_WIDGET_H
39 #include "cxResourceVisualizationExport.h"
41 #include "QVTKInteractor.h"
44 class QVTKInteractorAdapter;
46 class vtkRenderWindow;
48 #include "vtkTDxConfigure.h"
53 #include "QVTKWin32Header.h"
62 CXQVTKWidget(QWidget* parent = NULL, Qt::WindowFlags f = 0);
68 virtual void SetRenderWindow(vtkRenderWindow*);
72 virtual vtkRenderWindow* GetRenderWindow();
76 virtual QVTKInteractor* GetInteractor();
83 ContextMenuEvent = QVTKInteractor::ContextMenuEvent,
84 DragEnterEvent = QVTKInteractor::DragEnterEvent,
85 DragMoveEvent = QVTKInteractor::DragMoveEvent,
86 DragLeaveEvent = QVTKInteractor::DragLeaveEvent,
87 DropEvent = QVTKInteractor::DropEvent
92 virtual void showEvent(QShowEvent*);
103 void SetUseTDx(
bool useTDx);
104 bool GetUseTDx()
const;
111 void mouseEvent(QMouseEvent* event);
119 void setDevice(vtkTDxDevice *device);
126 virtual void resizeEvent(QResizeEvent* event);
128 virtual void moveEvent(QMoveEvent* event);
130 virtual void paintEvent(QPaintEvent* event);
133 virtual void mousePressEvent(QMouseEvent* event);
135 virtual void mouseMoveEvent(QMouseEvent* event);
137 virtual void mouseReleaseEvent(QMouseEvent* event);
139 virtual void keyPressEvent(QKeyEvent* event);
141 virtual void keyReleaseEvent(QKeyEvent* event);
143 virtual void enterEvent(QEvent*);
145 virtual void leaveEvent(QEvent*);
146 #ifndef QT_NO_WHEELEVENT
148 virtual void wheelEvent(QWheelEvent*);
151 virtual void focusInEvent(QFocusEvent*);
153 virtual void focusOutEvent(QFocusEvent*);
155 bool event( QEvent* e );
158 virtual void contextMenuEvent(QContextMenuEvent*);
160 virtual void dragEnterEvent(QDragEnterEvent*);
162 virtual void dragMoveEvent(QDragMoveEvent*);
164 virtual void dragLeaveEvent(QDragLeaveEvent*);
166 virtual void dropEvent(QDropEvent*);
174 void x11_setup_window();
176 #if defined(Q_WS_WIN)
177 bool winEvent(MSG* msg,
long* result);