Medical Imaging Interaction Toolkit  2018.4.99-b7f3afaa
Medical Imaging Interaction Toolkit
mitkInteractionEvent.cpp
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 #include "mitkInteractionEvent.h"
14 #include "mitkException.h"
15 
16 const std::string mitk::InteractionEvent::KeyEsc = "Escape";
17 const std::string mitk::InteractionEvent::KeyEnter = "Enter";
18 const std::string mitk::InteractionEvent::KeyReturn = "Return";
19 const std::string mitk::InteractionEvent::KeyDelete = "Delete";
20 const std::string mitk::InteractionEvent::KeyArrowUp = "ArrowUp";
21 const std::string mitk::InteractionEvent::KeyArrowDown = "ArrowDown";
22 const std::string mitk::InteractionEvent::KeyArrowLeft = "ArrowLeft";
23 const std::string mitk::InteractionEvent::KeyArrowRight = "ArrowRight";
24 
25 const std::string mitk::InteractionEvent::KeyF1 = "F1";
26 const std::string mitk::InteractionEvent::KeyF2 = "F2";
27 const std::string mitk::InteractionEvent::KeyF3 = "F3";
28 const std::string mitk::InteractionEvent::KeyF4 = "F4";
29 const std::string mitk::InteractionEvent::KeyF5 = "F5";
30 const std::string mitk::InteractionEvent::KeyF6 = "F6";
31 const std::string mitk::InteractionEvent::KeyF7 = "F7";
32 const std::string mitk::InteractionEvent::KeyF8 = "F8";
33 const std::string mitk::InteractionEvent::KeyF9 = "F9";
34 const std::string mitk::InteractionEvent::KeyF10 = "F10";
35 const std::string mitk::InteractionEvent::KeyF11 = "F11";
36 const std::string mitk::InteractionEvent::KeyF12 = "F12";
37 
38 const std::string mitk::InteractionEvent::KeyPos1 = "Pos1";
39 const std::string mitk::InteractionEvent::KeyEnd = "End";
40 const std::string mitk::InteractionEvent::KeyInsert = "Insert";
41 const std::string mitk::InteractionEvent::KeyPageUp = "PageUp";
42 const std::string mitk::InteractionEvent::KeyPageDown = "PageDown";
43 const std::string mitk::InteractionEvent::KeySpace = "Space";
44 
45 mitk::InteractionEvent::InteractionEvent(BaseRenderer *baseRenderer) : m_Sender(baseRenderer)
46 {
47 }
48 
50 {
51  m_Sender = sender;
52 }
53 
55 {
56  return m_Sender;
57 }
58 
60 {
61  return true;
62 }
63 
65 {
66 }
67 
69 {
70  return (dynamic_cast<InteractionEvent *>(baseClass.GetPointer()) != nullptr);
71 }
72 
74 {
75  return (typeid(a) == typeid(b) && a.IsEqual(b));
76 }
77 
79 {
80  return !(a == b);
81 }
static const std::string KeyF1
static const std::string KeyF12
static const std::string KeyF9
static const std::string KeyF4
MITKCORE_EXPORT bool operator!=(const InteractionEvent &a, const InteractionEvent &b)
static const std::string KeyPos1
static const std::string KeyF10
static const std::string KeyEsc
static const std::string KeyArrowLeft
static const std::string KeySpace
Organizes the rendering process.
static const std::string KeyEnd
static const std::string KeyArrowRight
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
virtual bool IsEqual(const InteractionEvent &other) const
static const std::string KeyEnter
BaseRenderer * GetSender() const
static const std::string KeyF7
virtual bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const
static const std::string KeyArrowDown
static const std::string KeyF2
static const std::string KeyF11
static const std::string KeyInsert
static const std::string KeyDelete
static const std::string KeyF5
static const std::string KeyF6
static const std::string KeyF3
static const std::string KeyF8
static const std::string KeyPageDown
static const std::string KeyReturn
static const std::string KeyArrowUp
static const std::string KeyPageUp
void SetSender(BaseRenderer *sender)