1#ifndef AIRCRAFTSEARCHFILTERMODEL_HXX
2#define AIRCRAFTSEARCHFILTERMODEL_HXX
4#include <QSortFilterProxyModel>
7#include <simgear/props/props.hxx>
44 return m_ratingsFilter;
67 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const override;
68 bool lessThan(
const QModelIndex& left,
const QModelIndex& right)
const override;
71 bool filterAircraft(
const QModelIndex& sourceIndex)
const;
73 bool m_ratingsFilter =
false;
74 bool m_onlyShowInstalled =
false;
75 bool m_onlyShowWithUpdate =
false;
76 bool m_onlyShowFavourites =
false;
79 QString m_filterString;
80 SGPropertyNode_ptr m_filterProps;
void setRatingFilterEnabled(bool e)
bool ratingsFilterEnabled
Q_INVOKABLE void saveRatingsSettings()
void ratingsFilterEnabledChanged()
void setRatings(QList< int > ratings)
void setHaveUpdateFilterEnabled(bool e)
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
void setInstalledFilterEnabled(bool e)
Q_INVOKABLE void loadRatingsSettings()
void summaryTextChanged()
bool ratingsFilterEnabled() const
AircraftProxyModel(QObject *pr, QAbstractItemModel *source)
Q_INVOKABLE void setAircraftFilterString(QString s)
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override
Custom sorting based on aircraft variants and URI.
void setShowFavourites(bool e)
Q_INVOKABLE int indexForURI(QUrl uri) const
Compute the row (index in QML / ListView speak) based on an aircraft URI.
Q_INVOKABLE void selectVariantForAircraftURI(QUrl uri)