添加粒子能量数据视图显示
This commit is contained in:
parent
ee794cfccc
commit
3e18a7dea0
|
|
@ -9,6 +9,7 @@ enum class AnalysisType {
|
||||||
EfficiencyScale, // 效率刻度
|
EfficiencyScale, // 效率刻度
|
||||||
ParticleData, // 粒子数据
|
ParticleData, // 粒子数据
|
||||||
AddressCountData, // 粒子道址计数数据
|
AddressCountData, // 粒子道址计数数据
|
||||||
|
ParticleEnergyData, // 粒子数据
|
||||||
EnergyCountData, // 能量计数数据
|
EnergyCountData, // 能量计数数据
|
||||||
ChannelEnergyCountData, // 通道能量计数数据
|
ChannelEnergyCountData, // 通道能量计数数据
|
||||||
CoincidenceParticleEnergyData, // 符合粒子能量数据
|
CoincidenceParticleEnergyData, // 符合粒子能量数据
|
||||||
|
|
|
||||||
|
|
@ -933,7 +933,7 @@ void MeasureAnalysisProjectModelList::intiProjectNodeStruce(MeasureAnalysisProje
|
||||||
|
|
||||||
state_ok = !pro_model->GetParticleEnergyDataFilename().isEmpty();
|
state_ok = !pro_model->GetParticleEnergyDataFilename().isEmpty();
|
||||||
status = state_ok ? QStringLiteral(u"有效") : QStringLiteral(u"无效");
|
status = state_ok ? QStringLiteral(u"有效") : QStringLiteral(u"无效");
|
||||||
analys_type = QVariant::fromValue(AnalysisType::CoincidenceParticleEnergyData);
|
analys_type = QVariant::fromValue(AnalysisType::ParticleEnergyData);
|
||||||
item_name = QStringLiteral(u"粒子能量数据");
|
item_name = QStringLiteral(u"粒子能量数据");
|
||||||
node_item = AddChildNode(analysis_data_item, item_name, status, analys_type, true, state_ok);
|
node_item = AddChildNode(analysis_data_item, item_name, status, analys_type, true, state_ok);
|
||||||
node_item->setData(project_name, ProjectName);
|
node_item->setData(project_name, ProjectName);
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,26 @@ void MeasureAnalysisTreeView::onNodeDoubleClicked(const QModelIndex& index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} break;
|
} 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: {
|
case AnalysisType::AddressCountSpectrumView: {
|
||||||
MeasureAnalysisProjectModel* project_model = _model->GetProjectModel(project_name);
|
MeasureAnalysisProjectModel* project_model = _model->GetProjectModel(project_name);
|
||||||
if (project_model) {
|
if (project_model) {
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,10 @@ MeasureAnalysisView *MeasureAnalysisView::NewAnalyzeView(AnalysisType view_type)
|
||||||
new_view = new MeasureAnalysisDataTableView;
|
new_view = new MeasureAnalysisDataTableView;
|
||||||
new_view->setDeleteOnClose(true);
|
new_view->setDeleteOnClose(true);
|
||||||
} break;
|
} break;
|
||||||
|
case AnalysisType::ParticleEnergyData: {
|
||||||
|
new_view = new MeasureAnalysisDataTableView;
|
||||||
|
new_view->setDeleteOnClose(true);
|
||||||
|
} break;
|
||||||
case AnalysisType::AddressCountData: {
|
case AnalysisType::AddressCountData: {
|
||||||
new_view = new MeasureAnalysisDataTableView;
|
new_view = new MeasureAnalysisDataTableView;
|
||||||
new_view->setDeleteOnClose(true);
|
new_view->setDeleteOnClose(true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user