Merge branch 'master' into develop
This commit is contained in:
commit
8444eda4ee
@ -166,3 +166,8 @@ std::string MetaDataModel::toHtml() const
|
|||||||
|
|
||||||
return out.str();
|
return out.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Age MetaDataModel::getAge() const
|
||||||
|
{
|
||||||
|
return {m_dateOfBirth, m_dateOfTest};
|
||||||
|
}
|
||||||
|
@ -24,19 +24,14 @@ public:
|
|||||||
MetaDataModel(QObject *parent);
|
MetaDataModel(QObject *parent);
|
||||||
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
QVariant data(
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
||||||
const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
||||||
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
Qt::ItemFlags flags(const QModelIndex &index) const override;
|
||||||
bool setData(const QModelIndex &index, const QVariant &value,
|
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
|
||||||
int role = Qt::EditRole) override;
|
|
||||||
|
|
||||||
void read(const ESGRAF48::MetaDataModel &model);
|
void read(const ESGRAF48::MetaDataModel &model);
|
||||||
void write(ESGRAF48::MetaDataModel &model) const;
|
void write(ESGRAF48::MetaDataModel &model) const;
|
||||||
|
|
||||||
std::string toHtml() const;
|
std::string toHtml() const;
|
||||||
|
|
||||||
Age getAge() const
|
Age getAge() const;
|
||||||
{
|
|
||||||
return { m_dateOfBirth, m_dateOfTest };
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
@ -20,7 +20,7 @@ unsigned int PRMap::lookup(const Age &age, const unsigned int &points)
|
|||||||
|
|
||||||
if (m_ages.back() < age)
|
if (m_ages.back() < age)
|
||||||
{
|
{
|
||||||
return m_ages.size() - 1;
|
return m_ages.size() - 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t index = 1; index < m_ages.size(); ++index)
|
for (size_t index = 1; index < m_ages.size(); ++index)
|
||||||
|
Reference in New Issue
Block a user