#ifndef MAINWIDGET_H
#define MAINWIDGET_H
#include "plotwidget.h"
#include "realwidget.h"
#include <QtWidgets/QWidget>

QT_USE_NAMESPACE

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

private:
    PlotWidget *m_customPlotWidget;
    RealWidget *m_customRealWidget;
    QStackedLayout *m_stackLayout;

    void createUI();
    uint16_t ModbusCRC16(QByteArray senddata);
    void InvertUint16(unsigned short *dBuf,unsigned short *srcBuf);
    uint16_t CRC16_MODBUS(unsigned char *data, unsigned int datalen);


private slots:
    void showStackCPRealWidget();
    void showStackCPAnaWidget();

protected:

private:
};


#endif // MAINWIDGET_H
