添加粒子能量数据视图显示

This commit is contained in:
徐海 2026-03-24 14:18:44 +08:00
parent ee794cfccc
commit 3e18a7dea0
4 changed files with 26 additions and 1 deletions

View File

@ -9,6 +9,7 @@ enum class AnalysisType {
EfficiencyScale, // 效率刻度
ParticleData, // 粒子数据
AddressCountData, // 粒子道址计数数据
ParticleEnergyData, // 粒子数据
EnergyCountData, // 能量计数数据
ChannelEnergyCountData, // 通道能量计数数据
CoincidenceParticleEnergyData, // 符合粒子能量数据

View File

@ -933,7 +933,7 @@ void MeasureAnalysisProjectModelList::intiProjectNodeStruce(MeasureAnalysisProje
state_ok = !pro_model->GetParticleEnergyDataFilename().isEmpty();
status = state_ok ? QStringLiteral(u"有效") : QStringLiteral(u"无效");
analys_type = QVariant::fromValue(AnalysisType::CoincidenceParticleEnergyData);
analys_type = QVariant::fromValue(AnalysisType::ParticleEnergyData);
item_name = QStringLiteral(u"粒子能量数据");
node_item = AddChildNode(analysis_data_item, item_name, status, analys_type, true, state_ok);
node_item->setData(project_name, ProjectName);

View File

@ -102,6 +102,26 @@ void MeasureAnalysisTreeView::onNodeDoubleClicked(const QModelIndex& index)
}
}
} break;
case AnalysisType::ParticleEnergyData: {
MeasureAnalysisProjectModel* project_model = _model->GetProjectModel(project_name);
if (project_model) {
auto file_name = project_model->GetParticleEnergyDataFilename();
if ( !file_name.isEmpty() ) {
QMap<QString, QVariant> data_files_set;
data_files_set[QStringLiteral(u"粒子能量数据")] = file_name;
MeasureAnalysisView* view = MeasureAnalysisView::NewAnalyzeView(analysis_type);
if ( view ) {
view->SetProjectName(project_name);
const auto& view_name = QStringLiteral(u"%1[%2]").arg(item_text).arg(project_name);
view->SetViewName(view_name);
view->SetViewDescription(view_name);
view->InitViewWorkspace(project_name);
view->SetAnalyzeDataFilename(data_files_set);
emit currentItemView(view);
}
}
}
} break;
case AnalysisType::AddressCountSpectrumView: {
MeasureAnalysisProjectModel* project_model = _model->GetProjectModel(project_name);
if (project_model) {

View File

@ -27,6 +27,10 @@ MeasureAnalysisView *MeasureAnalysisView::NewAnalyzeView(AnalysisType view_type)
new_view = new MeasureAnalysisDataTableView;
new_view->setDeleteOnClose(true);
} break;
case AnalysisType::ParticleEnergyData: {
new_view = new MeasureAnalysisDataTableView;
new_view->setDeleteOnClose(true);
} break;
case AnalysisType::AddressCountData: {
new_view = new MeasureAnalysisDataTableView;
new_view->setDeleteOnClose(true);