operationtimeparts.h 1.23 KB
#ifndef OPERATIONTIMEPARTS_H
#define OPERATIONTIMEPARTS_H

#include <QMainWindow>
#include <qlabel.h>
#include <qbuttongroup.h>
#include <qpushbutton.h>
#include "servicedata.h"

#define OPERATION_TIME_CONTROL_MAX    11
#define OPERATION_TIME_PARTS_MAX_ITEM    10

namespace Ui {
class OperationTimeParts;
}

class OperationTimeParts : public QMainWindow
{
    Q_OBJECT

public:
    explicit OperationTimeParts(QWidget *parent = 0);
    ~OperationTimeParts();

private slots:
    void on_backButton_clicked();

    void on_btnReset_2_clicked();
    void on_btnResets_clicked(int);

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

private:
    const uint16_t m_arrPartItemIdxs[OPERATION_TIME_PARTS_MAX_ITEM] = {
        USE_ITEM_door_open,USE_ITEM_dv_open,USE_ITEM_ssv_open,USE_ITEM_qnv_open,USE_ITEM_snv_open,
         0xffff, USE_ITEM_ssp_open, USE_ITEM_hdm_open, USE_ITEM_dp_open, USE_ITEM_unp_open
    };


    uint32_t* m_arrUseItems[OPERATION_TIME_PARTS_MAX_ITEM];
    QLabel* m_arrTimeLabels[OPERATION_TIME_CONTROL_MAX];
    QPushButton* m_arrResetBtn[OPERATION_TIME_CONTROL_MAX];
    QButtonGroup* m_btnGrops;

    Ui::OperationTimeParts *ui;
    void reloadUi(void);
};

#endif // OPERATIONTIMEPARTS_H