mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 21:04:07 -07:00
Adjust to namespace.
Took 4 minutes Took 1 minute
This commit is contained in:
parent
5bf00d8735
commit
82dd4c08e7
3 changed files with 6 additions and 6 deletions
|
|
@ -117,8 +117,8 @@ void DeckEditorDeckDockWidget::createDeckDock()
|
||||||
activeGroupCriteriaComboBox->addItem(tr("Mana Cost"), DeckListModelGroupCriteria::MANA_COST);
|
activeGroupCriteriaComboBox->addItem(tr("Mana Cost"), DeckListModelGroupCriteria::MANA_COST);
|
||||||
activeGroupCriteriaComboBox->addItem(tr("Colors"), DeckListModelGroupCriteria::COLOR);
|
activeGroupCriteriaComboBox->addItem(tr("Colors"), DeckListModelGroupCriteria::COLOR);
|
||||||
connect(activeGroupCriteriaComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() {
|
connect(activeGroupCriteriaComboBox, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]() {
|
||||||
deckModel->setActiveGroupCriteria(
|
deckModel->setActiveGroupCriteria(static_cast<DeckListModelGroupCriteria::Type>(
|
||||||
static_cast<DeckListModelGroupCriteria>(activeGroupCriteriaComboBox->currentData(Qt::UserRole).toInt()));
|
activeGroupCriteriaComboBox->currentData(Qt::UserRole).toInt()));
|
||||||
deckModel->sort(deckView->header()->sortIndicatorSection(), deckView->header()->sortIndicatorOrder());
|
deckModel->sort(deckView->header()->sortIndicatorSection(), deckView->header()->sortIndicatorOrder());
|
||||||
deckView->expandAll();
|
deckView->expandAll();
|
||||||
deckView->expandAll();
|
deckView->expandAll();
|
||||||
|
|
|
||||||
|
|
@ -521,7 +521,7 @@ void DeckListModel::sort(int column, Qt::SortOrder order)
|
||||||
emit layoutChanged();
|
emit layoutChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeckListModel::setActiveGroupCriteria(DeckListModelGroupCriteria newCriteria)
|
void DeckListModel::setActiveGroupCriteria(DeckListModelGroupCriteria::Type newCriteria)
|
||||||
{
|
{
|
||||||
activeGroupCriteria = newCriteria;
|
activeGroupCriteria = newCriteria;
|
||||||
rebuildTree();
|
rebuildTree();
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ namespace DeckListModelGroupCriteria
|
||||||
* @enum DeckListModelGroupCriteria
|
* @enum DeckListModelGroupCriteria
|
||||||
* @brief Available grouping strategies for deck visualization.
|
* @brief Available grouping strategies for deck visualization.
|
||||||
*/
|
*/
|
||||||
enum
|
enum Type
|
||||||
{
|
{
|
||||||
MAIN_TYPE, /**< Group cards by their main type (e.g., creature, instant). */
|
MAIN_TYPE, /**< Group cards by their main type (e.g., creature, instant). */
|
||||||
MANA_COST, /**< Group cards by their total mana cost. */
|
MANA_COST, /**< Group cards by their total mana cost. */
|
||||||
|
|
@ -283,12 +283,12 @@ public:
|
||||||
* @brief Sets the criteria used to group cards in the model.
|
* @brief Sets the criteria used to group cards in the model.
|
||||||
* @param newCriteria The new grouping criteria.
|
* @param newCriteria The new grouping criteria.
|
||||||
*/
|
*/
|
||||||
void setActiveGroupCriteria(DeckListModelGroupCriteria newCriteria);
|
void setActiveGroupCriteria(DeckListModelGroupCriteria::Type newCriteria);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DeckList *deckList; /**< Pointer to the deck loader providing the underlying data. */
|
DeckList *deckList; /**< Pointer to the deck loader providing the underlying data. */
|
||||||
InnerDecklistNode *root; /**< Root node of the model tree. */
|
InnerDecklistNode *root; /**< Root node of the model tree. */
|
||||||
DeckListModelGroupCriteria activeGroupCriteria = DeckListModelGroupCriteria::MAIN_TYPE;
|
DeckListModelGroupCriteria::Type activeGroupCriteria = DeckListModelGroupCriteria::MAIN_TYPE;
|
||||||
int lastKnownColumn; /**< Last column used for sorting. */
|
int lastKnownColumn; /**< Last column used for sorting. */
|
||||||
Qt::SortOrder lastKnownOrder; /**< Last known sort order. */
|
Qt::SortOrder lastKnownOrder; /**< Last known sort order. */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue