![]() |
Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
|
#include <card_search_model.h>
Classes | |
| struct | SearchResult |
Public Types | |
| enum | CardSearchRoles { CardInfoRole = Qt::UserRole + 1 } |
Public Member Functions | |
| CardSearchModel (CardDatabaseDisplayModel *sourceModel, QObject *parent=nullptr) | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| void | updateSearchResults (const QString &query) |
| void | setSearchLanguage (const CardSearchLanguage &searchLang) |
Private Member Functions | |
| QStringList | searchableNames (const CardInfoPtr &card) const |
| The names a card is searched by with the current search language. | |
| QString | sortableName (const CardInfoPtr &card) const |
| The name used to break distance ties when sorting suggestions. | |
Private Attributes | |
| CardDatabaseDisplayModel * | sourceModel |
| QList< SearchResult > | searchResults |
| CardSearchLanguage | searchLanguage |
|
explicit |
|
nodiscardoverride |
|
nodiscardoverride |
|
nodiscardprivate |
The names a card is searched by with the current search language.
|
inline |
|
nodiscardprivate |
The name used to break distance ties when sorting suggestions.
| void CardSearchModel::updateSearchResults | ( | const QString & | query | ) |
|
private |
|
private |
|
private |