#ifndef SCOPE_H #define SCOPE_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "macro.h" #include "ClassDigitizer.h" #include "CustomThreads.h" #include "CustomWidgets.h" //^==================================================== //^==================================================== class Scope : public QMainWindow{ Q_OBJECT public: Scope(Digitizer ** digi, unsigned int nDigi, ReadDataThread ** readDataThread, QMainWindow * parent = nullptr); ~Scope(); private slots: void StartScope(); void StopScope(); void UpdateScope(); void ReadSettingsFromBoard(); signals: void SendLogMsg(const QString &msg); private: void SetUpComboBoxSimple(RComboBox * &cb, QString str, int row, int col); void SetUpComboBox(RComboBox * &cb, QString str, int row, int col, const Register::Reg para); void SetUpSpinBox(RSpinBox * &sb, QString str, int row, int col, const Register::Reg para); void CleanUpSettingsGroupBox(); void SetUpPHAPanel(); void SetUpPSDPanel(); void EnableControl(bool enable); void UpdateComobox(RComboBox * &cb, const Register::Reg para); void UpdateSpinBox(RSpinBox * &sb, const Register::Reg para); void UpdatePanelFromMomeory(); Digitizer ** digi; unsigned short nDigi; unsigned short ID; // the id of digi, index of cbScopeDigi int ch2ns; ReadDataThread ** readDataThread; TimingThread * updateTraceThread; bool enableSignalSlot; Trace * plot; TraceView * plotView; QLineSeries * dataTrace[MaxNumberOfTrace]; // 2 analog, 2 digi RComboBox * cbScopeDigi; RComboBox * cbScopeCh; QPushButton * bnScopeStart; QPushButton * bnScopeStop; QPushButton * bnReadSettingsFromBoard; QLineEdit * leTriggerRate; QGroupBox * settingGroup; QGridLayout * settingLayout; /// common to PSD and PHA RSpinBox * sbReordLength; RSpinBox * sbPreTrigger; RSpinBox * sbDCOffset; RComboBox * cbDynamicRange; RComboBox * cbPolarity; /// PHA RSpinBox * sbInputRiseTime; RSpinBox * sbTriggerHoldOff; RSpinBox * sbThreshold; RComboBox * cbSmoothingFactor; RSpinBox * sbTrapRiseTime; RSpinBox * sbTrapFlatTop; RSpinBox * sbDecayTime; RSpinBox * sbPeakingTime; RSpinBox * sbPeakHoldOff; RComboBox * cbPeakAvg; RComboBox * cbBaselineAvg; RComboBox * cbAnaProbe1; RComboBox * cbAnaProbe2; RComboBox * cbDigiProbe1; RComboBox * cbDigiProbe2; }; #endif