Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkModuleTableModel.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,
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 QMITKMODULETABLEMODEL_H
18 #define QMITKMODULETABLEMODEL_H
19 
20 #include <QAbstractTableModel>
21 #include <QList>
22 
24 
25 namespace us
26 {
27  class ModuleContext;
28  class Module;
29 }
30 
31 class QmitkModuleTableModelPrivate;
32 
33 class MITKQTWIDGETSEXT_EXPORT QmitkModuleTableModel : public QAbstractTableModel
34 {
35 public:
36  QmitkModuleTableModel(QObject *parent = nullptr, us::ModuleContext *mc = nullptr);
38 
39 protected:
40  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
41 
42  int columnCount(const QModelIndex &parent = QModelIndex()) const override;
43 
44  QVariant data(const QModelIndex &index, int role) const override;
45 
46  QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
47 
48 private:
49  friend class QmitkModuleTableModelPrivate;
50 
51  void insertModule(us::Module *module);
52 
53  QmitkModuleTableModelPrivate *const d;
54 };
55 
56 #endif
#define MITKQTWIDGETSEXT_EXPORT