[Browser] Add Client Settings and Server Settings Tabs.

Save Browser state to the client config
pull/416/head
Koncord 7 years ago
parent 3d5860d6f4
commit 2aaf9105af

@ -14,6 +14,7 @@ set(BROWSER
PingUpdater.cpp PingUpdater.cpp
PingHelper.cpp PingHelper.cpp
QueryHelper.cpp QueryHelper.cpp
Settings.cpp
${CMAKE_SOURCE_DIR}/files/tes3mp/browser.rc ${CMAKE_SOURCE_DIR}/files/tes3mp/browser.rc
) )
@ -33,6 +34,7 @@ set(BROWSER_HEADER
netutils/Utils.hpp netutils/Utils.hpp
netutils/QueryClient.hpp netutils/QueryClient.hpp
Types.hpp Types.hpp
Settings.hpp
) )
source_group(browser FILES ${BROWSER} ${BROWSER_HEADER}) source_group(browser FILES ${BROWSER} ${BROWSER_HEADER})

@ -13,6 +13,8 @@
#include <QJsonArray> #include <QJsonArray>
#include <QFile> #include <QFile>
#include <QJsonDocument> #include <QJsonDocument>
#include <apps/browser/netutils/Utils.hpp>
#include <QtWidgets/QFileDialog>
using namespace Process; using namespace Process;
@ -31,9 +33,6 @@ MainWindow::MainWindow(QWidget *parent)
tblServerBrowser->setModel(proxyModel); tblServerBrowser->setModel(proxyModel);
tblFavorites->setModel(proxyModel); tblFavorites->setModel(proxyModel);
// Remove Favorites tab while it remains broken
tabWidget->removeTab(1);
tblServerBrowser->hideColumn(ServerData::ADDR); tblServerBrowser->hideColumn(ServerData::ADDR);
tblFavorites->hideColumn(ServerData::ADDR); tblFavorites->hideColumn(ServerData::ADDR);
@ -57,12 +56,20 @@ MainWindow::MainWindow(QWidget *parent)
connect(cBBoxWOPass, SIGNAL(toggled(bool)), this, SLOT(noPasswordSwitch(bool))); connect(cBBoxWOPass, SIGNAL(toggled(bool)), this, SLOT(noPasswordSwitch(bool)));
connect(comboLatency, SIGNAL(currentIndexChanged(int)), this, SLOT(maxLatencyChanged(int))); connect(comboLatency, SIGNAL(currentIndexChanged(int)), this, SLOT(maxLatencyChanged(int)));
connect(leGamemode, SIGNAL(textChanged(const QString &)), this, SLOT(gamemodeChanged(const QString &))); connect(leGamemode, SIGNAL(textChanged(const QString &)), this, SLOT(gamemodeChanged(const QString &)));
connect(pbModulePath, &QPushButton::clicked, [this](bool) {
QString str = QFileDialog::getExistingDirectory(this, tr("Module path"),
leModulePath->text(), QFileDialog::ShowDirsOnly);
if(!str.isEmpty())
leModulePath->setText(str);
});
loadFavorites(); loadFavorites();
queryHelper->refresh(); queryHelper->refresh();
settingsMgr.loadBrowserSettings(*this);
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
settingsMgr.saveBrowserSettings(*this);
delete mGameInvoker; delete mGameInvoker;
} }
@ -71,6 +78,9 @@ void MainWindow::addServerAndUpdate(const QString &addr)
favorites->insertRow(0); favorites->insertRow(0);
QModelIndex mi = favorites->index(0, ServerData::ADDR); QModelIndex mi = favorites->index(0, ServerData::ADDR);
favorites->setData(mi, addr, Qt::EditRole); favorites->setData(mi, addr, Qt::EditRole);
/*auto address = addr.split(":");
auto data = getExtendedData(address[0].toLatin1(), address[1].toUShort());*/
//NetController::get()->updateInfo(favorites, mi); //NetController::get()->updateInfo(favorites, mi);
//QueryClient::Update(RakNet::SystemAddress()) //QueryClient::Update(RakNet::SystemAddress())
/*auto data = QueryClient::Get().Query(); /*auto data = QueryClient::Get().Query();

@ -9,6 +9,7 @@
#include "ui_Main.h" #include "ui_Main.h"
#include "ServerModel.hpp" #include "ServerModel.hpp"
#include "MySortFilterProxyModel.hpp" #include "MySortFilterProxyModel.hpp"
#include "Settings.hpp"
#include <components/process/processinvoker.hpp> #include <components/process/processinvoker.hpp>
class QueryHelper; class QueryHelper;
@ -39,6 +40,7 @@ private:
Process::ProcessInvoker *mGameInvoker; Process::ProcessInvoker *mGameInvoker;
ServerModel *browser, *favorites; ServerModel *browser, *favorites;
MySortFilterProxyModel *proxyModel; MySortFilterProxyModel *proxyModel;
SettingsMgr settingsMgr;
void loadFavorites(); void loadFavorites();
}; };

@ -0,0 +1,189 @@
//
// Created by koncord on 31.03.18.
//
#include "Settings.hpp"
#include <QDebug>
#include <components/files/configurationmanager.hpp>
#include <apps/browser/netutils/QueryClient.hpp>
#include "MainWindow.hpp"
std::string loadSettings (Settings::Manager & settings, const std::string &cfgName)
{
Files::ConfigurationManager mCfgMgr;
// Create the settings manager and load default settings file
const std::string localdefault = (mCfgMgr.getLocalPath() / (cfgName + "-default.cfg")).string();
const std::string globaldefault = (mCfgMgr.getGlobalPath() / (cfgName + "-default.cfg")).string();
// prefer local
if (boost::filesystem::exists(localdefault))
settings.loadDefault(localdefault);
else if (boost::filesystem::exists(globaldefault))
settings.loadDefault(globaldefault);
else
throw std::runtime_error ("No default settings file found! Make sure the file \"" + cfgName + "-default.cfg\" was properly installed.");
// load user settings if they exist
const std::string settingspath = (mCfgMgr.getUserConfigPath() / (cfgName + ".cfg")).string();
if (boost::filesystem::exists(settingspath))
settings.loadUser(settingspath);
return settingspath;
}
SettingsMgr::SettingsMgr()
{
clientCfg = loadSettings(clientMgr, "tes3mp-client");
switchMgr();
serverCfg = loadSettings(serverMgr, "tes3mp-server");
switchMgr();
std::string addr = clientMgr.getString("address", "Master");
int port = clientMgr.getInt("port", "Master");
QueryClient::Get().SetServer(addr, port);
}
void SettingsMgr::loadBrowserSettings(Ui::MainWindow &mw)
{
mw.comboLatency->setCurrentIndex(clientMgr.getInt("maxLatency", "Browser"));
mw.leGamemode->setText(QString::fromStdString(clientMgr.getString("gameMode", "Browser")));
mw.cBoxNotFull->setCheckState(clientMgr.getBool("notFull", "Browser") ? Qt::Checked : Qt::Unchecked);
mw.cBoxWithPlayers->setCheckState(clientMgr.getBool("withPlayers", "Browser") ? Qt::Checked : Qt::Unchecked);
mw.cBBoxWOPass->setCheckState(clientMgr.getBool("noPassword", "Browser") ? Qt::Checked : Qt::Unchecked);
mw.tblServerBrowser->sortByColumn(clientMgr.getInt("sortByCol", "Browser"),
clientMgr.getBool("sortByColAscending", "Browser") ? Qt::AscendingOrder : Qt::DescendingOrder);
loadClientSettings(mw);
switchMgr();
loadServerSettings(mw);
switchMgr();
}
void SettingsMgr::saveBrowserSettings(Ui::MainWindow &mw)
{
clientMgr.setInt("maxLatency", "Browser", mw.comboLatency->currentIndex());
clientMgr.setString("gameMode", "Browser", mw.leGamemode->text().toStdString());
clientMgr.setBool("notFull", "Browser", mw.cBoxNotFull->checkState() == Qt::Checked);
clientMgr.setBool("withPlayers", "Browser", mw.cBoxWithPlayers->checkState() == Qt::Checked);
clientMgr.setBool("noPassword", "Browser", mw.cBBoxWOPass->checkState() == Qt::Checked);
clientMgr.setInt("sortByCol", "Browser", mw.tblServerBrowser->horizontalHeader()->sortIndicatorSection());
clientMgr.setBool("sortByColAscending", "Browser", mw.tblServerBrowser->horizontalHeader()->sortIndicatorOrder() == Qt::AscendingOrder);
saveClientSettings(mw);
clientMgr.saveUser(clientCfg);
switchMgr();
saveServerSettings(mw);
switchMgr();
}
void SettingsMgr::loadClientSettings(Ui::MainWindow &mw)
{
mw.leClientAddress->setText(QString::fromStdString(clientMgr.getString("destinationAddress", "General")));
mw.leClientPort->setText(QString::fromStdString(clientMgr.getString("port", "General")));
mw.leClientPassword->setText(QString::fromStdString(clientMgr.getString("password", "General")));
mw.combLoglevel->setCurrentIndex(clientMgr.getInt("loglevel", "General"));
mw.leClientMAddress->setText(QString::fromStdString(clientMgr.getString("address", "Master")));
mw.leClientMPort->setText(QString::fromStdString(clientMgr.getString("port", "Master")));
mw.pbChatKey->setText(QString::fromStdString(clientMgr.getString("keySay", "Chat")));
mw.pbModeKey->setText(QString::fromStdString(clientMgr.getString("keyChatMode", "Chat")));
mw.sbPosX->setValue(clientMgr.getInt("x", "Chat"));
mw.sbPosY->setValue(clientMgr.getInt("y", "Chat"));
mw.sbPosW->setValue(clientMgr.getInt("w", "Chat"));
mw.sbPosH->setValue(clientMgr.getInt("h", "Chat"));
mw.sbDelay->setValue(clientMgr.getFloat("delay", "Chat"));
}
void SettingsMgr::saveClientSettings(Ui::MainWindow &mw)
{
clientMgr.setString("destinationAddress", "General", mw.leClientAddress->text().toStdString());
clientMgr.setString("port", "General", mw.leClientPort->text().toStdString());
clientMgr.setString("password", "General", mw.leClientPassword->text().toStdString());
clientMgr.setInt("loglevel", "General", mw.combLoglevel->currentIndex());
clientMgr.setString("address", "Master", mw.leClientMAddress->text().toStdString());
clientMgr.setString("port", "Master", mw.leClientMPort->text().toStdString());
clientMgr.setString("keySay", "Chat", mw.pbChatKey->text().toStdString());
clientMgr.setString("keyChatMode", "Chat", mw.pbModeKey->text().toStdString());
clientMgr.setInt("x", "Chat", mw.sbPosX->value());
clientMgr.setInt("y", "Chat", mw.sbPosY->value());
clientMgr.setInt("w", "Chat", mw.sbPosW->value());
clientMgr.setInt("h", "Chat", mw.sbPosH->value());
clientMgr.setFloat("delay", "Chat", mw.sbDelay->value());
}
void SettingsMgr::loadServerSettings(Ui::MainWindow &mw)
{
mw.leServerAddress->setText(QString::fromStdString(serverMgr.getString("localAddress", "General")));
mw.leServerPort->setText(QString::fromStdString(serverMgr.getString("port", "General")));
mw.sbMaxPlayers->setValue(serverMgr.getInt("maximumPlayers", "General"));
mw.leHostname->setText(QString::fromStdString(serverMgr.getString("hostname", "General")));
mw.combServerLoglevel->setCurrentIndex(serverMgr.getInt("logLevel", "General"));
mw.leServerPassword->setText(QString::fromStdString(serverMgr.getString("password", "General")));
mw.chbMSenabled->setCheckState(serverMgr.getBool("enabled", "MasterServer") ? Qt::Checked : Qt::Unchecked);
mw.leServerMaddress->setText(QString::fromStdString(serverMgr.getString("address", "MasterServer")));
mw.leServerMPort->setText(QString::fromStdString(serverMgr.getString("port", "MasterServer")));
mw.sbRate->setValue(serverMgr.getInt("rate", "MasterServer"));
mw.leModulePath->setText(QString::fromStdString(serverMgr.getString("home", "Modules")));
mw.chbAutosort->setCheckState(serverMgr.getBool("autoSort", "Modules") ? Qt::Checked : Qt::Unchecked);
}
void SettingsMgr::saveServerSettings(Ui::MainWindow &mw)
{
serverMgr.setString("localAddress", "General", mw.leServerAddress->text().toStdString());
serverMgr.setString("port", "General", mw.leServerPort->text().toStdString());
serverMgr.setInt("maximumPlayers", "General", mw.sbMaxPlayers->value());
serverMgr.setString("hostname", "General", mw.leHostname->text().toStdString());
serverMgr.setInt("logLevel", "General", mw.combServerLoglevel->currentIndex());
serverMgr.setString("password", "General", mw.leServerPassword->text().toStdString());
serverMgr.setBool("enabled", "MasterServer", mw.chbMSenabled->checkState() == Qt::Checked);
serverMgr.setString("address", "MasterServer", mw.leServerMaddress->text().toStdString());
serverMgr.setString("port", "MasterServer", mw.leServerMPort->text().toStdString());
serverMgr.setInt("rate", "MasterServer", mw.sbRate->value());
serverMgr.setString("home", "Modules", mw.leModulePath->text().toStdString());
serverMgr.setBool("autoSort", "Modules", mw.chbAutosort->checkState() == Qt::Checked);
serverMgr.saveUser(serverCfg);
}
void SettingsMgr::switchMgr()
{
static Settings::CategorySettingValueMap saveUserSettings;
static Settings::CategorySettingValueMap saveDefaultSettings;
static Settings::CategorySettingVector saveChangedSettings;
static bool currentMgrIsClient = true;
if(!currentMgrIsClient)
{
saveUserSettings.swap(clientMgr.mUserSettings);
saveDefaultSettings.swap(clientMgr.mDefaultSettings);
saveChangedSettings.swap(clientMgr.mChangedSettings);
qDebug() << "Manager switched to Client config";
}
else
{
saveUserSettings.swap(serverMgr.mUserSettings);
saveDefaultSettings.swap(serverMgr.mDefaultSettings);
saveChangedSettings.swap(serverMgr.mChangedSettings);
qDebug() << "Manager switched to Server config";
}
currentMgrIsClient = !currentMgrIsClient;
}

@ -0,0 +1,32 @@
//
// Created by koncord on 31.03.18.
//
#pragma once
#include <components/settings/settings.hpp>
namespace Ui
{
class MainWindow;
}
class SettingsMgr
{
public:
SettingsMgr();
void loadBrowserSettings(Ui::MainWindow &mw);
void saveBrowserSettings(Ui::MainWindow &mw);
void loadClientSettings(Ui::MainWindow &mw);
void saveClientSettings(Ui::MainWindow &mw);
void loadServerSettings(Ui::MainWindow &mw);
void saveServerSettings(Ui::MainWindow &mw);
private:
Settings::Manager serverMgr, clientMgr;
std::string serverCfg, clientCfg;
void switchMgr();
};

@ -4,42 +4,8 @@
#include <apps/browser/netutils/QueryClient.hpp> #include <apps/browser/netutils/QueryClient.hpp>
#include "MainWindow.hpp" #include "MainWindow.hpp"
std::string loadSettings (Settings::Manager & settings)
{
Files::ConfigurationManager mCfgMgr;
// Create the settings manager and load default settings file
const std::string localdefault = (mCfgMgr.getLocalPath() / "tes3mp-client-default.cfg").string();
const std::string globaldefault = (mCfgMgr.getGlobalPath() / "tes3mp-client-default.cfg").string();
// prefer local
if (boost::filesystem::exists(localdefault))
settings.loadDefault(localdefault);
else if (boost::filesystem::exists(globaldefault))
settings.loadDefault(globaldefault);
else
throw std::runtime_error ("No default settings file found! Make sure the file \"tes3mp-client-default.cfg\" was properly installed.");
// load user settings if they exist
const std::string settingspath = (mCfgMgr.getUserConfigPath() / "tes3mp-client.cfg").string();
if (boost::filesystem::exists(settingspath))
settings.loadUser(settingspath);
return settingspath;
}
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
Settings::Manager mgr;
loadSettings(mgr);
std::string addr = mgr.getString("address", "Master");
int port = mgr.getInt("port", "Master");
// initialize resources, if needed
// Q_INIT_RESOURCE(resfile);
QueryClient::Get().SetServer(addr, port);
QApplication app(argc, argv); QApplication app(argc, argv);
MainWindow d; MainWindow d;

@ -66,6 +66,688 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tabSettings">
<attribute name="title">
<string>Client Settings</string>
</attribute>
<layout class="QFormLayout" name="formLayout">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QGroupBox" name="t">
<property name="title">
<string>Default Server</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_10">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leClientAddress">
<property name="text">
<string>127.0.0.1</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Port</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leClientPort">
<property name="text">
<string>25565</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_28">
<item>
<widget class="QLabel" name="label_19">
<property name="text">
<string>Password</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leClientPassword"/>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="t_2">
<property name="title">
<string>Master Server</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leClientMAddress">
<property name="text">
<string>127.0.0.1</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<item>
<widget class="QLabel" name="label_5">
<property name="text">
<string>Port</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leClientMPort">
<property name="text">
<string>25565</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Log Level</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="combLoglevel">
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>Fatal errors</string>
</property>
</item>
<item>
<property name="text">
<string>General errors</string>
</property>
</item>
<item>
<property name="text">
<string>Warnings</string>
</property>
</item>
<item>
<property name="text">
<string>Info</string>
</property>
</item>
<item>
<property name="text">
<string>Verbose</string>
</property>
</item>
<item>
<property name="text">
<string>Trace</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item row="0" column="1">
<widget class="QGroupBox" name="groupBox_3">
<property name="title">
<string>Chat</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_16">
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Key switch mode</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbModeKey">
<property name="text">
<string>F2</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_15">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Key</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbChatKey">
<property name="text">
<string>Y</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_24">
<item>
<widget class="QLabel" name="label_14">
<property name="text">
<string>Delay</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="sbDelay">
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.500000000000000</double>
</property>
<property name="maximum">
<double>101.000000000000000</double>
</property>
<property name="value">
<double>5.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QGroupBox" name="grboxPos">
<property name="title">
<string>Window position</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_19">
<item>
<widget class="QLabel" name="label_10">
<property name="text">
<string>W</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbPosW">
<property name="maximum">
<number>65535</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_17">
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>X</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbPosX">
<property name="maximum">
<number>65535</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_18">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Y</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbPosY">
<property name="maximum">
<number>65535</number>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_20">
<item>
<widget class="QLabel" name="label_11">
<property name="text">
<string>H</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbPosH">
<property name="maximum">
<number>65535</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Server Settings</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox">
<property name="title">
<string>General</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QGroupBox" name="t_3">
<property name="title">
<string>Address</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_21">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_22">
<item>
<widget class="QLabel" name="label_12">
<property name="text">
<string>Broadcast address</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leServerAddress">
<property name="text">
<string>0.0.0.0</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_23">
<item>
<widget class="QLabel" name="label_13">
<property name="text">
<string>Port</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leServerPort">
<property name="text">
<string>25565</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_25">
<item>
<widget class="QLabel" name="label_16">
<property name="text">
<string>Hostname</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leHostname">
<property name="text">
<string>My TES3MP server</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_15">
<property name="text">
<string>Maximum players</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbMaxPlayers">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>655535</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_27">
<item>
<widget class="QLabel" name="label_18">
<property name="text">
<string>Password</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leServerPassword"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_26">
<item>
<widget class="QLabel" name="label_17">
<property name="text">
<string>Log Level</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="combServerLoglevel">
<item>
<property name="text">
<string>Off</string>
</property>
</item>
<item>
<property name="text">
<string>Fatal errors</string>
</property>
</item>
<item>
<property name="text">
<string>General errors</string>
</property>
</item>
<item>
<property name="text">
<string>Warnings</string>
</property>
</item>
<item>
<property name="text">
<string>Info</string>
</property>
</item>
<item>
<property name="text">
<string>Verbose</string>
</property>
</item>
<item>
<property name="text">
<string>Trace</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="0" column="1" rowspan="2">
<widget class="QGroupBox" name="groupBox_2">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Modules</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QCheckBox" name="chbAutosort">
<property name="text">
<string>AutoSort</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="enabled">
<bool>true</bool>
</property>
<layout class="QVBoxLayout" name="vertLayoutModulesList">
<item>
<widget class="QListWidget" name="listWidget"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_55">
<item>
<widget class="QLineEdit" name="leAddModule"/>
</item>
<item>
<widget class="QPushButton" name="pbAddModule">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_56">
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>Up</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButton_2">
<property name="text">
<string>Down</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbRemModule">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_57">
<item>
<widget class="QLabel" name="label_40">
<property name="text">
<string>Path</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leModulePath"/>
</item>
<item>
<widget class="QPushButton" name="pbModulePath">
<property name="text">
<string>...</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="t_7">
<property name="title">
<string>Master Server</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QCheckBox" name="chbMSenabled">
<property name="text">
<string>Enabled</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_51">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_52">
<item>
<widget class="QLabel" name="label_37">
<property name="text">
<string>Address</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leServerMaddress">
<property name="text">
<string>127.0.0.1</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_53">
<item>
<widget class="QLabel" name="label_38">
<property name="text">
<string>Port</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leServerMPort">
<property name="text">
<string>25565</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_54">
<item>
<widget class="QLabel" name="label_39">
<property name="text">
<string>Update rate</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbRate">
<property name="minimum">
<number>500</number>
</property>
<property name="maximum">
<number>10000</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>1000</number>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget> </widget>
</item> </item>
<item> <item>

Loading…
Cancel
Save