Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berryIShellListener.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 
14 #ifndef BERRYISHELLLISTENER_H_
15 #define BERRYISHELLLISTENER_H_
16 
18 
19 #include "berryShellEvent.h"
20 
21 #include <berryMessage.h>
22 #include <berryMacros.h>
23 
24 namespace berry {
25 
41 {
42 
43  struct Events {
45 
46  enum Type {
47  NONE = 0x00000000,
48  ACTIVATED = 0x00000001,
49  CLOSED = 0x00000002,
50  DEACTIVATED = 0x00000004,
51  DEICONIFIED = 0x00000008,
52  ICONIFIED = 0x00000010,
53 
54  ALL = 0xffffffff
55  };
56 
57  Q_DECLARE_FLAGS(Types, Type)
58 
59  ShellEventType shellActivated;
60  ShellEventType shellClosed;
61  ShellEventType shellDeactivated;
62  ShellEventType shellDeiconified;
63  ShellEventType shellIconified;
64 
65  void AddListener(IShellListener* listener);
66  void RemoveListener(IShellListener* listener);
67 
68  private:
69 
70  typedef MessageDelegate1<IShellListener, const ShellEvent::Pointer&> Delegate;
71  };
72 
73  virtual ~IShellListener();
74 
80  virtual void ShellActivated(const ShellEvent::Pointer& e);
81 
87  virtual void ShellClosed(const ShellEvent::Pointer& e);
88 
94  virtual void ShellDeactivated(const ShellEvent::Pointer& e);
95 
101  virtual void ShellDeiconified(const ShellEvent::Pointer& e);
102 
108  virtual void ShellIconified(const ShellEvent::Pointer& e);
109 };
110 
111 }
112 
113 Q_DECLARE_OPERATORS_FOR_FLAGS(berry::IShellListener::Events::Types)
114 
115 #endif /* BERRYISHELLLISTENER_H_ */
org_blueberry_ui_qt_Export.h
berryMacros.h
berryShellEvent.h
berryMessage.h
berry::Message1< const ShellEvent::Pointer & >
berry::MessageDelegate1
Definition: berryMessage.h:170
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berry::ShellEvent
Definition: berryShellEvent.h:33
berry::IShellListener::Events
Definition: berryIShellListener.h:43
berry::IShellListener
Definition: berryIShellListener.h:40
berry::IShellListener::Events::ShellEventType
Message1< const ShellEvent::Pointer & > ShellEventType
Definition: berryIShellListener.h:44
berry::IShellListener::Events::Type
Type
Definition: berryIShellListener.h:46
berry
Definition: QmitkPropertyItemModel.h:24