switching to a more model based adding of items to serviceListModel

This commit is contained in:
Chris Cochrun 2023-02-24 16:01:11 -06:00
parent 903cee065b
commit d6a92ee3cb
3 changed files with 86 additions and 66 deletions

View file

@ -226,7 +226,9 @@ QModelIndex ImageProxyModel::idx(int row) {
}
QVariantMap ImageProxyModel::getImage(const int &row) {
return QVariantMap();
auto model = qobject_cast<ImageSqlModel *>(sourceModel());
QVariantMap image = model->getImage(mapToSource(index(row, 0)).row());
return image;
}
void ImageProxyModel::deleteImage(const int &row) {

View file

@ -261,7 +261,9 @@ QModelIndex PresentationProxyModel::idx(int row) {
}
QVariantMap PresentationProxyModel::getPresentation(const int &row) {
return QVariantMap();
auto model = qobject_cast<PresentationSqlModel *>(sourceModel());
QVariantMap presentation = model->getPresentation(mapToSource(index(row, 0)).row());
return presentation;
}
void PresentationProxyModel::deletePresentation(const int &row) {