My Project
mainwindow.h
1 // RAN 2015-07-03 - Moved some prototypes to filter.h
2 
3 #ifndef MAINWINDOW_H
4 #define MAINWINDOW_H
5 
6 #include <QMainWindow>
7 #include <QFileDialog>
8 #include <QDir>
9 #include <QMessageBox>
10 #include <QSlider>
11 #include <QShortcut>
12 #include <QMessageBox>
13 
14 #define WHITE 0xffffffff
15 #define BLACK 0xff000000
16 
17 namespace Ui {
18 class MainWindow;
19 }
20 
21 class MainWindow : public QMainWindow
22 {
23  Q_OBJECT
24 
25 public:
31  explicit MainWindow(QWidget *parent = 0);
32 
44  void GrayScale(QImage &);
45 
58  void VerticalFlip(QImage &);
59 
72  void HorizontalFlip(QImage &);
73 
95  void ThresholdFilter(QImage &, QImage &,unsigned int , bool);
96 
102  ~MainWindow();
103 
104 private slots:
105 
112 
119 
125  void on_actionClose_Window_triggered();
126 
133 
140 
147 
154 
161 
168 
169 
175  void applyThresholdFilter();
176 
182  void instructions();
183 
184 
193 
200 
207 
214 
223 
230 
237 
244 
251 
252 private:
253  Ui::MainWindow *ui;
254  QImage originalImage; //This will hold the original image.
255  QImage editedImage; //This will hold the edited image.
256  bool invertColor; //Boolean value of the switch button for the threshold filter.
257 };
258 
259 #endif // MAINWINDOW_H
void on_btnFlipImageVertically_clicked()
To call the vertical flip image filter.
Definition: mainwindow.cpp:253
void instructions()
To display the instructions.
Definition: mainwindow.cpp:287
void ThresholdFilter(QImage &, QImage &, unsigned int, bool)
Function that applies a theshold filter to the edited image. It works by creating a black and white i...
Definition: filter.cpp:82
void VerticalFlip(QImage &)
Function that applies a vertical flip to the edited image. It works by putting the pixel from the ori...
Definition: filter.cpp:30
void on_btnInvertThreshold_clicked()
To apply the threshold filter and load the edited image to the GUI when the threshold color is invert...
Definition: mainwindow.cpp:197
void on_actionFlip_Image_Horizontally_triggered()
Invokes function on_btnFlipImageHorizontally_clicked()
Definition: mainwindow.cpp:114
void on_btnRevertImage_clicked()
To reset the edited image to the original image.
Definition: mainwindow.cpp:275
void on_btnGreyScaleFilter_clicked()
To call the Gray Scale image filter.
Definition: mainwindow.cpp:264
Definition: mainwindow.h:17
void on_thresholdSlider_sliderReleased()
To apply the threshold filter and load the edited image to the GUI when the GUI slider is moved...
Definition: mainwindow.cpp:185
void on_btnFlipImageHorizontally_clicked()
To call the horizontal flip image filter.
Definition: mainwindow.cpp:242
void on_actionFlip_Image_Vertically_triggered()
Invokes function on_btnFlipImageVertically_clicked()
Definition: mainwindow.cpp:123
void on_btnSaveImage_clicked()
To save an image to the file system when the save image option is selected.
Definition: mainwindow.cpp:230
void on_actionApply_Grey_Scale_Filter_triggered()
Invokes function on_btnGreyScaleFilter_clicked()
Definition: mainwindow.cpp:132
void on_btnLoadImage_clicked()
To load an image to the GUI when the load image option is selected.
Definition: mainwindow.cpp:210
void HorizontalFlip(QImage &)
Function that applies a horizontal flip to the edited image. It works by putting the pixel from the o...
Definition: filter.cpp:57
void on_actionInstructions_triggered()
To display the instructions.
Definition: mainwindow.cpp:150
void on_actionInvert_Threshold_Colors_triggered()
Invokes function on_btnInvertThreshold_clicked()
Definition: mainwindow.cpp:105
MainWindow(QWidget *parent=0)
Constructor.
Definition: mainwindow.cpp:14
void applyThresholdFilter()
To apply the threshold filter.
Definition: mainwindow.cpp:174
void GrayScale(QImage &)
Function that applies a greyscale filter in the edited image. It works by turning each pixel into the...
Definition: filter.cpp:10
Definition: mainwindow.h:21
void on_actionRevert_Edited_Image_to_Original_triggered()
Invokes function on_btnRevertImage_clicked()
Definition: mainwindow.cpp:141
void on_chboxThreshold_clicked()
To apply the threshold filter and load the edited image to the GUI.
Definition: mainwindow.cpp:159
void on_actionSave_Image_triggered()
Invokes function on_btnSaveImage_clicked()
Definition: mainwindow.cpp:87
void on_actionLoad_Image_triggered()
Invokes function on_btnLoadImage_clicked()
Definition: mainwindow.cpp:78