Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryIShellListener.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
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 
18 #ifndef BERRYISHELLLISTENER_H_
19 #define BERRYISHELLLISTENER_H_
20 
22 
23 #include "berryShellEvent.h"
24 
25 #include <berryMessage.h>
26 #include <berryMacros.h>
27 
28 namespace berry {
29 
45 {
46 
47  struct Events {
49 
50  enum Type {
51  NONE = 0x00000000,
52  ACTIVATED = 0x00000001,
53  CLOSED = 0x00000002,
54  DEACTIVATED = 0x00000004,
55  DEICONIFIED = 0x00000008,
56  ICONIFIED = 0x00000010,
57 
58  ALL = 0xffffffff
59  };
60 
61  Q_DECLARE_FLAGS(Types, Type)
62 
63  ShellEventType shellActivated;
64  ShellEventType shellClosed;
65  ShellEventType shellDeactivated;
66  ShellEventType shellDeiconified;
67  ShellEventType shellIconified;
68 
69  void AddListener(IShellListener* listener);
70  void RemoveListener(IShellListener* listener);
71 
72  private:
73 
75  };
76 
77  virtual ~IShellListener();
78 
84  virtual void ShellActivated(const ShellEvent::Pointer& e);
85 
91  virtual void ShellClosed(const ShellEvent::Pointer& e);
92 
98  virtual void ShellDeactivated(const ShellEvent::Pointer& e);
99 
105  virtual void ShellDeiconified(const ShellEvent::Pointer& e);
106 
112  virtual void ShellIconified(const ShellEvent::Pointer& e);
113 };
114 
115 }
116 
117 Q_DECLARE_OPERATORS_FOR_FLAGS(berry::IShellListener::Events::Types)
118 
119 #endif /* BERRYISHELLLISTENER_H_ */
itk::SmartPointer< Self > Pointer
Message1< const ShellEvent::Pointer & > ShellEventType
#define BERRY_UI_QT