13 #ifndef QmitkPointListModel_h
14 #define QmitkPointListModel_h
17 #include <QAbstractListModel>
58 Qt::ItemFlags
flags(
const QModelIndex &index)
const override;
65 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
73 QVariant
data(
const QModelIndex &index,
int role)
const override;
82 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
Qt list model providing access to points in a mitk::PointSet.
unsigned int m_PointSetDeletedObserverTag
void SignalUpdateSelection()
void ObserveNewPointSet(mitk::DataNode *pointSetNode)
internally observe different point set
void OnPointSetChanged(const itk::EventObject &e)
ITK observer callback for point set modification events.
int GetTimeStep() const
Get the current time step.
bool GetPointForModelIndex(const QModelIndex &index, mitk::PointSet::PointType &p, mitk::PointSet::PointIdentifier &id) const
get point and point ID that correspond to a given QModelIndex
void SetTimeStep(int t)
Set the time step to display.
mitk::PointSet * CheckForPointSetInNode(mitk::DataNode *node) const
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Return the number of points in the current time step.
void OnPointSetDeleted(const itk::EventObject &e)
ITK observer callback for point set deletion events.
~QmitkPointListModel() override
Destructor. Removes observers from the point set.
QVariant data(const QModelIndex &index, int role) const override
Return the display data for a point (ID and coordinates).
bool GetModelIndexForPointID(mitk::PointSet::PointIdentifier id, QModelIndex &index) const
returns a QModelIndex for a given point ID
unsigned int m_PointSetModifiedObserverTag
void MoveSelectedPointDown()
void MoveSelectedPointUp()
mitk::DataNode * GetPointSetNode() const
Get the data node containing the point set.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Return header data.
QmitkPointListModel(mitk::DataNode *pointSetNode=nullptr, int t=0, QObject *parent=nullptr)
Construct the model.
Qt::ItemFlags flags(const QModelIndex &index) const override
Return item flags (selectable and enabled).
mitk::PointSet * GetPointSet() const
Get the modeled point set.
void RemoveSelectedPoint()
void SetPointSetNode(mitk::DataNode *pointSetNode)
Set the data node containing the point set to model.
mitk::DataNode * m_PointSetNode
Central node class of the MITK data tree, associating a data object with properties and mappers.
Data structure which stores a set of points.
DataType::PointIdentifier PointIdentifier