Page MenuHomePhabricator

Redesign QmitkFunctionality/Basic GUI Module concept
Closed, ResolvedPublic

Description

The QmitkFunctionality class - or in general the basic GUI-module concept - was clear and reasonable in Qt3 versions and very important to MITK developers as it was easy to integrate a new module. Now, as MITK moved to Qt4 and a lot of new things were integrated, the class or the concept should be redesigned considering the following points:

  • Activated/Deactivated states: At which point should a functionality remove special interactors or other things or in general: how does a view interact with other views
  • Common access to the current DataManager selection -> SelectionEvents
  • Valid bundle/module generator (also standalone projects? -> versioning)
  • Common access to the DataStorage
  • Common access to the MultiWidget
  • Common access to the help system
  • Common access to functionality preferences
  • GUI Testing
  • Stable interface

Any more points?
Maybe this can be done in a bugsquashing session

Event Timeline

Thanks for starting this. Especially the different states should be thought about and at least be well documented. I would add:

  • Visible (after "show view") / invisible (after clicking the cross) / hidden
  • more possible uses of the selection mechanism

not to forget: Memento state restoring (do not store GUI properties in the preferences)

Ok, we should about this soon if we want to change something for the release.

I just committed with revision 21527 (T3115) code which should fix the close/reset perspective problem. However, some code in QmitkFunctionality leads to a seg fault when reopening a perspective. Please check that the following works after the redesign:

  • Start the ExtApp
  • Click Window->Close Perspective
  • Click Window->Open Perspective->Research

If we provide virtual methods in QmitkFunctionality which mimick the semantics of berry::IPartListener, we should probably stick to the same naming conventions (PartActivated, PartVisible, etc.) and not change their meaning (i.e. the logic at which point they are called).

Michi, you probably already implemented the methods, but what about dedicated methods like FunctionalityActivated, FunctionalityDeactivated etc. for registering/unregistering interactors for example?

[SVN revision 21583]
FIX (#3225): Adding redesigned QmitkFunctionality class. See specification page for further details. Adapated (parts of) ImageStatistics, PropertyList, Measurement and DataManager

[SVN revision 21584]
COMP (#3225): Fixed method name PartClosed -> ClosePart

[SVN revision 21585]
COMP (#3225): Fixed enum scope

[SVN revision 21586]
COMP (#3225): Removed unnecessary |

[SVN revision 21587]
COMP (#3225): Fixed use of PartClose method. Renamed to ClosePart

[SVN revision 21588]
COMP (#3225): Fixed use of PartClose method. Renamed to ClosePart

[SVN revision 21620]
ENH (#3225):

  • fixed doxygen reference
  • don't focus multi-widget editor when opening it (this messes with the restored active part on app startup)

closing this. see specification for further details. in case of errors or problems, open up other bugs.

[SVN revision 21664]
FIX (#3225): Adapted documentation for IsExclusiveFunctionality

[SVN revision 21686]
ENH (#3225): Added GetCurrentSelection() method

[SVN revision 21923]
FIX (#3225): QmitkFunctionality does not inherit from ISelectionProvider anymore and is therefore not set as the Site`s selection provider which caused a smart pointer cycle. Instead, an inner class is implemented as selectionprovider and used by QmitkFunctionalities

[SVN revision 21924]
COMP (#3225): removing warnings

[SVN revision 22076]
CHG (#3225): FireNodeSelected now takes a vector of DataNode raw pointers instead of DataNode SmartPointers (for consistency with OnSelectionChanged())

closing now, nothign more to do