-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuserpasswordinput.h
78 lines (53 loc) · 1.58 KB
/
userpasswordinput.h
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef USERPASSWORDINPUT_H
#define USERPASSWORDINPUT_H
#include <QWidget>
#include <QGridLayout>
#include <QCheckBox>
#include <QLineEdit>
#include <QLabel>
#include <QPushButton>
#include <QSlider>
#include "mainwindow.h"
class UserPasswordInput : public QWidget
{
Q_OBJECT
public:
explicit UserPasswordInput(QWidget *parent = nullptr);
QGridLayout *p_central_grid_layout;
QPushButton *p_generate_button;
QPushButton *p_next_button;
QLabel *p_label;
QLineEdit *p_line_edit;
QCheckBox *p_letters_checkbox;
QCheckBox *p_digits_checkbox;
QCheckBox *p_specials_checkbox;
QCheckBox *p_user_input_checkbox;
QSlider *p_slider;
QLabel *p_slider_display;
QString password;
int password_minimum_length;
short password_maximum_length;
//password simbols generation
std::string generatePassword();
char *p_password_simbols = nullptr;
bool setPasswordSimbolsDigits();
bool setPasswordSimbolsLetters();
bool setPasswordSimbolsSpecials();
bool setPasswordSimbolsDigitsLetters();
bool setPasswordSimbolsDigitsSpecials();
bool setPasswordSimbolsLettersSpecials();
bool setPasswordSimbolsDigitsLettersSpecials();
//end of password simbols generation
signals:
void sendPassword(QString);
public slots:
void userPasswordCheckBoxToggled();
void checkPassword();
void generateButtonClicked();
void nextButtonClicked();
void setPasswordMaximumLength(int);
void setPasswordMinimumLength(int);
void setText(QString);
void clearInput();
};
#endif // USERPASSWORDINPUT_H