23 #ifndef __SERVERLISTPROXYMODEL_H__ 24 #define __SERVERLISTPROXYMODEL_H__ 28 #include <QSortFilterProxyModel> 37 static ColumnSort deserializeQVariant(
const QVariant &v);
44 Qt::SortOrder order()
const;
46 bool operator==(
const ColumnSort &other)
const;
48 QVariant serializeQVariant()
const;
64 void addAdditionalColumnSorting(
int column, Qt::SortOrder order);
65 const QList<ColumnSort> &additionalSortColumns()
const;
66 void clearAdditionalSorting();
69 bool isAnyColumnSortedAdditionally()
const;
70 bool isSortingAdditionallyByColumn(
int column)
const;
72 void removeAdditionalColumnSorting(
int column);
73 void setAdditionalSortColumns(
const QList<ColumnSort> &columns);
78 void setGroupServersWithPlayersAtTop(
bool b);
80 void sortServers(
int column, Qt::SortOrder order = Qt::AscendingOrder);
83 void additionalSortColumnsChanged();
89 bool filterAcceptsRow(
int sourceRow,
const QModelIndex &sourceParent)
const override;
94 int compareColumnSortData(QVariant &var1, QVariant &var2,
int column)
const;
95 bool lessThan(
const QModelIndex &left,
const QModelIndex &right)
const override;
97 ServerPtr serverFromList(
const QModelIndex &index)
const;
98 ServerPtr serverFromList(
int row)
const;
Structure describing server filter.
A representation of a server for a given game.