13 #ifndef QmitkDataStorageLayerStackModel_h
14 #define QmitkDataStorageLayerStackModel_h
112 QModelIndex
index(
int row,
int column,
const QModelIndex& parent)
const;
120 QModelIndex
parent(
const QModelIndex& child)
const;
130 Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
142 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
150 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
158 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
174 QVariant
data(
const QModelIndex& index,
int role)
const override;
187 bool setData(
const QModelIndex& index,
const QVariant& value,
int role = Qt::EditRole)
override;
191 void UpdateModelData();
#define MITKRENDERWINDOWMANAGERUI_EXPORT
Abstract base class extending QAbstractItemModel for DataStorage-backed models.
Table model that displays the render window layer stack for a specific renderer.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Return the number of columns (always 2: visibility and node name).
void NodeAdded(const mitk::DataNode *node) override
Called when a data node has been added to the data storage.
Qt::ItemFlags flags(const QModelIndex &index) const override
Return item flags for the given index.
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Set data for the given index and role (visibility toggling).
void DataStorageChanged() override
Called when the data storage has been changed. Refreshes the model data.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Return the number of rows (layers) in the model.
QVariant data(const QModelIndex &index, int role) const override
Return data for the given index and role.
QModelIndex parent(const QModelIndex &child) const
Return the parent index (always invalid, since this is a flat table model).
void NodeChanged(const mitk::DataNode *node) override
Called when a data node has been changed. Refreshes the model data.
QmitkDataStorageLayerStackModel(QObject *parent=nullptr)
Construct the layer stack model.
QModelIndex index(int row, int column, const QModelIndex &parent) const
Create a model index for the given row and column.
void NodeRemoved(const mitk::DataNode *node) override
Called when a data node has been removed from the data storage. Refreshes the model data.
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Return header data for the table.
mitk::BaseRenderer * GetCurrentRenderer() const
Get the currently active base renderer.
void NodePredicateChanged() override
Called when the node predicate has been changed. Refreshes the model data.
void SetCurrentRenderer(const std::string &rendererName)
Set the current renderer by its name and refresh the layer stack.
Organizes the rendering process.
Central node class of the MITK data tree, associating a data object with properties and mappers.
std::map< int, DataNode::Pointer, std::greater< int > > LayerStack