-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathregistration.cpp
More file actions
36 lines (29 loc) · 972 Bytes
/
registration.cpp
File metadata and controls
36 lines (29 loc) · 972 Bytes
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
#include "registration.h"
#include "ui_registration.h"
#include "qmessagebox.h"
registration::registration(QWidget *parent) :
QDialog(parent),
ui(new Ui::registration)
{
ui->setupUi(this);
}
registration::~registration()
{
delete ui;
}
void registration::on_signup_button_reg_clicked()
{
QString login = ui->login_reg->text(); // login string
QString pass = ui->pass_reg->text(); // pass string
if (login != "admin" && pass != "admin") {
// отправить проверку в дб + занести в дб
QMessageBox::information(this, "кайф", "Успешно зарегистрировался"); // if login&&pass found
close();
} else {
QMessageBox::warning(this, "печалька", "Занято, попутал ты чето"); // if login&&pass not found
}
}
void registration::on_back_button_clicked()
{
close(); // close this window
}