-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
107 lines (91 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QApplication>
#include <QWidget>
#include <QPushButton>
#include <QComboBox>
#include <QLabel>
#include <QString>
#include <QStringList>
#include <QGridLayout>
#include <QTextEdit>
#include "decipher.h"
#include "cipher.h"
#include "sign.h"
#include "generatekey.h"
#include "hash.h"
#include "verify.h"
class MainWindow : public QWidget
{
Q_OBJECT
public:
MainWindow();
int getHashSelected() const {return comboHash->currentIndex();}
int getCipherSelected() const {return comboCipher->currentIndex();}
int getDecipherSelected() const {return comboDecipher->currentIndex();}
int getSignSelected() const {return comboSign->currentIndex();}
int getGenerateKeySelected() const {return comboGenerateKey->currentIndex();}
int getVerifySelected() const {return comboVerify->currentIndex();}
public slots:
void openHash();
void openGenerateKey();
void openCipher();
void openDecipher();
void openSign();
void openVerify();
void viewFile1(QString);
void viewFile2(QString);
signals:
void hashSelected(int);
void generateKeySelected(int);
void cipherSelected(int);
void decipherSelected(int);
void signSelected(int);
void verifSelected(int);
private:
char c;
QMessageBox *mbInformation;
QPushButton *buttonHash;
QPushButton *buttonGenerateKey;
QPushButton *buttonCipher;
QPushButton *buttonDecipher;
QPushButton *buttonSign;
QPushButton *buttonVerify;
QPushButton *buttonQuit;
QPushButton *buttonBrowseFile1;
QPushButton *buttonBrowseFile2;
QFileDialog *fdFile1;
QFileDialog *fdFile2;
QComboBox *comboHash;
QComboBox *comboGenerateKey;
QComboBox *comboCipher;
QComboBox *comboDecipher;
QComboBox *comboSign;
QComboBox *comboVerify;
QLabel *labelAfficherFichier1;
QLabel *labelAfficherFichier2;
QLabel *labelHash;
QLabel *labelGenerateKey;
QLabel *labelCipher;
QLabel *labelDecipher;
QLabel *labelSign;
QLabel *labelVerify;
QTextEdit *qtFichier1;
QTextEdit *qtFichier2;
QGridLayout *glMain;
QGridLayout *glTextEdit;
QGridLayout *gl;
QGridLayout *glHash;
QGridLayout *glGenKey;
QGridLayout *glCipher;
QGridLayout *glDecipher;
QGridLayout *glSign;
QGridLayout *glVerify;
Cipher *cipher;
Decipher *decipher;
Sign *sign;
Verify *verify;
GenerateKey *generateKey;
Hash *hash;
};
#endif // MainWindow_H