diff options
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/divelistmodel.cpp | 5 | ||||
-rw-r--r-- | qt-models/divelistmodel.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp index 38c8c86c0..1c4e20b48 100644 --- a/qt-models/divelistmodel.cpp +++ b/qt-models/divelistmodel.cpp @@ -20,6 +20,11 @@ void DiveListSortModel::resetFilter() setFilterRegExp(""); } +int DiveListSortModel::shown() +{ + return rowCount(); +} + int DiveListSortModel::getDiveId(int idx) { DiveListModel *mySourceModel = qobject_cast<DiveListModel *>(sourceModel()); diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h index c34fb931d..b633cc3d5 100644 --- a/qt-models/divelistmodel.h +++ b/qt-models/divelistmodel.h @@ -19,6 +19,7 @@ public slots: int getIdxForId(int id); void setFilter(QString f); void resetFilter(); + int shown(); }; class DiveListModel : public QAbstractListModel |