From d048d667618952963a0a6337a71c891f45b80efb Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Tue, 10 Oct 2023 10:31:04 +0200
Subject: [PATCH] rm old init fct 1/3

---
 GUI/Model/Descriptor/DoubleProperty.cpp |  6 ------
 GUI/Model/Descriptor/DoubleProperty.h   |  3 +--
 GUI/Model/Detector/DetectorItem.cpp     | 12 ++++++------
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/GUI/Model/Descriptor/DoubleProperty.cpp b/GUI/Model/Descriptor/DoubleProperty.cpp
index c19a0e9462c..190df5a907b 100644
--- a/GUI/Model/Descriptor/DoubleProperty.cpp
+++ b/GUI/Model/Descriptor/DoubleProperty.cpp
@@ -37,12 +37,6 @@ void DoubleProperty::init(const QString& label, const QString& tooltip, double v
 }
 
 
-void DoubleProperty::init(const QString& label, const QString& tooltip, double value,
-                          const variant<QString, Unit>& unit, const QString& uidPrefix)
-{
-    init(label, tooltip, value, unit, 3, RealLimits::nonnegative(), uidPrefix);
-}
-
 void DoubleProperty::init(const QString& label, const QString& tooltip, double value,
                           const variant<QString, Unit>& unit, uint decimals,
                           const RealLimits& limits, const QString& uidPrefix)
diff --git a/GUI/Model/Descriptor/DoubleProperty.h b/GUI/Model/Descriptor/DoubleProperty.h
index 8faa2680fc9..9e2a50d655b 100644
--- a/GUI/Model/Descriptor/DoubleProperty.h
+++ b/GUI/Model/Descriptor/DoubleProperty.h
@@ -37,6 +37,7 @@
 //!   also when serializing the link. Right now, this uid is a UUID.
 
 class DoubleProperty {
+private:
 public:
     void init(const QString& label, const QString& tooltip, double value, const QString& uidPrefix);
     void init(const QString& label, const QString& tooltip, double value, uint decimals,
@@ -44,8 +45,6 @@ public:
     void init(const QString& label, const QString& tooltip, double value, uint decimals,
               double step, const RealLimits& limits, const QString& uidPrefix);
 
-    void init(const QString& label, const QString& tooltip, double value,
-              const std::variant<QString, Unit>& unit, const QString& uidPrefix);
     void init(const QString& label, const QString& tooltip, double value,
               const std::variant<QString, Unit>& unit, uint decimals, const RealLimits& limits,
               const QString& uidPrefix);
diff --git a/GUI/Model/Detector/DetectorItem.cpp b/GUI/Model/Detector/DetectorItem.cpp
index 14e220a4845..4b2c95c8bbc 100644
--- a/GUI/Model/Detector/DetectorItem.cpp
+++ b/GUI/Model/Detector/DetectorItem.cpp
@@ -56,9 +56,9 @@ DetectorItem::DetectorItem()
 
     m_xSize = 100;
     m_ySize = 100;
-    m_width.init("Width (x-axis)", "Width of the detector", default_detector_width, "mm",
+    m_width.init("Width (mm)", "Width of the detector", default_detector_width,
                  3 /* decimals */, RealLimits::positive(), "width");
-    m_height.init("Height (y-axis)", "Height of the detector", default_detector_height, "mm",
+    m_height.init("Height (mm)", "Height of the detector", default_detector_height,
                   3 /* decimals */, RealLimits::positive(), "height");
 
     m_normalVector.init(
@@ -71,11 +71,11 @@ DetectorItem::DetectorItem()
                            "directionVector");
     m_directionVector.setY(-1.0);
 
-    m_u0.init("u0", "", default_detector_width / 2., "mm", 3 /* decimals */,
+    m_u0.init("u0 (mm)", "", default_detector_width / 2., 3 /* decimals */,
               RealLimits::limitless(), "u0");
-    m_v0.init("v0", "", 0.0, "mm", 3 /* decimals */, RealLimits::limitless(), "v0");
-    m_distance.init("Distance", "Distance from the sample origin to the detector plane",
-                    default_detector_distance, "mm", "distance");
+    m_v0.init("v0 (mm)", "", 0.0, 3 /* decimals */, RealLimits::limitless(), "v0");
+    m_distance.init("Distance (mm)", "Distance from the sample origin to the detector plane",
+                    default_detector_distance, "distance");
 
     m_detectorAlignment = ComboProperty::fromList(alignment_names_map.values(),
                                                   alignment_names_map.value(FlatDetector::T));
-- 
GitLab