diff --git a/BlueBerry/Bundles/org.blueberry.core.jobs/src/internal/berryPluginActivator.cpp b/BlueBerry/Bundles/org.blueberry.core.jobs/src/internal/berryPluginActivator.cpp index e56387a238..d731d79046 100644 --- a/BlueBerry/Bundles/org.blueberry.core.jobs/src/internal/berryPluginActivator.cpp +++ b/BlueBerry/Bundles/org.blueberry.core.jobs/src/internal/berryPluginActivator.cpp @@ -1,40 +1,42 @@ /*=================================================================== BlueBerry Platform 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. ===================================================================*/ #include "berryPluginActivator.h" #include namespace berry { org_blueberry_core_jobs_Activator::org_blueberry_core_jobs_Activator() { } void org_blueberry_core_jobs_Activator::start(ctkPluginContext* context) { Q_UNUSED(context) } void org_blueberry_core_jobs_Activator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_blueberry_core_jobs, berry::org_blueberry_core_jobs_Activator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_blueberry_core_jobs, berry::org_blueberry_core_jobs_Activator) +#endif diff --git a/BlueBerry/Bundles/org.blueberry.core.jobs/src/internal/berryPluginActivator.h b/BlueBerry/Bundles/org.blueberry.core.jobs/src/internal/berryPluginActivator.h index 160fea1318..7cbaf0af92 100644 --- a/BlueBerry/Bundles/org.blueberry.core.jobs/src/internal/berryPluginActivator.h +++ b/BlueBerry/Bundles/org.blueberry.core.jobs/src/internal/berryPluginActivator.h @@ -1,42 +1,45 @@ /*=================================================================== BlueBerry Platform 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 BERRYPLUGINACTIVATOR_H #define BERRYPLUGINACTIVATOR_H #include namespace berry { class org_blueberry_core_jobs_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_blueberry_core_jobs") +#endif Q_INTERFACES(ctkPluginActivator) public: org_blueberry_core_jobs_Activator(); void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; typedef org_blueberry_core_jobs_Activator PluginActivator; } #endif // BERRYPLUGINACTIVATOR_H diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt.objectinspector/src/internal/berryPluginActivator.cpp b/BlueBerry/Bundles/org.blueberry.ui.qt.objectinspector/src/internal/berryPluginActivator.cpp index 3deccddb55..79c6982d98 100644 --- a/BlueBerry/Bundles/org.blueberry.ui.qt.objectinspector/src/internal/berryPluginActivator.cpp +++ b/BlueBerry/Bundles/org.blueberry.ui.qt.objectinspector/src/internal/berryPluginActivator.cpp @@ -1,40 +1,40 @@ /*=================================================================== BlueBerry Platform 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. ===================================================================*/ #include "berryPluginActivator.h" #include "berryObjectBrowserView.h" #include namespace berry { void org_blueberry_ui_qt_objectinspector_Activator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(berry::ObjectBrowserView, context) } void org_blueberry_ui_qt_objectinspector_Activator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_blueberry_ui_qt_objectinspector, berry::org_blueberry_ui_qt_objectinspector_Activator) - - +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_blueberry_ui_qt_objectinspector, berry::org_blueberry_ui_qt_objectinspector_Activator) +#endif diff --git a/BlueBerry/Bundles/org.blueberry.ui.qt.objectinspector/src/internal/berryPluginActivator.h b/BlueBerry/Bundles/org.blueberry.ui.qt.objectinspector/src/internal/berryPluginActivator.h index 0840e767d1..6126f0910e 100644 --- a/BlueBerry/Bundles/org.blueberry.ui.qt.objectinspector/src/internal/berryPluginActivator.h +++ b/BlueBerry/Bundles/org.blueberry.ui.qt.objectinspector/src/internal/berryPluginActivator.h @@ -1,42 +1,45 @@ /*=================================================================== BlueBerry Platform 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 BERRYOBJECTINSPECTORACTIVATOR_H #define BERRYOBJECTINSPECTORACTIVATOR_H #include namespace berry { class org_blueberry_ui_qt_objectinspector_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_blueberry_ui_qt_objectinspector") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; typedef org_blueberry_ui_qt_objectinspector_Activator PluginActivator; } #endif // BERRYOBJECTINSPECTORACTIVATOR_H diff --git a/Plugins/org.mitk.core.jobs/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.core.jobs/src/internal/mitkPluginActivator.cpp index 0d608ccb5e..785033cfa0 100644 --- a/Plugins/org.mitk.core.jobs/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.core.jobs/src/internal/mitkPluginActivator.cpp @@ -1,34 +1,36 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include namespace mitk { void PluginActivator::start(ctkPluginContext* context) { Q_UNUSED(context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_core_jobs, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_core_jobs, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.core.jobs/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.core.jobs/src/internal/mitkPluginActivator.h index 12053e09e3..bdba95af92 100644 --- a/Plugins/org.mitk.core.jobs/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.core.jobs/src/internal/mitkPluginActivator.h @@ -1,39 +1,42 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include #include namespace mitk { class MITK_LOCAL PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_core_jobs") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.diffusionimaging/src/internal/mitkDiffusionImagingActivator.cpp b/Plugins/org.mitk.diffusionimaging/src/internal/mitkDiffusionImagingActivator.cpp index 8d979b58d5..40d92b2cdf 100644 --- a/Plugins/org.mitk.diffusionimaging/src/internal/mitkDiffusionImagingActivator.cpp +++ b/Plugins/org.mitk.diffusionimaging/src/internal/mitkDiffusionImagingActivator.cpp @@ -1,59 +1,61 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkDiffusionImagingActivator.h" #include "QmitkNodeDescriptorManager.h" #include "mitkNodePredicateDataType.h" #include void mitk::DiffusionImagingActivator::start(ctkPluginContext* context) { Q_UNUSED(context) QmitkNodeDescriptorManager* manager = QmitkNodeDescriptorManager::GetInstance(); mitk::NodePredicateDataType::Pointer isDiffusionImage = mitk::NodePredicateDataType::New("DiffusionImage"); QmitkNodeDescriptor* desc = new QmitkNodeDescriptor(QObject::tr("DiffusionImage"), QString(":/QmitkDiffusionImaging/QBallData24.png"), isDiffusionImage, manager); manager->AddDescriptor(desc); mitk::NodePredicateDataType::Pointer isTensorImage = mitk::NodePredicateDataType::New("TensorImage"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("TensorImage"), QString(":/QmitkDiffusionImaging/recontensor.png"), isTensorImage, manager)); mitk::NodePredicateDataType::Pointer isQBallImage = mitk::NodePredicateDataType::New("QBallImage"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("QBallImage"), QString(":/QmitkDiffusionImaging/reconodf.png"), isQBallImage, manager)); mitk::NodePredicateDataType::Pointer isFiberBundle = mitk::NodePredicateDataType::New("FiberBundle"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("FiberBundle"), QString(":/QmitkDiffusionImaging/FiberBundle.png"), isFiberBundle, manager)); mitk::NodePredicateDataType::Pointer isFiberBundleX = mitk::NodePredicateDataType::New("FiberBundleX"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("FiberBundleX"), QString(":/QmitkDiffusionImaging/FiberBundleX.png"), isFiberBundleX, manager)); mitk::NodePredicateDataType::Pointer isConnectomicsNetwork = mitk::NodePredicateDataType::New("ConnectomicsNetwork"); manager->AddDescriptor(new QmitkNodeDescriptor(QObject::tr("ConnectomicsNetwork"), QString(":/QmitkDiffusionImaging/ConnectomicsNetwork.png"), isConnectomicsNetwork, manager)); } void mitk::DiffusionImagingActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } -Q_EXPORT_PLUGIN2(org_mitk_diffusionimaging, mitk::DiffusionImagingActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_diffusionimaging, mitk::DiffusionImagingActivator) +#endif diff --git a/Plugins/org.mitk.diffusionimaging/src/internal/mitkDiffusionImagingActivator.h b/Plugins/org.mitk.diffusionimaging/src/internal/mitkDiffusionImagingActivator.h index 40dfce9ee3..b17942daf0 100644 --- a/Plugins/org.mitk.diffusionimaging/src/internal/mitkDiffusionImagingActivator.h +++ b/Plugins/org.mitk.diffusionimaging/src/internal/mitkDiffusionImagingActivator.h @@ -1,54 +1,57 @@ /*=================================================================== 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 MITKDIFFUSIONIMAGINGACTIVATOR_H_ #define MITKDIFFUSIONIMAGINGACTIVATOR_H_ #include #include namespace mitk { /** * \ingroup org_mitk_diffusionimaging_internal * * \brief The plug-in activator for the diffusion imaging module * * When the plug-in is started by the framework, it initialzes diffusion imaging * specific things. */ class MITK_LOCAL DiffusionImagingActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_diffusionimaging") +#endif Q_INTERFACES(ctkPluginActivator) public: /** * Registers diffusion imaging object factories. */ void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; } #endif /* MITKDIFFUSIONIMAGINGACTIVATOR_H_ */ diff --git a/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.cpp b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.cpp index 82cca91141..6ea064a91b 100644 --- a/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.cpp @@ -1,39 +1,41 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). 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. ===================================================================*/ #include "org_mitk_gui_qt_cmdlinemodules_Activator.h" #include #include "CommandLineModulesView.h" #include "CommandLineModulesPreferencesPage.h" namespace mitk { void org_mitk_gui_qt_cmdlinemodules_Activator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(CommandLineModulesView, context) BERRY_REGISTER_EXTENSION_CLASS(CommandLineModulesPreferencesPage, context) } void org_mitk_gui_qt_cmdlinemodules_Activator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_cmdlinemodules, mitk::org_mitk_gui_qt_cmdlinemodules_Activator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_cmdlinemodules, mitk::org_mitk_gui_qt_cmdlinemodules_Activator) +#endif diff --git a/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.h b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.h index fc5db1913c..cc926ecf91 100644 --- a/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.h +++ b/Plugins/org.mitk.gui.qt.cmdlinemodules/src/internal/org_mitk_gui_qt_cmdlinemodules_Activator.h @@ -1,45 +1,48 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) University College London (UCL). 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 org_mitk_gui_qt_cmdlinemodules_Activator_h #define org_mitk_gui_qt_cmdlinemodules_Activator_h #include namespace mitk { /** * \class org_mitk_gui_qt_cmdlinemodules_Activator * \brief Blueberry plugin activator for CommandLineModulesView. * \author Matt Clarkson (m.clarkson@ucl.ac.uk) * \ingroup org_mitk_gui_qt_cmdlinemodules_internal */ class org_mitk_gui_qt_cmdlinemodules_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_cmdlinemodules") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // org_mitk_gui_qt_cmdlinemodules_Activator } #endif // org_mitk_gui_qt_cmdlinemodules_Activator_h diff --git a/Plugins/org.mitk.gui.qt.coreapplication/src/internal/org_mitk_gui_qt_coreapplication_Activator.cpp b/Plugins/org.mitk.gui.qt.coreapplication/src/internal/org_mitk_gui_qt_coreapplication_Activator.cpp index 4ae0c85594..581e263b88 100644 --- a/Plugins/org.mitk.gui.qt.coreapplication/src/internal/org_mitk_gui_qt_coreapplication_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.coreapplication/src/internal/org_mitk_gui_qt_coreapplication_Activator.cpp @@ -1,42 +1,42 @@ /*=================================================================== 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. ===================================================================*/ #include "org_mitk_gui_qt_coreapplication_Activator.h" #include "QmitkCoreApplication.h" #include "QmitkDefaultPerspective.h" #include namespace mitk { void org_mitk_gui_qt_coreapplication_Activator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkCoreApplication, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDefaultPerspective, context) } void org_mitk_gui_qt_coreapplication_Activator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_coreapplication, mitk::org_mitk_gui_qt_coreapplication_Activator) - - +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_coreapplication, mitk::org_mitk_gui_qt_coreapplication_Activator) +#endif diff --git a/Plugins/org.mitk.gui.qt.coreapplication/src/internal/org_mitk_gui_qt_coreapplication_Activator.h b/Plugins/org.mitk.gui.qt.coreapplication/src/internal/org_mitk_gui_qt_coreapplication_Activator.h index 9ac0220f38..0002eaf3ac 100644 --- a/Plugins/org.mitk.gui.qt.coreapplication/src/internal/org_mitk_gui_qt_coreapplication_Activator.h +++ b/Plugins/org.mitk.gui.qt.coreapplication/src/internal/org_mitk_gui_qt_coreapplication_Activator.h @@ -1,42 +1,45 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include namespace mitk { class org_mitk_gui_qt_coreapplication_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_coreapplication") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // org_mitk_gui_common_Activator typedef org_mitk_gui_qt_coreapplication_Activator PluginActivator; } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.datamanagerlight/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.datamanagerlight/src/internal/mitkPluginActivator.cpp index f90ad379a6..fcfdc2351a 100644 --- a/Plugins/org.mitk.gui.qt.datamanagerlight/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.datamanagerlight/src/internal/mitkPluginActivator.cpp @@ -1,34 +1,36 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include #include "QmitkDataManagerLightView.h" namespace mitk { void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkDataManagerLightView, context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_datamanagerlight, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_datamanagerlight, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.gui.qt.datamanagerlight/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.datamanagerlight/src/internal/mitkPluginActivator.h index 489bd853ca..3543c69b38 100644 --- a/Plugins/org.mitk.gui.qt.datamanagerlight/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.datamanagerlight/src/internal/mitkPluginActivator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include #include namespace mitk { class MITK_LOCAL PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_datamanagerlight") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.cpp index 516fd7e11e..ed2e5fc64b 100644 --- a/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.cpp @@ -1,47 +1,49 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include #include "QmitkDicomBrowser.h" //#include "QmitkDicomPreferencePage.h" namespace mitk { ctkPluginContext* PluginActivator::pluginContext = 0; void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkDicomBrowser, context) //BERRY_REGISTER_EXTENSION_CLASS(QmitkDicomPreferencePage, context) pluginContext = context; } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) pluginContext = NULL; } ctkPluginContext* PluginActivator::getContext() { return pluginContext; } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_dicom, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_dicom, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.h index 90aa1c78d5..4344913a9a 100644 --- a/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/mitkPluginActivator.h @@ -1,41 +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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include namespace mitk { class PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_dicom") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); static ctkPluginContext* getContext(); private: static ctkPluginContext* pluginContext; }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp index b027ead130..a05a46f165 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.cpp @@ -1,102 +1,104 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include #include "src/internal/Perspectives/QmitkDiffusionImagingAppPerspective.h" #include "src/internal/Perspectives/QmitkDIAppIVIMPerspective.h" #include "src/internal/Perspectives/QmitkDIAppSyntheticDataGenerationPerspective.h" #include "src/internal/Perspectives/QmitkGibbsTractographyPerspective.h" #include "src/internal/Perspectives/QmitkStreamlineTractographyPerspective.h" #include "src/internal/Perspectives/QmitkProbabilisticTractographyPerspective.h" #include "src/internal/Perspectives/QmitkFiberProcessingPerspective.h" #include "src/internal/QmitkQBallReconstructionView.h" #include "src/internal/QmitkPreprocessingView.h" #include "src/internal/QmitkDiffusionDicomImportView.h" #include "src/internal/QmitkDiffusionQuantificationView.h" #include "src/internal/QmitkTensorReconstructionView.h" #include "src/internal/QmitkControlVisualizationPropertiesView.h" #include "src/internal/QmitkODFDetailsView.h" #include "src/internal/QmitkGibbsTrackingView.h" #include "src/internal/QmitkStochasticFiberTrackingView.h" #include "src/internal/QmitkFiberProcessingView.h" #include "src/internal/QmitkPartialVolumeAnalysisView.h" #include "src/internal/QmitkIVIMView.h" #include "src/internal/QmitkTractbasedSpatialStatisticsView.h" #include "src/internal/QmitkTbssSkeletonizationView.h" #include "src/internal/QmitkStreamlineTrackingView.h" #include "src/internal/Connectomics/QmitkConnectomicsDataView.h" #include "src/internal/Connectomics/QmitkConnectomicsNetworkOperationsView.h" #include "src/internal/Connectomics/QmitkConnectomicsStatisticsView.h" #include "src/internal/Connectomics/QmitkRandomParcellationView.h" #include "src/internal/QmitkOdfMaximaExtractionView.h" #include "src/internal/QmitkFiberfoxView.h" #include "src/internal/QmitkFiberExtractionView.h" #include "src/internal/QmitkFieldmapGeneratorView.h" #include "src/internal/QmitkDiffusionRegistrationView.h" #include "src/internal/QmitkDenoisingView.h" namespace mitk { void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkGibbsTractographyPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkStreamlineTractographyPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkProbabilisticTractographyPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppSyntheticDataGenerationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppIVIMPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkFiberProcessingPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkQBallReconstructionView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkPreprocessingView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionDicomImport, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionQuantificationView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkTensorReconstructionView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkControlVisualizationPropertiesView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkODFDetailsView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkGibbsTrackingView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkStochasticFiberTrackingView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkFiberProcessingView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkPartialVolumeAnalysisView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkIVIMView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkTractbasedSpatialStatisticsView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkTbssSkeletonizationView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkConnectomicsDataView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkConnectomicsNetworkOperationsView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkConnectomicsStatisticsView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkStreamlineTrackingView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkOdfMaximaExtractionView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkFiberfoxView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkFiberExtractionView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkFieldmapGeneratorView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionRegistrationView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDenoisingView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkRandomParcellationView, context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_diffusionimaging, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_diffusionimaging, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.h index 489bd853ca..c99ace3fa1 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.diffusionimaging/src/internal/mitkPluginActivator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include #include namespace mitk { class MITK_LOCAL PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_diffusionimaging") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.cpp b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.cpp index d3dd44ef81..33906841dd 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.cpp +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.cpp @@ -1,88 +1,90 @@ /*=================================================================== 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. ===================================================================*/ #include "QmitkDiffusionApplicationPlugin.h" #include "src/QmitkDiffusionImagingAppApplication.h" #include "src/internal/Perspectives/QmitkWelcomePerspective.h" #include "src/internal/QmitkDiffusionImagingAppIntroPart.h" #include #include #include #include #include #include #include QmitkDiffusionApplicationPlugin* QmitkDiffusionApplicationPlugin::inst = 0; QmitkDiffusionApplicationPlugin::QmitkDiffusionApplicationPlugin() { inst = this; } QmitkDiffusionApplicationPlugin::~QmitkDiffusionApplicationPlugin() { } QmitkDiffusionApplicationPlugin* QmitkDiffusionApplicationPlugin::GetDefault() { return inst; } void QmitkDiffusionApplicationPlugin::start(ctkPluginContext* context) { berry::AbstractUICTKPlugin::start(context); this->context = context; BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppApplication, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppIntroPart, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkWelcomePerspective, context) ctkServiceReference cmRef = context->getServiceReference(); ctkConfigurationAdmin* configAdmin = 0; if (cmRef) { configAdmin = context->getService(cmRef); } // Use the CTK Configuration Admin service to configure the BlueBerry help system if (configAdmin) { ctkConfigurationPtr conf = configAdmin->getConfiguration("org.blueberry.services.help", QString()); ctkDictionary helpProps; helpProps.insert("homePage", "qthelp://org.mitk.gui.qt.diffusionimagingapp/bundle/index.html"); conf->update(helpProps); context->ungetService(cmRef); } else { MITK_WARN << "Configuration Admin service unavailable, cannot set home page url."; } } ctkPluginContext* QmitkDiffusionApplicationPlugin::GetPluginContext() const { return context; } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_diffusionimagingapp, QmitkDiffusionApplicationPlugin) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_diffusionimagingapp, QmitkDiffusionApplicationPlugin) +#endif diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.h b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.h index bd57933803..9b8e79ef15 100644 --- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.h +++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.h @@ -1,52 +1,55 @@ /*=================================================================== 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 QMITKDIFFUSIONAPPLICATIONPLUGIN_H_ #define QMITKDIFFUSIONAPPLICATIONPLUGIN_H_ #include #include #include class QmitkDiffusionApplicationPlugin : public QObject, public berry::AbstractUICTKPlugin { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_diffusionimagingapp") +#endif Q_INTERFACES(ctkPluginActivator) public: QmitkDiffusionApplicationPlugin(); ~QmitkDiffusionApplicationPlugin(); static QmitkDiffusionApplicationPlugin* GetDefault(); ctkPluginContext* GetPluginContext() const; void start(ctkPluginContext*); QString GetQtHelpCollectionFile() const; private: static QmitkDiffusionApplicationPlugin* inst; ctkPluginContext* context; }; #endif /* QMITKDIFFUSIONAPPLICATIONPLUGIN_H_ */ diff --git a/Plugins/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.cpp b/Plugins/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.cpp index 337ece002c..cbc6c6d0cc 100644 --- a/Plugins/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.cpp +++ b/Plugins/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.cpp @@ -1,121 +1,121 @@ /*=================================================================== 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. ===================================================================*/ #include "QmitkDTIAtlasAppApplicationPlugin.h" #include #include #include #include "src/QmitkDTIAtlasAppApplication.h" #include "src/internal/QmitkDTIAtlasAppIntroPart.h" #include "src/internal/QmitkDTIAtlasAppPerspective.h" #include "src/internal/QmitkWelcomePerspective.h" #include #include QmitkDTIAtlasAppApplicationPlugin* QmitkDTIAtlasAppApplicationPlugin::inst = 0; QmitkDTIAtlasAppApplicationPlugin::QmitkDTIAtlasAppApplicationPlugin() : pluginListener(0) { inst = this; } QmitkDTIAtlasAppApplicationPlugin::~QmitkDTIAtlasAppApplicationPlugin() { delete pluginListener; } QmitkDTIAtlasAppApplicationPlugin* QmitkDTIAtlasAppApplicationPlugin::GetDefault() { return inst; } void QmitkDTIAtlasAppApplicationPlugin::start(ctkPluginContext* context) { berry::AbstractUICTKPlugin::start(context); this->context = context; BERRY_REGISTER_EXTENSION_CLASS(QmitkDTIAtlasAppApplication, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDTIAtlasAppIntroPart, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDTIAtlasAppPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkWelcomePerspective, context) // QString collectionFile = GetQtHelpCollectionFile(); // berry::QtAssistantUtil::SetHelpCollectionFile(collectionFile); // berry::QtAssistantUtil::SetDefaultHelpUrl("qthelp://org.mitk.gui.qt.dtiatlasapp/bundle/index.html"); delete pluginListener; pluginListener = new berry::QCHPluginListener(context); context->connectPluginListener(pluginListener, SLOT(pluginChanged(ctkPluginEvent)), Qt::DirectConnection); // register all QCH files from all the currently installed plugins pluginListener->processPlugins(); } QString QmitkDTIAtlasAppApplicationPlugin::GetQtHelpCollectionFile() const { if (!helpCollectionFile.isEmpty()) { return helpCollectionFile; } QString collectionFilename; QString na("n/a"); // if (na != MITK_REVISION) // collectionFilename = "MitkDTIAtlasAppQtHelpCollection_" MITK_REVISION ".qhc"; // else collectionFilename = "MitkDTIAtlasAppQtHelpCollection.qhc"; QFileInfo collectionFileInfo = context->getDataFile(collectionFilename); QFileInfo pluginFileInfo = QFileInfo(QUrl(context->getPlugin()->getLocation()).toLocalFile()); if (!collectionFileInfo.exists() || pluginFileInfo.lastModified() > collectionFileInfo.lastModified()) { // extract the qhc file from the plug-in QByteArray content = context->getPlugin()->getResource(collectionFilename); if (content.isEmpty()) { BERRY_WARN << "Could not get plug-in resource: " << collectionFilename.toStdString(); } else { QFile file(collectionFileInfo.absoluteFilePath()); file.open(QIODevice::WriteOnly); file.write(content); file.close(); } } if (QFile::exists(collectionFileInfo.absoluteFilePath())) { helpCollectionFile = collectionFileInfo.absoluteFilePath(); } return helpCollectionFile; } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_dtiatlasapp, QmitkDTIAtlasAppApplicationPlugin) - - +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_dtiatlasapp, QmitkDTIAtlasAppApplicationPlugin) +#endif diff --git a/Plugins/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.h b/Plugins/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.h index 01b83066ba..c7b74966c2 100644 --- a/Plugins/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.h +++ b/Plugins/org.mitk.gui.qt.dtiatlasapp/src/internal/QmitkDTIAtlasAppApplicationPlugin.h @@ -1,57 +1,60 @@ /*=================================================================== 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 QMITKDTIATLASAPPAPPLICATIONPLUGIN_H_ #define QMITKDTIATLASAPPAPPLICATIONPLUGIN_H_ #include #include #include #include class QmitkDTIAtlasAppApplicationPlugin : public QObject, public berry::AbstractUICTKPlugin { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_dtiatlasapp") +#endif Q_INTERFACES(ctkPluginActivator) public: QmitkDTIAtlasAppApplicationPlugin(); ~QmitkDTIAtlasAppApplicationPlugin(); static QmitkDTIAtlasAppApplicationPlugin* GetDefault(); ctkPluginContext* GetPluginContext() const; void start(ctkPluginContext*); QString GetQtHelpCollectionFile() const; private: static QmitkDTIAtlasAppApplicationPlugin* inst; ctkPluginContext* context; berry::QCHPluginListener* pluginListener; mutable QString helpCollectionFile; }; // QmitkDTIAtlasAppApplicationPlugin #endif // QMITKDTIATLASAPPAPPLICATIONPLUGIN_H_ diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.cpp b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.cpp index 3186d188e0..4dc0876202 100644 --- a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.cpp @@ -1,38 +1,40 @@ /*=================================================================== 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. ===================================================================*/ #include "org_mitk_gui_qt_eventrecorder_Activator.h" #include #include "InteractionEventRecorder.h" namespace mitk { void org_mitk_gui_qt_eventrecorder_Activator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(InteractionEventRecorder, context) } void org_mitk_gui_qt_eventrecorder_Activator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_eventrecorder, mitk::org_mitk_gui_qt_eventrecorder_Activator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_eventrecorder, mitk::org_mitk_gui_qt_eventrecorder_Activator) +#endif \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.h b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.h index a64fa7fcf5..b715022ba6 100644 --- a/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.h +++ b/Plugins/org.mitk.gui.qt.eventrecorder/src/internal/org_mitk_gui_qt_eventrecorder_Activator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 org_mitk_gui_qt_eventrecorder_Activator_h #define org_mitk_gui_qt_eventrecorder_Activator_h #include namespace mitk { class org_mitk_gui_qt_eventrecorder_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_eventrecorder") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // org_mitk_gui_qt_eventrecorder_Activator } #endif // org_mitk_gui_qt_eventrecorder_Activator_h diff --git a/Plugins/org.mitk.gui.qt.igtexamples/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.igtexamples/src/internal/mitkPluginActivator.cpp index f81bd5e67b..1bcd8603be 100644 --- a/Plugins/org.mitk.gui.qt.igtexamples/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.igtexamples/src/internal/mitkPluginActivator.cpp @@ -1,37 +1,39 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include "QmitkIGTTutorialView.h" #include "QmitkIGTTrackingLabView.h" #include namespace mitk { void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkIGTTutorialView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkIGTTrackingLabView, context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_igtexamples, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_igtexamples, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.gui.qt.igtexamples/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.igtexamples/src/internal/mitkPluginActivator.h index 12053e09e3..e6e9d7b23e 100644 --- a/Plugins/org.mitk.gui.qt.igtexamples/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.igtexamples/src/internal/mitkPluginActivator.h @@ -1,39 +1,42 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include #include namespace mitk { class MITK_LOCAL PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_igtexamples") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.igttracking/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.igttracking/src/internal/mitkPluginActivator.cpp index dac2744b3f..578dae18ac 100644 --- a/Plugins/org.mitk.gui.qt.igttracking/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.igttracking/src/internal/mitkPluginActivator.cpp @@ -1,52 +1,54 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include #include "QmitkMITKIGTNavigationToolManagerView.h" #include "QmitkMITKIGTTrackingToolboxView.h" #include "QmitkNavigationDataPlayerView.h" //#include //Workaround for bug in persistence module (see bug 16643 for details) //CAN BE REMOVED WHEN THE BUG IS FIXED namespace mitk { void PluginActivator::start(ctkPluginContext* context) { // mitk::PersistenceService::LoadModule(); //Workaround for bug in persistence module (see bug 16643 for details) //CAN BE REMOVED WHEN THE BUG IS FIXED BERRY_REGISTER_EXTENSION_CLASS(QmitkMITKIGTNavigationToolManagerView, context) BERRY_REGISTER_EXTENSION_CLASS( QmitkMITKIGTTrackingToolboxView , context) BERRY_REGISTER_EXTENSION_CLASS( QmitkNavigationDataPlayerView , context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_igttracking, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_igttracking, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.gui.qt.igttracking/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.igttracking/src/internal/mitkPluginActivator.h index bcc0aed5a2..968e2aad26 100644 --- a/Plugins/org.mitk.gui.qt.igttracking/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.igttracking/src/internal/mitkPluginActivator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include namespace mitk { class PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_igttracking") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.remeshing/src/internal/org_mitk_gui_qt_remeshing_Activator.cpp b/Plugins/org.mitk.gui.qt.remeshing/src/internal/org_mitk_gui_qt_remeshing_Activator.cpp index 2fe6042c78..1f552fe402 100644 --- a/Plugins/org.mitk.gui.qt.remeshing/src/internal/org_mitk_gui_qt_remeshing_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.remeshing/src/internal/org_mitk_gui_qt_remeshing_Activator.cpp @@ -1,30 +1,32 @@ /*=================================================================== 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. ===================================================================*/ #include "org_mitk_gui_qt_remeshing_Activator.h" #include "QmitkRemeshingView.h" #include void mitk::org_mitk_gui_qt_remeshing_Activator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkRemeshingView, context); } void mitk::org_mitk_gui_qt_remeshing_Activator::stop(ctkPluginContext*) { } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_remeshing, mitk::org_mitk_gui_qt_remeshing_Activator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_remeshing, mitk::org_mitk_gui_qt_remeshing_Activator) +#endif diff --git a/Plugins/org.mitk.gui.qt.remeshing/src/internal/org_mitk_gui_qt_remeshing_Activator.h b/Plugins/org.mitk.gui.qt.remeshing/src/internal/org_mitk_gui_qt_remeshing_Activator.h index 3ecd3b77b8..efce73c069 100644 --- a/Plugins/org.mitk.gui.qt.remeshing/src/internal/org_mitk_gui_qt_remeshing_Activator.h +++ b/Plugins/org.mitk.gui.qt.remeshing/src/internal/org_mitk_gui_qt_remeshing_Activator.h @@ -1,35 +1,38 @@ /*=================================================================== 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 org_mitk_gui_qt_remeshing_Activator_h #define org_mitk_gui_qt_remeshing_Activator_h #include namespace mitk { class org_mitk_gui_qt_remeshing_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_remeshing") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; } #endif diff --git a/Plugins/org.mitk.gui.qt.simulation/src/internal/org_mitk_gui_qt_simulation_Activator.cpp b/Plugins/org.mitk.gui.qt.simulation/src/internal/org_mitk_gui_qt_simulation_Activator.cpp index 90369e11b2..60f0d28cb2 100644 --- a/Plugins/org.mitk.gui.qt.simulation/src/internal/org_mitk_gui_qt_simulation_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.simulation/src/internal/org_mitk_gui_qt_simulation_Activator.cpp @@ -1,41 +1,43 @@ /*=================================================================== 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. ===================================================================*/ #include "org_mitk_gui_qt_simulation_Activator.h" #include "QmitkSimulationPreferencePage.h" #include "QmitkSimulationView.h" #include ctkPluginContext* mitk::org_mitk_gui_qt_simulation_Activator::Context = NULL; ctkPluginContext* mitk::org_mitk_gui_qt_simulation_Activator::GetContext() { return Context; } void mitk::org_mitk_gui_qt_simulation_Activator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkSimulationPreferencePage, context); BERRY_REGISTER_EXTENSION_CLASS(QmitkSimulationView, context); Context = context; } void mitk::org_mitk_gui_qt_simulation_Activator::stop(ctkPluginContext*) { Context = NULL; } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_simulation, mitk::org_mitk_gui_qt_simulation_Activator); +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_simulation, mitk::org_mitk_gui_qt_simulation_Activator) +#endif diff --git a/Plugins/org.mitk.gui.qt.simulation/src/internal/org_mitk_gui_qt_simulation_Activator.h b/Plugins/org.mitk.gui.qt.simulation/src/internal/org_mitk_gui_qt_simulation_Activator.h index 65e96a3771..c299e30a7b 100644 --- a/Plugins/org.mitk.gui.qt.simulation/src/internal/org_mitk_gui_qt_simulation_Activator.h +++ b/Plugins/org.mitk.gui.qt.simulation/src/internal/org_mitk_gui_qt_simulation_Activator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 org_mitk_gui_qt_simulation_Activator_h #define org_mitk_gui_qt_simulation_Activator_h #include namespace mitk { class org_mitk_gui_qt_simulation_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_simulation") +#endif Q_INTERFACES(ctkPluginActivator); public: static ctkPluginContext* GetContext(); void start(ctkPluginContext* context); void stop(ctkPluginContext*); private: static ctkPluginContext* Context; }; } #endif diff --git a/Plugins/org.mitk.gui.qt.toftutorial/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.toftutorial/src/internal/mitkPluginActivator.cpp index d6162b8a10..a0f199e44d 100644 --- a/Plugins/org.mitk.gui.qt.toftutorial/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.toftutorial/src/internal/mitkPluginActivator.cpp @@ -1,35 +1,37 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include #include "QmitkToFTutorialView.h" namespace mitk { void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkToFTutorialView, context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_toftutorial, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_toftutorial, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.gui.qt.toftutorial/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.toftutorial/src/internal/mitkPluginActivator.h index 489bd853ca..03aa373134 100644 --- a/Plugins/org.mitk.gui.qt.toftutorial/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.toftutorial/src/internal/mitkPluginActivator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include #include namespace mitk { class MITK_LOCAL PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_toftutorial") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.tofutil/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.tofutil/src/internal/mitkPluginActivator.cpp index 5a4c6d5d7e..547829cbea 100644 --- a/Plugins/org.mitk.gui.qt.tofutil/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.tofutil/src/internal/mitkPluginActivator.cpp @@ -1,37 +1,39 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include #include "QmitkToFUtilView.h" #include "QmitkToFDeviceGeneration.h" namespace mitk { void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkToFUtilView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkToFDeviceGeneration, context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_tofutil, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_tofutil, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.gui.qt.tofutil/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.tofutil/src/internal/mitkPluginActivator.h index 489bd853ca..c1daf6b9f3 100644 --- a/Plugins/org.mitk.gui.qt.tofutil/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.tofutil/src/internal/mitkPluginActivator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include #include namespace mitk { class MITK_LOCAL PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_tofutil") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.ugvisualization/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.ugvisualization/src/internal/mitkPluginActivator.cpp index 763d7135fc..a0ede4b27a 100644 --- a/Plugins/org.mitk.gui.qt.ugvisualization/src/internal/mitkPluginActivator.cpp +++ b/Plugins/org.mitk.gui.qt.ugvisualization/src/internal/mitkPluginActivator.cpp @@ -1,36 +1,38 @@ /*=================================================================== 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. ===================================================================*/ #include "mitkPluginActivator.h" #include #include "QmitkUGVisualizationView.h" namespace mitk { void PluginActivator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(QmitkUGVisualizationView, context) } void PluginActivator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_ugvisualization, mitk::PluginActivator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_ugvisualization, mitk::PluginActivator) +#endif diff --git a/Plugins/org.mitk.gui.qt.ugvisualization/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.ugvisualization/src/internal/mitkPluginActivator.h index 489bd853ca..4761cacfa1 100644 --- a/Plugins/org.mitk.gui.qt.ugvisualization/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.ugvisualization/src/internal/mitkPluginActivator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include #include namespace mitk { class MITK_LOCAL PluginActivator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_ugvisualization") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/Plugins/org.mitk.gui.qt.ultrasound/src/internal/org_mitk_gui_qt_ultrasound_Activator.cpp b/Plugins/org.mitk.gui.qt.ultrasound/src/internal/org_mitk_gui_qt_ultrasound_Activator.cpp index ef25db43db..04b614a8aa 100644 --- a/Plugins/org.mitk.gui.qt.ultrasound/src/internal/org_mitk_gui_qt_ultrasound_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.ultrasound/src/internal/org_mitk_gui_qt_ultrasound_Activator.cpp @@ -1,49 +1,51 @@ /*=================================================================== 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. ===================================================================*/ #include "org_mitk_gui_qt_ultrasound_Activator.h" #include #include "UltrasoundSupport.h" namespace mitk { ctkPluginContext* org_mitk_gui_qt_ultrasound_Activator::m_Context = 0; void org_mitk_gui_qt_ultrasound_Activator::start(ctkPluginContext* context) { m_Context = context; BERRY_REGISTER_EXTENSION_CLASS(UltrasoundSupport, context) } void org_mitk_gui_qt_ultrasound_Activator::stop(ctkPluginContext* context) { m_Context = 0; Q_UNUSED(context) } ctkPluginContext *org_mitk_gui_qt_ultrasound_Activator::GetContext() { return m_Context; } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_ultrasound, mitk::org_mitk_gui_qt_ultrasound_Activator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_ultrasound, mitk::org_mitk_gui_qt_ultrasound_Activator) +#endif diff --git a/Plugins/org.mitk.gui.qt.ultrasound/src/internal/org_mitk_gui_qt_ultrasound_Activator.h b/Plugins/org.mitk.gui.qt.ultrasound/src/internal/org_mitk_gui_qt_ultrasound_Activator.h index c34cbc0eda..54e46694f6 100644 --- a/Plugins/org.mitk.gui.qt.ultrasound/src/internal/org_mitk_gui_qt_ultrasound_Activator.h +++ b/Plugins/org.mitk.gui.qt.ultrasound/src/internal/org_mitk_gui_qt_ultrasound_Activator.h @@ -1,47 +1,50 @@ /*=================================================================== 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 org_mitk_gui_qt_ultrasound_Activator_h #define org_mitk_gui_qt_ultrasound_Activator_h #include namespace mitk { class org_mitk_gui_qt_ultrasound_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_ultrasound") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); static ctkPluginContext* GetContext(); private: static ctkPluginContext* m_Context; }; // org_mitk_gui_qt_ultrasound_Activator typedef org_mitk_gui_qt_ultrasound_Activator PluginActivator; } #endif // org_mitk_gui_qt_ultrasound_Activator_h diff --git a/Plugins/org.mitk.gui.qt.viewnavigator/src/internal/org_mitk_gui_qt_viewnavigator_Activator.cpp b/Plugins/org.mitk.gui.qt.viewnavigator/src/internal/org_mitk_gui_qt_viewnavigator_Activator.cpp index 50a638f6f0..d4dfcaa33e 100644 --- a/Plugins/org.mitk.gui.qt.viewnavigator/src/internal/org_mitk_gui_qt_viewnavigator_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.viewnavigator/src/internal/org_mitk_gui_qt_viewnavigator_Activator.cpp @@ -1,38 +1,40 @@ /*=================================================================== 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. ===================================================================*/ #include "org_mitk_gui_qt_viewnavigator_Activator.h" #include #include "ViewNavigatorView.h" namespace mitk { void org_mitk_gui_qt_viewnavigator_Activator::start(ctkPluginContext* context) { BERRY_REGISTER_EXTENSION_CLASS(ViewNavigatorView, context) } void org_mitk_gui_qt_viewnavigator_Activator::stop(ctkPluginContext* context) { Q_UNUSED(context) } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_viewnavigator, mitk::org_mitk_gui_qt_viewnavigator_Activator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_viewnavigator, mitk::org_mitk_gui_qt_viewnavigator_Activator) +#endif diff --git a/Plugins/org.mitk.gui.qt.viewnavigator/src/internal/org_mitk_gui_qt_viewnavigator_Activator.h b/Plugins/org.mitk.gui.qt.viewnavigator/src/internal/org_mitk_gui_qt_viewnavigator_Activator.h index 67ebc8166a..8f0d1acc9a 100644 --- a/Plugins/org.mitk.gui.qt.viewnavigator/src/internal/org_mitk_gui_qt_viewnavigator_Activator.h +++ b/Plugins/org.mitk.gui.qt.viewnavigator/src/internal/org_mitk_gui_qt_viewnavigator_Activator.h @@ -1,40 +1,43 @@ /*=================================================================== 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 org_mitk_gui_qt_viewnavigator_Activator_h #define org_mitk_gui_qt_viewnavigator_Activator_h #include namespace mitk { class org_mitk_gui_qt_viewnavigator_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_viewnavigator") +#endif Q_INTERFACES(ctkPluginActivator) public: void start(ctkPluginContext* context); void stop(ctkPluginContext* context); }; // org_mitk_gui_qt_viewnavigator_Activator } #endif // org_mitk_gui_qt_viewnavigator_Activator_h diff --git a/Plugins/org.mitk.gui.qt.xnat/src/internal/org_mitk_gui_qt_xnatinterface_Activator.cpp b/Plugins/org.mitk.gui.qt.xnat/src/internal/org_mitk_gui_qt_xnatinterface_Activator.cpp index 8792aaaa78..d6201dc46a 100644 --- a/Plugins/org.mitk.gui.qt.xnat/src/internal/org_mitk_gui_qt_xnatinterface_Activator.cpp +++ b/Plugins/org.mitk.gui.qt.xnat/src/internal/org_mitk_gui_qt_xnatinterface_Activator.cpp @@ -1,57 +1,59 @@ /*=================================================================== 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. ===================================================================*/ #include "org_mitk_gui_qt_xnatinterface_Activator.h" #include #include "QmitkXnatEditor.h" #include "QmitkXnatTreeBrowserView.h" #include "QmitkXnatConnectionPreferencePage.h" namespace mitk { ctkPluginContext* org_mitk_gui_qt_xnatinterface_Activator::m_Context = 0; QmitkXnatSessionManager* org_mitk_gui_qt_xnatinterface_Activator::GetXnatSessionManager() { static QmitkXnatSessionManager manager; return &manager; } ctkPluginContext* org_mitk_gui_qt_xnatinterface_Activator::GetContext() { return m_Context; } void org_mitk_gui_qt_xnatinterface_Activator::start(ctkPluginContext* context) { this->m_Context = context; BERRY_REGISTER_EXTENSION_CLASS(QmitkXnatEditor, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkXnatTreeBrowserView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkXnatConnectionPreferencePage, context) } void org_mitk_gui_qt_xnatinterface_Activator::stop(ctkPluginContext* context) { Q_UNUSED(context) this->m_Context = 0; } } -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_xnatinterface, mitk::org_mitk_gui_qt_xnatinterface_Activator) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_gui_qt_xnatinterface, mitk::org_mitk_gui_qt_xnatinterface_Activator) +#endif diff --git a/Plugins/org.mitk.gui.qt.xnat/src/internal/org_mitk_gui_qt_xnatinterface_Activator.h b/Plugins/org.mitk.gui.qt.xnat/src/internal/org_mitk_gui_qt_xnatinterface_Activator.h index 72b524c6d3..075d9063ff 100644 --- a/Plugins/org.mitk.gui.qt.xnat/src/internal/org_mitk_gui_qt_xnatinterface_Activator.h +++ b/Plugins/org.mitk.gui.qt.xnat/src/internal/org_mitk_gui_qt_xnatinterface_Activator.h @@ -1,48 +1,51 @@ /*=================================================================== 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 org_mitk_gui_qt_xnatinterface_Activator_h #define org_mitk_gui_qt_xnatinterface_Activator_h #include #include "QmitkXnatSessionManager.h" namespace mitk { class org_mitk_gui_qt_xnatinterface_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_xnatinterface") +#endif Q_INTERFACES(ctkPluginActivator) public: static QmitkXnatSessionManager* GetXnatSessionManager(); static ctkPluginContext* GetContext(); void start(ctkPluginContext* context); void stop(ctkPluginContext* context); private: static ctkPluginContext* m_Context; }; // org_mitk_gui_qt_xnatinterface_Activator } #endif // org_mitk_gui_qt_xnatinterface_Activator_h diff --git a/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp b/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp index 90895d08ff..1d74aa9eaa 100644 --- a/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp +++ b/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.cpp @@ -1,107 +1,109 @@ /*=================================================================== 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. ===================================================================*/ #include "org_mitk_simulation_Activator.h" #include #include #include #include #include #include #include #include #include #include static void RegisterSofaClasses() { int MeshMitkLoaderClass = sofa::core::RegisterObject("").add(); } static void LoadSofaPlugins() { berry::IPreferences::Pointer preferences = mitk::GetSimulationPreferences(); if (preferences.IsNull()) return; QString plugins = preferences->GetByteArray("plugins", "").c_str(); if (plugins.isEmpty()) return; QStringList pluginList = plugins.split(';', QString::SkipEmptyParts); QStringListIterator it(pluginList); typedef sofa::helper::system::PluginManager PluginManager; PluginManager& pluginManager = PluginManager::getInstance(); while (it.hasNext()) { std::string plugin = it.next().toStdString(); std::ostringstream errlog; pluginManager.loadPlugin(plugin, &errlog); if (errlog.str().empty()) pluginManager.getPluginMap()[plugin].initExternalModule(); } } static void AddPropertyFilters() { mitk::IPropertyFilters* filters = mitk::org_mitk_simulation_Activator::GetService(); if (filters == NULL) return; mitk::PropertyFilter filter; filter.AddEntry("layer", mitk::PropertyFilter::Blacklist); filter.AddEntry("name", mitk::PropertyFilter::Blacklist); filter.AddEntry("path", mitk::PropertyFilter::Blacklist); filter.AddEntry("selected", mitk::PropertyFilter::Blacklist); filter.AddEntry("visible", mitk::PropertyFilter::Blacklist); filters->AddFilter(filter, "Simulation"); } ctkPluginContext* mitk::org_mitk_simulation_Activator::Context = NULL; void mitk::org_mitk_simulation_Activator::start(ctkPluginContext* context) { Context = context; RegisterSimulationObjectFactory(); RegisterSofaClasses(); LoadSofaPlugins(); AddPropertyFilters(); QmitkNodeDescriptorManager* nodeDescriptorManager = QmitkNodeDescriptorManager::GetInstance(); if (nodeDescriptorManager != NULL) { mitk::NodePredicateDataType::Pointer simulationPredicate = mitk::NodePredicateDataType::New("Simulation"); nodeDescriptorManager->AddDescriptor(new QmitkNodeDescriptor("Simulation", ":/Simulation/SOFAIcon.png", simulationPredicate, nodeDescriptorManager)); } } void mitk::org_mitk_simulation_Activator::stop(ctkPluginContext*) { Context = NULL; } -Q_EXPORT_PLUGIN2(org_mitk_simulation, mitk::org_mitk_simulation_Activator); +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + Q_EXPORT_PLUGIN2(org_mitk_simulation, mitk::org_mitk_simulation_Activator) +#endif diff --git a/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.h b/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.h index dd1d1ef36c..723654d737 100644 --- a/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.h +++ b/Plugins/org.mitk.simulation/src/internal/org_mitk_simulation_Activator.h @@ -1,51 +1,54 @@ /*=================================================================== 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 org_mitk_simulation_Activator_h #define org_mitk_simulation_Activator_h #include namespace mitk { class org_mitk_simulation_Activator : public QObject, public ctkPluginActivator { Q_OBJECT +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "org_mitk_simulation") +#endif Q_INTERFACES(ctkPluginActivator); public: template static T* GetService() { if (Context == NULL) return NULL; ctkServiceReference serviceReference = Context->getServiceReference(); return serviceReference ? Context->getService(serviceReference) : NULL; } void start(ctkPluginContext* context); void stop(ctkPluginContext*); private: static ctkPluginContext* Context; }; } #endif