You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
110 lines
3.1 KiB
C
110 lines
3.1 KiB
C
|
6 years ago
|
#ifndef MUBAN_H
|
||
|
|
#define MUBAN_H
|
||
|
|
|
||
|
|
#include <QtWidgets/QWidget>
|
||
|
|
#include "RasterAnalysis.h"
|
||
|
|
#include "IDetectState.h"
|
||
|
|
#include "qsimpletickergraph.h"
|
||
|
|
class muban:public QWidget
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
|
||
|
|
public:
|
||
|
|
muban(QWidget *parent = 0);
|
||
|
|
~muban();
|
||
|
|
|
||
|
|
void onStartSampling();
|
||
|
|
void onStopSampling();
|
||
|
|
Q_SLOT void ButtonClick();
|
||
|
|
Q_SLOT void onTimer();
|
||
|
|
Q_SLOT void onTimerCheckSys();
|
||
|
|
Q_SLOT void onButtonClick(int state);
|
||
|
|
Q_SLOT void onShowSys(QString,int);
|
||
|
|
Q_SLOT void onShowValue(int);
|
||
|
|
Q_SLOT void onSaveData();
|
||
|
|
Q_SLOT void onScanDevice();
|
||
|
|
Q_SLOT void onShowComState(QString, int);
|
||
|
|
Q_SLOT void onShowThrenss(QString);
|
||
|
|
Q_SLOT void onCtrolDevice();
|
||
|
|
Q_SLOT void onShowMsgLabel(int nData, int nType);
|
||
|
|
Q_SLOT void onAddData2Graph(int nData);
|
||
|
|
|
||
|
|
QString getSysState(quint8 nValue);
|
||
|
|
void setDetectStatePtr(IDetectState *ptr){ if (ptr) { pDetectStatePtr = ptr; } };
|
||
|
|
signals:
|
||
|
|
void recvDataSignal(QByteArray);
|
||
|
|
void sgShowSys(QString,int);
|
||
|
|
void sgShowValue(int);
|
||
|
|
void sgThress(int);
|
||
|
|
void SignalByteData2Parent(QByteArray);
|
||
|
|
void sgSaveData(int);
|
||
|
|
void sgCtrolDevice(int);
|
||
|
|
void sgShowMsgLabel(int nData, int nType);
|
||
|
|
private:
|
||
|
|
class QRasterAnalysis *Rasteranalysis;
|
||
|
|
struct RasterST* m_pRaster;
|
||
|
|
struct RasterCom* m_pRasterCom;
|
||
|
|
private:
|
||
|
|
virtual bool OnPolished(QWidget * watched);
|
||
|
|
virtual bool onCreate(QWidget* parent);
|
||
|
|
virtual void changeEvent(QEvent *);
|
||
|
|
void Appanalysis(Raster_ComFrame m_ComFrame);
|
||
|
|
public slots:
|
||
|
|
virtual void SlotRecvDataByParent(QByteArray m_data);
|
||
|
|
virtual void SlotTxDataByParent(QByteArray m_data);
|
||
|
|
virtual void SlotRxNumByParent(int num);
|
||
|
|
virtual void SlotTxNumByParent(int num);
|
||
|
|
virtual void SlotRxSizeByParent(int num);
|
||
|
|
virtual void SlotTxSizeByParent(int num);
|
||
|
|
virtual void SlotGetPosByParent(QPoint point);
|
||
|
|
void SetData2UI(struct RasterST *m_rastdata);
|
||
|
|
void SetData2UI(struct RasterCom *m_rastdata);
|
||
|
|
void GetDataFromUI(struct RasterST *m_rastdata);
|
||
|
|
void GetDataFromUI(struct RasterCom *m_rastdata);
|
||
|
|
public:
|
||
|
|
Q_SLOT void onRecvThread(const QStringList &s);
|
||
|
|
private:
|
||
|
|
class QLineEdit *Raster_ShowlineEdit;
|
||
|
|
class QLineEdit *Raster_ShowlineEdit_2;
|
||
|
|
class QLineEdit *Raster_ShowlineEdit_3;
|
||
|
|
class QTextBrowser *Raster_textBrowser;
|
||
|
|
class QFrame *Raster_frame;
|
||
|
|
class myChart1* m_chart;
|
||
|
|
|
||
|
|
class QTimer *m_timer{ NULL };
|
||
|
|
class QTimer *m_timerChackSys{ NULL };
|
||
|
|
class SWitchButton *m_switchbp{ NULL };
|
||
|
|
class SWitchButton *m_switsybp{ NULL };
|
||
|
|
|
||
|
|
//Tab1
|
||
|
|
class QDoubleSpinBox *doubleSpinBox_beilv;
|
||
|
|
class QDoubleSpinBox *doubleSpinBox_baseheight;
|
||
|
|
class QDoubleSpinBox *doubleSpinBox_min;
|
||
|
|
class QDoubleSpinBox *doubleSpinBox_mid_value;
|
||
|
|
class QSpinBox *SpinBox_max_size;
|
||
|
|
|
||
|
|
class QComboBox *Raster_ComBox;
|
||
|
|
class QComboBox *Raster_Baute;
|
||
|
|
class QPushButton *Raster_OpenDevice;
|
||
|
|
class QPushButton *Raster_CloseDevice;
|
||
|
|
class QCheckBox *Raster_checkBox;
|
||
|
|
class QLabel *Raster_showState_lb;
|
||
|
|
|
||
|
|
class QTabWidget *m_tabWidget;
|
||
|
|
|
||
|
|
//tab2
|
||
|
|
class QDoubleSpinBox *Raster_doubleSpinBox_K;
|
||
|
|
class QDoubleSpinBox *Raster_doubleSpinBox_B;
|
||
|
|
protected:
|
||
|
|
IDetectState *pDetectStatePtr;
|
||
|
|
|
||
|
|
bool bInsertData;
|
||
|
|
class QSimpleTickerGraph *m_graph1;
|
||
|
|
protected:
|
||
|
|
virtual void closeEvent(QCloseEvent *event);
|
||
|
|
virtual void showEvent(QShowEvent *event);
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // MUBAN_H
|