Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
QmitkFunctionalityCoordinator.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,
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 QmitkFunctionalityCoordinator_h
19 #define QmitkFunctionalityCoordinator_h
20 
21 #include <berryIPartListener.h>
22 #include <berryIWindowListener.h>
23 #include <berryIWorkbenchWindow.h>
24 
25 #include <set>
27 
28 class QmitkFunctionality;
29 
36 {
37 public:
38 
40 
42 
46  void Start();
47 
51  void Stop();
52 
53  //#IPartListener methods (these methods internally call Activated() or other similar methods)
57  berry::IPartListener::Events::Types GetPartEventTypes() const override;
61  virtual void PartActivated (const berry::IWorkbenchPartReference::Pointer& partRef) override;
65  virtual void PartDeactivated(const berry::IWorkbenchPartReference::Pointer& /*partRef*/) override;
69  virtual void PartOpened(const berry::IWorkbenchPartReference::Pointer& partRef) override;
73  virtual void PartClosed (const berry::IWorkbenchPartReference::Pointer& partRef) override;
77  virtual void PartHidden (const berry::IWorkbenchPartReference::Pointer& partRef) override;
81  virtual void PartVisible (const berry::IWorkbenchPartReference::Pointer& partRef) override;
82 
86  virtual void WindowClosed(const berry::IWorkbenchWindow::Pointer& window) override;
87 
91  virtual void WindowOpened(const berry::IWorkbenchWindow::Pointer& /*window*/) override;
92 
93 protected:
97  void ActivateStandaloneFunctionality(berry::IWorkbenchPartReference *partRef);
101  void DeactivateStandaloneFunctionality(berry::IWorkbenchPartReference *functionality, berry::IWorkbenchPartReference *newRef);
110 
114  std::set<QmitkFunctionality*> m_Functionalities;
118  std::set<berry::IWorkbenchPartReference*> m_VisibleStandaloneFunctionalities;
119 };
120 
121 #endif // QmitkFunctionalityCoordinator_h
virtual void PartHidden(const IWorkbenchPartReference::Pointer &)
virtual void WindowClosed(const IWorkbenchWindow::Pointer &)
std::set< berry::IWorkbenchPartReference * > m_VisibleStandaloneFunctionalities
virtual void PartOpened(const IWorkbenchPartReference::Pointer &)
virtual void PartDeactivated(const IWorkbenchPartReference::Pointer &)
virtual void WindowOpened(const IWorkbenchWindow::Pointer &)
virtual void PartActivated(const IWorkbenchPartReference::Pointer &)
virtual void PartClosed(const IWorkbenchPartReference::Pointer &)
The base class of all MITK related blueberry views (~ in the old version of MITK, this was called "Fu...
virtual void PartVisible(const IWorkbenchPartReference::Pointer &)
berry::IWorkbenchPartReference * m_StandaloneFuntionality
berry::IWorkbenchWindow::WeakPtr m_Window
std::set< QmitkFunctionality * > m_Functionalities
virtual Events::Types GetPartEventTypes() const =0