#ifndef SOLARIS_PANEL_H #define SOLARIS_PANEL_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ClassDigitizer2Gen.h" #include "CustomWidgets.h" #include "macro.h" #define MaxDetGroup 10 #define MaxDetID 60 #define MaxSettingItem 3 class SOLARISpanel : public QWidget{ Q_OBJECT public: SOLARISpanel(Digitizer2Gen ** digi, unsigned short nDigi, QString analysisPath, std::vector> mapping, QStringList detType, QStringList detGroupName, std::vector detGroupID, std::vector detMaxID, QWidget * parent = nullptr); ~SOLARISpanel(); private slots: void RefreshSettings(); void SaveSettings(); void LoadSettings(); public slots: void UpdateThreshold(); void UpdatePanelFromMemory(); signals: void UpdateOtherPanels(); void SendLogMsg(const QString str); private: void CreateDetGroup(int SettingID, QList detIDArray, QGridLayout * &layout, int row, int col); Digitizer2Gen ** digi; unsigned short nDigi; std::vector> mapping; QStringList detType; std::vector nDetinType; std::vector detMaxID; QStringList detGroupName; std::vector detGroupID; std::vector nDetinGroup; QList> detIDList; // 1-D array of { detID, (Digi << 8 ) + ch} QString digiSettingPath; int FindDetTypeID(int detID); int FindDetGroup(int detID); RSpinBox * sbCoinTime; QCheckBox * chkAll[MaxDetGroup][MaxSettingItem]; // checkBox for all setting on that tab; QGroupBox * groupBox[MaxDetGroup][MaxSettingItem][MaxDetID]; QLineEdit * leDisplay[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel]; // [SettingID][DigiID][ChID] RSpinBox * sbSetting[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel]; QCheckBox * chkOnOff[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel]; RComboBox * cbTrigger[MaxDetGroup][MaxDetID]; //[detTypeID][detID] for array only bool enableSignalSlot; }; #endif