SOLARIS_QT6_DAQ/SOLARISpanel.h

94 lines
2.3 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"
2023-03-31 20:01:27 -04:00
#define MaxDetGroup 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,
2023-03-31 20:01:27 -04:00
QStringList detGroupName,
std::vector<int> detGroupID,
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-31 20:01:27 -04:00
void CreateDetGroup(int SettingID, QList<int> detIDArray, QGridLayout * &layout, int row, int col);
Digitizer2Gen ** digi;
unsigned short nDigi;
std::vector<std::vector<int>> mapping;
QStringList detTypeNameList;
2023-03-31 20:01:27 -04:00
std::vector<int> nDetinType;
std::vector<int> detMaxID;
QStringList detGroupNameList;
2023-03-31 20:01:27 -04:00
std::vector<int> detGroupID;
std::vector<int> nDetinGroup;
QList<QList<int>> detIDArrayList; // 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-31 20:01:27 -04:00
int FindDetTypeID(int detID);
int FindDetGroup(int detID);
RSpinBox * sbCoinTime;
2023-03-31 20:01:27 -04:00
QCheckBox * chkAll[MaxDetGroup][MaxSettingItem]; // checkBox for all setting on that tab;
2023-03-27 12:46:03 -04:00
2023-03-31 20:01:27 -04:00
QGroupBox * groupBox[MaxDetGroup][MaxSettingItem][MaxDetID];
2023-03-24 19:23:36 -04:00
QLineEdit * leDisplay[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel]; // [SettingID][DigiID][ChID]
RSpinBox * sbSetting[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel];
QCheckBox * chkOnOff[MaxSettingItem][MaxNumberOfDigitizer][MaxNumberOfChannel];
2023-03-31 20:01:27 -04:00
RComboBox * cbTrigger[MaxDetGroup][MaxDetID]; //[detTypeID][detID] for array only
2023-03-20 15:52:04 -04:00
bool enableSignalSlot;
};
#endif