Medical Imaging Interaction Toolkit  2021.10.99-fd647480
Medical Imaging Interaction Toolkit
berryISelectionService.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 #ifndef BERRYISELECTIONSERVICE_H_
14 #define BERRYISELECTIONSERVICE_H_
15 
17 
18 #include "berryISelection.h"
20 #include "berryIWorkbenchPart.h"
21 
22 #include <berryMessage.h>
23 
24 namespace berry {
25 
42 
43  struct SelectionEvents {
44 
47 
48  SelectionEvent selectionChanged;
49  SelectionEvent postSelectionChanged;
50 
51  };
52 
53  virtual ~ISelectionService();
54 
55  //virtual SelectionEvents& GetSelectionEvents(const QString& partId = "") = 0;
56 
63  virtual void AddSelectionListener(ISelectionListener* listener) = 0;
64 
83  virtual void AddSelectionListener(const QString& partId, ISelectionListener* listener) = 0;
84 
95  virtual void AddPostSelectionListener(ISelectionListener* listener) = 0;
96 
115  virtual void AddPostSelectionListener(const QString& partId,
116  ISelectionListener* listener) = 0;
117 
125  virtual ISelection::ConstPointer GetSelection() const = 0;
126 
136  virtual ISelection::ConstPointer GetSelection(const QString& partId) = 0;
137 
144  virtual void RemoveSelectionListener(ISelectionListener* listener) = 0;
145 
154  virtual void RemoveSelectionListener(const QString& partId,
155  ISelectionListener* listener) = 0;
156 
163  virtual void RemovePostSelectionListener(ISelectionListener* listener) = 0;
164 
173  virtual void RemovePostSelectionListener(const QString& partId,
174  ISelectionListener* listener) = 0;
175 };
176 
177 } // namespace berry
178 
179 Q_DECLARE_INTERFACE(berry::ISelectionService, "org.blueberry.ui.ISelectionService")
180 
181 #endif /*BERRYISELECTIONSERVICE_H_*/
Message2< IWorkbenchPart::Pointer, ISelection::ConstPointer > SelectionEvent
MessageDelegate2< ISelectionListener, IWorkbenchPart::Pointer, ISelection::ConstPointer > Delegate
#define BERRY_UI_QT