diff --git a/Modules/Bundles/CMakeLists.txt b/Modules/Bundles/CMakeLists.txt index 8492cb0471..901d64463c 100644 --- a/Modules/Bundles/CMakeLists.txt +++ b/Modules/Bundles/CMakeLists.txt @@ -1,60 +1,61 @@ IF(MITK_USE_BLUEBERRY) SET(MITK_DEFAULT_SUBPROJECTS MITK-Plugins) SET(_mitk_bundles_default ) IF(QT4_FOUND) LIST(APPEND _mitk_bundles_default "org.mitk.gui.qt.imagenavigator") # BlueBerry depends on CTK which depends on Qt, so we # need the Qt include direcotries INCLUDE(${QT_USE_FILE}) ENDIF() SET(PLUGIN_EXCLUDE_LIST org.mitk.core.ext org.mitk.gui.qt.volumetry org.mitk.core.jobs org.mitk.diffusionimaging org.mitk.gui.qt.diffusionimaging org.mitk.gui.qt.ext org.mitk.gui.qt.extapplication org.mitk.gui.qt.datamanager org.mitk.gui.qt.regiongrowing org.mitk.gui.qt.segmentation org.mitk.planarfigure org.mitk.gui.qt.igtnavigationtoolmanager org.mitk.gui.qt.igttrackingtoolbox org.mitk.gui.qt.igttutorial org.mitk.gui.qt.igttoolpairnavigation org.mitk.gui.qt.basicimageprocessing org.mitk.gui.qt.colourimageprocessing org.mitk.gui.qt.navigationdataplayer org.mitk.gui.qt.tofutil org.mitk.gui.qt.toftutorial org.mitk.gui.qt.imagenavigator org.mitk.gui.qt.moviemaker org.mitk.gui.qt.deformableregistration org.mitk.gui.qt.rigidregistration org.mitk.gui.qt.imagestatistics org.mitk.gui.qt.materialeditor org.mitk.gui.qt.simpleexample org.mitk.gui.qt.ugvisualization org.mitk.gui.qt.measurement + org.mitk.gui.qt.simplemeasurement ) MACRO_COLLECT_PLUGINS(OUTPUT_DIR ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ExtBundles CACHE_PLUGIN_SOURCE_DIRS MITK_MODULES_PLUGIN_SOURCE_DIRS CACHE_PLUGIN_OUTPUT_DIRS MITK_MODULES_PLUGIN_OUTPUT_DIRS CACHE_PLUGIN_TARGETS MITK_MODULES_ENABLED_PLUGINS BUNDLE_LIST_PATH "${MITK_BINARY_DIR}/Bundles/MITKModulesBundleList.cmake" CMAKE_CACHE_PREFIX "MITK" PLUGIN_DEFAULT_ON ${_mitk_bundles_default} PLUGIN_EXCLUDES ${PLUGIN_EXCLUDE_LIST} ${MITK_BUILD_ALL_PLUGINS_OPTION}) ENDIF(MITK_USE_BLUEBERRY) diff --git a/Modules/Bundles/PluginList.cmake b/Modules/Bundles/PluginList.cmake index e410b3ec94..74a441d50a 100644 --- a/Modules/Bundles/PluginList.cmake +++ b/Modules/Bundles/PluginList.cmake @@ -1,31 +1,32 @@ SET(MITK_EXT_PLUGINS org.mitk.core.ext:ON org.mitk.core.jobs:OFF org.mitk.planarfigure:ON org.mitk.diffusionimaging:OFF org.mitk.gui.qt.ext:ON org.mitk.gui.qt.extapplication:ON org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.segmentation:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.igtnavigationtoolmanager:OFF org.mitk.gui.qt.igttoolpairnavigation:OFF org.mitk.gui.qt.igttrackingtoolbox:OFF org.mitk.gui.qt.regiongrowing:OFF org.mitk.gui.qt.navigationdataplayer:OFF org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.igttutorial:OFF org.mitk.gui.qt.colourimageprocessing:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.imagenavigator:OFF org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.deformableregistration:OFF org.mitk.gui.qt.rigidregistration:OFF org.mitk.gui.qt.imagestatistics:OFF org.mitk.gui.qt.volumetry:OFF org.mitk.gui.qt.materialeditor:OFF org.mitk.gui.qt.simpleexample:OFF org.mitk.gui.qt.ugvisualization:OFF org.mitk.gui.qt.measurement:OFF + org.mitk.gui.qt.simplemeasurement:OFF ) diff --git a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/CMakeLists.txt b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/CMakeLists.txt index d1fae30ab7..9337709b4a 100644 --- a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/CMakeLists.txt +++ b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/CMakeLists.txt @@ -1 +1,9 @@ -MACRO_CREATE_MITK_PLUGIN(QmitkExt) +# The project name must correspond to the directory name of your plug-in +# and must not contain periods. +PROJECT(org_mitk_gui_qt_simplemeasurement) + +MACRO_CREATE_MITK_CTK_PLUGIN( + EXPORT_DIRECTIVE MITK_QT_SIMPLEMEASUREMENT + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDENCIES QmitkExt +) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/META-INF/MANIFEST.MF b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/META-INF/MANIFEST.MF deleted file mode 100644 index 6f54f29cd2..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/META-INF/MANIFEST.MF +++ /dev/null @@ -1,6 +0,0 @@ -Manifest-Version: 1.0 -Bundle-Name: Simple Measurement -Bundle-SymbolicName: org.mitk.gui.qt.simplemeasurement -Bundle-Version: 1.0.0 -Bundle-Vendor: DKFZ, Medical and Biological Informatics -Require-Bundle: org.mitk.gui.qt.common \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/files.cmake b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/files.cmake index 3a082e69d6..67ae772f7c 100644 --- a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/files.cmake +++ b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/files.cmake @@ -1,33 +1,36 @@ SET(SRC_CPP_FILES ) SET(INTERNAL_CPP_FILES QmitkSimpleMeasurement.cpp + mitkPluginActivator.cpp ) SET(UI_FILES src/internal/QmitkSimpleMeasurementControls.ui ) SET(MOC_H_FILES src/internal/QmitkSimpleMeasurement.h + src/internal/mitkPluginActivator.h ) -SET(RESOURCE_FILES +SET(CACHED_RESOURCE_FILES resources/SimpleMeasurement.png + plugin.xml ) -SET(RES_FILES +SET(QRC_FILES ) -SET(CPP_FILES manifest.cpp) +SET(CPP_FILES) 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.simplemeasurement/manifest.cpp b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/manifest.cpp deleted file mode 100644 index 219e107880..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/manifest.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date: 2009-02-17 20:07:18 +0100 (Tue, 17 Feb 2009) $ -Version: $Revision: 14645 $ - -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 -#include "src/internal/QmitkSimpleMeasurement.h" - - -POCO_BEGIN_NAMED_MANIFEST(berryIViewPart, berry::IViewPart) - POCO_EXPORT_CLASS(QmitkSimpleMeasurement) -POCO_END_MANIFEST diff --git a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/manifest_headers.cmake b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/manifest_headers.cmake new file mode 100644 index 0000000000..30334f8bab --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "Simple Measurement") +set(Plugin-Version "1.0.0") +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.simplemeasurement/src/internal/QmitkSimpleMeasurement.h b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/QmitkSimpleMeasurement.h index bdb6df1bb3..0e0858c963 100644 --- a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/QmitkSimpleMeasurement.h +++ b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/QmitkSimpleMeasurement.h @@ -1,96 +1,102 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date: 2009-03-21 14:46:24 +0100 (Sat, 21 Mar 2009) $ Version: $Revision: 15412 $ 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. =========================================================================*/ #if !defined(QMITK_MEASUREMENT_H__INCLUDED) #define QMITK_MEASUREMENT_H__INCLUDED //#include "QmitkFunctionality.h" #include #include #include #include #include #include "ui_QmitkSimpleMeasurementControls.h" class QmitkStdMultiWidget; //!mm //class QmitkSimpleMeasurementControls; //! /*! \brief SimpleMeasurement Allows to measure distances, angles, etc. \sa QmitkFunctionality \ingroup org_mitk_gui_qt_simplemeasurement_internal */ class QmitkSimpleMeasurement : public QmitkFunctionality { Q_OBJECT public: + QmitkSimpleMeasurement() {} + QmitkSimpleMeasurement(const QmitkSimpleMeasurement& other) + { + Q_UNUSED(other) + throw std::runtime_error("Copy constructor not implemented"); + } virtual ~QmitkSimpleMeasurement(); virtual void Activated(); virtual void Deactivated(); virtual bool IsExclusiveFunctionality() const; /// /// Called when the selection in the workbench changed /// virtual void OnSelectionChanged(std::vector nodes); virtual void NodeRemoved(const mitk::DataNode* node); protected: // Pseudo Ctor void CreateQtPartControl(QWidget* parent); protected slots: void AddDistanceSimpleMeasurement(); void AddAngleSimpleMeasurement(); void AddPathSimpleMeasurement(); protected: /*! * controls containing sliders for scrolling through the slices */ Ui::QmitkSimpleMeasurementControls * m_Controls; /* * Interactor for performing the simplemeasurements. */ mitk::WeakPointer m_PointSetInteractor; /* * Interactor for performing the simplemeasurements. */ mitk::WeakPointer m_SelectedPointSetNode; /* * Node representing the PointSet last created. It is used to delete empty point sets. */ std::vector m_CreatedPointSetNodes; }; #endif // !defined(QMITK_MEASUREMENT_H__INCLUDED) diff --git a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/mitkPluginActivator.cpp b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/mitkPluginActivator.cpp new file mode 100644 index 0000000000..5a5a94721c --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/mitkPluginActivator.cpp @@ -0,0 +1,20 @@ +#include "mitkPluginActivator.h" +#include "QmitkSimpleMeasurement.h" + +#include + +namespace mitk { + +void PluginActivator::start(ctkPluginContext* context) +{ + BERRY_REGISTER_EXTENSION_CLASS(QmitkSimpleMeasurement, context) +} + +void PluginActivator::stop(ctkPluginContext* context) +{ + Q_UNUSED(context) +} + +} + +Q_EXPORT_PLUGIN2(org.mitk.gui.qt.simplemeasurement, mitk::PluginActivator) \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/mitkPluginActivator.h b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/mitkPluginActivator.h new file mode 100644 index 0000000000..70c968b98e --- /dev/null +++ b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/internal/mitkPluginActivator.h @@ -0,0 +1,23 @@ +#ifndef MITKPLUGINACTIVATOR_H +#define MITKPLUGINACTIVATOR_H + +#include + +namespace mitk { + +class PluginActivator : + public QObject, public ctkPluginActivator +{ + Q_OBJECT + Q_INTERFACES(ctkPluginActivator) + +public: + + void start(ctkPluginContext* context); + void stop(ctkPluginContext* context); + +}; // PluginActivator + +} + +#endif // MITKPLUGINACTIVATOR_H \ No newline at end of file diff --git a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/mitkQmitkSimpleMeasurementDll.h b/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/mitkQmitkSimpleMeasurementDll.h deleted file mode 100644 index 7b95a17bfb..0000000000 --- a/Modules/Bundles/org.mitk.gui.qt.simplemeasurement/src/mitkQmitkSimpleMeasurementDll.h +++ /dev/null @@ -1,41 +0,0 @@ -/*========================================================================= - -Program: Medical Imaging & Interaction Toolkit -Language: C++ -Date: $Date: 2009-02-10 14:14:32 +0100 (Tue, 10 Feb 2009) $ -Version: $Revision: 14620 $ - -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 MITKQTMEASUREMENTDLL_H_ -#define MITKQTMEASUREMENTDLL_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_application_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 -// MITK_QT_APP functions as being imported from a DLL, wheras this DLL sees symbols -// defined with this macro as being exported. -// -#if defined(_WIN32) && !defined(BERRY_STATIC) - #if defined(org_mitk_gui_qt_simplemeasurement_EXPORTS) - #define MITK_QT_MEASUREMENT __declspec(dllexport) - #else - #define MITK_QT_MEASUREMENT __declspec(dllimport) - #endif -#endif - -#if !defined(MITK_QT_MEASUREMENT) - #define MITK_QT_MEASUREMENT -#endif - -#endif /*MITKQTMEASUREMENTDLL_H_*/