Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Base class to implement InteractionEventObservers. More...
#include <mitkInteractionEventObserver.h>
Public Member Functions | |
InteractionEventObserver () | |
virtual | ~InteractionEventObserver () |
virtual void | Notify (InteractionEvent *interactionEvent, bool isHandled)=0 |
void | Disable () |
void | Enable () |
bool | IsEnabled () const |
Base class to implement InteractionEventObservers.
This class also provides state machine infrastructure, but usage thereof is optional. See the Notify method for more information.
Definition at line 37 of file mitkInteractionEventObserver.h.
mitk::InteractionEventObserver::InteractionEventObserver | ( | ) |
Definition at line 19 of file mitkInteractionEventObserver.cpp.
|
virtual |
Definition at line 23 of file mitkInteractionEventObserver.cpp.
void mitk::InteractionEventObserver::Disable | ( | ) |
Definition at line 27 of file mitkInteractionEventObserver.cpp.
void mitk::InteractionEventObserver::Enable | ( | ) |
Definition at line 32 of file mitkInteractionEventObserver.cpp.
bool mitk::InteractionEventObserver::IsEnabled | ( | ) | const |
Definition at line 37 of file mitkInteractionEventObserver.cpp.
Referenced by mitk::Dispatcher::ProcessEvent().
|
pure virtual |
By this method all registered EventObersers are notified about every InteractionEvent, the isHandled flag indicates if a DataInteractor has already handled that event. InteractionEventObserver that trigger an action when observing an event may consider this in order to not confuse the user by, triggering several independent action with one single user event (such as a mouse click)
If you want to use the InteractionEventObserver as a state machine give the event to the state machine by implementing, e.g.
This overwrites the FilterEvents function of the EventStateMachine to ignore the DataNode, since InteractionEventObservers are not associated with one. virtual bool FilterEvents(InteractionEvent* interactionEvent, DataNode* dataNode);
Implemented in mitk::Tool, QmitkFreeSurferParcellationHandler, mitk::EventRecorder, and mitk::DisplayInteractor.
Referenced by mitk::Dispatcher::ProcessEvent().