diff --git a/model/generalsortfiltermodel.cpp b/model/generalsortfiltermodel.cpp index 75784e5..1dd5cf3 100644 --- a/model/generalsortfiltermodel.cpp +++ b/model/generalsortfiltermodel.cpp @@ -23,6 +23,10 @@ QItemSelection GeneralSortFilterModel::findItems(const QString& text) const { return result; } +QString GeneralSortFilterModel::getUuid(const QModelIndex& itemIndex) const { + return data(itemIndex, IdRole).toString(); +} + QByteArray GeneralSortFilterModel::jsonDataForServer(const QModelIndex& proxyIndex) { const QModelIndex sourceIndex = mapToSource(proxyIndex); return m_tableModel->jsonDataForServer(sourceIndex); diff --git a/model/generalsortfiltermodel.h b/model/generalsortfiltermodel.h index 9afdabc..a5eade5 100644 --- a/model/generalsortfiltermodel.h +++ b/model/generalsortfiltermodel.h @@ -17,6 +17,7 @@ class GeneralSortFilterModel : public QSortFilterProxyModel { * @return QItemSelection containing all successful ModelIndex results */ QItemSelection findItems(const QString& text) const; + QString getUuid(const QModelIndex& itemIndex) const; QByteArray jsonDataForServer(const QModelIndex& proxyIndex);