mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
improved token dialog w/ storage inside the deck list - now we need a reliable online source for token data (preferably with pictures)
This commit is contained in:
parent
f553fd7456
commit
12b5e39440
7 changed files with 121 additions and 17 deletions
|
|
@ -80,7 +80,7 @@ CardDatabaseDisplayModel::CardDatabaseDisplayModel(QObject *parent)
|
|||
|
||||
bool CardDatabaseDisplayModel::filterAcceptsRow(int sourceRow, const QModelIndex & /*sourceParent*/) const
|
||||
{
|
||||
CardInfo *info = static_cast<CardDatabaseModel *>(sourceModel())->getCard(sourceRow);
|
||||
CardInfo const *info = static_cast<CardDatabaseModel *>(sourceModel())->getCard(sourceRow);
|
||||
|
||||
if (((isToken == ShowTrue) && !info->getIsToken()) || (isToken == ShowFalse) && info->getIsToken())
|
||||
return false;
|
||||
|
|
@ -88,11 +88,15 @@ bool CardDatabaseDisplayModel::filterAcceptsRow(int sourceRow, const QModelIndex
|
|||
if (!cardNameBeginning.isEmpty())
|
||||
if (!info->getName().startsWith(cardNameBeginning, Qt::CaseInsensitive))
|
||||
return false;
|
||||
|
||||
|
||||
if (!cardName.isEmpty())
|
||||
if (!info->getName().contains(cardName, Qt::CaseInsensitive))
|
||||
return false;
|
||||
|
||||
if (!cardNameSet.isEmpty())
|
||||
if (!cardNameSet.contains(info->getName()))
|
||||
return false;
|
||||
|
||||
if (!cardText.isEmpty())
|
||||
if (!info->getText().contains(cardText, Qt::CaseInsensitive))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue