config1digitsetandenablesetdlg.h 1021 Bytes
#ifndef CONFIG1DIGITSETANDENABLESETDLG_H
#define CONFIG1DIGITSETANDENABLESETDLG_H

#include <QDialog>

enum custom_result{
    result_rejected=0,
    result_disable,
    result_ok
};

#define MAX_MONITORING_VALUE 180
#define MIN_MONITORING_VALUE 5

namespace Ui {
class Config1DigitSetAndEnableSetDlg;
}

class Config1DigitSetAndEnableSetDlg : public QDialog
{
    Q_OBJECT

public:
    explicit Config1DigitSetAndEnableSetDlg(QWidget *parent = 0, uint16_t val = 5);
    ~Config1DigitSetAndEnableSetDlg();

    custom_result getResult(){return m_nResult;};
    int getValue();

private slots:
    void on_ctrBtnOk_clicked();

    void on_ctrBtnOk_2_clicked();

    void on_ctrBtnCancel_clicked();

public slots:
    void keyCancel_clicked();
    void keyEnter_clicked();

protected:
    void keyReleaseEvent(QKeyEvent* event);
    void keyPressEvent(QKeyEvent* event);

private:
    Ui::Config1DigitSetAndEnableSetDlg *ui;
    custom_result m_nResult;
    int m_nPrevValue;
};

#endif // CONFIG1DIGITSETANDENABLESETDLG_H