Medical Imaging Interaction Toolkit  2016.11.0
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,
6  Division of Medical and Biological Informatics.
7  All rights reserved.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without
10  even the implied warranty of MERCHANTABILITY or FITNESS FOR
11  A PARTICULAR PURPOSE.
12 
13  See LICENSE.txt or http://www.mitk.org for details.
14 
15  ===================================================================*/
16 
17 #include "mitkInteractionEvent.h"
18 #include "mitkException.h"
19 
20 const std::string mitk::InteractionEvent::KeyEsc = "Escape";
21 const std::string mitk::InteractionEvent::KeyEnter = "Enter";
22 const std::string mitk::InteractionEvent::KeyReturn = "Return";
23 const std::string mitk::InteractionEvent::KeyDelete = "Delete";
24 const std::string mitk::InteractionEvent::KeyArrowUp = "ArrowUp";
25 const std::string mitk::InteractionEvent::KeyArrowDown = "ArrowDown";
26 const std::string mitk::InteractionEvent::KeyArrowLeft = "ArrowLeft";
27 const std::string mitk::InteractionEvent::KeyArrowRight = "ArrowRight";
28 
29 const std::string mitk::InteractionEvent::KeyF1 = "F1";
30 const std::string mitk::InteractionEvent::KeyF2 = "F2";
31 const std::string mitk::InteractionEvent::KeyF3 = "F3";
32 const std::string mitk::InteractionEvent::KeyF4 = "F4";
33 const std::string mitk::InteractionEvent::KeyF5 = "F5";
34 const std::string mitk::InteractionEvent::KeyF6 = "F6";
35 const std::string mitk::InteractionEvent::KeyF7 = "F7";
36 const std::string mitk::InteractionEvent::KeyF8 = "F8";
37 const std::string mitk::InteractionEvent::KeyF9 = "F9";
38 const std::string mitk::InteractionEvent::KeyF10 = "F10";
39 const std::string mitk::InteractionEvent::KeyF11 = "F11";
40 const std::string mitk::InteractionEvent::KeyF12 = "F12";
41 
42 const std::string mitk::InteractionEvent::KeyPos1 = "Pos1";
43 const std::string mitk::InteractionEvent::KeyEnd = "End";
44 const std::string mitk::InteractionEvent::KeyInsert = "Insert";
45 const std::string mitk::InteractionEvent::KeyPageUp = "PageUp";
46 const std::string mitk::InteractionEvent::KeyPageDown = "PageDown";
47 const std::string mitk::InteractionEvent::KeySpace = "Space";
48 
49 mitk::InteractionEvent::InteractionEvent(BaseRenderer *baseRenderer) : m_Sender(baseRenderer)
50 {
51 }
52 
54 {
55  m_Sender = sender;
56 }
57 
59 {
60  return m_Sender;
61 }
62 
64 {
65  return true;
66 }
67 
69 {
70 }
71 
73 {
74  return (dynamic_cast<InteractionEvent *>(baseClass.GetPointer()) != NULL);
75 }
76 
78 {
79  return (typeid(a) == typeid(b) && a.IsEqual(b));
80 }
81 
83 {
84  return !(a == b);
85 }
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
BaseRenderer * GetSender() const
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)
static const std::string KeyEnter
static const std::string KeyF7
static const std::string KeyArrowDown
static const std::string KeyF2
static const std::string KeyF11
virtual bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const
virtual bool IsEqual(const InteractionEvent &other) const
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)