-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterfaceimages.h
77 lines (61 loc) · 1.95 KB
/
interfaceimages.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
#ifndef INTERFACEIMAGES_H
#define INTERFACEIMAGES_H
#include <QMainWindow>
#include <QtGui>
#include <QFile>
//#include "cryptage.h"
#include "curseur.h"
#include "methodedecryptage.h"
class InterfaceImages : public QMainWindow
{
Q_OBJECT
public:
explicit InterfaceImages(QWidget *parent = 0);
~InterfaceImages();
signals:
public slots:
void nouveau();
void ouvrir();
void enregistrer();
void enregistrerSous();
void changerLaMethodeDeCryptage();
void changerPassword();
void redimensionnerImage();
void resizeEvent( QResizeEvent * event );
void updateNombreCaracteres();
private:
static void qimageToImage(const QImage &qimage, Image &image);
static void imageToQImage(Image &image, QImage &qimage);
void enregistrerDansLeFichier(QString const& fichier);
void changerImage(QString const& fichier);
inline MethodeDeCryptage* methode() {return m_methodesDeCryptage[m_indexMethodeDeCryptage];}
QMenu *m_menuFichier;
QAction *m_actionQuitter;
QAction *m_actionEnregistrer;
QAction *m_actionEnregistrerSous;
QAction *m_actionOuvrir;
QAction *m_actionNouveau;
QMenu *m_menuMethodeCryptage;
QAction *m_actionChangerMethodeCryptage;
QAction *m_actionChangerPassword;
QFile *m_fichierImage;
bool m_nouvelleImage;
QTextEdit *m_textEdit;
QHBoxLayout *m_layoutPrincipal;
QVBoxLayout *m_layoutImage;
QVBoxLayout *m_layoutTexte;
QLabel *m_labelDimensionsImage;
QLabel *m_labelPlaceImage;
QLabel *m_vueImage;
QLabel *m_textePasDimageEncours;
QLabel *m_nombreDeCaracteresTexte;
QWidget *m_zoneCentrale;
QFrame *m_frameImage;
QPixmap m_image;
QImage m_imageCryptage;
std::vector<MethodeDeCryptage*> m_methodesDeCryptage;
unsigned int m_indexMethodeDeCryptage;
std::string m_password;
bool m_imageEnCours;
};
#endif // INTERFACEIMAGES_H