From 05ca2b5a66b5b7970cf9f1bf000e69279a041744 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Wed, 9 Aug 2023 11:39:18 +0200
Subject: [PATCH] further rename -> NominalNormal

---
 Device/Detector/RectangularDetector.cpp        | 2 +-
 Device/Detector/RectangularDetector.h          | 7 ++++---
 GUI/Model/Detector/RectangularDetectorItem.cpp | 6 +++---
 GUI/Model/Detector/RectangularDetectorItem.h   | 4 ++--
 GUI/View/Device/DetectorAlignmentForm.cpp      | 2 +-
 5 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/Device/Detector/RectangularDetector.cpp b/Device/Detector/RectangularDetector.cpp
index 1f27c1f56e8..5c8e7270b2e 100644
--- a/Device/Detector/RectangularDetector.cpp
+++ b/Device/Detector/RectangularDetector.cpp
@@ -118,7 +118,7 @@ double RectangularDetector::getDistance() const
     return m_distance;
 }
 
-RectangularDetector::DetectorPlacement RectangularDetector::getDetectorArrangment() const
+RectangularDetector::NominalNormal RectangularDetector::getDetectorArrangment() const
 {
     return m_detector_arrangement;
 }
diff --git a/Device/Detector/RectangularDetector.h b/Device/Detector/RectangularDetector.h
index 2c8fc434083..fad7c1a8291 100644
--- a/Device/Detector/RectangularDetector.h
+++ b/Device/Detector/RectangularDetector.h
@@ -24,7 +24,8 @@ class RectangularPixel;
 
 class RectangularDetector : public IDetector {
 public:
-    enum DetectorPlacement { GENERIC, X, T, R };
+    //! Nominal detector normal along x-axis (X), direct beam (T), or reflected beam (R).
+    enum NominalNormal { GENERIC, X, T, R };
 
     //! Rectangular detector constructor
     //! @param nxbins Number of bins (pixels) in x-direction
@@ -54,7 +55,7 @@ public:
     double getV0() const;
     R3 getDirectionVector() const;
     double getDistance() const;
-    DetectorPlacement getDetectorArrangment() const;
+    NominalNormal getDetectorArrangment() const;
 
     const RectangularPixel* regionOfInterestPixel() const;
 
@@ -86,7 +87,7 @@ private:
     double m_u0, m_v0; //!< position of normal vector hitting point in detector coordinates
     R3 m_direction;    //!< direction vector of detector coordinate system
     double m_distance; //!< distance from sample origin to the detector plane
-    DetectorPlacement m_detector_arrangement;
+    NominalNormal m_detector_arrangement;
     R3 m_u_unit;
     R3 m_v_unit;
 };
diff --git a/GUI/Model/Detector/RectangularDetectorItem.cpp b/GUI/Model/Detector/RectangularDetectorItem.cpp
index 71d58cbecfa..f625f55b022 100644
--- a/GUI/Model/Detector/RectangularDetectorItem.cpp
+++ b/GUI/Model/Detector/RectangularDetectorItem.cpp
@@ -38,7 +38,7 @@ const double default_detector_height = 20.0;
 const double default_detector_distance = 1000.0;
 
 //! Holds the alignments as expected on the UI (map is sorted by keys)
-const QMap<RectangularDetector::DetectorPlacement, QString> alignment_names_map = {
+const QMap<RectangularDetector::NominalNormal, QString> alignment_names_map = {
     {RectangularDetector::X, "Perpendicular to sample x-axis"},
     {RectangularDetector::T, "Perpendicular to direct beam"},
     {RectangularDetector::R, "Perpendicular to reflected beam"}};
@@ -239,13 +239,13 @@ void RectangularDetectorItem::setDetectorAlignment(const QString& alignment)
     setDetectorAlignment(alignment_names_map.key(alignment));
 }
 
-void RectangularDetectorItem::setDetectorAlignment(RectangularDetector::DetectorPlacement alignment)
+void RectangularDetectorItem::setDetectorAlignment(RectangularDetector::NominalNormal alignment)
 {
     m_detectorAlignment.setCurrentValue(alignment_names_map.value(alignment));
     updateTooltips();
 }
 
-RectangularDetector::DetectorPlacement RectangularDetectorItem::detectorAlignment() const
+RectangularDetector::NominalNormal RectangularDetectorItem::detectorAlignment() const
 {
     ASSERT(alignment_names_map.values().contains(m_detectorAlignment.currentValue()));
     return alignment_names_map.key(m_detectorAlignment.currentValue());
diff --git a/GUI/Model/Detector/RectangularDetectorItem.h b/GUI/Model/Detector/RectangularDetectorItem.h
index 469e993ae75..a20ac19ea96 100644
--- a/GUI/Model/Detector/RectangularDetectorItem.h
+++ b/GUI/Model/Detector/RectangularDetectorItem.h
@@ -42,9 +42,9 @@ public:
     void setHeight(double v) { m_height.setValue(v); }
 
     const ComboProperty& detectorAlignmentCombo() const { return m_detectorAlignment; }
-    RectangularDetector::DetectorPlacement detectorAlignment() const;
+    RectangularDetector::NominalNormal detectorAlignment() const;
     void setDetectorAlignment(const QString& alignment);
-    void setDetectorAlignment(RectangularDetector::DetectorPlacement alignment);
+    void setDetectorAlignment(RectangularDetector::NominalNormal alignment);
 
     VectorProperty& normalVector() { return m_normalVector; }
     const VectorProperty& normalVector() const { return m_normalVector; }
diff --git a/GUI/View/Device/DetectorAlignmentForm.cpp b/GUI/View/Device/DetectorAlignmentForm.cpp
index 9399481ac06..fa1eaa6102f 100644
--- a/GUI/View/Device/DetectorAlignmentForm.cpp
+++ b/GUI/View/Device/DetectorAlignmentForm.cpp
@@ -19,7 +19,7 @@
 #include <QLabel>
 
 namespace {
-QString alignmentDescription(RectangularDetector::DetectorPlacement a)
+QString alignmentDescription(RectangularDetector::NominalNormal a)
 {
     switch (a) {
     case RectangularDetector::X:
-- 
GitLab