-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcreatedomaindlg.cpp
More file actions
56 lines (47 loc) · 1.31 KB
/
createdomaindlg.cpp
File metadata and controls
56 lines (47 loc) · 1.31 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <QDebug>
#include "createdomaindlg.h"
#include "QtCore/qsettings.h"
#include "QtWidgets/qpushbutton.h"
//#include "behaviour.h"
#include "account.h"
#include "ui_createdomaindlg.h"
CreateDomainDlg::CreateDomainDlg(QWidget *parent) :
QDialog(parent),
ui(new Ui::CreateDomainDlg)
{
ui->setupUi(this);
}
CreateDomainDlg::~CreateDomainDlg()
{
delete ui;
}
QString CreateDomainDlg::getDomainName()
{
return ui->leDomainName->text().simplified();
}
QString CreateDomainDlg::getCurrency()
{
return ui->leCurrencyName->text().simplified();
}
QString CreateDomainDlg::getCurrencyAbbrev()
{
return ui->leAbbrev->text().simplified();
}
void CreateDomainDlg::on_leDomainName_textChanged(const QString &arg1)
{
// qDebug() << "CreateDomainDlg::on_leDomainName_textChanged called";
QPushButton *okButton = ui->buttonBox->button(QDialogButtonBox::Ok);
if (arg1.isEmpty()) {
okButton->setEnabled(false);
} else {
// TODO: Check that domain name hasn't already been used
okButton->setEnabled(true);
}
}
void CreateDomainDlg::accept()
{
// QString domainName = ui->leDomainName->text().simplified();
// qDebug() << "CreateDomainDlg::accept(): creating domain" << domainName;
// Domain *newDomain = new Domain(domainName, nullptr);
QDialog::accept();
}