HITDAQ/hit2023v2_RMS/dialogdevices.h

42 lines
1.1 KiB
C
Raw Normal View History

#ifndef DIALOGDEVICES_H
#define DIALOGDEVICES_H
#include <QDialog>
#include <QSettings>
#include <QShowEvent>
#include <QVector> // Include QVector for calibration data storage
namespace Ui {
class DialogDevices;
}
class DialogDevices : public QDialog
{
Q_OBJECT
public:
explicit DialogDevices(QWidget *parent = 0);
~DialogDevices();
QSettings* deviceSettings = NULL;
2024-08-06 15:06:06 +02:00
QVector<QVector<unsigned short>> getAllCalibrationFactors() const; // Declaration of the method
public slots:
void showEvent(QShowEvent *event);
void accept();
protected:
int validateAndSave();
void applyCalibrationDataToDevice(int dev_nr, const QVector<unsigned short>& data); // Function to apply calibration data to a device
void importSettings();
int last_nr_devices = -1;
int initialized = 0;
2024-08-06 15:06:06 +02:00
QVector<QVector<unsigned short>> deviceCalibrationData; // Storage for calibration data for each device
private slots:
void on_spinNrDevices_valueChanged(int arg1);
void selectCalibrationFile(int dev_nr); // Slot for handling calibration file selection
private:
Ui::DialogDevices *ui;
};
#endif // DIALOGDEVICES_H