23 #ifndef __SERVERLIST_H_
24 #define __SERVERLIST_H_
45 class QSortFilterProxyModel;
56 void cleanUpRightNow();
62 bool hasAtLeastOneServer()
const;
64 bool isAnyColumnSortedAdditionally()
const;
65 bool isSortingAdditionallyByColumn(
int column)
const;
66 bool isSortingByColumn(
int columnIndex);
68 void removeCustomServers();
69 void removeNonSpecialServers();
70 QList<ServerPtr> selectedServers()
const;
71 QList<ServerPtr> servers()
const;
72 QList<ServerPtr> serversForPlugin(
const EnginePlugin *plugin)
const;
74 ServerPtr serverFromIndex(
const QModelIndex &);
84 void refreshSelected();
85 void registerServer(ServerPtr server);
86 void removeServer(
const ServerPtr &server);
92 void setGroupServersWithPlayersAtTop(
bool b);
94 void tableMiddleClicked();
95 void tableRightClicked(
const QModelIndex &index,
const QPoint &cursorPosition);
96 void updateCountryFlags();
110 void serverDeregistered(ServerPtr);
117 void serverRegistered(ServerPtr);
118 void serverDoubleClicked(
const ServerPtr &);
119 void serversSelected(QList<ServerPtr> &);
127 Qt::SortOrder sortOrder;
131 bool areColumnsWidthsSettingsChanged();
133 void connectTableModelProxySlots();
134 void clearAdditionalSorting();
139 Qt::SortOrder getColumnDefaultSortOrder(
int columnId);
141 void initCleanerTimer();
143 void prepareServerTable();
145 void removeAdditionalSortingForColumn(
const QModelIndex &modelIndex);
146 void saveColumnsWidthsSettings();
148 void setupTableColumnWidths();
149 void setupTableProperties(QSortFilterProxyModel *tableModel);
151 void sortAdditionally(
const QModelIndex &modelIndex, Qt::SortOrder order);
153 Qt::SortOrder swappedCurrentSortOrder();
155 void updateCountryFlags(
bool force);
158 void columnHeaderClicked(
int);
159 void contextMenuAboutToHide();
160 void contextMenuTriggered(QAction *action);
161 void doubleClicked(
const QModelIndex &);
162 void itemSelected(
const QItemSelection &);
163 void mouseEntered(
const QModelIndex &);
164 void saveAdditionalSortingConfig();
165 void onServerBegunRefreshing(
const ServerPtr &server);
166 void onServerUpdated(
const ServerPtr &server);
167 void updateHeaderTitles();