Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
Medical Imaging Interaction Toolkit
QmitkDataStorageDefaultListModel.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 QMITKDATASTORAGEDEFAULTLISTMODEL_H
14 #define QMITKDATASTORAGEDEFAULTLISTMODEL_H
15 
16 #include <MitkQtWidgetsExports.h>
17 
18 // qt widgets module
20 
28 {
29  Q_OBJECT
30 
31 public:
32 
33  QmitkDataStorageDefaultListModel(QObject *parent);
34 
35  // override from 'QmitkAbstractDataStorageModel'
36  /*
37  * @brief See 'QmitkAbstractDataStorageModel'
38  */
39  void DataStorageChanged() override;
40  /*
41  * @brief See 'QmitkAbstractDataStorageModel'
42  */
43  void NodePredicateChanged() override;
44  /*
45  * @brief See 'QmitkAbstractDataStorageModel'
46  */
47  void NodeAdded(const mitk::DataNode* node) override;
48  /*
49  * @brief See 'QmitkAbstractDataStorageModel'
50  */
51  void NodeChanged(const mitk::DataNode* node) override;
52  /*
53  * @brief See 'QmitkAbstractDataStorageModel'
54  */
55  void NodeRemoved(const mitk::DataNode* node) override;
56 
57  // override pure virtual from 'QAbstractItemModel'
58  QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
59  QModelIndex parent(const QModelIndex &child) const override;
60 
61  int rowCount(const QModelIndex &parent = QModelIndex()) const override;
62  int columnCount(const QModelIndex &parent = QModelIndex()) const override;
63 
64  QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
65 
66  // override for customization
67  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
68  Qt::ItemFlags flags(const QModelIndex &index) const override;
69 
70 protected:
71 
72  virtual void UpdateModelData();
73 
74  std::vector<mitk::DataNode::Pointer> m_DataNodes;
75 
76 };
77 
78 #endif // QMITKDATASTORAGEDEFAULTLISTMODEL_H
virtual void NodePredicateChanged()=0
virtual void DataStorageChanged()=0
The &#39;QmitkDataStorageDefaultListModel&#39; is a basic list model, derived from the &#39;QmitkAbstractDataStor...
#define MITKQTWIDGETS_EXPORT
virtual void NodeChanged(const mitk::DataNode *node)=0
std::vector< mitk::DataNode::Pointer > m_DataNodes
virtual void NodeRemoved(const mitk::DataNode *node)=0
virtual void NodeAdded(const mitk::DataNode *node)=0
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63