switching to a more model based adding of items to serviceListModel
This commit is contained in:
parent
903cee065b
commit
d6a92ee3cb
3 changed files with 86 additions and 66 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue