Adding Long Name Sorting Options To Set List

Updating Dialog To Sort Options
This commit is contained in:
Phoenix Osiris 2013-07-17 17:27:45 -04:00
parent 2e1f5332db
commit 27b8cc5526
3 changed files with 14 additions and 0 deletions

View file

@ -58,11 +58,22 @@ public:
}
};
class SetList::CompareName {
public:
inline bool operator()(CardSet *a, CardSet *b) const {
return a->getLongName() < b->getLongName();
}
};
void SetList::sortByKey()
{
qSort(begin(), end(), CompareFunctor());
}
void SetList::sortByName() {
qSort(begin(), end(), CompareName());
}
PictureToLoad::PictureToLoad(CardInfo *_card, bool _stripped, bool _hq)
: card(_card), stripped(_stripped), setIndex(0), hq(_hq)
{