Locked History Attachments

ChangeRequests/3225

Summary of feature description

The current implementation of the QmitkFunctionality is somehow untransparent. The class and the interaction between QmitkFunctionalities should be redesigned with the following goals in mind:

  1. Maximum convenience for QmitkFunctionality authors

  2. Intuitive handling (e.g. how public functions are called)
  3. Interface stability (no further changes needed)

The first goal can be subdivided in providing methods for the following methods:

  1. Access to the DataStorage

  2. Access to the StdMultiWidget

  3. Access to and update notification for the functionality/view preferences
  4. Access to and update notification for the current DataTreeNode selection / to DataTreeNode selection events send through the SelectionService

  5. Methods to send DataTreeNode selections through the SelectionService

  6. Very important: Some events for unproblematic View interaction (Activated/Deactivated)
  7. Some minor important convenience methods (like changing the mouse cursor/exception handling)

The second goal involves the following steps:

  • Refactoring of the QmitkFunctionality class (remove unnecessary methods/code)

  • Add a fully documented interface

The third goal is implicitly reached by finishing step 1 and 2.

Proposed solution

  • Changes in QmitkFunctionality: Adding convinience methods (see doxygen documentation), adding a lot of documentation

  • Adding a QmitkFunctionalityCoordinator class, which does the following:

    1. Calling StdMultiWidgetAvailable, StdMultiWidgetClosed, StdMultiWidgetNotAvailable (which are deprecated, but should nevertheless still be called as long as functionalities are using it)

    2. Calling Activated/Deactivated appropriately: Please read Documentation of QmitkFunctionality::IsExclusiveFunctionality() which describes everything related to Activated/Deactivated

  • Changes in QmitkExtWorkbenchWindowAdvisor: Inherits now from QmitkCommonWorkbenchWindowAdvisor which is an intermediate WorkbenchWindowAdvisor for common !Qmitk tasks concerning MITK Workbenches and not application specific as QmitkExtWorkbenchWindowAdvisor

  • Adding QmitkCommonWorkbenchWindowAdvisor which creates the single QmitkFunctionalityCoordinator instance and adds it as PartListener to the Workbench

Affected classes

Modified classes:

  • QmitkFunctionality (CoreUI/Bundles/org.mitk.gui.qt.common)

  • QmitkExtWorkbenchWindowAdvisor (Modules/Bundles/org.mitk.gui.qt.ext)

New classes

  • QmitkFunctionalityCoordinator (CoreUI/Bundles/org.mitk.gui.qt.common)

  • QmitkCommonWorkbenchWindowAdvisor (Modules/Bundles/org.mitk.gui.qt.ext)

How will the bugfix get tested?

  • A graphical test is would involve a lot of effort and additional testing code
  • Therefore: Manual testing (Debugging) and an instensive Code review