PictureCrypt  1.4.1
An image-steganography project
viewpc.h
Go to the documentation of this file.
1 #ifndef VIEWPC_H
2 #define VIEWPC_H
3 
4 #include <QMainWindow>
5 #include <QFile>
6 #include <QFileInfo>
7 #include <QFileDialog>
8 #include <QMessageBox>
9 #include <QImage>
10 #include <QByteArray>
11 #include <QVector>
12 #include <QThread>
13 #include <QDesktopServices>
14 #include <QInputDialog>
15 #include <QtMath>
16 
17 #include "encryptdialog.h"
18 #include <QProgressDialog>
19 #include "aboutpc.h"
20 
21 #include <QLocale>
22 
23 namespace Ui {
24 class ViewPC;
25 }
35 class ViewPC : public QMainWindow
36 {
37  Q_OBJECT
38 
39 public:
40  explicit ViewPC(QWidget *parent = nullptr);
41  ~ViewPC();
42 private slots:
43  void on_encryptMode_clicked();
44 
45  void on_decryptMode_clicked();
46 
47  void on_actionJPHS_path_triggered();
48 
49  void on_comboBox_currentIndexChanged(int index);
50 
51  void on_text_textChanged();
52 
53 protected slots:
54  void on_fileButton_clicked();
55 
56  void on_startButton_clicked();
57 
58  void on_actionAbout_triggered();
59 
60  void on_actionHelp_triggered();
61 
62  void setupErrorsDict();
63 public slots:
64  void alert(QString message, bool isWarning = false);
65  void saveData(QByteArray Edata);
66  void saveImage(QImage *image);
67  void setProgress(int val);
68  void abortCircuit();
69  void setEncryptMode(bool encr);
70  void setVersion(QString version);
71 signals:
80  void encrypt(QByteArray data, QImage *image, int mode, QString key, int bitsUsed);
88  void inject(QByteArray data, QImage * image, int mode, int bitsUsed);
96  void decrypt(QImage * _image, QString key, int mode);
100  void abortModel();
105  void setJPHSDir(QString dir);
106 public:
111  QProgressDialog * dialog;
120  QMap<QString, QString> errorsDict;
121 protected:
122  QString requestKey();
123 private:
124  Ui::ViewPC *ui;
125  bool isEncrypt;
126  QString inputFileName;
127  QByteArray bytes(long long n);
128  QString versionString;
129  int selectedMode = 2;
130 };
131 
132 #endif // VIEWPC_H
bool progressDialogClosed
progressDialogClosed Flag, if dialog is closed.
Definition: viewpc.h:116
Definition: aboutpc.h:6
The ViewPC class View layer of the app. Controls EncryptDialog and ProgressDialog.
Definition: viewpc.h:35
QProgressDialog * dialog
dialog ProgressDialog used.
Definition: viewpc.h:111
QMap< QString, QString > errorsDict
errorsDict QMap - Errors dictionary
Definition: viewpc.h:120