#ifndef HAUSDORFM_SETTING_H
#define HAUSDORFM_SETTING_H

#include <QWidget>

#include "hausdorfm_form.h"

#include <my_image.h>
#include <hausdorfm/hausdorfm.h>

#include <QMessageBox>

#include <QTime>

namespace Ui {
    class hausdorfm_setting;
}

class hausdorfm_setting : public QWidget {
    Q_OBJECT
public:
    hausdorfm_setting(QWidget *parent = 0);
    ~hausdorfm_setting();

    void load_image(my_image *img);
    void load_ref_image(my_image *img);

    int Time;
    int Time_ref;
    std::vector<BOD> position;//vysledek

protected:
    void changeEvent(QEvent *e);
    Ui::hausdorfm_setting *ui;
    hausdorfm_form *form;
protected:
    //void changeEvent(QEvent *e);
    my_image *image;
    my_image *image_ref;
    QPalette paletteOK;
    QPalette paletteERR;
    hausdorfm * haus;
    bool CanHRun;
    bool ResultIsValid;
public slots:
    void ShowResult();
    void ShowForm();//pri kliku na tlacitko zobraz formular
    void RefImageIsLoaded();//signal prjde pokud uzivatel nacte novy obraz - povoleni tlacitka pro nacteni obrazu do tridy
    void ImageIsLoaded();//signal prjde pokud uzivatel nacte novy obraz - povoleni tlacitka pro nacteni obrazu do tridy

    void NeedLoadRefImage();//tato funkce vysle signal hlavnimu oknu aby hlavni okno nacetlo obraz do tridy
    void NeedLoadImage();//tato funkce vysle signal hlavnimu oknu aby hlavni okno nacetlo obraz do tridy
signals:
    void NeedLoadRef(int i);
    void NeedLoadImg(int i);
};

#endif // HAUSDORFM_SETTING_H
