#include <card_list.h>
|
| enum | SortOption {
NoSort
, SortByMainType
, SortByManaValue
, SortByColorGrouping
,
SortByName
, SortByType
, SortByManaCost
, SortByColors
,
SortByPt
, SortBySet
, SortByPrinting
} |
|
| | CardList (bool _contentsKnown) |
| CardItem * | findCard (const int cardId) const |
| | Finds the CardItem with the given id in the list. If contentsKnown is false, then this just returns the first element of the list.
|
| bool | getContentsKnown () const |
| void | sortBy (const QList< SortOption > &options) |
| | sorts the list by using string comparison on properties extracted from the CardItem The cards are compared using each property in order. If two cards have the same value for a property, then the next property in the list is used.
|
◆ SortOption
| Enumerator |
|---|
| NoSort | |
| SortByMainType | |
| SortByManaValue | |
| SortByColorGrouping | |
| SortByName | |
| SortByType | |
| SortByManaCost | |
| SortByColors | |
| SortByPt | |
| SortBySet | |
| SortByPrinting | |
◆ CardList()
| CardList::CardList |
( |
bool | _contentsKnown | ) |
|
|
explicit |
◆ findCard()
| CardItem * CardList::findCard |
( |
const int | cardId | ) |
const |
Finds the CardItem with the given id in the list. If contentsKnown is false, then this just returns the first element of the list.
- Parameters
-
| cardId | The id of the card to find. |
- Returns
- A pointer to the CardItem, or a nullptr if not found.
◆ getContentsKnown()
| bool CardList::getContentsKnown |
( |
| ) |
const |
|
inline |
◆ getExtractorFor()
returns the function that extracts the given property from the CardItem.
◆ sortBy()
| void CardList::sortBy |
( |
const QList< SortOption > & | option | ) |
|
sorts the list by using string comparison on properties extracted from the CardItem The cards are compared using each property in order. If two cards have the same value for a property, then the next property in the list is used.
- Parameters
-
| option | the option to compare the cards by, in order of usage. |
◆ contentsKnown
| bool CardList::contentsKnown |
|
protected |
The documentation for this class was generated from the following files: