Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
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 (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 QmitkFunctionalityCoordinator_h
15 #define QmitkFunctionalityCoordinator_h
16 
17 #include <berryIPartListener.h>
18 #include <berryIWindowListener.h>
19 #include <berryIWorkbenchWindow.h>
20 
21 #include <set>
22 #include <org_mitk_gui_qt_common_legacy_Export.h>
23 
24 class QmitkFunctionality;
25 
31 class MITK_QT_COMMON_LEGACY QmitkFunctionalityCoordinator : virtual public berry::IPartListener, virtual public berry::IWindowListener
32 {
33 public:
34 
36 
38 
42  void Start();
43 
47  void Stop();
48 
49  //#IPartListener methods (these methods internally call Activated() or other similar methods)
53  berry::IPartListener::Events::Types GetPartEventTypes() const override;
57  void PartActivated (const berry::IWorkbenchPartReference::Pointer& partRef) override;
61  void PartDeactivated(const berry::IWorkbenchPartReference::Pointer& /*partRef*/) override;
65  void PartOpened(const berry::IWorkbenchPartReference::Pointer& partRef) override;
69  void PartClosed (const berry::IWorkbenchPartReference::Pointer& partRef) override;
73  void PartHidden (const berry::IWorkbenchPartReference::Pointer& partRef) override;
77  void PartVisible (const berry::IWorkbenchPartReference::Pointer& partRef) override;
78 
82  void WindowClosed(const berry::IWorkbenchWindow::Pointer& window) override;
83 
87  void WindowOpened(const berry::IWorkbenchWindow::Pointer& /*window*/) override;
88 
89 protected:
93  void ActivateStandaloneFunctionality(berry::IWorkbenchPartReference *partRef);
97  void DeactivateStandaloneFunctionality(berry::IWorkbenchPartReference *functionality, berry::IWorkbenchPartReference *newRef);
106 
110  std::set<QmitkFunctionality*> m_Functionalities;
114  std::set<berry::IWorkbenchPartReference*> m_VisibleStandaloneFunctionalities;
115 };
116 
117 #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