Medical Imaging Interaction Toolkit  2024.06.00
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
QmitkAbstractDataStorageModel::DataStorageChanged
virtual void DataStorageChanged()=0
MITKQTWIDGETS_EXPORT
#define MITKQTWIDGETS_EXPORT
Definition: MitkQtWidgetsExports.h:15
QmitkDataStorageDefaultListModel::m_DataNodes
std::vector< mitk::DataNode::Pointer > m_DataNodes
Definition: QmitkDataStorageDefaultListModel.h:74
QmitkAbstractDataStorageModel::NodeRemoved
virtual void NodeRemoved(const mitk::DataNode *node)=0
QmitkAbstractDataStorageModel::NodeChanged
virtual void NodeChanged(const mitk::DataNode *node)=0
QmitkAbstractDataStorageModel.h
MitkQtWidgetsExports.h
QmitkAbstractDataStorageModel::NodeAdded
virtual void NodeAdded(const mitk::DataNode *node)=0
QmitkDataStorageDefaultListModel
The 'QmitkDataStorageDefaultListModel' is a basic list model, derived from the 'QmitkAbstractDataStor...
Definition: QmitkDataStorageDefaultListModel.h:27
QmitkAbstractDataStorageModel
Definition: QmitkAbstractDataStorageModel.h:40
mitk::DataNode
Class for nodes of the DataTree.
Definition: mitkDataNode.h:63
QmitkAbstractDataStorageModel::NodePredicateChanged
virtual void NodePredicateChanged()=0