#ifndef CMAINPAGE_H
#define CMAINPAGE_H
#include "ZTInfo.h"
#include <QPixmap>

#include <QWidget>

class COutilModbus;

namespace Ui {
class CModbusPage;
}

class CModbusPage : public QWidget
{
    Q_OBJECT
    
public:
    explicit CModbusPage(QWidget *parent = 0);
    ~CModbusPage();
    void MasterConnected();
    void MasterDisconnected();
    COutilModbus *mProgramHandle;
    QPixmap mLedONPixmap, mLedOFFPixmap;

    void UpdateZTInfo(CZTInfo *DataStruct);
    
private:
    Ui::CModbusPage *ui;

public slots:
    void ConnectToSlaveBtnClicked();
    void ReadModbusBtnClicked();
    void SendAN1BtnClicked();
    void SendAN2BtnClicked();
    void SendDateTimeBtnClicked();
    void AutoSendRequestsCheckboxClicked(int);
    void StayOnTopBtnClicked(int);
    void ModbusActivity();
    void WatchdogChkBxChanged(int);
    void SendTrainInfoBtnClicked();
};

#endif // CMAINPAGE_H
