1 #ifndef STATIONLISTPROXYMODEL_H
2 #define STATIONLISTPROXYMODEL_H
4 #include <QSortFilterProxyModel>
5 #include <QGeoCoordinate>
10 class StationListProxyModel : public QSortFilterProxyModel
15 explicit StationListProxyModel(QObject *parent = 0);
16 Q_INVOKABLE void setUserPosition(const QGeoCoordinate &pos);
17 Q_INVOKABLE void setRecentStations(const QStringList &stations);
18 Q_INVOKABLE void setRecentOnlyFilter(bool);
21 virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const;
22 virtual bool filterAcceptsRow(int sourceRow,
23 const QModelIndex &sourceParent) const;
26 QGeoCoordinate m_here;
27 QStringList m_stations;
28 bool m_filterRecentOnly;
31 #endif // STATIONLISTPROXYMODEL_H