13 #ifndef QmitkRenderWindowDataNodeTableModel_h
14 #define QmitkRenderWindowDataNodeTableModel_h
63 using NodeList = QList<mitk::DataNode::Pointer>;
73 QModelIndex
index(
int row,
int column,
const QModelIndex& parent = QModelIndex())
const override;
74 QModelIndex
parent(
const QModelIndex& child)
const override;
76 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
77 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
79 QVariant
data(
const QModelIndex& index,
int role)
const override;
80 bool setData(
const QModelIndex& index,
const QVariant& value,
int role = Qt::EditRole)
override;
82 Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
87 QMimeData*
mimeData(
const QModelIndexList& indexes)
const override;
90 bool dropMimeData(
const QMimeData* data, Qt::DropAction action,
int row,
int column,
const QModelIndex& parent)
override;
99 std::unique_ptr<mitk::RenderWindowLayerController> m_RenderWindowLayerController;
104 QIcon m_InvisibleIcon;
Table model that manages data nodes for a specific render window.
QmitkRenderWindowDataNodeTableModel(QObject *parent=nullptr)
Qt::DropActions supportedDropActions() const override
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
QVariant data(const QModelIndex &index, int role) const override
QModelIndex parent(const QModelIndex &child) const override
QList< mitk::DataNode::Pointer > NodeList
Convenience type alias for a list of data node pointers.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
void NodesLayerMoved(QSet< mitk::DataNode * > nodes, int layer)
void SetDataStorage(mitk::DataStorage *dataStorage)
Sets the data storage to use.
Qt::DropActions supportedDragActions() const override
mitk::BaseRenderer::Pointer GetCurrentRenderer() const
Returns the current renderer.
QMimeData * mimeData(const QModelIndexList &indexes) const override
void SetCurrentSelection(NodeList selectedNodes)
Sets the current selection of data nodes.
Qt::ItemFlags flags(const QModelIndex &index) const override
void moveNodesLayer(QSet< mitk::DataNode * > movedNodes, int targetLayer)
void SetCurrentRenderer(mitk::BaseRenderer *baseRenderer)
Sets the current renderer whose layer stack is displayed.
NodeList GetCurrentSelection() const
Returns the currently selected data nodes.
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
QStringList mimeTypes() const override
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
int columnCount(const QModelIndex &parent=QModelIndex()) const override
void UpdateModelData()
Updates the model data from the data storage for the current renderer.
Organizes the rendering process.
Abstract data management class that organizes DataNode objects in a directed acyclic graph.