13 #ifndef QmitkDataStorageTreeModel_h
14 #define QmitkDataStorageTreeModel_h
22 #include <QAbstractListModel>
64 virtual QList<mitk::DataNode::Pointer> GetNodeSet()
const;
77 void SetPlaceNewNodesOnTop(
bool _PlaceNewNodesOnTop);
81 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
82 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
83 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
84 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
85 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
91 QModelIndex index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
92 QModelIndex parent(
const QModelIndex &index)
const override;
94 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
95 bool setHeaderData(
int section, Qt::Orientation orientation,
const QVariant &value,
int role = Qt::EditRole)
override;
97 const QMimeData *data, Qt::DropAction action,
int row,
int column,
const QModelIndex &parent)
override;
98 Qt::DropActions supportedDropActions()
const override;
99 Qt::DropActions supportedDragActions()
const override;
100 QStringList mimeTypes()
const override;
101 QMimeData *mimeData(
const QModelIndexList &indexes)
const override;
103 static QMimeData *mimeDataFromModelIndexList(
const QModelIndexList &indexes);
116 void SetDataStorageDeleted();
138 void SetAllowHierarchyChange(
bool allowHierarchyChange);
142 void nodeVisibilityChanged();
149 QList<TreeItem *> ToTreeItemPtrList(
const QMimeData *mimeData);
150 QList<TreeItem *> ToTreeItemPtrList(
const QByteArray &ba);
155 void AdjustLayerProperty();
159 TreeItem *TreeItemFromIndex(
const QModelIndex &index)
const;
163 QModelIndex IndexFromTreeItem(
TreeItem *)
const;
171 void TreeToVector(
TreeItem *parent, std::vector<TreeItem *> &vec)
const;
175 void TreeToNodeSet(
TreeItem *parent, QList<mitk::DataNode::Pointer> &vec)
const;
206 unsigned long m_DataStorageDeletedTag;