-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainwindow.h
122 lines (100 loc) · 3 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 <QFile>
#include <QGraphicsScene>
#include <QGraphicsView>
#include <QMap>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
QFile inFile;
~MainWindow();
private slots:
/**
* @brief on_pushButton_released
* function which determines action when "Display File" button is pressed
* the function displays the decrypted value of the file in the GraphicsView
*/
void on_pushButton_released();
/**
* @brief on_pushButton_2_released
* function which determines action when "Show Graph" button is pressed
* the function displays the graph of the Bases and communication Channels
*/
void on_pushButton_2_released();
/**
* @brief on_pushButton_3_released
* function which determines action when "Export File" button is pressed
* the function exports the file to output
*/
void on_pushButton_3_released();
/**
* @brief on_pushButton_4_released
* function which determines action when "Open File" button is pressed
* the function displays file dialog to open the input file
*/
void on_pushButton_4_released();
/**
* @brief on_pushButton_5_released
* function which determines action when "Edit Messages" button is pressed
* the function displays the changes messages and respective bases along with it
*/
void on_pushButton_5_released();
protected:
QString paragraph;
QString string1;
QString string2;
QList <QString> vertices;
QList <QString> edges;
QList <QString> messages;
QList <QString> editedMessages;
QVector <int> graphColor;
QMap <char, char> decryptMap;
QMap <char, char> encryptMap;
private:
Ui::MainWindow *ui;
QGraphicsScene* scene;
QGraphicsView* graphView;
QGraphicsEllipseItem* ellipse;
QGraphicsRectItem* rectangle;
QGraphicsTextItem* text;
int messageCount;
QString inputFileName;
QMap <char, char> reverseMap(QMap <char, char>);
/**
* @brief getParagraph
* Provide with the path of the file which is considered as input
* @return
* QString containing the News
*/
QString getNewsParagraph();
/**
* @brief getVerticesList
* Provide with the path of the file which is considered as input
* @return
* QList containing the list of the vertices (Bases)
*/
QList <QString> getVerticesList();
/**
* @brief getChannels
* Provide with the path of the file which is considered as input
* @return
* QList containing the list of edges (Channels)
*/
QList <QString> getChannels();
/**
* @brief getMessages
* Provide with the path of the file which is considered as input
* @return
* QString containing the list of messages(Messages)
*/
QList <QString> getMessages();
QList <QString> editMessages();
};
#endif // MAINWINDOW_H