2026-03-02 11:07:51 +08:00
|
|
|
#ifndef MEASUREANALYSISPROJECTMODEL_H
|
|
|
|
|
#define MEASUREANALYSISPROJECTMODEL_H
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QMap>
|
|
|
|
|
|
|
|
|
|
class MeasureAnalysisProjectModel
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
enum class SpectrumType {
|
|
|
|
|
None,
|
|
|
|
|
Sample, // 样品谱
|
|
|
|
|
Background, // 本底谱
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ConformParticleData, uint:符合粒子数, QString符合粒子数据文件名
|
|
|
|
|
typedef QMap<uint, QString> ConformParticleData;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
void SetProjectDir(const QString& project_dir);
|
|
|
|
|
void SetProjectName(const QString& project_name);
|
|
|
|
|
void SetSpectrumType(SpectrumType spec_type);
|
|
|
|
|
void SetIsStdSource(bool is_std_source);
|
|
|
|
|
void SetDescriptionInfo(const QString& description_info);
|
|
|
|
|
void SetMeasurePresetTime(ulong measure_preset_time);
|
|
|
|
|
void SetConformTimeWin(uint conform_time_win);
|
|
|
|
|
void SetIsMeasureComplete(bool is_measure_complete);
|
|
|
|
|
void SetMeasureDeviceParamsCfgFilename(const QString& filename);
|
|
|
|
|
void SetEneryScaleFilename(const QString& filename);
|
|
|
|
|
void SetEfficiencyScaleFilename(const QString& filename);
|
|
|
|
|
void SetAllChannelParticleDataFilename(const QString& filename);
|
2026-03-02 21:39:41 +08:00
|
|
|
void SetSortedParticleDataFilename(const QString& filename);
|
2026-03-02 11:07:51 +08:00
|
|
|
void SetChannelParticleDataFilename(uint channel, const QString& filename);
|
|
|
|
|
void SetChannelParticleCountDataFilename(uint channel, const QString& filename);
|
|
|
|
|
void SetAllChannelParticleTotalCountDataFilename(const QString& filename);
|
|
|
|
|
void SetTimeWinConformParticleData(uint time_win, uint conform_particle_count, const QString& filename);
|
|
|
|
|
|
|
|
|
|
const QString& GetProjectDir() const;
|
|
|
|
|
const QString& GetProjectName() const;
|
|
|
|
|
SpectrumType GetSpectrumType() const;
|
|
|
|
|
bool GetIsStdSource() const;
|
|
|
|
|
const QString& GetDescriptionInfo() const;
|
|
|
|
|
ulong GetMeasurePresetTime() const;
|
|
|
|
|
uint GetConformTimeWin() const;
|
|
|
|
|
bool GetIsMeasureComplete() const;
|
|
|
|
|
const QString& GetMeasureDeviceParamsCfgFilename() const;
|
|
|
|
|
const QString& GetEneryScaleFilename() const;
|
|
|
|
|
const QString& GetEfficiencyScaleFilename() const;
|
|
|
|
|
const QString& GetAllChannelParticleDataFilename() const;
|
|
|
|
|
const QMap<uint, QString>& GetChannelParticleDataFilenameList() const;
|
|
|
|
|
const QString& GetChannelParticleDataFilename(uint channel) const;
|
|
|
|
|
const QMap<uint, QString>& GetChannelParticleCountDataFilenameList() const;
|
|
|
|
|
const QString& GetChannelParticleCountDataFilename(uint channel) const;
|
|
|
|
|
const QString& GetAllChannelParticleTotalCountDataFilename() const;
|
|
|
|
|
const QString& GetTimeWinConformParticleDataFilename(uint time_win, uint conform_particle_count) const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QString _project_dir;
|
|
|
|
|
QString _project_name;
|
|
|
|
|
SpectrumType _spec_type = SpectrumType::None;
|
|
|
|
|
bool _is_std_source = false;
|
|
|
|
|
QString _description_info;
|
|
|
|
|
ulong _measure_preset_time = 0;
|
|
|
|
|
uint _conform_time_win = 50;
|
|
|
|
|
|
|
|
|
|
bool _is_measure_complete = false;
|
|
|
|
|
|
|
|
|
|
QString _measure_device_params_cfg_filename;
|
|
|
|
|
QString _enery_scale_filename;
|
|
|
|
|
QString _efficiency_scale_filename;
|
|
|
|
|
|
|
|
|
|
QString _all_channel_particle_data_filename;
|
|
|
|
|
QMap<uint, QString> _channel_particle_data_filename_list;
|
|
|
|
|
QMap<uint, QString> _channel_particle_count_data_filename_list;
|
|
|
|
|
QString _all_channel_particle_total_count_data_filename;
|
|
|
|
|
QMap<uint, ConformParticleData> _time_win_conform_particle_data;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class MeasureAnalysisProjectModelList
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static QMap<QString, MeasureAnalysisProjectModel*> ProjectModels;
|
|
|
|
|
|
|
|
|
|
static void AddProjectModel(MeasureAnalysisProjectModel* model);
|
|
|
|
|
static void RmProjectModel(const QString& project_name);
|
|
|
|
|
|
|
|
|
|
static MeasureAnalysisProjectModel* GetProjectModel(const QString& project_name);
|
|
|
|
|
static MeasureAnalysisProjectModel* GetCurrentProjectModel();
|
|
|
|
|
static void SetCurrentProjectModel(const QString& project_name);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
static MeasureAnalysisProjectModel* current_project_model;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // MEASUREANALYSISPROJECTMODEL_H
|