Skip to content
Snippets Groups Projects
Commit 7d4af818 authored by t.knopff's avatar t.knopff
Browse files

Make DetectorItem::P_ANALYZER_TOTAL_TRANSMISSION private

parent ce8777b5
No related branches found
No related tags found
1 merge request!96Refactor model: detector items
......@@ -123,6 +123,16 @@ SessionItem* DetectorItem::analyserEfficiencyItem() const
return getItem(P_ANALYZER_EFFICIENCY);
}
void DetectorItem::setAnalyserTotalTransmission(const double transmission)
{
setItemValue(P_ANALYZER_TOTAL_TRANSMISSION, transmission);
}
SessionItem* DetectorItem::analyserTotalTransmissionItem() const
{
return getItem(P_ANALYZER_TOTAL_TRANSMISSION);
}
void DetectorItem::register_resolution_function()
{
auto item = addGroupProperty(P_RESOLUTION_FUNCTION, "Resolution function group");
......
......@@ -29,9 +29,9 @@ private:
static const QString P_RESOLUTION_FUNCTION;
static const QString P_ANALYZER_DIRECTION;
static const QString P_ANALYZER_EFFICIENCY;
static const QString P_ANALYZER_TOTAL_TRANSMISSION;
public:
static const QString P_ANALYZER_TOTAL_TRANSMISSION;
explicit DetectorItem(const QString& modelType);
std::unique_ptr<IDetector2D> createDetector() const;
......@@ -67,6 +67,9 @@ public:
void setAnalyserEfficiency(double efficiency);
SessionItem* analyserEfficiencyItem() const;
void setAnalyserTotalTransmission(double efficiency);
SessionItem* analyserTotalTransmissionItem() const;
protected:
void register_resolution_function();
void update_resolution_function_tooltips();
......
......@@ -352,7 +352,7 @@ void TransformFromDomain::setDetectorProperties(DetectorItem* detector_item,
double efficiency = detector.detectionProperties().analyzerEfficiency();
detector_item->setAnalyserDirection(analyzer_dir);
detector_item->setAnalyserEfficiency(efficiency);
detector_item->setItemValue(DetectorItem::P_ANALYZER_TOTAL_TRANSMISSION, total_transmission);
detector_item->setAnalyserTotalTransmission(total_transmission);
}
void TransformFromDomain::setSphericalDetector(SphericalDetectorItem* detector_item,
......
......@@ -100,6 +100,5 @@ void PolarizationAnalysisEditor::updateAnalyserEditor()
m_analyserPropertiesEditor->clearEditor();
m_analyserDirectionEditor->addItem(detectorItem()->analyserDirectionItem());
m_analyserPropertiesEditor->addItem(detectorItem()->analyserEfficiencyItem());
m_analyserPropertiesEditor->addItem(
detectorItem()->getItem(DetectorItem::P_ANALYZER_TOTAL_TRANSMISSION));
m_analyserPropertiesEditor->addItem(detectorItem()->analyserTotalTransmissionItem());
}
---
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment