Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryISelectionService.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 #ifndef BERRYISELECTIONSERVICE_H_
18 #define BERRYISELECTIONSERVICE_H_
19 
21 
22 #include "berryISelection.h"
24 #include "berryIWorkbenchPart.h"
25 
26 #include <berryMessage.h>
27 
28 namespace berry {
29 
46 
47  struct SelectionEvents {
48 
51 
52  SelectionEvent selectionChanged;
53  SelectionEvent postSelectionChanged;
54 
55  };
56 
57  virtual ~ISelectionService();
58 
59  //virtual SelectionEvents& GetSelectionEvents(const QString& partId = "") = 0;
60 
67  virtual void AddSelectionListener(ISelectionListener* listener) = 0;
68 
87  virtual void AddSelectionListener(const QString& partId, ISelectionListener* listener) = 0;
88 
99  virtual void AddPostSelectionListener(ISelectionListener* listener) = 0;
100 
119  virtual void AddPostSelectionListener(const QString& partId,
120  ISelectionListener* listener) = 0;
121 
129  virtual ISelection::ConstPointer GetSelection() const = 0;
130 
140  virtual ISelection::ConstPointer GetSelection(const QString& partId) = 0;
141 
148  virtual void RemoveSelectionListener(ISelectionListener* listener) = 0;
149 
158  virtual void RemoveSelectionListener(const QString& partId,
159  ISelectionListener* listener) = 0;
160 
167  virtual void RemovePostSelectionListener(ISelectionListener* listener) = 0;
168 
177  virtual void RemovePostSelectionListener(const QString& partId,
178  ISelectionListener* listener) = 0;
179 };
180 
181 } // namespace berry
182 
183 Q_DECLARE_INTERFACE(berry::ISelectionService, "org.blueberry.ui.ISelectionService")
184 
185 #endif /*BERRYISELECTIONSERVICE_H_*/
Message2< IWorkbenchPart::Pointer, ISelection::ConstPointer > SelectionEvent
MessageDelegate2< ISelectionListener, IWorkbenchPart::Pointer, ISelection::ConstPointer > Delegate
#define BERRY_UI_QT