mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 20:13:56 -07:00
* Sort *every* file into a doxygen group. Took 7 hours 9 minutes Took 18 seconds Took 2 minutes * Lint some ingroup definitions. Took 10 minutes Took 2 seconds * Just include the groups in the Doxyfile in this commit. Took 3 minutes * Update some group comments so they link! Took 14 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
30 lines
745 B
C++
30 lines
745 B
C++
/**
|
|
* @file card_info_comparator.h
|
|
* @ingroup Cards
|
|
* @brief TODO: Document this.
|
|
*/
|
|
|
|
#ifndef CARD_INFO_COMPARATOR_H
|
|
#define CARD_INFO_COMPARATOR_H
|
|
|
|
#include "../card/card_info.h"
|
|
|
|
#include <QStringList>
|
|
#include <QVariant>
|
|
#include <Qt>
|
|
|
|
class CardInfoComparator
|
|
{
|
|
public:
|
|
explicit CardInfoComparator(const QStringList &properties, Qt::SortOrder order = Qt::AscendingOrder);
|
|
bool operator()(const CardInfoPtr &a, const CardInfoPtr &b) const;
|
|
|
|
private:
|
|
QStringList m_properties; // List of properties to sort by
|
|
Qt::SortOrder m_order;
|
|
|
|
QVariant getProperty(const CardInfoPtr &card, const QString &property) const;
|
|
bool compareVariants(const QVariant &a, const QVariant &b) const;
|
|
};
|
|
|
|
#endif // CARD_INFO_COMPARATOR_H
|