13 #ifndef QmitkMAPAlgorithmModel_h
14 #define QmitkMAPAlgorithmModel_h
16 #include <QAbstractTableModel>
17 #include <QStringList>
23 #include <mapMetaPropertyAlgorithmInterface.h>
24 #include <mapRegistrationAlgorithmBase.h>
44 void SetAlgorithm(map::algorithm::RegistrationAlgorithmBase *pAlgorithm);
45 void SetAlgorithm(map::algorithm::facet::MetaPropertyAlgorithmInterface *pMetaInterface);
47 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
48 QVariant data(
const QModelIndex &index,
int role)
const override;
49 QVariant headerData(
int section, Qt::Orientation orientation,
int role)
const override;
50 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
51 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
52 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
55 void UpdateMetaProperties()
const;
61 QVariant GetPropertyValue(
const map::algorithm::MetaPropertyInfo *pInfo,
int role)
const;
63 template <
typename TValueType>
64 bool CheckCastAndSetProp(
const map::algorithm::MetaPropertyInfo *pInfo,
const QVariant &value);
66 bool SetPropertyValue(
const map::algorithm::MetaPropertyInfo *pInfo,
const QVariant &value);
68 map::algorithm::facet::MetaPropertyAlgorithmInterface *m_pMetaInterface;
69 mutable map::algorithm::facet::MetaPropertyAlgorithmInterface::MetaPropertyVectorType m_MetaProperties;