From 2cdc83f6f6f9c5f7d119ebcfdb33edee1b09a494 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (o)" <j.wuttke@fz-juelich.de>
Date: Tue, 23 Jul 2024 14:37:47 +0200
Subject: [PATCH] replace 'Profile2DItemCatalog' by 'Profile2DCatalog'

---
 GUI/Model/Job/ParameterTreeBuilder.cpp | 11 ++++-------
 GUI/Model/Sample/InterferenceItems.cpp |  6 +++---
 GUI/Model/Sample/InterferenceItems.h   | 12 ++++++------
 GUI/Model/Sample/ProfileCatalogs.cpp   | 10 +++++-----
 GUI/Model/Sample/ProfileCatalogs.h     |  4 ++--
 5 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/GUI/Model/Job/ParameterTreeBuilder.cpp b/GUI/Model/Job/ParameterTreeBuilder.cpp
index ae4ab0a5adc..297fa5a9713 100644
--- a/GUI/Model/Job/ParameterTreeBuilder.cpp
+++ b/GUI/Model/Job/ParameterTreeBuilder.cpp
@@ -207,14 +207,11 @@ void ParameterTreeBuilder::addInterference(ParameterLabelItem* layoutLabel,
 
         auto* pdf1 = itf->probabilityDistributionSelection1().certainItem();
         auto* pdf2 = itf->probabilityDistributionSelection2().certainItem();
-        const bool samePdfTypes =
-            Profile2DItemCatalog::type(pdf1) == Profile2DItemCatalog::type(pdf2);
-        auto* pdf1Label =
-            addLabel<Profile2DItemCatalog>(label, samePdfTypes ? "PDF1" : "PDF", pdf1);
+        const bool samePdfTypes = Profile2DCatalog::type(pdf1) == Profile2DCatalog::type(pdf2);
+        auto* pdf1Label = addLabel<Profile2DCatalog>(label, samePdfTypes ? "PDF1" : "PDF", pdf1);
         for (auto* d : pdf1->profileProperties())
             addParameterItem(pdf1Label, *d);
-        auto* pdf2Label =
-            addLabel<Profile2DItemCatalog>(label, samePdfTypes ? "PDF2" : "PDF", pdf2);
+        auto* pdf2Label = addLabel<Profile2DCatalog>(label, samePdfTypes ? "PDF2" : "PDF", pdf2);
         for (auto* d : pdf2->profileProperties())
             addParameterItem(pdf2Label, *d);
     } else if (auto* itf = dynamic_cast<Interference1DLatticeItem*>(interference)) {
@@ -231,7 +228,7 @@ void ParameterTreeBuilder::addInterference(ParameterLabelItem* layoutLabel,
         addLattice(label, itf);
 
         auto* df = itf->decayFunctionSelection().certainItem();
-        auto* dfLabel = addLabel<Profile2DItemCatalog>(label, "Decay function", df);
+        auto* dfLabel = addLabel<Profile2DCatalog>(label, "Decay function", df);
         for (auto* d : df->profileProperties())
             addParameterItem(dfLabel, *d);
     } else if (auto* itf = dynamic_cast<InterferenceFinite2DLatticeItem*>(interference)) {
diff --git a/GUI/Model/Sample/InterferenceItems.cpp b/GUI/Model/Sample/InterferenceItems.cpp
index 9910b069ab6..c232eb75b76 100644
--- a/GUI/Model/Sample/InterferenceItems.cpp
+++ b/GUI/Model/Sample/InterferenceItems.cpp
@@ -157,7 +157,7 @@ Interference2DLatticeItem::Interference2DLatticeItem()
 {
     m_decay_function.initWithArgs("Decay Function",
                                   "Two-dimensional decay function (finite size effects)",
-                                  Profile2DItemCatalog::Type::Cauchy);
+                                  Profile2DCatalog::Type::Cauchy);
 }
 
 std::unique_ptr<IInterference> Interference2DLatticeItem::createInterference() const
@@ -207,9 +207,9 @@ Interference2DParacrystalItem::Interference2DParacrystalItem()
                         "Size of the coherent domain along the second basis vector", 20000.0,
                         "size2");
     m_pdf1.initWithArgs("PDF 1", "Probability distribution in first lattice direction",
-                        Profile2DItemCatalog::Type::Cauchy);
+                        Profile2DCatalog::Type::Cauchy);
     m_pdf2.initWithArgs("PDF 2", "Probability distribution in second lattice direction",
-                        Profile2DItemCatalog::Type::Cauchy);
+                        Profile2DCatalog::Type::Cauchy);
 }
 
 std::unique_ptr<IInterference> Interference2DParacrystalItem::createInterference() const
diff --git a/GUI/Model/Sample/InterferenceItems.h b/GUI/Model/Sample/InterferenceItems.h
index 4d3cdec8a7f..7316798a558 100644
--- a/GUI/Model/Sample/InterferenceItems.h
+++ b/GUI/Model/Sample/InterferenceItems.h
@@ -102,11 +102,11 @@ public:
     void writeTo(QXmlStreamWriter* w) const override;
     void readFrom(QXmlStreamReader* r) override;
 
