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);
93 void tableMiddleClicked();
94 void showContextMenu(
const QPoint &position);
95 void updateCountryFlags();
109 void serverDeregistered(ServerPtr);
116 void serverRegistered(ServerPtr);
117 void serverDoubleClicked(
const ServerPtr &);
118 void serversSelected(QList<ServerPtr> &);
126 Qt::SortOrder sortOrder;
130 bool areColumnsWidthsSettingsChanged();
132 void connectTableModelProxySlots();
133 void clearAdditionalSorting();
138 Qt::SortOrder getColumnDefaultSortOrder(
int columnId);
140 void initCleanerTimer();
142 void prepareServerTable();
144 void removeAdditionalSortingForColumn(
const QModelIndex &modelIndex);
145 void saveColumnsWidthsSettings();
147 void setupTableColumnWidths();
148 void setupTableProperties(QSortFilterProxyModel *tableModel);
150 void sortAdditionally(
const QModelIndex &modelIndex, Qt::SortOrder order);
152 Qt::SortOrder swappedCurrentSortOrder();
154 void updateCountryFlags(
bool force);
157 void columnHeaderClicked(
int);
158 void contextMenuAboutToHide();
159 void contextMenuTriggered(QAction *action);
160 void doubleClicked(
const QModelIndex &);
161 void itemSelected(
const QItemSelection &);
162 void mouseEntered(
const QModelIndex &);
163 void saveAdditionalSortingConfig();
164 void onServerBegunRefreshing(
const ServerPtr &server);
165 void onServerUpdated(
const ServerPtr &server);
166 void updateHeaderTitles();