13 #ifndef QmitkMAPAlgorithmModel_h
14 #define QmitkMAPAlgorithmModel_h
16 #include <QAbstractTableModel>
17 #include <QStringList>
23 #include <mapMetaPropertyAlgorithmInterface.h>
24 #include <mapRegistrationAlgorithmBase.h>
68 void SetAlgorithm(map::algorithm::RegistrationAlgorithmBase *pAlgorithm);
77 void SetAlgorithm(map::algorithm::facet::MetaPropertyAlgorithmInterface *pMetaInterface);
88 Qt::ItemFlags
flags(
const QModelIndex &index)
const override;
100 QVariant
data(
const QModelIndex &index,
int role)
const override;
113 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
120 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
127 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
141 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
144 void UpdateMetaProperties()
const;
150 QVariant GetPropertyValue(
const map::algorithm::MetaPropertyInfo *pInfo,
int role)
const;
152 template <
typename TValueType>
153 bool CheckCastAndSetProp(
const map::algorithm::MetaPropertyInfo *pInfo,
const QVariant &value);
155 bool SetPropertyValue(
const map::algorithm::MetaPropertyInfo *pInfo,
const QVariant &value);
157 map::algorithm::facet::MetaPropertyAlgorithmInterface *m_pMetaInterface;
158 mutable map::algorithm::facet::MetaPropertyAlgorithmInterface::MetaPropertyVectorType m_MetaProperties;
#define MITKMATCHPOINTREGISTRATIONUI_EXPORT
Qt table model exposing the meta-properties of a MatchPoint registration algorithm.
void SetAlgorithm(map::algorithm::RegistrationAlgorithmBase *pAlgorithm)
Sets the algorithm whose meta-properties should be displayed.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns in the model.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows (meta-properties) in the model.
QVariant data(const QModelIndex &index, int role) const override
Returns data for the given model index and role.
QmitkMAPAlgorithmModel(QObject *parent=nullptr)
Constructs the algorithm model.
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns item flags for the given model index.
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Sets a property value at the given index.
void SetAlgorithm(map::algorithm::facet::MetaPropertyAlgorithmInterface *pMetaInterface)
Sets the meta-property interface directly as data source.
~QmitkMAPAlgorithmModel() override
Destructor.
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Returns header data for the table columns.