-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.cpp
54 lines (41 loc) · 1.33 KB
/
signup.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
46
47
48
49
50
51
52
53
#include "signup.h"
#include "ui_signup.h"
#include <QMessageBox>
signup::signup(QWidget *parent) : QWidget(parent), ui(new Ui::signup) {
ui->setupUi(this);
}
signup::~signup() { delete ui; }
// void Signup::on_signupButton_clicked()
// {
// QString firstName = ui->firstNameLineEdit->text();
// QString lastName = ui->lastNameLineEdit->text();
// QString email = ui->emailLineEdit->text();
// QString password = ui->passwordLineEdit->text();
// emit signupAttempt(firstName, lastName, email, password);
// }
// void Signup::on_backButton_clicked()
// {
// emit backToLoginRequested();
// }
void signup::showErrorMessage(const QString &message)
{
QMessageBox::warning(this, "Error", message);
}
void signup::on_pushButton_signup_clicked()
{
QString firstName = ui->lineEdit_signup_fname->text();
QString lastName = ui->LineEdit_signup_lname->text();
QString email = ui->lineEdit_signup_mail->text();
QString password = ui->lineEdit_signup_pass->text();
QString passwordReenter = ui->lineEdit_signup_pass_reenter->text();
if(password==passwordReenter)
{
emit signupAttempt(firstName, lastName, email, password);
}
else
QMessageBox::warning(this, "Error", "Passwords didn't match,Please Retry");
}
void signup::on_pushButton_signup_gotologin_clicked()
{
emit backToLoginRequested();
}