diff --git a/Plugins/org.mitk.gui.common/files.cmake b/Plugins/org.mitk.gui.common/files.cmake index d2ef71d786..44a5d0d931 100644 --- a/Plugins/org.mitk.gui.common/files.cmake +++ b/Plugins/org.mitk.gui.common/files.cmake @@ -1,31 +1,35 @@ set(MOC_H_FILES src/internal/org_mitk_gui_common_Activator.h ) set(SRC_CPP_FILES mitkDataNodeObject.cpp mitkDataNodeSelection.cpp mitkDataStorageEditorInput.cpp mitkILifecycleAwarePart.h + mitkILifecycleAwarePart.cpp mitkILinkedRenderWindowPart.h + mitkILinkedRenderWindowPart.cpp mitkIRenderingManager.cpp mitkIRenderWindowPart.cpp mitkIRenderWindowPartListener.h + mitkIRenderWindowPartListener.cpp mitkIZombieViewPart.h + mitkIZombieViewPart.cpp mitkWorkbenchUtil.cpp ) set(INTERNAL_CPP_FILES org_mitk_gui_common_Activator.cpp ) #set(CPP_FILES manifest.cpp) foreach(file ${SRC_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) set(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.common/src/mitkILifecycleAwarePart.cpp b/Plugins/org.mitk.gui.common/src/mitkILifecycleAwarePart.cpp new file mode 100644 index 0000000000..2da9e18b6e --- /dev/null +++ b/Plugins/org.mitk.gui.common/src/mitkILifecycleAwarePart.cpp @@ -0,0 +1,26 @@ +/*=================================================================== + +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 "mitkILifecycleAwarePart.h" + +namespace mitk { + +ILifecycleAwarePart::~ILifecycleAwarePart() +{ + +} + + +} diff --git a/Plugins/org.mitk.gui.common/src/mitkILifecycleAwarePart.h b/Plugins/org.mitk.gui.common/src/mitkILifecycleAwarePart.h index e53ded00d0..90a63f22d4 100644 --- a/Plugins/org.mitk.gui.common/src/mitkILifecycleAwarePart.h +++ b/Plugins/org.mitk.gui.common/src/mitkILifecycleAwarePart.h @@ -1,59 +1,61 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision: 18127 $ 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 MITKILIFECYCLEAWAREPART_H #define MITKILIFECYCLEAWAREPART_H +#include + namespace mitk { /** * \ingroup org_mitk_gui_common * * \brief Interface for a MITK Workbench part which wants to be notified about lifecycle changes. * * This interface is intended to be implemented by subclasses of berry::IWorkbenchPart. MITK Workbench parts * implementing this interface will be notified about their lifecycle changes. The same effect could * be achieved by registering a custom berry::IPartListener. * * \note There are no "Closed()" or "Opened()" methods. These correspond to the constructor and * desctructor of the Workbench part class. * * \see berry::IPartListener * \see mitk::IZombieViewPart */ -struct ILifecycleAwarePart +struct MITK_GUI_COMMON_PLUGIN ILifecycleAwarePart { - virtual ~ILifecycleAwarePart() {} + virtual ~ILifecycleAwarePart(); /** \see berry::IPartListener::PartActivated */ virtual void Activated() = 0; /** \see berry::IPartListener::PartDeactivated */ virtual void Deactivated() = 0; /** \see berry::IPartListener::PartVisible */ virtual void Visible() = 0; /** \see berry::IPartListener::PartHidden */ virtual void Hidden() = 0; }; } #endif // MITKILIFECYCLEAWAREPART_H diff --git a/Plugins/org.mitk.gui.common/src/mitkILinkedRenderWindowPart.cpp b/Plugins/org.mitk.gui.common/src/mitkILinkedRenderWindowPart.cpp new file mode 100644 index 0000000000..c8a8bdb8f4 --- /dev/null +++ b/Plugins/org.mitk.gui.common/src/mitkILinkedRenderWindowPart.cpp @@ -0,0 +1,26 @@ +/*=================================================================== + +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 "mitkILinkedRenderWindowPart.h" + +namespace mitk { + +ILinkedRenderWindowPart::~ILinkedRenderWindowPart() +{ + +} + + +} diff --git a/Plugins/org.mitk.gui.common/src/mitkILinkedRenderWindowPart.h b/Plugins/org.mitk.gui.common/src/mitkILinkedRenderWindowPart.h index 2cc427f485..a0266f7f99 100644 --- a/Plugins/org.mitk.gui.common/src/mitkILinkedRenderWindowPart.h +++ b/Plugins/org.mitk.gui.common/src/mitkILinkedRenderWindowPart.h @@ -1,91 +1,93 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ 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 MITKILINKEDRENDERWINDOWPART_H #define MITKILINKEDRENDERWINDOWPART_H #include "mitkIRenderWindowPart.h" namespace mitk { class SlicesRotator; class SlicesSwiveller; /** * \ingroup org_mitk_gui_common * * \brief Extends the IRenderWindowPart interface with methods for controlling linked * render windows. * * This inteface should be implemented by subclasses of berry::IWorkbenchPart if they * provided several linked QmitkRenderWindow instances. */ -struct ILinkedRenderWindowPart : public virtual IRenderWindowPart { +struct MITK_GUI_COMMON_PLUGIN ILinkedRenderWindowPart : public virtual IRenderWindowPart { + + ~ILinkedRenderWindowPart(); /** * Get the mitk::SlicesRotator. * * \return A mitk::SlicesRotator instance if rotating slices is supported; * NULL otherwise. */ virtual mitk::SlicesRotator* GetSlicesRotator() const = 0; /** * Get the mitk::SlicesSwiveller. * * \return A mitk::SlicesSwiveller instance if swivelling slices is supported; * NULL otherwise. */ virtual mitk::SlicesSwiveller* GetSlicesSwiveller() const = 0; /** * Enable or disable the slicing planes linking the QmitkRenderWindow instances. * * \param enable true if the slicing planes should be enabled; * false otherwise. */ virtual void EnableSlicingPlanes(bool enable) = 0; /** * Get the enabled status of the slicing planes. * * \return true if the slicing planes are enabled; false * otherwise. */ virtual bool IsSlicingPlanesEnabled() const = 0; /** * Enable or disalbe linked navigation. * * \param enable If true, setting the selected position in one QmitkRenderWindow * affects the positions in the linked windows. If false, linked navigation * is disabled. */ virtual void EnableLinkedNavigation(bool enable) = 0; /** * Get the enabled status of linked navigation. * * \return true if linked navigation is enabled; false * otherwise. */ virtual bool IsLinkedNavigationEnabled() const = 0; }; } #endif // MITKILINKEDRENDERWINDOWPART_H diff --git a/Plugins/org.mitk.gui.common/src/mitkIRenderWindowPartListener.cpp b/Plugins/org.mitk.gui.common/src/mitkIRenderWindowPartListener.cpp new file mode 100644 index 0000000000..b3411534b4 --- /dev/null +++ b/Plugins/org.mitk.gui.common/src/mitkIRenderWindowPartListener.cpp @@ -0,0 +1,27 @@ +/*=================================================================== + +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 "mitkIRenderWindowPartListener.h" + +namespace mitk { + +IRenderWindowPartListener::~IRenderWindowPartListener() +{ + +} + + +} diff --git a/Plugins/org.mitk.gui.common/src/mitkIRenderWindowPartListener.h b/Plugins/org.mitk.gui.common/src/mitkIRenderWindowPartListener.h index b7abf8b0a2..310652ecbe 100644 --- a/Plugins/org.mitk.gui.common/src/mitkIRenderWindowPartListener.h +++ b/Plugins/org.mitk.gui.common/src/mitkIRenderWindowPartListener.h @@ -1,59 +1,61 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision: 18127 $ 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 MITKIRENDERWINDOWPARTLISTENER_H #define MITKIRENDERWINDOWPARTLISTENER_H +#include + namespace mitk { struct IRenderWindowPart; /** * \ingroup org_mitk_gui_common * * \brief Interface for berry::IViewPart implementations to be notified about mitk::IRenderWindowPart lifecycle changes. * * This interface is intended to be implemented by subclasses of berry::IWorkbenchPart. If implemented, * the interface methods are called automatically if a Workbench part which implementes mitk::IRenderWindowPart * is activated or deactivated. * * The notion of activated and deactivated is slightly different from the usual Workbench part lifecycle. */ -struct IRenderWindowPartListener +struct MITK_GUI_COMMON_PLUGIN IRenderWindowPartListener { - virtual ~IRenderWindowPartListener() {} + virtual ~IRenderWindowPartListener(); /** * Called when a IRenderWindowPart is activated or if it becomes visible and no * other IRenderWindowPart was activated before. * * \param renderWindowPart The newly activated IRenderWindowPart. */ virtual void RenderWindowPartActivated(mitk::IRenderWindowPart* renderWindowPart) = 0; /** * Called when a IRenderWindowPart becomes invisible and if it was active before. * * \param renderWindowPart The deactivated IRenderWindowPart. */ virtual void RenderWindowPartDeactivated(mitk::IRenderWindowPart* renderWindowPart) = 0; }; } #endif // MITKIRENDERWINDOWPARTLISTENER_H diff --git a/Plugins/org.mitk.gui.common/src/mitkIZombieViewPart.cpp b/Plugins/org.mitk.gui.common/src/mitkIZombieViewPart.cpp new file mode 100644 index 0000000000..12887b7e48 --- /dev/null +++ b/Plugins/org.mitk.gui.common/src/mitkIZombieViewPart.cpp @@ -0,0 +1,28 @@ +/*=================================================================== + +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 "mitkIZombieViewPart.h" + +#include "berryIWorkbenchPartReference.h" + +namespace mitk { + +IZombieViewPart::~IZombieViewPart() +{ + +} + + +}