game_launcher 1.1.0
Modern Linux game launcher with Steam / Proton / Wine integration
Loading...
Searching...
No Matches
GameListProxyModel Class Reference

#include <game_list_proxy_model.h>

Inheritance diagram for GameListProxyModel:
Collaboration diagram for GameListProxyModel:

Public Types

enum class  SortKey { Name , RecentlyPlayed , MostPlayed , Recent }

Public Member Functions

 GameListProxyModel (QObject *parent=nullptr)
void clearAllFilters ()
 Reset all filters in one shot.
void setCollectionFilter (const QString &collection)
 Restrict to a collection name, or empty for all.
void setRunnerFilter (const QString &runner)
 Restrict to a specific runner version ("proton-ge-9", "Wine 9.0", etc.).
void setSearchText (const QString &text)
 Free-text search (matches against name, developer, publisher).
void setShowFavoritesOnly (bool favoritesOnly)
void setShowRunningOnly (bool running)
 Additional booleans applied on top of the main filters.
void setShowUpdatesOnlyGame (bool updatesOnly)
void setSortKey (SortKey key)
void setSourceFilter (const QString &source)
 Restrict to a specific source name ("Steam", "GOG", etc.) or empty for all.
SortKey sortKey () const

Protected Member Functions

bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override

Detailed Description

Definition at line 22 of file game_list_proxy_model.h.

Member Enumeration Documentation

◆ SortKey

enum class GameListProxyModel::SortKey
strong
Enumerator
Name 
RecentlyPlayed 
MostPlayed 
Recent 

Definition at line 27 of file game_list_proxy_model.h.

Constructor & Destructor Documentation

◆ GameListProxyModel()

GameListProxyModel::GameListProxyModel ( QObject * parent = nullptr)
explicit

Definition at line 23 of file game_list_proxy_model.cpp.

Member Function Documentation

◆ clearAllFilters()

void GameListProxyModel::clearAllFilters ( )

Reset all filters in one shot.

Definition at line 96 of file game_list_proxy_model.cpp.

◆ filterAcceptsRow()

bool GameListProxyModel::filterAcceptsRow ( int sourceRow,
const QModelIndex & sourceParent ) const
overrideprotected

◆ lessThan()

bool GameListProxyModel::lessThan ( const QModelIndex & left,
const QModelIndex & right ) const
overrideprotected

◆ setCollectionFilter()

void GameListProxyModel::setCollectionFilter ( const QString & collection)

Restrict to a collection name, or empty for all.

Definition at line 64 of file game_list_proxy_model.cpp.

◆ setRunnerFilter()

void GameListProxyModel::setRunnerFilter ( const QString & runner)

Restrict to a specific runner version ("proton-ge-9", "Wine 9.0", etc.).

Definition at line 56 of file game_list_proxy_model.cpp.

◆ setSearchText()

void GameListProxyModel::setSearchText ( const QString & text)

Free-text search (matches against name, developer, publisher).

Empty string clears the filter.

Definition at line 40 of file game_list_proxy_model.cpp.

◆ setShowFavoritesOnly()

void GameListProxyModel::setShowFavoritesOnly ( bool favoritesOnly)

Definition at line 88 of file game_list_proxy_model.cpp.

◆ setShowRunningOnly()

void GameListProxyModel::setShowRunningOnly ( bool running)

Additional booleans applied on top of the main filters.

Definition at line 72 of file game_list_proxy_model.cpp.

◆ setShowUpdatesOnlyGame()

void GameListProxyModel::setShowUpdatesOnlyGame ( bool updatesOnly)

Definition at line 80 of file game_list_proxy_model.cpp.

◆ setSortKey()

void GameListProxyModel::setSortKey ( SortKey key)

Definition at line 118 of file game_list_proxy_model.cpp.

◆ setSourceFilter()

void GameListProxyModel::setSourceFilter ( const QString & source)

Restrict to a specific source name ("Steam", "GOG", etc.) or empty for all.

Definition at line 48 of file game_list_proxy_model.cpp.

◆ sortKey()

SortKey GameListProxyModel::sortKey ( ) const
inline

Definition at line 67 of file game_list_proxy_model.h.


The documentation for this class was generated from the following files: