A list-like container for CardSet objects with extended management methods. More...
#include <card_set_list.h>
Classes | |
| class | KeyCompareFunctor |
| Internal comparison functor for sorting by sort key. More... | |
Public Member Functions | |
| void | sortByKey () |
| Sorts the set list by each set’s assigned sort key. | |
| void | guessSortKeys () |
| Reassigns sort keys based on the current order. | |
| void | enableAllUnknown () |
| Enables all sets that are unknown or ignored. | |
| void | enableAll () |
| Enables all sets in the list. | |
| void | markAllAsKnown () |
| Marks all sets as known and adjusts their enabled state. | |
| int | getEnabledSetsNum () |
| Counts the number of sets that are currently enabled. | |
| int | getUnknownSetsNum () |
| Counts the number of sets that are currently unknown. | |
| QStringList | getUnknownSetsNames () |
| Collects the short names of all sets marked as unknown. | |
| void | defaultSort () |
| Sorts the list by default rules. | |
A list-like container for CardSet objects with extended management methods.
Extends QList<CardSetPtr> by adding convenience operations for sorting, enabling/disabling sets, and tracking known/unknown status. Unlike a plain list, this container provides domain-specific functionality for handling groups of sets in bulk.
| void CardSetList::defaultSort | ( | ) |
Sorts the list by default rules.
Orders sets first by priority (ascending), then by release date (most recent first), and finally alphabetically by short name.
| void CardSetList::enableAll | ( | ) |
Enables all sets in the list.
Equivalent to calling setEnabled(true) on each entry.
| void CardSetList::enableAllUnknown | ( | ) |
Enables all sets that are unknown or ignored.
Sets that are not marked as known and not ignored are marked as known and enabled. Ignored-known sets are also enabled, but remain ignored.
| int CardSetList::getEnabledSetsNum | ( | ) |
Counts the number of sets that are currently enabled.
| QStringList CardSetList::getUnknownSetsNames | ( | ) |
Collects the short names of all sets marked as unknown.
| int CardSetList::getUnknownSetsNum | ( | ) |
Counts the number of sets that are currently unknown.
| void CardSetList::guessSortKeys | ( | ) |
Reassigns sort keys based on the current order.
Calls defaultSort() and then assigns sequential sort keys to all sets according to their resulting positions, replacing any existing sort keys to ensure consistent ordering.
| void CardSetList::markAllAsKnown | ( | ) |
Marks all sets as known and adjusts their enabled state.
Unknown, non-ignored sets become known and disabled. Ignored-known sets are enabled if they were previously disabled.
| void CardSetList::sortByKey | ( | ) |
Sorts the set list by each set’s assigned sort key.
Uses KeyCompareFunctor internally. If two sets share the same sort key, their relative order is unspecified.