From fda83974be15d467367d5335be815720f9bd62fe Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 8 Sep 2009 13:00:12 +0000 Subject: [PATCH] Fix problem with VTK viewer and qt 4.5 on Windows --- src/SVTK/SVTK_RenderWindowInteractor.cxx | 10 +++++++++- src/SVTK/SVTK_RenderWindowInteractor.h | 3 +++ src/VTKViewer/VTKViewer_RenderWindow.cxx | 6 ++++++ src/VTKViewer/VTKViewer_RenderWindow.h | 2 ++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/SVTK/SVTK_RenderWindowInteractor.cxx b/src/SVTK/SVTK_RenderWindowInteractor.cxx index 549355475..01cc85cec 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.cxx +++ b/src/SVTK/SVTK_RenderWindowInteractor.cxx @@ -58,7 +58,7 @@ using namespace std; -static bool GENERATE_SUIT_EVENTS = false; +static bool GENERATE_SUIT_EVENTS = true; static bool FOCUS_UNDER_MOUSE = false; @@ -147,6 +147,14 @@ QVTK_RenderWindowInteractor GetDevice()->InvokeEvent(theEvent,theCallData); } +/*! + Get paint engine for the scene +*/ +QPaintEngine* QVTK_RenderWindowInteractor::paintEngine() const +{ + return 0; +} + /*! Need for initial contents display on Win32 */ diff --git a/src/SVTK/SVTK_RenderWindowInteractor.h b/src/SVTK/SVTK_RenderWindowInteractor.h index 53aabeb2e..5f014cf13 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.h +++ b/src/SVTK/SVTK_RenderWindowInteractor.h @@ -88,6 +88,9 @@ class SVTK_EXPORT QVTK_RenderWindowInteractor: public QWidget void InvokeEvent(unsigned long theEvent, void* theCallData); + //! Get paint engine for the scene + virtual QPaintEngine* paintEngine() const; + public slots: //! Need for initial contents display on Win32 virtual void show(); diff --git a/src/VTKViewer/VTKViewer_RenderWindow.cxx b/src/VTKViewer/VTKViewer_RenderWindow.cxx index be3abf8d1..e3039a3a4 100755 --- a/src/VTKViewer/VTKViewer_RenderWindow.cxx +++ b/src/VTKViewer/VTKViewer_RenderWindow.cxx @@ -91,6 +91,12 @@ void VTKViewer_RenderWindow::resizeEvent(QResizeEvent* theEvent) } } +/*! Get paint engine for the scene */ +QPaintEngine* VTKViewer_RenderWindow::paintEngine() const +{ + return 0; +} + /*!Emit mouse move event.*/ void VTKViewer_RenderWindow::mouseMoveEvent(QMouseEvent* event) { diff --git a/src/VTKViewer/VTKViewer_RenderWindow.h b/src/VTKViewer/VTKViewer_RenderWindow.h index 13cbb3ea3..4bc7297b2 100755 --- a/src/VTKViewer/VTKViewer_RenderWindow.h +++ b/src/VTKViewer/VTKViewer_RenderWindow.h @@ -45,6 +45,8 @@ public: /*!Get render window pointer.*/ vtkRenderWindow* getRenderWindow() { return myRW; } + virtual QPaintEngine* paintEngine() const; + protected: virtual void mouseMoveEvent( QMouseEvent* ); virtual void mousePressEvent( QMouseEvent* ); -- 2.39.2