#ifndef RIS_SETTING_H
#define RIS_SETTING_H

#include <QWidget>
#include <QTime>

#include <my_image.h>

#include <ris/ris.h>
#include <cis/cis.h>

#include "ris_form.h"
#include <lib.h>


namespace Ui {
    class ris_setting;
}

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

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


    std::vector<BOD> position_rass;//vysledek
    std::vector<BOD> position_ciss;//vysledek
    std::vector<BOD> position_riscis;//vysledek


    int Time_R;
    int Time_R_ref;
    int Time_C;
    int Time_C_ref;
    int Time_RC;
    int Time_RC_ref;

protected:
    void changeEvent(QEvent *e);
    my_image * image;
    my_image *image_ref;
    ris * rass;
    cis * ciss;
    ris * riscis;

    ris_form *form;



    void btn_method_enabled(bool state);//hromadne zakazani stisku talcitek implementovanych metod(napr. pri nacteni noveho obrazu)
    void delete_method();//zavola delete na metody

private:
    Ui::ris_setting *ui;
    QPalette paletteOK;
    QPalette paletteERR;
    bool ResultIsValid_riss;
    bool ResultIsValid_ciss;
    bool ResultIsValid_rissciss;
    bool CanRis_Run;
    bool CanCis_Run;
    bool CanRisCis_Run;

public slots:
   // void ShowResult();
    void form_closed();
    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

    void ris_btn_clicked();//kliknuto na tlacitko pro rass metodu
    void ris_btn_run_clicked();
    void ris_btn_show_clicked();


    //////////////////
    void cis_btn_clicked();//source file je cis_setting.cpp
    void cis_btn_run_clicked();
    void cis_btn_show_clicked();

    //////////////////////
    void riscis_btn_clicked();//source file je cis_setting.cpp
    void riscis_btn_run_clicked();
    void riscis_btn_show_clicked();

signals:
    void NeedLoadRef(int i);
    void NeedLoadImg(int i);
};

#endif // RIS_SETTING_H
