Page MenuHomePhabricator

bug-16272-qt5-build-system-releasefix-to_v2014.03.0.patch

Authored By
wegner
May 21 2014, 10:57 AM
Size
12 KB
Referenced Files
None
Subscribers
None

bug-16272-qt5-build-system-releasefix-to_v2014.03.0.patch

From bbc7275d635cf28006e0f0a8d1d06b916db0ed1d Mon Sep 17 00:00:00 2001
From: Ingmar Wegner <ingmar.wegner@stryker.com>
Date: Wed, 21 May 2014 10:44:27 +0200
Subject: [PATCH] Fixes according to changes for v2014.03.0 release:
rafactoring of naming sceme (export macros), api changes of
Mouse...Events and cmake changes to reach generated files.
QuickRenderer project compiled fine in VS12 with QT530 and
CMake 3.0 (superbuild according to readme in QuickRender
folder)
---
Examples/QuickRender/CMakeLists.txt | 3 +++
Examples/QuickRender/README.md | 12 ++++++++----
Modules/OpenViewCore/QVTKInteractor.h | 2 +-
Modules/OpenViewCore/QVTKInteractorAdapter.h | 2 +-
Modules/OpenViewCore/QVTKQuickItem.h | 2 +-
Modules/OpenViewCore/vtkEventQtSlotConnect.h | 2 +-
Modules/OpenViewCore/vtkQtConnection.h | 2 +-
.../QmlItems/InteractionLegacy/QmitkEventAdapter.h | 4 ++--
Modules/QmlItems/QmlMitkBigRenderLock.h | 4 ++--
Modules/QmlItems/QmlMitkFourRenderWindowWidget.h | 4 ++--
Modules/QmlItems/QmlMitkRenderWindowItem.cpp | 12 ++++++++----
Modules/QmlItems/QmlMitkRenderWindowItem.h | 4 ++--
Modules/QmlItems/QmlMitkRenderingManager.h | 4 ++--
Modules/QmlItems/QmlMitkRenderingManagerFactory.h | 4 ++--
14 files changed, 36 insertions(+), 25 deletions(-)
diff --git a/Examples/QuickRender/CMakeLists.txt b/Examples/QuickRender/CMakeLists.txt
index 0bc5f67..2dd99bb 100644
--- a/Examples/QuickRender/CMakeLists.txt
+++ b/Examples/QuickRender/CMakeLists.txt
@@ -1,4 +1,7 @@
project(QuickRender)
find_package(MITK REQUIRED)
+# to reach the generated files
+include_directories (${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
+
mitk_create_executable(DEPENDS MitkQmlItems)
diff --git a/Examples/QuickRender/README.md b/Examples/QuickRender/README.md
index 061b41c..1dc398d 100644
--- a/Examples/QuickRender/README.md
+++ b/Examples/QuickRender/README.md
@@ -32,13 +32,17 @@ A new module QmlMitk provides
Build Instructions
------------------
- - build Qt 5.1
- - place the Qt 5.1 qmake application in your environment `PATH`
+ - build Qt 5.3.0 as well (qt-opensource-windows-x86-msvc2013_64_opengl-5.3.0)
+ - place the Qt 5 qmake application in your environment `PATH` or locally add the path when you call cmake and the compiler
- build MITK superbuild with
+ - `DESIRED_QT_VERSION` set to 5
- `MITK_BUILD_EXAMPLES` variable switched to `ON`
- - advanced option `MITK_USE_CTK` switched to `OFF`
- - `MITK_USE_BLUEBERRY` and `MITK_USE_QT` switched to `OFF` (MITK_USE_QT finds Qt 4)
+ - advanced option `MITK_USE_CTK` switched to `OFF`
+ - `MITK_USE_BLUEBERRY` switched to `OFF`
+ - `MITK_USE_QT` switched to `ON`
+Latest checks were done on Visual Studio 2013 X64 with Qt5.3.0 and CMake 3.0 (IW)
+
Open Issues
------------------
diff --git a/Modules/OpenViewCore/QVTKInteractor.h b/Modules/OpenViewCore/QVTKInteractor.h
index a74e1c5..3c61da0 100644
--- a/Modules/OpenViewCore/QVTKInteractor.h
+++ b/Modules/OpenViewCore/QVTKInteractor.h
@@ -60,7 +60,7 @@ class QVTKInteractorInternal;
// .SECTION Description
// QVTKInteractor is an interactor for a QVTKWiget.
-class MitkOVCORE_EXPORT QVTKInteractor : public vtkRenderWindowInteractor
+class OVCORE_EXPORT QVTKInteractor : public vtkRenderWindowInteractor
{
public:
static QVTKInteractor* New();
diff --git a/Modules/OpenViewCore/QVTKInteractorAdapter.h b/Modules/OpenViewCore/QVTKInteractorAdapter.h
index 80b5f9a..3b3cb2b 100644
--- a/Modules/OpenViewCore/QVTKInteractorAdapter.h
+++ b/Modules/OpenViewCore/QVTKInteractorAdapter.h
@@ -47,7 +47,7 @@ class QEvent;
// .SECTION Description
// QVTKInteractorAdapter translates QEvents and send them to a
// vtkRenderWindowInteractor.
-class MitkOVCORE_EXPORT QVTKInteractorAdapter : public QObject
+class OVCORE_EXPORT QVTKInteractorAdapter : public QObject
{
Q_OBJECT
public:
diff --git a/Modules/OpenViewCore/QVTKQuickItem.h b/Modules/OpenViewCore/QVTKQuickItem.h
index 818a0e3..e6c6fd1 100644
--- a/Modules/OpenViewCore/QVTKQuickItem.h
+++ b/Modules/OpenViewCore/QVTKQuickItem.h
@@ -28,7 +28,7 @@ class vtkGenericOpenGLRenderWindow;
class vtkObject;
class vtkContextView;
-class MitkOVCORE_EXPORT QVTKQuickItem : public QQuickItem
+class OVCORE_EXPORT QVTKQuickItem : public QQuickItem
{
Q_OBJECT
public:
diff --git a/Modules/OpenViewCore/vtkEventQtSlotConnect.h b/Modules/OpenViewCore/vtkEventQtSlotConnect.h
index b5d9904..53456b9 100644
--- a/Modules/OpenViewCore/vtkEventQtSlotConnect.h
+++ b/Modules/OpenViewCore/vtkEventQtSlotConnect.h
@@ -51,7 +51,7 @@ class vtkQtConnections;
class vtkQtConnection;
// manage connections between VTK object events and Qt slots
-class MitkOVCORE_EXPORT vtkEventQtSlotConnect : public vtkObject
+class OVCORE_EXPORT vtkEventQtSlotConnect : public vtkObject
{
public:
static vtkEventQtSlotConnect* New();
diff --git a/Modules/OpenViewCore/vtkQtConnection.h b/Modules/OpenViewCore/vtkQtConnection.h
index 2569c7f..ba2ae32 100644
--- a/Modules/OpenViewCore/vtkQtConnection.h
+++ b/Modules/OpenViewCore/vtkQtConnection.h
@@ -44,7 +44,7 @@ class vtkEventQtSlotConnect;
// class for managing a single VTK/Qt connection
// not to be included in other projects
// only here for moc to process for vtkEventQtSlotConnect
-class MitkOVCORE_EXPORT vtkQtConnection : public QObject
+class OVCORE_EXPORT vtkQtConnection : public QObject
{
Q_OBJECT
diff --git a/Modules/QmlItems/InteractionLegacy/QmitkEventAdapter.h b/Modules/QmlItems/InteractionLegacy/QmitkEventAdapter.h
index ac9c633..537ccfc 100644
--- a/Modules/QmlItems/InteractionLegacy/QmitkEventAdapter.h
+++ b/Modules/QmlItems/InteractionLegacy/QmitkEventAdapter.h
@@ -17,7 +17,7 @@ See LICENSE.txt or http://www.mitk.org for details.
#ifndef QMITKEVENTADAPTER_H_
#define QMITKEVENTADAPTER_H_
-#include <QmlMitkExports.h>
+#include <MitkQmlItemsExports.h>
#include <QMouseEvent>
#include <QKeyEvent>
@@ -32,7 +32,7 @@ See LICENSE.txt or http://www.mitk.org for details.
* Refer to \see DataInteractionPage for general information about the concept of
* the new implementation
*/
-class QmlMitk_EXPORT QmitkEventAdapter
+class MitkQmlItems_EXPORT QmitkEventAdapter
{
public:
diff --git a/Modules/QmlItems/QmlMitkBigRenderLock.h b/Modules/QmlItems/QmlMitkBigRenderLock.h
index 3a4bd52..b4a3601 100644
--- a/Modules/QmlItems/QmlMitkBigRenderLock.h
+++ b/Modules/QmlItems/QmlMitkBigRenderLock.h
@@ -3,7 +3,7 @@
#include <QtCore>
-#include "QmlMitkExports.h"
+#include "MitkQmlItemsExports.h"
/**
\brief Workaround lock around MITK rendering.
@@ -17,7 +17,7 @@
in rendering thread safe. This solution is much more
work though, so it will come later.
*/
-class QmlMitk_EXPORT QmlMitkBigRenderLock : public QObject
+class MitkQmlItems_EXPORT QmlMitkBigRenderLock : public QObject
{
Q_OBJECT
public:
diff --git a/Modules/QmlItems/QmlMitkFourRenderWindowWidget.h b/Modules/QmlItems/QmlMitkFourRenderWindowWidget.h
index 5082536..4fef3c2 100644
--- a/Modules/QmlItems/QmlMitkFourRenderWindowWidget.h
+++ b/Modules/QmlItems/QmlMitkFourRenderWindowWidget.h
@@ -7,7 +7,7 @@
#include "mitkDataStorage.h"
-#include "QmlMitkCoreExports.h"
+#include "MitkQmlItemsExports.h"
/**
\brief QML replacement for QmitkStdMultiWidget.
@@ -17,7 +17,7 @@
\warning Subject to change.
*/
-class QmlMitk_EXPORT QmlMitkFourRenderWindowWidget : public QQuickItem
+class MitkQmlItems_EXPORT QmlMitkFourRenderWindowWidget : public QQuickItem
{
Q_OBJECT
diff --git a/Modules/QmlItems/QmlMitkRenderWindowItem.cpp b/Modules/QmlItems/QmlMitkRenderWindowItem.cpp
index 0f96ef6..094544b 100644
--- a/Modules/QmlItems/QmlMitkRenderWindowItem.cpp
+++ b/Modules/QmlItems/QmlMitkRenderWindowItem.cpp
@@ -255,8 +255,9 @@ mitk::InteractionEvent::MouseButtons QmlMitkRenderWindowItem::GetButtonState(QWh
void QmlMitkRenderWindowItem::mousePressEvent(QMouseEvent* me)
{
+ mitk::Point3D worldPos = mitk::RenderWindowBase::GetRenderer()->Map2DRendererPositionTo3DWorldPosition(GetMousePosition(me));
mitk::MousePressEvent::Pointer mPressEvent =
- mitk::MousePressEvent::New(mitk::RenderWindowBase::GetRenderer(), GetMousePosition(me), GetButtonState(me), GetModifiers(me), GetEventButton(me));
+ mitk::MousePressEvent::New(mitk::RenderWindowBase::GetRenderer(), GetMousePosition(me), worldPos, GetButtonState(me), GetModifiers(me), GetEventButton(me));
#if defined INTERACTION_LEGACY
bool modernInteractorHandledEvent =
@@ -278,8 +279,9 @@ void QmlMitkRenderWindowItem::mousePressEvent(QMouseEvent* me)
void QmlMitkRenderWindowItem::mouseReleaseEvent(QMouseEvent* me)
{
+ mitk::Point3D worldPos = mitk::RenderWindowBase::GetRenderer()->Map2DRendererPositionTo3DWorldPosition(GetMousePosition(me));
mitk::MouseReleaseEvent::Pointer mReleaseEvent =
- mitk::MouseReleaseEvent::New(mitk::RenderWindowBase::GetRenderer(), GetMousePosition(me), GetButtonState(me), GetModifiers(me), GetEventButton(me));
+ mitk::MouseReleaseEvent::New(mitk::RenderWindowBase::GetRenderer(), GetMousePosition(me), worldPos, GetButtonState(me), GetModifiers(me), GetEventButton(me));
#if defined INTERACTION_LEGACY
bool modernInteractorHandledEvent =
@@ -301,8 +303,9 @@ void QmlMitkRenderWindowItem::mouseReleaseEvent(QMouseEvent* me)
void QmlMitkRenderWindowItem::mouseMoveEvent(QMouseEvent* me)
{
+ mitk::Point3D worldPos = mitk::RenderWindowBase::GetRenderer()->Map2DRendererPositionTo3DWorldPosition(GetMousePosition(me));
mitk::MouseMoveEvent::Pointer mMoveEvent =
- mitk::MouseMoveEvent::New(mitk::RenderWindowBase::GetRenderer(), GetMousePosition(me), GetButtonState(me), GetModifiers(me));
+ mitk::MouseMoveEvent::New(mitk::RenderWindowBase::GetRenderer(), GetMousePosition(me), worldPos, GetButtonState(me), GetModifiers(me));
#if defined INTERACTION_LEGACY
bool modernInteractorHandledEvent =
@@ -325,8 +328,9 @@ void QmlMitkRenderWindowItem::mouseMoveEvent(QMouseEvent* me)
void QmlMitkRenderWindowItem::wheelEvent(QWheelEvent *we)
{
+ mitk::Point3D worldPos = mitk::RenderWindowBase::GetRenderer()->Map2DRendererPositionTo3DWorldPosition(GetMousePosition(we));
mitk::MouseWheelEvent::Pointer mWheelEvent =
- mitk::MouseWheelEvent::New(mitk::RenderWindowBase::GetRenderer(), GetMousePosition(we), GetButtonState(we), GetModifiers(we), we->delta());
+ mitk::MouseWheelEvent::New(mitk::RenderWindowBase::GetRenderer(), GetMousePosition(we), worldPos, GetButtonState(we), GetModifiers(we), we->delta());
#if defined INTERACTION_LEGACY
bool modernInteractorHandledEvent =
diff --git a/Modules/QmlItems/QmlMitkRenderWindowItem.h b/Modules/QmlItems/QmlMitkRenderWindowItem.h
index 435292d..67e6328 100644
--- a/Modules/QmlItems/QmlMitkRenderWindowItem.h
+++ b/Modules/QmlItems/QmlMitkRenderWindowItem.h
@@ -7,7 +7,7 @@
#include <QTimer>
-#include "QmlMitkExports.h"
+#include "MitkQmlItemsExports.h"
/**
\brief QML replacement for QmitkRenderWindow.
@@ -17,7 +17,7 @@
\warning Subject to change.
*/
-class QmlMitk_EXPORT QmlMitkRenderWindowItem : public QVTKQuickItem, public mitk::RenderWindowBase
+class MitkQmlItems_EXPORT QmlMitkRenderWindowItem : public QVTKQuickItem, public mitk::RenderWindowBase
{
Q_OBJECT
diff --git a/Modules/QmlItems/QmlMitkRenderingManager.h b/Modules/QmlItems/QmlMitkRenderingManager.h
index fd5eac1..a23f1b0 100644
--- a/Modules/QmlItems/QmlMitkRenderingManager.h
+++ b/Modules/QmlItems/QmlMitkRenderingManager.h
@@ -18,7 +18,7 @@ See LICENSE.txt or http://www.mitk.org for details.
#ifndef QmlMitkRenderingManager_h
#define QmlMitkRenderingManager_h
-#include <QmlMitkExports.h>
+#include <MitkQmlItemsExports.h>
#include "mitkRenderingManager.h"
@@ -36,7 +36,7 @@ class QmlMitkRenderingManagerFactory;
* receive it back in the GUI thread where we are allowed to do rendering.
*
*/
-class QmlMitk_EXPORT QmlMitkRenderingManager : public QObject, public mitk::RenderingManager
+class MitkQmlItems_EXPORT QmlMitkRenderingManager : public QObject, public mitk::RenderingManager
{
Q_OBJECT
diff --git a/Modules/QmlItems/QmlMitkRenderingManagerFactory.h b/Modules/QmlItems/QmlMitkRenderingManagerFactory.h
index 1d0917e..f4134f7 100644
--- a/Modules/QmlItems/QmlMitkRenderingManagerFactory.h
+++ b/Modules/QmlItems/QmlMitkRenderingManagerFactory.h
@@ -18,7 +18,7 @@ See LICENSE.txt or http://www.mitk.org for details.
#ifndef QmlMitkRenderingManagerFactory_h
#define QmlMitkRenderingManagerFactory_h
-#include <QmlMitkExports.h>
+#include <MitkQmlItemsExports.h>
#include "mitkRenderingManagerFactory.h"
@@ -30,7 +30,7 @@ See LICENSE.txt or http://www.mitk.org for details.
* CreateRenderingManager().
*
*/
-class QmlMitk_EXPORT QmlMitkRenderingManagerFactory : public mitk::RenderingManagerFactory
+class MitkQmlItems_EXPORT QmlMitkRenderingManagerFactory : public mitk::RenderingManagerFactory
{
public:
--
1.7.9.msysgit.0

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1032
Default Alt Text
bug-16272-qt5-build-system-releasefix-to_v2014.03.0.patch (12 KB)

Event Timeline

patch fixes for QuickRenderer to compile against v2014.03.0 release