-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.cpp
46 lines (35 loc) · 971 Bytes
/
login.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 "login.h"
#include "ui_login.h"
#include <QMessageBox>
login::login(QWidget *parent) : QWidget(parent), ui(new Ui::login) {
ui->setupUi(this);
}
login::~login() { delete ui; }
// void login::on_loginButton_clicked()
// {
// QString email = ui->emailLineEdit->text();
// QString password = ui->passwordLineEdit->text();
// emit loginAttempt(email, password);
// }
// void login::on_signupButton_clicked()
// {
// emit signupRequested();
// }
void login::showErrorMessage(const QString &message)
{
QMessageBox::warning(this, "Error", message);
}
void login::showSuccessMessage(const QString &message)
{
QMessageBox::information(this, "Success", message);
}
void login::on_pushButton_login_login_clicked()
{
QString email = ui->lineEdit_login_mail->text();
QString password = ui->lineEdit_login_pass->text();
emit loginAttempt(email, password);
}
void login::on_pushButton_login_signup_clicked()
{
emit signupRequested();
}