#ifndef CENTRALWIDGET_H #define CENTRALWIDGET_H #include #include "qcustomplot.h" #include "protocol.h" #include "global.h" #include "draglinehandler.h" class CentralWidget:public QWidget { Q_OBJECT public: enum AnalysisMode{ None, NumericalLabel, StartPoint, StopPoint, }; CentralWidget(QWidget *parent = nullptr); ~CentralWidget(); void setAnalysisMode(const AnalysisMode); public slots: void slotModeModify(const Global::Mode); void slotRecvCommonData(const CommonData&); void slotRecvAnalysisFileName(const QString&); protected: void timerEvent(QTimerEvent* event); private: void analysisMode(const bool); private: QCustomPlot *_customPlot; QCPGraph* _graph; DragLineHandler* _eventHandler; QCPItemStraightLine *_line1,*_line2; }; #endif // CENTRALWIDGET_H