Removed obsolete json read/writes
This commit is contained in:
parent
a2c4b16eb4
commit
09d811ee25
5 changed files with 5 additions and 86 deletions
|
@ -112,24 +112,6 @@ bool MetaDataModel::setData(const QModelIndex &modelIndex, const QVariant &value
|
|||
return valueChanged;
|
||||
}
|
||||
|
||||
void MetaDataModel::write(QJsonObject &json) const
|
||||
{
|
||||
json["participant name"] = m_participant;
|
||||
json["instructor name"] = m_instructor;
|
||||
json["date of birth"] = m_dateOfBirth.toString(Qt::ISODate);
|
||||
json["date of test"] = m_dateOfTest.toString(Qt::ISODate);
|
||||
json["remarks"] = m_remarks;
|
||||
}
|
||||
|
||||
void MetaDataModel::read(const QJsonObject &json)
|
||||
{
|
||||
setData(index(0, 0), json["participant name"].toVariant(), Qt::EditRole);
|
||||
setData(index(0, 1), json["instructor name"].toVariant(), Qt::EditRole);
|
||||
setData(index(0, 2), json["date of birth"].toVariant(), Qt::EditRole);
|
||||
setData(index(0, 3), json["date of test"].toVariant(), Qt::EditRole);
|
||||
setData(index(0, 4), json["remarks"].toVariant(), Qt::EditRole);
|
||||
}
|
||||
|
||||
void MetaDataModel::readProtoBuf(const ESGRAF48::MetaDataModel &model)
|
||||
{
|
||||
setData(index(0, 0), QString::fromStdString(model.participantname()));
|
||||
|
|
|
@ -30,9 +30,6 @@ public:
|
|||
bool setData(const QModelIndex &index, const QVariant &value,
|
||||
int role = Qt::EditRole) override;
|
||||
|
||||
void write(QJsonObject &json) const;
|
||||
void read(const QJsonObject &json);
|
||||
|
||||
void readProtoBuf(const ESGRAF48::MetaDataModel &model);
|
||||
void writeProtoBuf(ESGRAF48::MetaDataModel &model) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue