summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divelistmodel.cpp1
-rw-r--r--qt-models/divelistmodel.h5
2 files changed, 5 insertions, 1 deletions
diff --git a/qt-models/divelistmodel.cpp b/qt-models/divelistmodel.cpp
index d1ae4093d..f79efe0ff 100644
--- a/qt-models/divelistmodel.cpp
+++ b/qt-models/divelistmodel.cpp
@@ -195,6 +195,7 @@ DiveListSortModel *DiveListSortModel::instance()
void DiveListSortModel::updateFilterState()
{
DiveFilter::instance()->updateAll();
+ emit shownChanged();
}
void DiveListSortModel::setSourceModel(QAbstractItemModel *sourceModel)
diff --git a/qt-models/divelistmodel.h b/qt-models/divelistmodel.h
index b051605ae..110ee82ae 100644
--- a/qt-models/divelistmodel.h
+++ b/qt-models/divelistmodel.h
@@ -47,11 +47,14 @@ public:
Q_INVOKABLE void reload();
QString filterString;
void updateFilterState();
+ Q_PROPERTY(int shown READ shown NOTIFY shownChanged);
+ int shown();
public slots:
int getIdxForId(int id);
void setFilter(QString f, FilterData::Mode mode);
void resetFilter();
- int shown();
+signals:
+ void shownChanged();
protected:
bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
private: