-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfigpropertieswindow.cpp
More file actions
33 lines (30 loc) · 1.07 KB
/
configpropertieswindow.cpp
File metadata and controls
33 lines (30 loc) · 1.07 KB
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
#include "configpropertieswindow.h"
#include "ui_configpropertieswindow.h"
ConfigPropertiesWindow::ConfigPropertiesWindow(QWidget *parent) :
QDialog(parent),
ui(new Ui::ConfigPropertiesWindow)
{
ui->setupUi(this);
}
ConfigPropertiesWindow::ConfigPropertiesWindow(QWidget *parent, ScoreCheckingConfig *config) :
QDialog(parent),
ui(new Ui::ConfigPropertiesWindow)
{
this->config=config;
ui->setupUi(this);
ui->txtName->setText(QString(this->config->Name.c_str()));
ui->txtPassphrase->setText(QString(this->config->Passphrase.c_str()));
ui->txtDescription->setText(QString(this->config->Description.c_str()));
ui->spinSeconds->setValue(this->config->checkSeconds);
}
ConfigPropertiesWindow::~ConfigPropertiesWindow()
{
delete ui;
}
void ConfigPropertiesWindow::on_buttonBox_accepted()
{
this->config->Name=ui->txtName->text().toStdString();
this->config->Passphrase=ui->txtPassphrase->text().toStdString();
this->config->Description=ui->txtDescription->text().toStdString();
this->config->checkSeconds=ui->spinSeconds->value();
}