17 #ifndef QMITKDATASTORAGETREEMODEL_H_
18 #define QMITKDATASTORAGETREEMODEL_H_
26 #include <QAbstractListModel>
59 virtual QList<mitk::DataNode::Pointer> GetNodeSet()
const;
72 void SetPlaceNewNodesOnTop(
bool _PlaceNewNodesOnTop);
76 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
77 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
78 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
79 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
80 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
86 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
87 QModelIndex parent(
const QModelIndex &index)
const override;
89 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
90 bool setHeaderData(
int section, Qt::Orientation orientation,
const QVariant &value,
int role = Qt::EditRole)
override;
92 const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent)
override;
93 Qt::DropActions supportedDropActions()
const override;
94 Qt::DropActions supportedDragActions()
const override;
95 QStringList mimeTypes()
const override;
96 QMimeData *mimeData(
const QModelIndexList &indexes)
const override;
98 static QMimeData *mimeDataFromModelIndexList(
const QModelIndexList &indexes);
111 void SetDataStorageDeleted(
const itk::Object *_DataStorage);
133 void SetAllowHierarchyChange(
bool allowHierarchyChange);
155 int IndexOfChild(
const TreeItem *item)
const;
159 TreeItem *GetChild(
int index)
const;
167 int GetChildCount()
const;
171 int GetIndex()
const;
183 std::vector<TreeItem *> GetChildren()
const;
197 void InsertChild(
TreeItem *item,
int index = -1);
211 QList<TreeItem *> ToTreeItemPtrList(
const QMimeData *mimeData);
212 QList<TreeItem *> ToTreeItemPtrList(
const QByteArray &ba);
217 void AdjustLayerProperty();
221 TreeItem *TreeItemFromIndex(
const QModelIndex &index)
const;
225 QModelIndex IndexFromTreeItem(
TreeItem *)
const;
233 void TreeToVector(
TreeItem *parent, std::vector<TreeItem *> &vec)
const;
237 void TreeToNodeSet(
TreeItem *parent, QList<mitk::DataNode::Pointer> &vec)
const;
Data management class that handles 'was created by' relations.
bool m_PlaceNewNodesOnTop
static void Update(vtkPolyData *)
static mitk::DataStorage::Pointer GetDataStorage()
bool m_BlockDataStorageEvents
Flag to block the data storage events if nodes are added/removed by this class.
bool m_AllowHierarchyChange
static const std::string COLUMN_TYPE
static const std::string COLUMN_VISIBILITY
mitk::WeakPointer< mitk::DataStorage > m_DataStorage
static const std::string COLUMN_NAME
mitk::NodePredicateBase::Pointer m_Predicate
mitk::DataNode::Pointer m_DataNode
bool GetPlaceNewNodesOnTopFlag()
std::vector< TreeItem * > m_Children
Class for nodes of the DataTree.