-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmangerlog.cpp
More file actions
39 lines (34 loc) · 845 Bytes
/
Copy pathmangerlog.cpp
File metadata and controls
39 lines (34 loc) · 845 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
#include "mangerlog.h"
#include "login.h"
#include "managerui.h"
#include "ui_mangerlog.h"
#include "QMessageBox"
mangerlog::mangerlog(ComputerClassroom* m_classroom,QWidget *parent)
: QWidget(parent)
, ui(new Ui::mangerlog)
,m_classroom(m_classroom)
{
ui->setupUi(this);
}
mangerlog::~mangerlog()
{
delete ui;
}
void mangerlog::on_manlogexit_clicked()
{
login *a=new login(m_classroom);
this->close();
a->show();
}
void mangerlog::on_manlog_clicked()
{
QString username = ui->manid->text();
QString password = ui->password->text();
if (loginManagers->authenticate(username, password, true)) {
managerui *a = new managerui(m_classroom);
this->close();
a->show();
} else {
QMessageBox::warning(this, "警告", "账号密码不正确", QMessageBox::Ok);
}
}