24 #ifndef __SERVERLIST_H_
25 #define __SERVERLIST_H_
44 class QSortFilterProxyModel;
57 QWidget* getMainWindow() {
return mainWindow; }
58 bool hasAtLeastOneServer()
const;
60 bool isAnyColumnSortedAdditionally()
const;
61 bool isSortingAdditionallyByColumn(
int column)
const;
62 bool isSortingByColumn(
int columnIndex);
64 QList<ServerPtr> selectedServers();
66 ServerPtr serverFromIndex(
const QModelIndex&);
80 void refreshSelected();
81 void serverBegunRefreshing(
const ServerPtr &server);
82 void serverUpdated(
const ServerPtr &server,
int response);
89 void setGroupServersWithPlayersAtTop(
bool b);
91 void tableMiddleClicked(
const QModelIndex& index,
const QPoint& cursorPosition);
92 void tableRightClicked(
const QModelIndex& index,
const QPoint& cursorPosition);
93 void updateCountryFlags();
94 void updateSearch(
const QString& search);
99 void doubleClicked(
const QModelIndex&);
100 void itemSelected(
const QItemSelection&);
102 void mouseEntered(
const QModelIndex&);
122 void serverDoubleClicked(
const ServerPtr&);
123 void serversSelected(QList<ServerPtr>&);
127 static const QString FONT_COLOR_MISSING;
128 static const QString FONT_COLOR_OPTIONAL;
129 static const QString FONT_COLOR_FOUND;
138 Qt::SortOrder sortOrder;
142 QString createIwadToolTip(ServerPtr server);
143 QString createPlayersToolTip(ServerCPtr server);
144 QString createPortToolTip(ServerCPtr server);
145 QString createPwadsToolTip(ServerPtr server);
146 QString createPwadToolTipInfo(
const PWad& pwad,
const ServerPtr &server);
147 QString createServerNameToolTip(ServerCPtr server);
149 bool areColumnsWidthsSettingsChanged();
151 void connectTableModelProxySlots();
156 Qt::SortOrder getColumnDefaultSortOrder(
int columnId);
158 void initCleanerTimer();
160 void prepareServerTable();
162 void saveColumnsWidthsSettings();
164 void setupTableColumnWidths();
165 void setupTableProperties(QSortFilterProxyModel* tableModel);
167 Qt::SortOrder swapCurrentSortOrder();
169 void updateCountryFlags(
bool force);
172 void clearAdditionalSorting();
173 WadFindResult findWad(ServerPtr server,
const QString &name)
const;
174 void removeAdditionalSortingForColumn(
const QModelIndex &modelIndex);
175 void sortAdditionally(
const QModelIndex &modelIndex, Qt::SortOrder order);
178 void contextMenuAboutToHide();
179 void contextMenuTriggered(QAction* action);
180 void saveAdditionalSortingConfig();
181 void updateHeaderTitles();
Structure describing server filter.
void setCountryFlagsIfNotPresent()
Sets country flags for servers that don't have flags present yet.
void findMissingWADs(const ServerPtr &)
A representation of a server for a given game.
void displayServerJoinCommandLine(const ServerPtr &)
void columnHeaderClicked(int)
Handles column sorting.
void lookupHosts()
Looks up hosts for all available servers.
INI section representation.
void serverInfoUpdated(const ServerPtr &)
Emitted every time when a server info is updated through serverUpdated()