Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkInteractionEventHandler.h>
Public Types | |
typedef InteractionEventHandler | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const |
virtual const char * | GetClassName () const |
bool | SetEventConfig (const std::string &filename, const us::Module *module=nullptr) |
Loads a configuration from an XML resource. More... | |
bool | SetEventConfig (const EventConfig &config) |
Loads a configuration from an EventConfig object. More... | |
EventConfig | GetEventConfig () const |
Returns the current configuration. More... | |
bool | AddEventConfig (const std::string &filename, const us::Module *module=nullptr) |
This method extends the configuration. More... | |
bool | AddEventConfig (const EventConfig &config) |
This method extends the configuration. The configuration from the EventConfig object is loaded and only the ones conflicting are replaced by the new one. This way several configurations can be combined. More... | |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
InteractionEventHandler () | |
~InteractionEventHandler () override | |
PropertyList::Pointer | GetAttributes () const |
std::string | MapToEventVariant (InteractionEvent *interactionEvent) |
virtual void | ConfigurationChanged () |
Definition at line 40 of file mitkInteractionEventHandler.h.
typedef itk::SmartPointer<const Self> mitk::InteractionEventHandler::ConstPointer |
Definition at line 43 of file mitkInteractionEventHandler.h.
Definition at line 43 of file mitkInteractionEventHandler.h.
Definition at line 43 of file mitkInteractionEventHandler.h.
typedef itk::Object mitk::InteractionEventHandler::Superclass |
Definition at line 43 of file mitkInteractionEventHandler.h.
|
protected |
Definition at line 16 of file mitkInteractionEventHandler.cpp.
|
overrideprotected |
Definition at line 20 of file mitkInteractionEventHandler.cpp.
bool mitk::InteractionEventHandler::AddEventConfig | ( | const std::string & | filename, |
const us::Module * | module = nullptr |
||
) |
This method extends the configuration.
The configuration from the resource provided is loaded and only the ones conflicting are replaced by the new one. This way several configuration files can be combined.
filename | The resource name relative to the Interactions resource folder. |
module | The module containing the resource. Defaults to the Mitk module. |
true
if the configuration was successfully added, false
otherwise. Definition at line 55 of file mitkInteractionEventHandler.cpp.
References mitk::EventConfig::AddConfig(), ConfigurationChanged(), mitk::EventConfig::IsValid(), and MITK_ERROR.
Referenced by mitk::InteractionSchemeSwitcher::SetInteractionScheme().
bool mitk::InteractionEventHandler::AddEventConfig | ( | const EventConfig & | config | ) |
This method extends the configuration. The configuration from the EventConfig object is loaded and only the ones conflicting are replaced by the new one. This way several configurations can be combined.
config | The EventConfig object whose configuration should be added. |
true
if the configuration was successfully added, false
otherwise. Definition at line 71 of file mitkInteractionEventHandler.cpp.
References mitk::EventConfig::AddConfig(), ConfigurationChanged(), mitk::EventConfig::IsValid(), and MITK_ERROR.
|
protectedvirtual |
Is called whenever a new config object ist set. Overwrite this method e.g. to initialize EventHandler with parameters in configuration file.
Reimplemented in mitk::PlanarFigureInteractor, mitk::DisplayInteractor, mitk::DisplayActionEventBroadcast, and mitk::ExampleInteractor.
Definition at line 112 of file mitkInteractionEventHandler.cpp.
Referenced by AddEventConfig(), and SetEventConfig().
|
protected |
Returns a PropertyList in which the parameters defined in the config file are listed.
Definition at line 87 of file mitkInteractionEventHandler.cpp.
References mitk::EventConfig::GetAttributes(), mitk::EventConfig::IsValid(), and MITK_ERROR.
Referenced by mitk::DisplayActionEventBroadcast::ConfigurationChanged(), mitk::DisplayInteractor::ConfigurationChanged(), mitk::PlanarFigureInteractor::ConfigurationChanged(), and mitk::PointSetDataInteractor::DataNodeChanged().
|
inlinevirtual |
Reimplemented in mitk::EventStateMachine, mitk::PointSetDataInteractor, mitk::DataInteractor, mitk::SinglePointDataInteractor, mitk::DisplayInteractor, and mitk::DisplayActionEventBroadcast.
Definition at line 43 of file mitkInteractionEventHandler.h.
|
virtual |
mitk::EventConfig mitk::InteractionEventHandler::GetEventConfig | ( | ) | const |
Returns the current configuration.
Definition at line 50 of file mitkInteractionEventHandler.cpp.
|
inlinestatic |
Definition at line 43 of file mitkInteractionEventHandler.h.
|
protected |
Definition at line 100 of file mitkInteractionEventHandler.cpp.
References mitk::EventConfig::GetMappedEvent(), and mitk::EventConfig::IsValid().
Referenced by mitk::EventStateMachine::GetExecutableTransition().
bool mitk::InteractionEventHandler::SetEventConfig | ( | const std::string & | filename, |
const us::Module * | module = nullptr |
||
) |
Loads a configuration from an XML resource.
Loads an event configuration from an XML resource file contained in the given module. Default is the Mitk module (core). The files have to be placed in the Resources/Interactions folder of their respective module. This method will remove all existing configuration and replaces it with the new one.
filename | The resource name relative to the Interactions resource folder. |
module | The module containing the resource. Defaults to the Mitk module. |
true
if the resource was successfully loaded, false
otherwise. Definition at line 24 of file mitkInteractionEventHandler.cpp.
References ConfigurationChanged(), mitk::EventConfig::IsValid(), and MITK_ERROR.
Referenced by mitk::Tool::Deactivated(), mitk::Tool::InitializeStateMachine(), mitk::BoundingShapeInteractor::RestoreNodeProperties(), and mitk::InteractionSchemeSwitcher::SetInteractionScheme().
bool mitk::InteractionEventHandler::SetEventConfig | ( | const EventConfig & | config | ) |
Loads a configuration from an EventConfig object.
Loads an event configuration from the given EventConfig object. This method will remove all existing configuration and replaces it with the new one.
config | The EventConfig object containing the new configuration. |
true
if the configuration was successfully loaded, false
otherwise. Definition at line 38 of file mitkInteractionEventHandler.cpp.
References ConfigurationChanged(), and mitk::EventConfig::IsValid().