-    PolyItem<Profile2DItemCatalog>& decayFunctionSelection() { return m_decay_function; }
+    PolyItem<Profile2DCatalog>& decayFunctionSelection() { return m_decay_function; }
     void setDecayFunctionType(Profile2DItem* p) { m_decay_function.setCertainItem(p); }
 
 protected:
-    PolyItem<Profile2DItemCatalog> m_decay_function;
+    PolyItem<Profile2DCatalog> m_decay_function;
 };
 
 // ------------------------------------------------------------------------------------------------
@@ -131,18 +131,18 @@ public:
     const DoubleProperty& domainSize2() const { return m_domain_size2; }
     void setDomainSize2(double size) { m_domain_size2.setDVal(size); }
 
-    PolyItem<Profile2DItemCatalog>& probabilityDistributionSelection1() { return m_pdf1; }
+    PolyItem<Profile2DCatalog>& probabilityDistributionSelection1() { return m_pdf1; }
     void setPDF1Type(Profile2DItem* p) { m_pdf1.setCertainItem(p); }
 
-    PolyItem<Profile2DItemCatalog>& probabilityDistributionSelection2() { return m_pdf2; }
+    PolyItem<Profile2DCatalog>& probabilityDistributionSelection2() { return m_pdf2; }
     void setPDF2Type(Profile2DItem* p) { m_pdf2.setCertainItem(p); }
 
 private:
     DoubleProperty m_damping_length;
     DoubleProperty m_domain_size1;
     DoubleProperty m_domain_size2;
-    PolyItem<Profile2DItemCatalog> m_pdf1;
-    PolyItem<Profile2DItemCatalog> m_pdf2;
+    PolyItem<Profile2DCatalog> m_pdf1;
+    PolyItem<Profile2DCatalog> m_pdf2;
 };
 
 // ------------------------------------------------------------------------------------------------
diff --git a/GUI/Model/Sample/ProfileCatalogs.cpp b/GUI/Model/Sample/ProfileCatalogs.cpp
index 2f7717ce2a9..db1e736c73f 100644
--- a/GUI/Model/Sample/ProfileCatalogs.cpp
+++ b/GUI/Model/Sample/ProfileCatalogs.cpp
@@ -3,7 +3,7 @@
 //  BornAgain: simulate and fit reflection and scattering
 //
 //! @file      GUI/Model/Sample/ProfileCatalogs.cpp
-//! @brief     Implements classes Profile1DCatalog, Profile2DItemCatalog.
+//! @brief     Implements classes Profile1DCatalog, Profile2DCatalog.
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -82,7 +82,7 @@ Profile1DCatalog::Type Profile1DCatalog::type(const BaseItem* item)
 
 /* --------------------------------------------------------------------------------------------- */
 
-Profile2DItemCatalog::BaseItem* Profile2DItemCatalog::create(Type type)
+Profile2DCatalog::BaseItem* Profile2DCatalog::create(Type type)
 {
     switch (type) {
     case Type::Cauchy:
@@ -100,12 +100,12 @@ Profile2DItemCatalog::BaseItem* Profile2DItemCatalog::create(Type type)
     }
 }
 
-QVector<Profile2DItemCatalog::Type> Profile2DItemCatalog::types()
+QVector<Profile2DCatalog::Type> Profile2DCatalog::types()
 {
     return {Type::Cauchy, Type::Gauss, Type::Gate, Type::Cone, Type::Voigt};
 }
 
-UiInfo Profile2DItemCatalog::uiInfo(Type type)
+UiInfo Profile2DCatalog::uiInfo(Type type)
 {
     switch (type) {
     case Type::Cauchy:
@@ -123,7 +123,7 @@ UiInfo Profile2DItemCatalog::uiInfo(Type type)
     }
 }
 
-Profile2DItemCatalog::Type Profile2DItemCatalog::type(const BaseItem* item)
+Profile2DCatalog::Type Profile2DCatalog::type(const BaseItem* item)
 {
     ASSERT(item);
 
diff --git a/GUI/Model/Sample/ProfileCatalogs.h b/GUI/Model/Sample/ProfileCatalogs.h
index 54ccf94f4ca..6a2af38d8b5 100644
--- a/GUI/Model/Sample/ProfileCatalogs.h
+++ b/GUI/Model/Sample/ProfileCatalogs.h
@@ -3,7 +3,7 @@
 //  BornAgain: simulate and fit reflection and scattering
 //
 //! @file      GUI/Model/Sample/ProfileCatalogs.h
-//! @brief     Defines classes Profile1DCatalog, Profile2DItemCatalog.
+//! @brief     Defines classes Profile1DCatalog, Profile2DCatalog.
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -49,7 +49,7 @@ public:
     static Type type(const BaseItem* item);
 };
 
-class Profile2DItemCatalog {
+class Profile2DCatalog {
 public:
     using BaseItem = Profile2DItem;
 
-- 
GitLab