-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
122 lines (82 loc) · 2.47 KB
/
mainwindow.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <epasswordcore.h>
class QLabel;
class QGridLayout;
class QPushButton;
class QScrollArea;
class QVBoxLayout;
class QStackedWidget;
class ElementButton;
class ElementInfoWidget;
class UserNameInput;
class UserPasswordInput;
class UserNoteInput;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
static ePasswordCore core;
private :
QLabel *p_central_widget;
QGridLayout *p_grid_layout;
QPushButton *p_add_button;
QPushButton *p_wipe_button;
QStackedWidget *p_stacked_info_widget;
QScrollArea *p_scroll_area;
QWidget *p_scroll_area_widget;
QVBoxLayout *p_scroll_area_widget_layout;
QWidget *p_author_widget;
QPushButton *p_author_button;
QList<ElementButton*> element_buttons_list;
QLabel *p_null_widget;
int scroll_widget_height;
public :
static int element_buttons_height;
private :
void createButtonsSettings();
void createScrollAreaSettings();
void createTakeNameInputWidget();
void createTakePasswordInputWidget();
void createTakeNoteInputWidget();
void clearInput();
void createWidgetsPlacement();
void createBackGround();
void createObjectNames();
void createAuthorWidgetSettings();
ElementInfoWidget * createNewInfoLabel(QString name, QString password, QString note);
void removeElement(ElementInfoWidget*);
QString name_buffer,
password_buffer,
note_buffer;
UserNameInput *p_name_input;
UserPasswordInput *p_password_input;
UserNoteInput *p_note_input;
signals:
void nextInput();
public slots:
void processRefreshScrollArea();
void processCreateNewElement(QString name = 0, QString password = 0, QString note = 0);
void processRemoveElement();
void processWipeData();
void processReadElementsFromFile();
void processElementEdited(ElementInfoWidget*);
void processTakeName();
void processTakePassword();
void processTakeNote();
void createEditConnections();
void destroyEditConnections();
void clearElementInfoWidget();
void setElementInfoWidget(ElementInfoWidget*);
void showAuthorWidget();
void copyToNameBuffer(QString);
void copyToPasswordBuffer(QString);
void copyToNoteBuffer(QString);
void setOtherWidgetsEabled(bool);
void lockOtherWidgets();
void unlockOtherWidgets();
};
#endif // MAINWINDOW_H