-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstulog.cpp
More file actions
40 lines (34 loc) · 814 Bytes
/
Copy pathstulog.cpp
File metadata and controls
40 lines (34 loc) · 814 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
37
38
39
#include "stulog.h"
#include "login.h"
#include "qmessagebox.h"
#include "stuui.h"
#include "ui_stulog.h"
stulog::stulog(ComputerClassroom *m_classroom, QWidget *parent)
: QWidget(parent)
, ui(new Ui::stulog)
,m_classroom(m_classroom)
{
ui->setupUi(this);
}
stulog::~stulog()
{
delete ui;
}
void stulog::on_stulogexit_clicked()
{
login *a=new login(m_classroom);
this->close();
a->show();
}
void stulog::on_sutlog_clicked()
{
QString username = ui->stuid->text();
QString password = ui->stupassword->text();
if (loginManagers->authenticate(username, password, false)) {
stuui *a = new stuui(m_classroom);
this->close();
a->show();
} else {
QMessageBox::warning(this, "警告", "账号密码不正确", QMessageBox::Ok);
}
}