#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QGraphicsScene>
#include <QLabel>
#include <QMovie>
#include <QKeyEvent>
#include "mycv.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    bool eventFilter(QObject *target, QEvent *event);

private slots:
    void on_btnOK_clicked();

    void on_btnBad_clicked();

    void on_btnNext_clicked();

    void on_actionOpen_triggered();

    void on_actionExit_triggered();

    void on_btnBack_clicked();

    void on_actionSave_triggered();

    void on_actionSave_frame_triggered();

    void on_actionOpen_frame_triggered();

    void on_actionLoad_patterns_triggered();

    void on_actionLoad_test_triggered();

    void on_actionLoad_pattern_triggered();

    void on_actionLoad_test_2_triggered();

    void on_actionTrain_triggered();

    void on_actionLoad_xml_triggered();

    void on_actionPredict_triggered();

    void on_actionSave_digit_triggered();

    void on_actionLoad_patterns_2_triggered();



    void on_actionSave_noFrame_triggered();

    void on_actionEqualize_folder_triggered();

    void on_actionSave_xml_triggered();

    void on_actionNormalize_digits_triggered();

private:
    Ui::MainWindow *ui;

    QStringList mTxtFilesAndDirectories;
    QString mFilesDir;
    int mActPic;
    QGraphicsScene *mScene;

    // for gifs
    QLabel *mGif_anim;
    QMovie *mMovie;
    QGraphicsProxyWidget *mProxy;

    mycv *mMyCVClass;
    int mProcMode;

    void showActPict();
};

#endif // MAINWINDOW_H
