Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
berryQtSelectionProvider.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 BERRYQTSELECTIONPROVIDER_H_
14 #define BERRYQTSELECTIONPROVIDER_H_
15 
17 
19 
20 #include <QItemSelectionModel>
21 #include <QItemSelection>
22 #include <QObject>
23 
24 namespace berry
25 {
26 
27 class BERRY_UI_QT QtSelectionProvider: public QObject,
28  public ISelectionProvider
29 {
30  Q_OBJECT
31 
32 public:
33 
35 
37 
38  void AddSelectionChangedListener(ISelectionChangedListener* listener) override;
39 
40  void RemoveSelectionChangedListener(ISelectionChangedListener* listener) override;
41 
42  ISelection::ConstPointer GetSelection() const override;
43  void SetSelection(const ISelection::ConstPointer& selection) override;
44 
45  virtual void SetSelection(const ISelection::ConstPointer& selection,
46  QItemSelectionModel::SelectionFlags);
47 
48  QItemSelection GetQItemSelection() const;
49  void SetQItemSelection(const QItemSelection& selection);
50 
51  QItemSelectionModel* GetItemSelectionModel() const;
52  void SetItemSelectionModel(QItemSelectionModel* combo);
53 
54 protected:
56  QItemSelectionModel* qSelectionModel;
57 
58 protected slots:
59 
60  virtual void FireSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
61 
62 };
63 
64 }
65 
66 #endif /* BERRYQTSELECTIONPROVIDER_H_ */
org_blueberry_ui_qt_Export.h
berry::SmartPointer
Implements transparent reference counting.
Definition: berryICommandCategoryListener.h:21
berry::ISelectionChangedListener::Events
Definition: berryISelectionChangedListener.h:40
berry::QtSelectionProvider::qSelectionModel
QItemSelectionModel * qSelectionModel
Definition: berryQtSelectionProvider.h:56
berry::ISelectionChangedListener
Definition: berryISelectionChangedListener.h:37
berry::ISelectionProvider
Definition: berryISelectionProvider.h:33
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berry::QtSelectionProvider::selectionEvents
ISelectionChangedListener::Events selectionEvents
Definition: berryQtSelectionProvider.h:55
berryISelectionProvider.h
berry::QtSelectionProvider
Definition: berryQtSelectionProvider.h:27
berryObjectMacro
#define berryObjectMacro(...)
Definition: berryMacros.h:33
berry
Definition: QmitkPropertyItemModel.h:24