My Project

- Main Page
- Classes
- Files

- File List

ImageScrambler.h
1 #ifndef IMAGESCRAMBLER_H
2 #define IMAGESCRAMBLER_H
3
4 #include <QMainWindow>
5 #include <QFileDialog>
6 #include <QDir>
7 #include <QMessageBox>
8 #include <QShortcut>
9 #include <QImage>
10
11 namespace Ui {
12 class ImageScrambler;
13 }
14
15 class ImageScrambler : public QMainWindow
16 {
17 Q_OBJECT
18
19 public:
20
26 explicit ImageScrambler(QWidget *parent = 0);
27
33 ~ImageScrambler();
34
60 void cropSwap(QImage &, int, int, int, int, int, int);
61
87 QImage ScrambleFilter(QImage image, int, int, int, int, int);
88
89 private slots:
90
97 void on_btnLoadNewImage_clicked();
98
104 void on_btnSave_clicked();
105
113 void on_btnScrambleImage_clicked();
114
120 void on_btnDescrambleImage_clicked();
121
127 void on_actionLoad_Image_triggered();
128
134 void on_actionSave_Image_triggered();
135
141 void on_actionScramble_Image_triggered();
142
148 void on_actionDescramble_Image_triggered();
149
150 private:
151 Ui::ImageScrambler *ui;
152 QImage originalImage;
153 QImage scrambledImage;
154 int scrambleDepth ;
155 };
156
157 #endif // MAINWINDOW_H
ImageScrambler::~ImageScrambler
~ImageScrambler()
Destructor.
Definition: ImageScrambler.cpp:45
Ui
Definition: ImageScrambler.h:11
ImageScrambler::on_btnScrambleImage_clicked
void on_btnScrambleImage_clicked()
Function invokes the ScrambleFilter function to scramble the image and load it in the GUI...
Definition: ImageScrambler.cpp:89
ImageScrambler::on_btnSave_clicked
void on_btnSave_clicked()
Function that saves the scrambled image in the computer.
Definition: ImageScrambler.cpp:75
ImageScrambler
Definition: ImageScrambler.h:15
ImageScrambler::scrambledImage
QImage scrambledImage
Definition: ImageScrambler.h:153
ImageScrambler::ScrambleFilter
QImage ScrambleFilter(QImage image, int, int, int, int, int)
Funtion that recursively scrambles an images by dividing the image in squares (sub images) and then s...
Definition: Filter.cpp:72
ImageScrambler::on_btnDescrambleImage_clicked
void on_btnDescrambleImage_clicked()
Function that restore the scrambled image to the original image.
Definition: ImageScrambler.cpp:104
ImageScrambler::on_actionSave_Image_triggered
void on_actionSave_Image_triggered()
Function that invokes the on_btnSave_clicked() function.
Definition: ImageScrambler.cpp:123
ImageScrambler::on_btnLoadNewImage_clicked
void on_btnLoadNewImage_clicked()
Function display a file browsing window to load an image into the GUI.
Definition: ImageScrambler.cpp:56
ImageScrambler::on_actionDescramble_Image_triggered
void on_actionDescramble_Image_triggered()
Function that invokes the on_btnDescrambleImage_clicked() function.
Definition: ImageScrambler.cpp:141
ImageScrambler::originalImage
QImage originalImage
Definition: ImageScrambler.h:152
ImageScrambler::ImageScrambler
ImageScrambler(QWidget *parent=0)
Constructor.
Definition: ImageScrambler.cpp:10
ImageScrambler::on_actionLoad_Image_triggered
void on_actionLoad_Image_triggered()
Function that invokes the on_btnLoadNewImage_clicked() function.
Definition: ImageScrambler.cpp:114
ImageScrambler::cropSwap
void cropSwap(QImage &, int, int, int, int, int, int)
Funtion that crop two squares of equal size of an image or sub image and swaps them. The funtion receives two coords (x0, y0) and (x1, y1) and a width and a height. Then swaps pixel by pixel the square formed from the top left coordinate (x0, y0) to the bottom right coordinate (x0+width, y0+height) with the square formed from the top left coordinate (x1, y1) to the bottom right (x1+width, y1+height).
Definition: Filter.cpp:29
ImageScrambler::on_actionScramble_Image_triggered
void on_actionScramble_Image_triggered()
Function that invokes the on_btnScrambleImage_clicked() function.
Definition: ImageScrambler.cpp:132
ImageScrambler::scrambleDepth
int scrambleDepth
Definition: ImageScrambler.h:154