Add settings and start of record edit screen.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user