23 #ifndef __CFGCUSTOMSERVERS_H_
24 #define __CFGCUSTOMSERVERS_H_
27 #include "gui/configuration/configpage.h"
34 class QStandardItemModel;
44 QIcon
icon()
const override
46 return QIcon(
":/flags/localhost-small");
48 QString
name()
const override
50 return tr(
"Pinned servers");
66 EngineColumnIndex = 0,
67 AddressColumnIndex = 1,
81 CheckAndFixPorts checkAndFixPorts(
int firstRow,
int lastRow);
83 bool isPortColumnWithinRange(
int leftmostColumnIndex,
int rightmostColumnIndex);
84 bool isPortCorrect(
int rowIndex);
86 void prepareEnginesComboBox();
88 void setEnabledOnSelected(
bool enabled);
89 void setEngineOnItem(QStandardItem *,
const QString &engineName);
90 void setPortToDefault(
int rowIndex);
92 QVector<CustomServerInfo> tableGetServers();
96 void add(
const QString &engineName,
const QString &host,
97 unsigned short port,
bool enabled);
98 void dataChanged(
const QModelIndex &topLeft,
const QModelIndex &bottomRight);
99 void disableSelected();
100 void enableSelected();