18#include <QSortFilterProxyModel>
73 bool filterAcceptsRow(
int sourceRow,
const QModelIndex& sourceParent)
const override;
74 bool lessThan(
const QModelIndex& left,
const QModelIndex& right)
const override;
80 QString sourceFilter_;
81 QString runnerFilter_;
82 QString collectionFilter_;
83 bool showRunningOnly_ =
false;
84 bool showUpdatesOnly_ =
false;
85 bool showFavoritesOnly_ =
false;
void setRunnerFilter(const QString &runner)
Restrict to a specific runner version ("proton-ge-9", "Wine 9.0", etc.).
void setShowRunningOnly(bool running)
Additional booleans applied on top of the main filters.
GameListProxyModel(QObject *parent=nullptr)
bool lessThan(const QModelIndex &left, const QModelIndex &right) const override
void setSourceFilter(const QString &source)
Restrict to a specific source name ("Steam", "GOG", etc.) or empty for all.
void setCollectionFilter(const QString &collection)
Restrict to a collection name, or empty for all.
void setShowFavoritesOnly(bool favoritesOnly)
void setSortKey(SortKey key)
void setSearchText(const QString &text)
Free-text search (matches against name, developer, publisher).
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override
void setShowUpdatesOnlyGame(bool updatesOnly)
void clearAllFilters()
Reset all filters in one shot.