23 #ifndef __CFGCUSTOMSERVERS_H_
24 #define __CFGCUSTOMSERVERS_H_
26 #include "gui/configuration/configurationbasebox.h"
30 class ConfigurationBoxInfo;
35 class QStandardItemModel;
45 QIcon
icon()
const {
return QIcon(
":/flags/localhost-small"); }
46 QString
name()
const {
return tr(
"Custom Servers"); }
58 EngineColumnIndex = 0,
59 AddressColumnIndex = 1,
63 QStandardItemModel* model;
74 bool isPortColumnWithingRange(
int leftmostColumnIndex,
int rightmostColumnIndex);
75 bool isPortCorrect(
int rowIndex);
77 void prepareEnginesComboBox();
80 void setEngineOnItem(QStandardItem*,
const QString& engineName);
81 void setPortToDefault(
int rowIndex);
84 QVector<CustomServerInfo> tableGetServers();
88 void add(
const QString& engineName,
const QString& host,
unsigned short port);
89 void dataChanged(
const QModelIndex& topLeft,
const QModelIndex& bottomRight);
void readSettings()
Reimplement this to read settings from config into widgets.
CheckAndFixPorts checkAndFixPorts(int firstRow, int lastRow)
Moves through rows and checks if network port information is correct.
void saveSettings()
Reimplement this to write settings to config from widgets.
QString name() const
Reimplement this to return a list-displayable name for this ConfigurationBaseBox. ...
QIcon icon() const
Reimplement this to return a displayable icon for the ConfigurationBaseBox.
Base class for configuration pages.