-
Notifications
You must be signed in to change notification settings - Fork 0
/
avtorizat.cpp
52 lines (41 loc) · 1.09 KB
/
avtorizat.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
#include "avtorizat.h"
#include "ui_avtorizat.h"
#include"dobpolzovat.h"
avtorizat::avtorizat(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::avtorizat)
{
ui->setupUi(this);
setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::CustomizeWindowHint);
QPainterPath painPath;
painPath.addRoundedRect(rect(), 30, 30, Qt::AbsoluteSize);
this->setMask(painPath.toFillPolygon().toPolygon());
admin = new admins();
connect(admin, &admins::firstWindow,this, &QMainWindow::show);
polz = new polzovat();
connect(polz, &polzovat::firstWindow,this, &QMainWindow::show);
}
avtorizat::~avtorizat()
{
delete ui;
}
void avtorizat::on_vihodAVTORIZ_clicked()
{
out.show();
}
void avtorizat::on_AVTORIZ_clicked()
{
QString login = ui->login->text();
QString password = ui->password->text();
int t = addpolz.avtorizati(login,password);
switch(t){
case 1:
admin->show();
this->close();
break;
case 2:
polz->show();
this->close();
break;
}
}