Added comments and refactored according to review in T24216
Description
Description
Details
Details
- Provenance
kalali Authored on Apr 11 2018, 1:31 PM kalali Pushed on Apr 11 2018, 1:32 PM - Parents
- rMITK251e40159685: wip: include recent ideas for display action events and their handling
- Branches
- Unknown
- Tags
Event Timeline
/Modules/Core/src/Interactions/mitkStdDisplayActionEventHandler.cpp | ||
---|---|---|
58–61 | Here we are connecting some default events, that are predefined inside this class. | |
64 | An example of such a default action on the move event. | |
67 | We are basically doing the same as in the 'CustomDisplayActionEventHandler'. The difference is that we don't insert the std::function from outside but directly have it here inside the 'Connect'-function. Basically, we would move the command-initialization, setting it as an observer and pushing the tag to a list to a commonly accessible function (in the base class) and leave the implementation specific creation of the action functions and filter functions to the 'StdDisplayActionEventHandler'. However, this means, that we don't need a ''CustomDisplayActionEventHandler'' as everything could already be done by this base-class. So should we go back to a "subclass-approach"? |
/Modules/Core/src/Interactions/mitkStdDisplayActionEventHandler.cpp | ||
---|---|---|
58–61 | I think the extraction as a default connect would be basically a good idea. The criteria I see are
I see no problem with number 2. With number 1 I am not quite sure for all functions. But it would not heard to make them globally reusable for other that want to behave like the StdDisplayActionEventHandler. If the concrete implementation of the connection should be refactored (e.g. CrosshairEvent does not effect all registered render windows but only a subset (e.g. those of the same stdmultiwidget) is another topic and should be discussed in context (may be best in an explicit reafactoring task when the first draft is done and running. | |
64 | Yes. see above. | |
67 | I think it is a good idea. |