-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettingswin.cpp
45 lines (35 loc) · 942 Bytes
/
settingswin.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include "settingswin.h"
#include "ui_settingswin.h"
#include "qdebug.h"
#include "servermanager.h"
CSettingsWin::CSettingsWin(QWidget *parent) :
QDialog(parent),
CLogable("SettingDialogLog"),
ui(new Ui::CSettingsWin)
{
ui->setupUi(this);
}
CSettingsWin::~CSettingsWin()
{
delete ui;
}
void CSettingsWin::on_buttonBox_accepted()
{
int numOfDockers = ((ui->lineEdit)->text()).toInt();
std::string errMsg("");
for (int docker(0); docker < numOfDockers; ++docker)
{
CServerManager::getReference().registerClient();
}
//qDebug() << "Created: " << numOfDockers << " Servers";
LOGGER_HELPER(DEBUG, errMsg, "Created: " , numOfDockers, " Servers");
}
void CSettingsWin::on_buttonBox_rejected()
{
std::string errMsg("");
LOGGER_HELPER(DEBUG, errMsg, "Oper canceled");
}
void CSettingsWin::on_lineEdit_editingFinished()
{
m_numOfDockers = ((ui->lineEdit)->text()).toInt();
}