#ifndef DIALOGDEVICES_H #define DIALOGDEVICES_H #include #include #include #include // Include QVector for calibration data storage #include namespace Ui { class DialogDevices; } class DialogDevices : public QDialog { Q_OBJECT public: explicit DialogDevices(QWidget *parent = 0); ~DialogDevices(); QSettings* deviceSettings = NULL; QVector> getAllCalibrationFactors() const; // Declaration of the method public slots: void showEvent(QShowEvent *event); void accept(); protected: int validateAndSave(); bool loadCalibrationFactorsFromFile(const QString &filePath, QVector &calibrationFactors); // Function to load calibration factors from a file void applyCalibrationDataToDevice(int dev_nr, const QVector& data); // Function to apply calibration data to a device void importSettings(); int last_nr_devices = -1; int initialized = 0; QVector> 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