diff --git a/Modules/OpenViewCore/CMakeLists.txt b/Modules/OpenViewCore/CMakeLists.txt index c1a6dcefcb..6fafc479b3 100644 --- a/Modules/OpenViewCore/CMakeLists.txt +++ b/Modules/OpenViewCore/CMakeLists.txt @@ -1,5 +1,4 @@ MITK_CREATE_MODULE( PACKAGE_DEPENDS Qt5|Core+Quick VTK OpenGL - EXPORT_DEFINE OVCORE_EXPORT ) diff --git a/Modules/OpenViewCore/QVTKInteractor.h b/Modules/OpenViewCore/QVTKInteractor.h index a74e1c5c18..e1bb0291d1 100644 --- a/Modules/OpenViewCore/QVTKInteractor.h +++ b/Modules/OpenViewCore/QVTKInteractor.h @@ -1,140 +1,140 @@ /*========================================================================= Program: Visualization Toolkit Module: QVTKInteractor.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /*========================================================================= Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive license for use of this work by or on behalf of the U.S. Government. Redistribution and use in source and binary forms, with or without modification, are permitted provided that this Notice and any statement of authorship are reproduced on all copies. =========================================================================*/ /*======================================================================== For general information about using VTK and Qt, see: http://www.trolltech.com/products/3rdparty/vtksupport.html =========================================================================*/ // .NAME QVTKInteractor - Handle Qt events. // .SECTION Description // QVTKInteractor handles relaying Qt events to VTK. #ifndef Q_VTK_INTERACTOR_H #define Q_VTK_INTERACTOR_H #include #include #include #include "vtkTDxConfigure.h" // defines VTK_USE_TDX #if defined(VTK_USE_TDX) && defined(Q_WS_WIN) class vtkTDxWinDevice; #endif #if defined(VTK_USE_TDX) && defined(Q_WS_MAC) class vtkTDxMacDevice; #endif #if defined(VTK_USE_TDX) && defined(Q_WS_X11) class vtkTDxDevice; class vtkTDxUnixDevice; #endif #include class QVTKInteractorInternal; // .NAME QVTKInteractor - An interactor for the QVTKWidget. // .SECTION Description // QVTKInteractor is an interactor for a QVTKWiget. -class MitkOVCORE_EXPORT QVTKInteractor : public vtkRenderWindowInteractor +class MitkOpenViewCore_EXPORT QVTKInteractor : public vtkRenderWindowInteractor { public: static QVTKInteractor* New(); vtkTypeMacro(QVTKInteractor,vtkRenderWindowInteractor); // Description: // Enum for additional event types supported. // These events can be picked up by command observers on the interactor enum vtkCustomEvents { ContextMenuEvent = vtkCommand::UserEvent + 100, DragEnterEvent, DragMoveEvent, DragLeaveEvent, DropEvent }; // Description: // Overloaded terminiate app, which does nothing in Qt. // Use qApp->exit() instead. virtual void TerminateApp(); // Description: // Overloaded start method does nothing. // Use qApp->exec() instead. virtual void Start(); virtual void Initialize(); // Description: // Start listening events on 3DConnexion device. virtual void StartListening(); // Description: // Stop listening events on 3DConnexion device. virtual void StopListening(); // timer event slot virtual void TimerEvent(int timerId); #if defined(VTK_USE_TDX) && defined(Q_WS_X11) virtual vtkTDxUnixDevice *GetDevice(); virtual void SetDevice(vtkTDxDevice *device); #endif protected: // constructor QVTKInteractor(); // destructor ~QVTKInteractor(); // create a Qt Timer virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration); // destroy a Qt Timer virtual int InternalDestroyTimer(int platformTimerId); #if defined(VTK_USE_TDX) && defined(Q_WS_WIN) vtkTDxWinDevice *Device; #endif #if defined(VTK_USE_TDX) && defined(Q_WS_MAC) vtkTDxMacDevice *Device; #endif #if defined(VTK_USE_TDX) && defined(Q_WS_X11) vtkTDxUnixDevice *Device; #endif private: QVTKInteractorInternal* Internal; // unimplemented copy QVTKInteractor(const QVTKInteractor&); // unimplemented operator= void operator=(const QVTKInteractor&); }; #endif diff --git a/Modules/OpenViewCore/QVTKInteractorAdapter.h b/Modules/OpenViewCore/QVTKInteractorAdapter.h index 80b5f9a943..2c472eadaa 100644 --- a/Modules/OpenViewCore/QVTKInteractorAdapter.h +++ b/Modules/OpenViewCore/QVTKInteractorAdapter.h @@ -1,68 +1,68 @@ /*========================================================================= Program: Visualization Toolkit Module: QVTKInteractorAdapter.h Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ /*========================================================================= Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive license for use of this work by or on behalf of the U.S. Government. Redistribution and use in source and binary forms, with or without modification, are permitted provided that this Notice and any statement of authorship are reproduced on all copies. =========================================================================*/ /*======================================================================== For general information about using VTK and Qt, see: http://www.trolltech.com/products/3rdparty/vtksupport.html =========================================================================*/ // .NAME QVTKInteractorAdapter - Handle Qt events. // .SECTION Description // QVTKInteractor handles relaying Qt events to VTK. #ifndef Q_VTK_INTERACTOR_ADAPTER_H #define Q_VTK_INTERACTOR_ADAPTER_H #include #include class vtkRenderWindowInteractor; class QEvent; // .NAME QVTKInteractorAdapter - A QEvent translator. // .SECTION Description // QVTKInteractorAdapter translates QEvents and send them to a // vtkRenderWindowInteractor. -class MitkOVCORE_EXPORT QVTKInteractorAdapter : public QObject +class MitkOpenViewCore_EXPORT QVTKInteractorAdapter : public QObject { Q_OBJECT public: // Description: // Constructor: takes QObject parent QVTKInteractorAdapter(QObject* parent); // Description: // Destructor ~QVTKInteractorAdapter(); // Description: // Process a QEvent and send it to the interactor // returns whether the event was recognized and processed bool ProcessEvent(QEvent* e, vtkRenderWindowInteractor* iren); }; #endif diff --git a/Modules/OpenViewCore/QVTKQuickItem.h b/Modules/OpenViewCore/QVTKQuickItem.h index 818a0e30ca..7b4614410a 100644 --- a/Modules/OpenViewCore/QVTKQuickItem.h +++ b/Modules/OpenViewCore/QVTKQuickItem.h @@ -1,108 +1,108 @@ /*======================================================================== OpenView -- http://openview.kitware.com Copyright 2012 Kitware, Inc. Licensed under the BSD license. See LICENSE file for details. ========================================================================*/ #ifndef QVTKQuickItem_h #define QVTKQuickItem_h #include #include #include "vtkSmartPointer.h" #include "vtkNew.h" #include #include class QOpenGLContext; class QOpenGLFramebufferObject; class QVTKInteractorAdapter; class QVTKInteractor; class vtkEventQtSlotConnect; class vtkGenericOpenGLRenderWindow; class vtkObject; class vtkContextView; -class MitkOVCORE_EXPORT QVTKQuickItem : public QQuickItem +class MitkOpenViewCore_EXPORT QVTKQuickItem : public QQuickItem { Q_OBJECT public: QVTKQuickItem(QQuickItem* parent = 0); // Description: // destructor ~QVTKQuickItem(); void itemChange(ItemChange change, const ItemChangeData &); // Description: // set the render window to use with this item void SetRenderWindow(vtkGenericOpenGLRenderWindow* win); // Description: // get the render window used with this item vtkGenericOpenGLRenderWindow* GetRenderWindow() const; // Description: // get the render window interactor used with this item // this item enforces its own interactor QVTKInteractor* GetInteractor() const; public slots: virtual void paint(); protected slots: // slot to make this vtk render window current virtual void MakeCurrent(); // slot called when vtk render window starts to draw virtual void Start(); // slot called when vtk render window is done drawing virtual void End(); // slot called when vtk wants to know if the context is current virtual void IsCurrent(vtkObject* caller, unsigned long vtk_event, void* client_data, void* call_data); // slot called when vtk wants to know if a window is direct virtual void IsDirect(vtkObject* caller, unsigned long vtk_event, void* client_data, void* call_data); // slot called when vtk wants to know if a window supports OpenGL virtual void SupportsOpenGL(vtkObject* caller, unsigned long vtk_event, void* client_data, void* call_data); protected: virtual void init(); virtual void prepareForRender(); virtual void cleanupAfterRender(); // handle item key events virtual void keyPressEvent(QKeyEvent* e); virtual void keyReleaseEvent(QKeyEvent* e); // handle item mouse events virtual void mousePressEvent(QMouseEvent* e); virtual void mouseReleaseEvent(QMouseEvent* e); virtual void mouseDoubleClickEvent(QMouseEvent* e); virtual void mouseMoveEvent(QMouseEvent* e); virtual void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry); virtual void wheelEvent(QWheelEvent* e); virtual void hoverEnterEvent(QHoverEvent* e); virtual void hoverLeaveEvent(QHoverEvent* e); virtual void hoverMoveEvent(QHoverEvent* e); virtual QSGNode* updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData* updatePaintNodeData); QMutex m_viewLock; private: QOpenGLContext* m_context; vtkSmartPointer m_win; vtkSmartPointer m_interactor; QVTKInteractorAdapter* m_interactorAdapter; vtkSmartPointer m_connect; bool m_InitCalledOnce; }; #endif diff --git a/Modules/OpenViewCore/vtkEventQtSlotConnect.h b/Modules/OpenViewCore/vtkEventQtSlotConnect.h index b5d9904625..ce007d427b 100644 --- a/Modules/OpenViewCore/vtkEventQtSlotConnect.h +++ b/Modules/OpenViewCore/vtkEventQtSlotConnect.h @@ -1,103 +1,103 @@ /*========================================================================= Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive license for use of this work by or on behalf of the U.S. Government. Redistribution and use in source and binary forms, with or without modification, are permitted provided that this Notice and any statement of authorship are reproduced on all copies. =========================================================================*/ /*======================================================================== For general information about using VTK and Qt, see: http://www.trolltech.com/products/3rdparty/vtksupport.html =========================================================================*/ /*======================================================================== !!! WARNING for those who want to contribute code to this file. !!! If you use a commercial edition of Qt, you can modify this code. !!! If you use an open source version of Qt, you are free to modify !!! and use this code within the guidelines of the GPL license. !!! Unfortunately, you cannot contribute the changes back into this !!! file. Doing so creates a conflict between the GPL and BSD-like VTK !!! license. =========================================================================*/ // .NAME vtkEventQtSlotConnect - Manage connections between VTK events and Qt slots. // .SECTION Description // vtkEventQtSlotConnect provides a way to manage connections between VTK events // and Qt slots. // Qt slots to connect with must have one of the following signatures: // - MySlot() // - MySlot(vtkObject* caller) // - MySlot(vtkObject* caller, unsigned long vtk_event) // - MySlot(vtkObject* caller, unsigned long vtk_event, void* client_data) // - MySlot(vtkObject* caller, unsigned long vtk_event, void* client_data, void* call_data) // - MySlot(vtkObject* caller, unsigned long vtk_event, void* client_data, void* call_data, vtkCommand*) #ifndef VTK_EVENT_QT_SLOT_CONNECT #define VTK_EVENT_QT_SLOT_CONNECT #include "vtkObject.h" #include "vtkCommand.h" // for event defines #include // for version info #include class QObject; class vtkQtConnections; class vtkQtConnection; // manage connections between VTK object events and Qt slots -class MitkOVCORE_EXPORT vtkEventQtSlotConnect : public vtkObject +class MitkOpenViewCore_EXPORT vtkEventQtSlotConnect : public vtkObject { public: static vtkEventQtSlotConnect* New(); vtkTypeMacro(vtkEventQtSlotConnect, vtkObject) // Description: // Print the current connections between VTK and Qt void PrintSelf(ostream& os, vtkIndent indent); // Description: // Connect a vtk object's event with a Qt object's slot. Multiple // connections which are identical are treated as separate connections. virtual void Connect(vtkObject* vtk_obj, unsigned long event, const QObject* qt_obj, const char* slot, void* client_data=NULL, float priority=0.0 ,Qt::ConnectionType type = Qt::AutoConnection); // Description: // Disconnect a vtk object from a qt object. // Passing no arguments will disconnect all slots maintained by this object. // Passing in only a vtk object will disconnect all slots from it. // Passing only a vtk object and event, will disconnect all slots matching // the vtk object and event. // Passing all information in will match all information. virtual void Disconnect( vtkObject* vtk_obj=NULL, unsigned long event=vtkCommand::NoEvent, const QObject* qt_obj=NULL, const char* slot = 0, void* client_data=NULL); // Description: // Allow to query vtkEventQtSlotConnect to know if some Connect() have been // setup and how many. virtual int GetNumberOfConnections() const; protected: vtkQtConnections* Connections; friend class vtkQtConnection; void RemoveConnection(vtkQtConnection*); vtkEventQtSlotConnect(); ~vtkEventQtSlotConnect(); private: // unimplemented vtkEventQtSlotConnect(const vtkEventQtSlotConnect&); void operator=(const vtkEventQtSlotConnect&); }; #endif diff --git a/Modules/OpenViewCore/vtkQtConnection.h b/Modules/OpenViewCore/vtkQtConnection.h index 2569c7f3b2..1fc88c03ba 100644 --- a/Modules/OpenViewCore/vtkQtConnection.h +++ b/Modules/OpenViewCore/vtkQtConnection.h @@ -1,104 +1,104 @@ /*========================================================================= Copyright 2004 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive license for use of this work by or on behalf of the U.S. Government. Redistribution and use in source and binary forms, with or without modification, are permitted provided that this Notice and any statement of authorship are reproduced on all copies. =========================================================================*/ /*======================================================================== For general information about using VTK and Qt, see: http://www.trolltech.com/products/3rdparty/vtksupport.html =========================================================================*/ /*======================================================================== !!! WARNING for those who want to contribute code to this file. !!! If you use a commercial edition of Qt, you can modify this code. !!! If you use an open source version of Qt, you are free to modify !!! and use this code within the guidelines of the GPL license. !!! Unfortunately, you cannot contribute the changes back into this !!! file. Doing so creates a conflict between the GPL and BSD-like VTK !!! license. =========================================================================*/ // .SECTION Description // vtkQtConnection is an internal class. #ifndef VTK_QT_CONNECTION #define VTK_QT_CONNECTION #include "vtkObject.h" #include "vtkCommand.h" // for event defines #include "qobject.h" #include class QObject; class vtkCallbackCommand; 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 MitkOpenViewCore_EXPORT vtkQtConnection : public QObject { Q_OBJECT public: // constructor vtkQtConnection(vtkEventQtSlotConnect* owner); // destructor, disconnect if necessary ~vtkQtConnection(); // print function void PrintSelf(ostream& os, vtkIndent indent); // callback from VTK to emit signal void Execute(vtkObject* caller, unsigned long event, void* client_data); // set the connection void SetConnection(vtkObject* vtk_obj, unsigned long event, const QObject* qt_obj, const char* slot, void* client_data, float priority=0.0 ,Qt::ConnectionType type = Qt::AutoConnection); // check if a connection matches input parameters bool IsConnection(vtkObject* vtk_obj, unsigned long event, const QObject* qt_obj, const char* slot, void* client_data); static void DoCallback(vtkObject* vtk_obj, unsigned long event, void* client_data, void* call_data); signals: // the qt signal for moc to take care of void EmitExecute(vtkObject*, unsigned long, void* client_data, void* call_data, vtkCommand*); protected slots: void deleteConnection(); protected: // the connection information vtkObject* VTKObject; vtkCallbackCommand* Callback; const QObject* QtObject; void* ClientData; unsigned long VTKEvent; QString QtSlot; vtkEventQtSlotConnect* Owner; private: vtkQtConnection(const vtkQtConnection&); void operator=(const vtkQtConnection&); }; #endif diff --git a/Modules/QmlItems/InteractionLegacy/QmitkEventAdapter.h b/Modules/QmlItems/InteractionLegacy/QmitkEventAdapter.h index ac9c63362f..537ccfcbf9 100644 --- a/Modules/QmlItems/InteractionLegacy/QmitkEventAdapter.h +++ b/Modules/QmlItems/InteractionLegacy/QmitkEventAdapter.h @@ -1,44 +1,44 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKEVENTADAPTER_H_ #define QMITKEVENTADAPTER_H_ -#include +#include #include #include #include #include #include /** * \ingroup QmitkModule * \deprecatedSince{2013_03} mitk::QmitkEventAdapter is deprecated. It will become * obsolete. Adaption of events is now handeled (for Qt events) in QmitkRenderWindow. * Refer to \see DataInteractionPage for general information about the concept of * the new implementation */ -class QmlMitk_EXPORT QmitkEventAdapter +class MitkQmlItems_EXPORT QmitkEventAdapter { public: static mitk::MouseEvent AdaptMouseEvent(mitk::BaseRenderer* sender, QMouseEvent* mouseEvent); static mitk::WheelEvent AdaptWheelEvent(mitk::BaseRenderer* sender, QWheelEvent* wheelEvent); static mitk::KeyEvent AdaptKeyEvent(mitk::BaseRenderer* sender, QKeyEvent* keyEvent, const QPoint& point); }; #endif /*QMITKEVENTADAPTER_H_*/ diff --git a/Modules/QmlItems/QmlMitkBigRenderLock.h b/Modules/QmlItems/QmlMitkBigRenderLock.h index 3a4bd52aaa..b4a36019b2 100644 --- a/Modules/QmlItems/QmlMitkBigRenderLock.h +++ b/Modules/QmlItems/QmlMitkBigRenderLock.h @@ -1,33 +1,33 @@ #ifndef QmlMitkBigRenderLock_h #define QmlMitkBigRenderLock_h #include -#include "QmlMitkExports.h" +#include "MitkQmlItemsExports.h" /** \brief Workaround lock around MITK rendering. QtQuick renders in a thread, MITK datastructures do not tolerate this well. The current work-around is a big lock that delays signal delivery while rendering is in progress. The proper solution would be to make data structures 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: static QMutex& GetMutex(); QmlMitkBigRenderLock(QObject* parent = 0); protected: bool eventFilter(QObject *obj, QEvent *event); }; #endif diff --git a/Modules/QmlItems/QmlMitkFourRenderWindowWidget.h b/Modules/QmlItems/QmlMitkFourRenderWindowWidget.h index 5082536363..4fef3c2333 100644 --- a/Modules/QmlItems/QmlMitkFourRenderWindowWidget.h +++ b/Modules/QmlItems/QmlMitkFourRenderWindowWidget.h @@ -1,58 +1,58 @@ #ifndef QmlMitkFourRenderWindowWidget_h #define QmlMitkFourRenderWindowWidget_h #include #include "QmlMitkRenderWindowItem.h" #include "mitkDataStorage.h" -#include "QmlMitkCoreExports.h" +#include "MitkQmlItemsExports.h" /** \brief QML replacement for QmitkStdMultiWidget. A proof-of-concept "multi-widget". Currently exclusively for use in the QuickRender demo application. \warning Subject to change. */ -class QmlMitk_EXPORT QmlMitkFourRenderWindowWidget : public QQuickItem +class MitkQmlItems_EXPORT QmlMitkFourRenderWindowWidget : public QQuickItem { Q_OBJECT public: QmlMitkFourRenderWindowWidget(QQuickItem* parent = 0); virtual ~QmlMitkFourRenderWindowWidget(); void SetDataStorage( mitk::DataStorage::Pointer storage ); signals: public slots: protected slots: protected: virtual void SetupWidget( QQuickItem* parent ); virtual void InitializeMoveZoomInteraction(); mitk::DataStorage::Pointer m_DataStorage; private slots: private: QQuickItem* m_ChildrenContainer; QmlMitkRenderWindowItem* m_RenderItemAxial; QmlMitkRenderWindowItem* m_RenderItemSagittal; QmlMitkRenderWindowItem* m_RenderItemFrontal; QmlMitkRenderWindowItem* m_RenderItem3D; }; #endif diff --git a/Modules/QmlItems/QmlMitkRenderWindowItem.h b/Modules/QmlItems/QmlMitkRenderWindowItem.h index 435292d0ef..67e6328b83 100644 --- a/Modules/QmlItems/QmlMitkRenderWindowItem.h +++ b/Modules/QmlItems/QmlMitkRenderWindowItem.h @@ -1,87 +1,87 @@ #ifndef QmlMitkRenderWindowItem_h #define QmlMitkRenderWindowItem_h #include #include "mitkRenderWindowBase.h" #include -#include "QmlMitkExports.h" +#include "MitkQmlItemsExports.h" /** \brief QML replacement for QmitkRenderWindow. A proof-of-concept render window. Currently exclusively for use in the QuickRender demo application. \warning Subject to change. */ -class QmlMitk_EXPORT QmlMitkRenderWindowItem : public QVTKQuickItem, public mitk::RenderWindowBase +class MitkQmlItems_EXPORT QmlMitkRenderWindowItem : public QVTKQuickItem, public mitk::RenderWindowBase { Q_OBJECT public: static QmlMitkRenderWindowItem* GetInstanceForVTKRenderWindow( vtkRenderWindow* rw ); QmlMitkRenderWindowItem(QQuickItem* parent = 0, const QString& name = "QML render window", mitk::VtkPropRenderer* renderer = NULL, mitk::RenderingManager* renderingManager = NULL); virtual vtkRenderWindow* GetVtkRenderWindow(); virtual vtkRenderWindowInteractor* GetVtkRenderWindowInteractor(); void SetDataStorage(mitk::DataStorage::Pointer storage); void InitView( mitk::BaseRenderer::MapperSlotId mapperID, mitk::SliceNavigationController::ViewDirection viewDirection ); void SetPlaneNodeParent( mitk::DataNode::Pointer node ); void SetCrossHairPositioningOnClick(bool enabled); signals: public slots: protected slots: protected: virtual void init(); virtual void prepareForRender(); virtual void cleanupAfterRender(); mitk::Point2D GetMousePosition(QMouseEvent* me) const; mitk::Point2D GetMousePosition(QWheelEvent* we) const; mitk::InteractionEvent::MouseButtons GetEventButton(QMouseEvent* me) const; mitk::InteractionEvent::MouseButtons GetButtonState(QMouseEvent* me) const; mitk::InteractionEvent::ModifierKeys GetModifiers(QInputEvent* me) const; mitk::InteractionEvent::MouseButtons GetButtonState(QWheelEvent* we) const; void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry); // !? virtual void mousePressEvent(QMouseEvent* e); virtual void mouseReleaseEvent(QMouseEvent* e); virtual void mouseMoveEvent(QMouseEvent* e); virtual void wheelEvent(QWheelEvent* e); private slots: private: mitk::DataStorage::Pointer m_DataStorage; mitk::DataNode::Pointer m_PlaneNodeParent; mitk::BaseRenderer::MapperSlotId m_MapperID; mitk::SliceNavigationController::ViewDirection m_ViewDirection; QTimer m_Animation; vtkSmartPointer m_connect; static QMap& GetInstances(); }; #endif diff --git a/Modules/QmlItems/QmlMitkRenderingManager.h b/Modules/QmlItems/QmlMitkRenderingManager.h index fd5eac1599..a23f1b0bed 100644 --- a/Modules/QmlItems/QmlMitkRenderingManager.h +++ b/Modules/QmlItems/QmlMitkRenderingManager.h @@ -1,85 +1,85 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmlMitkRenderingManager_h #define QmlMitkRenderingManager_h -#include +#include #include "mitkRenderingManager.h" #include #include class QmlMitkRenderingManagerFactory; /** * \ingroup QmlMitkModule * \brief Qt/Qml specific implementation of mitk::RenderingManager. * * This implementation defines a QmlMitkRenderingRequestEvent to realize the * rendering request process. The event is put into Qt's event loop to * 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 public: mitkClassMacro( QmlMitkRenderingManager, mitk::RenderingManager ); virtual ~QmlMitkRenderingManager(); virtual bool event( QEvent *event ); protected: itkFactorylessNewMacro(Self); QmlMitkRenderingManager(); virtual void GenerateRenderingRequestEvent(); virtual void StartOrResetTimer(); int pendingTimerCallbacks; protected slots: void TimerCallback(); private: friend class QmlMitkRenderingManagerFactory; void MyUpdateExecutePendingRequests(); }; class QmlMitkRenderingRequestEvent : public QEvent { public: enum Type { RenderingRequest = QEvent::MaxUser - 1024 }; QmlMitkRenderingRequestEvent() : QEvent( (QEvent::Type) RenderingRequest ) {}; }; #endif /* MITKRenderingManager_H_HEADER_INCLUDED_C135A197 */ diff --git a/Modules/QmlItems/QmlMitkRenderingManagerFactory.h b/Modules/QmlItems/QmlMitkRenderingManagerFactory.h index 1d0917e6f4..f4134f72f8 100644 --- a/Modules/QmlItems/QmlMitkRenderingManagerFactory.h +++ b/Modules/QmlItems/QmlMitkRenderingManagerFactory.h @@ -1,48 +1,48 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmlMitkRenderingManagerFactory_h #define QmlMitkRenderingManagerFactory_h -#include +#include #include "mitkRenderingManagerFactory.h" /** * \ingroup QmlMitkModule * \brief Qt specific implementation of mitk::RenderingManagerFactory. * * This class create QmlMitkRenderingManager instances via * CreateRenderingManager(). * */ -class QmlMitk_EXPORT QmlMitkRenderingManagerFactory : public mitk::RenderingManagerFactory +class MitkQmlItems_EXPORT QmlMitkRenderingManagerFactory : public mitk::RenderingManagerFactory { public: QmlMitkRenderingManagerFactory(); ~QmlMitkRenderingManagerFactory(); virtual mitk::RenderingManager::Pointer CreateRenderingManager() const; private: }; #endif