#ifndef SEISETTINGSPAGE_H
#define SEISETTINGSPAGE_H
#include "GlobalDefine.h"
#include <QGraphicsWidget>
#include "Guipage.h"
#include <QString>
#include "PushButton.h"
#include "ZTSimulator.h"
#include "TextButtonWidget.h"
#include <QCheckBox>
#include <QLineEdit>
#include <QSpinBox>
#include <QGraphicsPixmapItem>


class CZoneTest;

class CSEISettingsPage : public CGuiPage
{
Q_OBJECT
public:
    CSEISettingsPage(QGraphicsWidget *Parent = 0);

    CZoneTest *mProgramHandle;

    int SetActualSettings(QHostAddress CCHostAdd);

    virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
    virtual void showEvent ( QShowEvent * event );


private:
    QGraphicsRectItem *mBackgroundRect;
    CTextButtonWidget *mCancelButton, *mApplyButton;
    QSpinBox *mIPChunk1, *mIPChunk2, *mIPChunk3, *mIPChunk4;
    QString mCurIP;
    QGraphicsTextItem *mModbusSEIConnectionState, *mModbusSEILinkState;
    QGraphicsPixmapItem *mSEIConnectionLED, *mSEIModbusLinkLED;

    void ShowApplyButton();



public slots:
    void ButtonClicked(CTextButtonWidget *);
    void ModbusSEIConnected(qint32 LocalIP, qint32 RemoteIP);
    void ModbusSEIDisconnected();
    void ModbusSEILinkUP();
    void ModbusSEILinkDown();
    void SpinBoxValueChanged(int);
};

#endif // SEISETTINGSPAGE_H
