2025-03-17 09:30:54 +00:00
|
|
|
#ifndef FILE_MANAGER_H
|
|
|
|
|
#define FILE_MANAGER_H
|
|
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
#include <QFile>
|
2025-03-19 07:19:45 +00:00
|
|
|
#include <qdir.h>
|
2025-03-17 09:30:54 +00:00
|
|
|
|
|
|
|
|
#include "protocol.h"
|
|
|
|
|
|
|
|
|
|
namespace FileManager{
|
2025-03-19 07:19:45 +00:00
|
|
|
const QString ExperimentDirPath = QDir::currentPath()+"/../experiment_data";
|
|
|
|
|
const QString SampleDataFloder = ExperimentDirPath + "/sample_data";
|
|
|
|
|
const QString BaseLineFolder = ExperimentDirPath + "/base_line";
|
|
|
|
|
const QString AnalysisStateFolder = ExperimentDirPath + "/analysis_state";
|
|
|
|
|
|
|
|
|
|
struct ExperimentData {
|
|
|
|
|
float sampleTemp;
|
|
|
|
|
float dsc;
|
|
|
|
|
};
|
2025-03-17 13:16:16 +00:00
|
|
|
struct ExpeInfo
|
|
|
|
|
{
|
|
|
|
|
QString sampleName;
|
|
|
|
|
float sampleWeight;
|
|
|
|
|
QString date;
|
|
|
|
|
QString userName;
|
|
|
|
|
};
|
2025-03-17 13:35:08 +00:00
|
|
|
extern ExpeInfo _expeInfo;
|
|
|
|
|
extern QFile _expeFile;
|
2025-03-17 13:16:16 +00:00
|
|
|
|
2025-03-17 13:35:08 +00:00
|
|
|
void createExperimentFile();
|
2025-03-17 13:16:16 +00:00
|
|
|
void writeExperimentFile(const CommonData&);
|
2025-03-18 09:28:40 +00:00
|
|
|
void fileClose();
|
2025-03-17 09:30:54 +00:00
|
|
|
|
2025-03-19 07:19:45 +00:00
|
|
|
void readExperimentFile(const QString fileName,QVector<ExperimentData>&);
|
|
|
|
|
|
2025-03-17 09:30:54 +00:00
|
|
|
void test();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|