#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <math.h>

 #include <QMainWindow>

 class QAction;
 class QMenu;
 class QPlainTextEdit;
 class QVBoxLayout;
 class QHBoxLayout;
 class QSlider;
 class QSpinBox;
 class QDoubleSpinBox;
 class QLabel;
 class QLayout;
 class QPushButton;

 class MainWindow : public QMainWindow
 {
     Q_OBJECT

 public:
     MainWindow();
     ~MainWindow();

 private slots:
     void openIm();
     bool saveIm();
     bool saveImAs();
     void exit();
     void zoom();
     void zoom2();
     void rotate();
     void gauss();
     void median();
     void grayworld();
     void harshnes();
     void waves();
     void wash(QImage*, int, int, int, double*, bool);
     void linear();
     void inchannel();
     void extension(QImage *Temp, const int channels);
     void inputmed(int);
     void inputgau(double);
     void inputsha(double);
     void inputzoo(double);
     void inputrot(double);
     void inputwaam(double);
     void inputwadl(double);

 private:
     void createActions();
     void createMenus();
     void createStatusBar();

     bool maybeSave();

     QWidget *window;
     QTabWidget *tabWidget;
     QWidget *gaussfiltration;
     QWidget *medianfiltration;
     QWidget *zooming;
     QWidget *rotation;
     QWidget *harshness;
     QWidget *wave;
     QString curFile;
     QLabel *labelIm;
     bool isModified;
     bool isOpened;
     double consd;
     double consd1;
     double gau;
     double sha;
     double rot;
     double zoo;
     double waam;
     double wadl;
     int med;
     double koefg;
     double koefp;
     QString r;
     QPixmap *image;
     QImage *curImage;

     QVBoxLayout *mainLayout;
     QSpinBox *spinBoxC2;
     QSlider *sliderC2;
     QHBoxLayout *lf1;
     QDoubleSpinBox *spinBoxF1;
     QPushButton *butF1;
     QSpinBox *spinBoxF2;
     QSlider *sliderF2;
     QHBoxLayout *lg1;
     QDoubleSpinBox *spinBoxG1;
     QPushButton *butG1;
     QHBoxLayout *lg2;
     QDoubleSpinBox *spinBoxG2;
     QPushButton *butG2;
     QVBoxLayout *lg0;
     QHBoxLayout *lg;
     QDoubleSpinBox *spinBoxG;
     QPushButton *butG;
     QHBoxLayout *lh;
     QDoubleSpinBox *spinBoxH;
     QPushButton *butH;
     QDoubleSpinBox *spinBoxW1;
     QPushButton *butW;
     QVBoxLayout *lw0;
     QHBoxLayout *lw1;
     QHBoxLayout *lw2;
     QDoubleSpinBox *spinBoxW2;
     QHBoxLayout *lm;
     QSpinBox *spinBoxM;
     QPushButton *butM;

     QMenu *fileMenu;
     QMenu *effectsMenu;
     QAction *newAct;
     QAction *openImAct;
     QAction *saveImAct;
     QAction *saveImAsAct;
     QAction *exitAct;
     QAction *zoomAct;
     QAction *zoom2Act;
     QAction *rotationAct;
     QAction *gaussAct;
     QAction *linearAct;
     QAction *channelAct;
     QAction *harshnessAct;
     QAction *wavesAct;
     QAction *medianAct;
     QAction *grayworldAct;
 };

 #endif
