ok I added some proxy models to all sql models, but they aint done..
This commit is contained in:
parent
cc501873c1
commit
c9f6fc4d1b
8 changed files with 117 additions and 71 deletions
|
|
@ -243,9 +243,22 @@ QVariantMap PresentationSqlModel::getPresentation(const int &row) {
|
|||
PresentationProxyModel::PresentationProxyModel(QObject *parent)
|
||||
:QSortFilterProxyModel(parent)
|
||||
{
|
||||
PresentationSqlModel *presentationModel = new PresentationSqlModel;
|
||||
setSourceModel(presentationModel);
|
||||
m_presentationModel = new PresentationSqlModel;
|
||||
setSourceModel(m_presentationModel);
|
||||
setDynamicSortFilter(true);
|
||||
setFilterRole(Qt::UserRole + 1);
|
||||
setFilterCaseSensitivity(Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
PresentationSqlModel *PresentationProxyModel::presentationModel() {
|
||||
return m_presentationModel;
|
||||
}
|
||||
|
||||
QVariantMap PresentationProxyModel::getPresentation(const int &row) {
|
||||
return QVariantMap();
|
||||
}
|
||||
|
||||
void PresentationProxyModel::deletePresentation(const int &row) {
|
||||
auto model = qobject_cast<PresentationSqlModel *>(sourceModel());
|
||||
model->deletePresentation(row);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue