Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
mitkInteractionKeyEvent.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 
14 
16  const std::string &key,
17  ModifierKeys modifiers = ControlKey)
18  : InteractionEvent(baseRenderer), m_Key(key), m_Modifiers(modifiers)
19 {
20 }
21 
23 {
24  return m_Modifiers;
25 }
26 
28 {
29  return m_Key;
30 }
31 
33 {
34 }
35 
37 {
38  const auto &keyEvent = static_cast<const Self &>(interactionEvent);
39  return (this->GetModifiers() == keyEvent.GetModifiers() && this->GetKey() == keyEvent.GetKey() &&
40  Superclass::IsEqual(interactionEvent));
41 }
42 
44 {
45  return (dynamic_cast<InteractionKeyEvent *>(baseClass.GetPointer()) != nullptr);
46 }
Organizes the rendering process.
virtual bool IsEqual(const InteractionEvent &other) const
bool IsEqual(const InteractionEvent &) const override
InteractionKeyEvent(BaseRenderer *, const std::string &key, ModifierKeys modifiers)
bool IsSuperClassOf(const InteractionEvent::Pointer &baseClass) const override