diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/CMakeLists.txt b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/CMakeLists.txt index fba82a3726..49ed29a959 100644 --- a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/CMakeLists.txt +++ b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/CMakeLists.txt @@ -1,2 +1,9 @@ +# The project name must correspond to the directory name of your plug-in +# and must not contain periods. +PROJECT(org_mitk_gui_qt_imagenavigator) -MACRO_CREATE_MITK_PLUGIN(QmitkExt) +MACRO_CREATE_MITK_CTK_PLUGIN( + EXPORT_DIRECTIVE IMAGENAVIGATOR_EXPORT + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDENCIES QmitkExt +) diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/META-INF/MANIFEST.MF b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/META-INF/MANIFEST.MF deleted file mode 100644 index 5d67dfd130..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/META-INF/MANIFEST.MF +++ /dev/null @@ -1,7 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Name: Image Navigator -Bundle-SymbolicName: org.mitk.gui.qt.imagenavigator -Bundle-Version: 0.1 -Bundle-Vendor: DKFZ, Medical and Biological Informatics -Require-Bundle: org.mitk.gui.qt.common -Bundle-Activator: diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/files.cmake b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/files.cmake index 9abd269c89..3e50cffe64 100644 --- a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/files.cmake +++ b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/files.cmake @@ -1,35 +1,36 @@ SET(SRC_CPP_FILES ) SET(INTERNAL_CPP_FILES QmitkImageNavigatorView.cpp - + mitkImageNavigatorPluginActivator.cpp ) SET(UI_FILES src/internal/QmitkImageNavigatorViewControls.ui ) SET(MOC_H_FILES + src/internal/mitkImageNavigatorPluginActivator.h src/internal/QmitkImageNavigatorView.h ) -SET(RESOURCE_FILES +SET(CACHED_RESOURCE_FILES resources/Slider.png + plugin.xml ) -SET(RES_FILES +SET(QRC_FILES resources/QmitkImageNavigatorView.qrc ) -SET(CPP_FILES manifest.cpp) foreach(file ${SRC_CPP_FILES}) SET(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) SET(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/manifest.cpp b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/manifest.cpp deleted file mode 100644 index b8f1207528..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/manifest.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date$ -Version: $Revision: 17495 $ - -Copyright (c) German Cancer Research Center, Division of Medical and -Biological Informatics. All rights reserved. -See MITKCopyright.txt or http://www.mitk.org/copyright.html 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 notices for more information. - -=========================================================================*/ - -#include - - - -#include "src/internal/QmitkImageNavigatorView.h" - -POCO_BEGIN_NAMED_MANIFEST(berryIViewPart, berry::IViewPart) - POCO_EXPORT_CLASS(::QmitkImageNavigatorView) -POCO_END_MANIFEST diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/manifest_headers.cmake b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/manifest_headers.cmake new file mode 100644 index 0000000000..218d55ad61 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "MITK Image Navigator") +set(Plugin-Version "0.9") +set(Plugin-Vendor "DKFZ, Medical and Biological Informatics") +set(Plugin-ContactAddress "http://www.mitk.org") +set(Require-Plugin org.mitk.gui.qt.common) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/plugin.xml b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/plugin.xml index b75e01f69d..0abe6b9d63 100644 --- a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/plugin.xml +++ b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/plugin.xml @@ -1,12 +1,12 @@ diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/ImagenavigatorDll.h b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/ImagenavigatorDll.h deleted file mode 100644 index 39adab9cfe..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/ImagenavigatorDll.h +++ /dev/null @@ -1,43 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date$ -Version: $Revision: 17495 $ - -Copyright (c) German Cancer Research Center, Division of Medical and -Biological Informatics. All rights reserved. -See MITKCopyright.txt or http://www.mitk.org/copyright.html 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 notices for more information. - -=========================================================================*/ - -#ifndef _IMAGENAVIGATOR_EXPORT_DLL_H_ -#define _IMAGENAVIGATOR_EXPORT_DLL_H_ - - -// -// The following block is the standard way of creating macros which make exporting -// from a DLL simpler. All files within this DLL are compiled with the org_mitk_gui_qt_imagenavigator_EXPORTS -// symbol defined on the command line. this symbol should not be defined on any project -// that uses this DLL. This way any other project whose source files include this file see -// org_mitk_gui_qt_imagenavigator_EXPORTS functions as being imported from a DLL, wheras this DLL sees symbols -// defined with this macro as being exported. -// -#if defined(_WIN32) && !defined(MITK_STATIC) - #if defined(org_mitk_gui_qt_imagenavigator_EXPORTS) - #define IMAGENAVIGATOR_EXPORT __declspec(dllexport) - #else - #define IMAGENAVIGATOR_EXPORT __declspec(dllimport) - #endif -#endif - - -#if !defined(IMAGENAVIGATOR_EXPORT) - #define IMAGENAVIGATOR_EXPORT -#endif - -#endif /*_IMAGENAVIGATOR_EXPORT_DLL_H_*/ diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/QmitkImageNavigatorView.h b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/QmitkImageNavigatorView.h index 89ab34e2e5..1f7ed7b049 100644 --- a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/QmitkImageNavigatorView.h +++ b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/QmitkImageNavigatorView.h @@ -1,89 +1,95 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision: 17495 $ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html 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 notices for more information. =========================================================================*/ #ifndef _QMITKIMAGENAVIGATORVIEW_H_INCLUDED #define _QMITKIMAGENAVIGATORVIEW_H_INCLUDED #include #include "berryISizeProvider.h" #include #include #include #include "QmitkStepperAdapter.h" #include #include "ui_QmitkImageNavigatorViewControls.h" #include "berryISizeProvider.h" /*! * \ingroup org_mitk_gui_qt_imagenavigator_internal * * \brief QmitkImageNavigatorView * * Document your class here. * * \sa QmitkFunctionality */ class QmitkImageNavigatorView : public berry::QtViewPart, public berry::ISizeProvider { // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) Q_OBJECT public: static const std::string VIEW_ID; QmitkImageNavigatorView(); + QmitkImageNavigatorView(const QmitkImageNavigatorView& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } + virtual ~QmitkImageNavigatorView(); virtual void CreateQtPartControl(QWidget *parent); QmitkStdMultiWidget* GetActiveStdMultiWidget(); void SetFocus(); virtual int GetSizeFlags(bool width); virtual int ComputePreferredSize(bool width, int /*availableParallel*/, int /*availablePerpendicular*/, int preferredResult); protected slots: protected: friend class ImageNavigatorPartListener; void SetMultiWidget(QmitkStdMultiWidget* multiWidget); Ui::QmitkImageNavigatorViewControls m_Controls; QmitkStdMultiWidget* m_MultiWidget; QmitkStepperAdapter* m_TransversalStepper; QmitkStepperAdapter* m_SagittalStepper; QmitkStepperAdapter* m_FrontalStepper; QmitkStepperAdapter* m_TimeStepper; berry::IPartListener::Pointer multiWidgetListener; }; #endif // _QMITKIMAGENAVIGATORVIEW_H_INCLUDED diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/mitkImageNavigatorPluginActivator.cpp b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/mitkImageNavigatorPluginActivator.cpp new file mode 100644 index 0000000000..44124d0888 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/mitkImageNavigatorPluginActivator.cpp @@ -0,0 +1,21 @@ +#include "mitkImageNavigatorPluginActivator.h" + +#include "QmitkImageNavigatorView.h" + +#include + +namespace mitk { + + void ImageNavigatorPluginActivator::start(ctkPluginContext* context) + { + BERRY_REGISTER_EXTENSION_CLASS(QmitkImageNavigatorView, context) + } + + void ImageNavigatorPluginActivator::stop(ctkPluginContext* context) + { + Q_UNUSED(context) + } + +} + +Q_EXPORT_PLUGIN2(org_mitk_gui_qt_imagenavigator, mitk::ImageNavigatorPluginActivator) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/mitkImageNavigatorPluginActivator.h b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/mitkImageNavigatorPluginActivator.h new file mode 100644 index 0000000000..75e38976c5 --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.imagenavigator/src/internal/mitkImageNavigatorPluginActivator.h @@ -0,0 +1,23 @@ +#ifndef MITKIMAGENAVIGATORPLUGINACTIVATOR_H +#define MITKIMAGENAVIGATORPLUGINACTIVATOR_H + +#include + +namespace mitk { + + class ImageNavigatorPluginActivator : + public QObject, public ctkPluginActivator + { + Q_OBJECT + Q_INTERFACES(ctkPluginActivator) + + public: + + void start(ctkPluginContext* context); + void stop(ctkPluginContext* context); + + }; // ImageNavigatorPluginActivator + +} + +#endif // MITKIMAGENAVIGATORPLUGINACTIVATOR_H \ No newline at end of file