Medical Imaging Interaction Toolkit  2023.12.99-63768887
Medical Imaging Interaction Toolkit
berryViewTreeModel.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 BERRYVIEWTREEMODEL_H
14 #define BERRYVIEWTREEMODEL_H
15 
17 
18 #include <berrySmartPointer.h>
19 
20 #include <QAbstractItemModel>
21 
22 namespace berry {
23 
24 struct IViewRegistry;
25 struct IWorkbenchWindow;
26 
27 class BERRY_UI_QT ViewTreeModel : public QAbstractItemModel
28 {
29  Q_OBJECT
30 
31 public:
32 
33  ViewTreeModel(const IWorkbenchWindow* window,
34  QObject* parent = nullptr);
35 
36  ~ViewTreeModel() override;
37 
38  enum Role {
39  Description = Qt::UserRole,
41  Id
42  };
43 
44  QVariant data(const QModelIndex &index, int role) const override;
45  Qt::ItemFlags flags(const QModelIndex& index) const override;
46  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
47  QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
48  QModelIndex parent(const QModelIndex &child) const override;
49  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
50  int columnCount(const QModelIndex &parent = QModelIndex()) const override;
51 
52  const IWorkbenchWindow* GetWorkbenchWindow() const;
53 
54 private:
55 
56  struct Impl;
57  QScopedPointer<Impl> d;
58 };
59 
60 }
61 
62 #endif // BERRYVIEWTREEMODEL_H
org_blueberry_ui_qt_Export.h
berry::IWorkbenchWindow
Definition: berryIWorkbenchWindow.h:62
berry::ViewTreeModel
Definition: berryViewTreeModel.h:27
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berry::ViewTreeModel::Keywords
@ Keywords
Definition: berryViewTreeModel.h:40
berrySmartPointer.h
berry::ViewTreeModel::Role
Role
Definition: berryViewTreeModel.h:38
berry
Definition: QmitkPropertyItemModel.h:24