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:
Maximum convenience for QmitkFunctionality authors
- Intuitive handling (e.g. how public functions are called)
- Interface stability (no further changes needed)
The first goal can be subdivided in providing methods for the following methods:
Access to the DataStorage
Access to the StdMultiWidget
- Access to and update notification for the functionality/view preferences
Access to and update notification for the current DataTreeNode selection / to DataTreeNode selection events send through the SelectionService
Methods to send DataTreeNode selections through the SelectionService
- Very important: Some events for unproblematic View interaction (Activated/Deactivated)
- 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:
Calling StdMultiWidgetAvailable, StdMultiWidgetClosed, StdMultiWidgetNotAvailable (which are deprecated, but should nevertheless still be called as long as functionalities are using it)
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
