mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-11 12:54:10 -07:00
Allow TabArchidekt to use VDE group/sort/display buttons
This commit is contained in:
parent
b4d33597c2
commit
16350799bf
8 changed files with 253 additions and 136 deletions
|
|
@ -74,6 +74,29 @@ enum Type
|
|||
MANA_COST, /**< Group cards by their total mana cost. */
|
||||
COLOR /**< Group cards by their color identity. */
|
||||
};
|
||||
static inline QString toString(Type t)
|
||||
{
|
||||
switch (t) {
|
||||
case MAIN_TYPE:
|
||||
return "Main Type";
|
||||
case MANA_COST:
|
||||
return "Mana Cost";
|
||||
case COLOR:
|
||||
return "Colors";
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
static inline Type fromString(const QString &s)
|
||||
{
|
||||
if (s == "Main Type")
|
||||
return MAIN_TYPE;
|
||||
if (s == "Mana Cost")
|
||||
return MANA_COST;
|
||||
if (s == "Colors")
|
||||
return COLOR;
|
||||
return MAIN_TYPE; // default
|
||||
}
|
||||
} // namespace DeckListModelGroupCriteria
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue