Add settings and start of record edit screen.

This commit is contained in:
2020-08-20 22:24:45 -04:00
parent 0d2a1d64bf
commit ea5779764d
9 changed files with 264 additions and 8 deletions

View File

@@ -99,6 +99,28 @@ void SqlServiceRecord::changeVehicleFilter(int id)
this->currentVehicleID = id;
}
QVariantMap SqlServiceRecord::getRecord(int index)
{
QHash<int, QByteArray> names = roleNames();
QHashIterator<int, QByteArray> i(names);
QVariantMap res;
QModelIndex idx = this->index(index, 0);
while(i.hasNext()) {
i.next();
QVariant data = idx.data(i.key());
res[i.value()] = data;
}
return res;
}
void SqlServiceRecord::updateRecord(int index, QString serviceProvider, QString dateISO, int miles, QString notes)
{
//TODO
}