Medical Imaging Interaction Toolkit  2018.4.99-08619e4f
Medical Imaging Interaction Toolkit
mitkInteractionEventHandler.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MITKEVENTHANDLER_H_
14 #define MITKEVENTHANDLER_H_
15 
16 #include "itkLightObject.h"
17 #include "itkObjectFactory.h"
18 
19 #include "mitkCommon.h"
20 #include "mitkEventConfig.h"
21 #include "mitkPropertyList.h"
22 #include <MitkCoreExports.h>
23 
24 #include <string>
25 
26 namespace us
27 {
28  class Module;
29 }
30 
31 namespace mitk
32 {
39  class InteractionEvent;
40  class MITKCORE_EXPORT InteractionEventHandler : public itk::Object
41  {
42  public:
44 
59  bool SetEventConfig(const std::string &filename, const us::Module *module = nullptr);
60 
72  bool SetEventConfig(const EventConfig &config);
73 
78  EventConfig GetEventConfig() const;
79 
92  bool AddEventConfig(const std::string &filename, const us::Module *module = nullptr);
93 
105  bool AddEventConfig(const EventConfig &config);
106 
107  protected:
109  ~InteractionEventHandler() override;
110 
114  PropertyList::Pointer GetAttributes() const;
115 
116  std::string MapToEventVariant(InteractionEvent *interactionEvent);
117 
122  virtual void ConfigurationChanged();
123 
124  private:
125  EventConfig m_EventConfig;
126  };
127 
128 } /* namespace mitk */
129 #endif /* MITKEVENTHANDLER_H_ */
#define MITKCORE_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
Configuration Object for Statemachines.