SOLARIS_QT6_DAQ/SOLARISpanel.h

88 lines
2.2 KiB
C
Raw Normal View History

#ifndef SOLARIS_PANEL_H
#define SOLARIS_PANEL_H
#include <QWidget>
#include <QLineEdit>
#include <QSpinBox>
#include <QDoubleSpinBox>
#include <QGridLayout>
#include <QScrollArea>
#include <QTabWidget>
#include <QGroupBox>
#include <QRadioButton>
#include <QCheckBox>
#include <QComboBox>
#include <QTableWidget>
#include <QDebug>
#include <QPushButton>
#include <QFrame>
#include <QSignalMapper>
#include "ClassDigitizer2Gen.h"
#include "CustomWidgets.h"
#include "macro.h"
#define MaxDetType 10
#define MaxDetID 60
#define MaxSettingItem 3
class SOLARISpanel : public QWidget{
Q_OBJECT
public:
SOLARISpanel(Digitizer2Gen ** digi,
unsigned short nDigi,
2023-03-27 15:48:41 -04:00
QString analysisPath,
std::vector<std::vector<int>> mapping,
QStringList detType,
std::vector<int> detMaxID,
QWidget * parent = nullptr);
~SOLARISpanel();
private slots:
2023-03-23 19:57:14 -04:00
void RefreshSettings();
void SaveSettings();
void LoadSettings();
2023-03-20 15:52:04 -04:00
public slots:
void UpdateThreshold();
void UpdatePanelFromMemory();
signals:
void UpdateOtherPanels();
2023-03-20 15:52:04 -04:00
void SendLogMsg(const QString str);
private:
2023-03-24 19:23:36 -04:00
void CreateDetGroup(int detTypeID, int SettingID, QList<int> detID, QGridLayout * &layout, int row, int col);
Digitizer2Gen ** digi;
unsigned short nDigi;
std::vector<std::vector<int>> mapping;
QStringList detType;
std::vector<int> nDet; // number of distgish detector
std::vector<int> detMaxID;
QList<QList<int>> detIDList; // 1-D array of { detID, (Digi << 8 ) + ch}
2023-03-20 15:52:04 -04:00
2023-03-27 15:48:41 -04:00
QString digiSettingPath;
2023-03-27 12:46:03 -04:00
int FindDetTypeID(QList<int> detIDListElement);
RSpinBox * sbCoinTime;
2023-03-24 19:23:36 -04:00
QCheckBox * chkAll[MaxDetType][MaxSettingItem]; // checkBox for all setting on that tab;
2023-03-27 12:46:03 -04:00
2023-03-24 19:23:36 -04:00
QGroupBox * groupBox[MaxDetType][MaxSettingItem][MaxDetID];
QLineEdit * leDisplay[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel]; // [SettingID][DigiID][ChID]
RSpinBox * sbSetting[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel];
QCheckBox * chkOnOff[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel];
RComboBox * cbTrigger[MaxDetType][MaxDetID]; //[detTypeID][detID] for array only
2023-03-20 15:52:04 -04:00
bool enableSignalSlot;
};
#endif