AnalysisSystemForRadionucli.../analyseflow.h

63 lines
1.8 KiB
C
Raw Normal View History

2024-06-04 15:25:02 +08:00
/* 用于单个谱文件分析时的状态(流程)提示
* AnalyseFlowChart 线 FlowThread
* 线 */
#ifndef ANALYSEFLOWCHART_H
#define ANALYSEFLOWCHART_H
#include <QThread>
#include "DataStore.h"
#include "GammaAnalyAlgLib.h"
#include "GammaAnalyALG.h"
#include <QJsonDocument>
#include <QJsonObject>
#include <QJsonArray>
#include <QFile>
class FlowThread : public QThread
{
Q_OBJECT
public:
//FlowThread(PHDFile *phd, QMap<QString, NuclideLines> mapNucLines, stdvec vc, QString strPath, ThrCallBack callFunc, QObject *parent = 0);
FlowThread(DataStore *store, QString strPath, ThrCallBack callFunc, QObject *parent = 0);
~FlowThread();
protected:
void run();
signals:
void state_changed(int);
private:
GammaAnalyALG *alg; // 算法类指针
PHDFile *m_phd; // 谱文件结构指针
DataStore *m_store;
QMap<QString, NuclideLines> m_mapNucLines; // 用户核素库中核素射线信息
stdvec m_vCount; // 当前谱计数
QString m_strPath;
ThrCallBack m_callFunc;
};
class AnalyseFlow : public QObject
{
Q_OBJECT
public:
explicit AnalyseFlow(DataStore *store, QString strPath, ThrCallBack callFunc, QObject *parent = 0);
~AnalyseFlow();
void SetSampleType(bool bUpdate); // 设置样品类型,样品类型不同,处理流程不同
private:
bool m_bUpdate; // 是否需要显示“刻度更新模块”的状态流程
QString style_run; // 运行状态样式
QString style_wait; // 等待状态样式
QString style_finish; // 完成状态样式
DataStore *m_store;
FlowThread *m_flowThread; // 算法处理线程指针
};
#endif // ANALYSEFLOWCHART_H