From 4d3168ee38b00a6f2dda5320b2ca1aa94b0f63d0 Mon Sep 17 00:00:00 2001
From: Gennady Pospelov <g.pospelov@fz-juelich.de>
Date: Mon, 27 Nov 2017 13:23:35 +0100
Subject: [PATCH] Prefix "Obsolete" added to ScientificDoubleProperty class and
 files.

---
 ...erty.h => ObsoleteScientificDoubleProperty.h} | 16 ++++++++--------
 GUI/coregui/Models/ParameterTreeItems.cpp        |  1 -
 .../ObsoletePropertyBrowserUtils.cpp             |  4 ++--
 .../ObsoletePropertyBrowserUtils.h               | 10 +++++-----
 .../ObsoletePropertyVariantFactory.cpp           | 10 +++++-----
 .../ObsoletePropertyVariantFactory.h             |  4 ++--
 .../ObsoletePropertyVariantManager.cpp           |  6 +++---
 .../ObsoletePropertyVariantManager.h             |  4 ++--
 8 files changed, 27 insertions(+), 28 deletions(-)
 rename GUI/coregui/Models/{ScientificDoubleProperty.h => ObsoleteScientificDoubleProperty.h} (72%)

diff --git a/GUI/coregui/Models/ScientificDoubleProperty.h b/GUI/coregui/Models/ObsoleteScientificDoubleProperty.h
similarity index 72%
rename from GUI/coregui/Models/ScientificDoubleProperty.h
rename to GUI/coregui/Models/ObsoleteScientificDoubleProperty.h
index 2345edc7255..c5310c1c78e 100644
--- a/GUI/coregui/Models/ScientificDoubleProperty.h
+++ b/GUI/coregui/Models/ObsoleteScientificDoubleProperty.h
@@ -2,8 +2,8 @@
 //
 //  BornAgain: simulate and fit scattering at grazing incidence
 //
-//! @file      GUI/coregui/Models/ScientificDoubleProperty.h
-//! @brief     Defines class ScientificDoubleProperty
+//! @file      GUI/coregui/Models/ObsoleteScientificDoubleProperty.h
+//! @brief     Defines class ObsoleteScientificDoubleProperty
 //!
 //! @homepage  http://www.bornagainproject.org
 //! @license   GNU General Public License v3 or higher (see COPYING)
@@ -14,8 +14,8 @@
 //
 // ************************************************************************** //
 
-#ifndef SCIENTIFICDOUBLEPROPERTY_H
-#define SCIENTIFICDOUBLEPROPERTY_H
+#ifndef OBSOLETESCIENTIFICDOUBLEPROPERTY_H
+#define OBSOLETESCIENTIFICDOUBLEPROPERTY_H
 
 #include "WinDllMacros.h"
 #include <QString>
@@ -26,10 +26,10 @@
 //! The reason is to have simple editor for doubles in scientific notation
 //! in PropertyEditor instead of inconvenient QDoubleSpinBox
 
-class BA_CORE_API_ ScientificDoubleProperty
+class BA_CORE_API_ ObsoleteScientificDoubleProperty
 {
 public:
-    explicit ScientificDoubleProperty(double value = 0) : m_value(value) { }
+    explicit ObsoleteScientificDoubleProperty(double value = 0) : m_value(value) { }
 
     double getValue() const { return m_value; }
 
@@ -48,7 +48,7 @@ private:
     double m_value;
 };
 
-Q_DECLARE_METATYPE(ScientificDoubleProperty)
+Q_DECLARE_METATYPE(ObsoleteScientificDoubleProperty)
 
-#endif // SCIENTIFICDOUBLEPROPERTY_H
+#endif // OBSOLETESCIENTIFICDOUBLEPROPERTY_H
 
diff --git a/GUI/coregui/Models/ParameterTreeItems.cpp b/GUI/coregui/Models/ParameterTreeItems.cpp
index 165a8185637..bed24add55f 100644
--- a/GUI/coregui/Models/ParameterTreeItems.cpp
+++ b/GUI/coregui/Models/ParameterTreeItems.cpp
@@ -18,7 +18,6 @@
 #include "ModelPath.h"
 #include "SessionModel.h"
 #include "FitParameterHelper.h"
-#include "ScientificDoubleProperty.h"
 
 // ----------------------------------------------------------------------------
 
diff --git a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyBrowserUtils.cpp b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyBrowserUtils.cpp
index 16833d87f99..fc05629b612 100644
--- a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyBrowserUtils.cpp
+++ b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyBrowserUtils.cpp
@@ -272,7 +272,7 @@ ObsoleteScientificDoublePropertyEdit::ObsoleteScientificDoublePropertyEdit(QWidg
 }
 
 void ObsoleteScientificDoublePropertyEdit::setScientificDoubleProperty(
-        const ScientificDoubleProperty &doubleProperty)
+        const ObsoleteScientificDoubleProperty &doubleProperty)
 {
     m_lineEdit->setText(doubleProperty.getText());
     m_scientificDoubleProperty = doubleProperty;
@@ -282,7 +282,7 @@ void ObsoleteScientificDoublePropertyEdit::onEditingFinished()
 {
     double new_value = m_lineEdit->text().toDouble();
     if(new_value != m_scientificDoubleProperty.getValue()) {
-        ScientificDoubleProperty doubleProperty(new_value);
+        ObsoleteScientificDoubleProperty doubleProperty(new_value);
         setScientificDoubleProperty(doubleProperty);
         emit scientificDoublePropertyChanged(m_scientificDoubleProperty);
     }
diff --git a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyBrowserUtils.h b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyBrowserUtils.h
index ed2823c69ec..e206a513e25 100644
--- a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyBrowserUtils.h
+++ b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyBrowserUtils.h
@@ -20,7 +20,7 @@
 #include <QWidget>
 #include "MaterialProperty.h"
 #include "ColorProperty.h"
-#include "ScientificDoubleProperty.h"
+#include "ObsoleteScientificDoubleProperty.h"
 #include "GroupProperty.h"
 #include "ComboProperty.h"
 
@@ -124,8 +124,8 @@ class BA_CORE_API_ ObsoleteScientificDoublePropertyEdit : public QWidget
 public:
     ObsoleteScientificDoublePropertyEdit(QWidget *parent = 0);
 
-    void setScientificDoubleProperty(const ScientificDoubleProperty &doubleProperty);
-    ScientificDoubleProperty getScientificDoubleProperty() const {
+    void setScientificDoubleProperty(const ObsoleteScientificDoubleProperty &doubleProperty);
+    ObsoleteScientificDoubleProperty getScientificDoubleProperty() const {
         return m_scientificDoubleProperty;
     }
 
@@ -133,13 +133,13 @@ public:
     QSize minimumSizeHint() const;
 
 signals:
-    void scientificDoublePropertyChanged(const ScientificDoubleProperty &doubleProperty);
+    void scientificDoublePropertyChanged(const ObsoleteScientificDoubleProperty &doubleProperty);
 private slots:
     void onEditingFinished();
 private:
     QLineEdit *m_lineEdit;
     QDoubleValidator *m_validator;
-    ScientificDoubleProperty m_scientificDoubleProperty;
+    ObsoleteScientificDoubleProperty m_scientificDoubleProperty;
 };
 
 #include <QComboBox>
diff --git a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.cpp b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.cpp
index 04466504bbe..6f7e2f7b11b 100644
--- a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.cpp
+++ b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.cpp
@@ -106,15 +106,15 @@ QWidget *ObsoletePropertyVariantFactory::createEditor(QtVariantPropertyManager *
             ObsoletePropertyVariantManager::scientificDoubleTypeId()) {
         ObsoleteScientificDoublePropertyEdit *editor = new ObsoleteScientificDoublePropertyEdit(parent);
         QVariant var = manager->value(property);
-        ScientificDoubleProperty sc = var.value<ScientificDoubleProperty>();
+        ObsoleteScientificDoubleProperty sc = var.value<ObsoleteScientificDoubleProperty>();
         editor->setScientificDoubleProperty(sc);
 
         m_property_to_scdouble_editors[property].append(editor);
         m_scdouble_editor_to_property[editor] = property;
 
         connect(editor,
-                SIGNAL(scientificDoublePropertyChanged(const ScientificDoubleProperty &)),
-                this, SLOT(slotSetValue(const ScientificDoubleProperty &)));
+                SIGNAL(scientificDoublePropertyChanged(const ObsoleteScientificDoubleProperty &)),
+                this, SLOT(slotSetValue(const ObsoleteScientificDoubleProperty &)));
         connect(editor, SIGNAL(destroyed(QObject *)),
                 this, SLOT(slotEditorDestroyed(QObject *)));
         return editor;
@@ -200,7 +200,7 @@ void ObsoletePropertyVariantFactory::slotPropertyChanged(QtProperty *property,
                 m_property_to_scdouble_editors[property];
         QListIterator<ObsoleteScientificDoublePropertyEdit *> itEditor(editors);
         while (itEditor.hasNext()) {
-            ScientificDoubleProperty mat = value.value<ScientificDoubleProperty>();
+            ObsoleteScientificDoubleProperty mat = value.value<ObsoleteScientificDoubleProperty>();
             itEditor.next()->setScientificDoubleProperty(mat);
         }
     }
@@ -263,7 +263,7 @@ void ObsoletePropertyVariantFactory::slotSetValue(const ColorProperty &value)
     }
 }
 
-void ObsoletePropertyVariantFactory::slotSetValue(const ScientificDoubleProperty &value)
+void ObsoletePropertyVariantFactory::slotSetValue(const ObsoleteScientificDoubleProperty &value)
 {
     QObject *object = sender();
     QMap<ObsoleteScientificDoublePropertyEdit *, QtProperty *>::ConstIterator itEditor =
diff --git a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.h b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.h
index 56f6e16e659..6a7ab81ef42 100644
--- a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.h
+++ b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantFactory.h
@@ -27,7 +27,7 @@ class MaterialProperty;
 class ObsoleteColorPropertyEdit;
 class ColorProperty;
 class ObsoleteScientificDoublePropertyEdit;
-class ScientificDoubleProperty;
+class ObsoleteScientificDoubleProperty;
 class ObsoleteGroupPropertyEdit;
 class ObsoleteComboPropertyEdit;
 class ComboProperty;
@@ -53,7 +53,7 @@ private slots:
     void slotPropertyChanged(QtProperty *property, const QVariant &value);
     void slotSetValue(const MaterialProperty &value);
     void slotSetValue(const ColorProperty &value);
-    void slotSetValue(const ScientificDoubleProperty &value);
+    void slotSetValue(const ObsoleteScientificDoubleProperty &value);
     void slotSetValue(const GroupProperty_t &value);
     void slotSetValue(const ComboProperty &value);
     void slotEditorDestroyed(QObject *object);
diff --git a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantManager.cpp b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantManager.cpp
index cb4dc4a1b7c..38de2dec574 100644
--- a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantManager.cpp
+++ b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantManager.cpp
@@ -39,7 +39,7 @@ int ObsoletePropertyVariantManager::colorPropertyTypeId()
 
 int ObsoletePropertyVariantManager::scientificDoubleTypeId()
 {
-    int result = qMetaTypeId<ScientificDoubleProperty>();
+    int result = qMetaTypeId<ObsoleteScientificDoubleProperty>();
     return result;
 }
 
@@ -176,7 +176,7 @@ void ObsoletePropertyVariantManager::setValue(QtProperty *property, const QVaria
     }
     if (m_theScientificDoubleValues.contains(property)) {
         if( val.userType() != scientificDoubleTypeId() ) return;
-        ScientificDoubleProperty double_prop = val.value<ScientificDoubleProperty>();
+        ObsoleteScientificDoubleProperty double_prop = val.value<ObsoleteScientificDoubleProperty>();
         m_theScientificDoubleValues[property] = double_prop;
         QVariant v2;
         v2.setValue(double_prop);
@@ -220,7 +220,7 @@ void ObsoletePropertyVariantManager::initializeProperty(QtProperty *property)
         m_theColorValues[property] = m;
     }
     if (propertyType(property) == scientificDoubleTypeId()) {
-        ScientificDoubleProperty m;
+        ObsoleteScientificDoubleProperty m;
         m_theScientificDoubleValues[property] = m;
     }
     if (propertyType(property) == fancyGroupTypeId()) {
diff --git a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantManager.h b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantManager.h
index eecd51970a2..a9a4ce89634 100644
--- a/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantManager.h
+++ b/GUI/coregui/Views/PropertyEditor/ObsoletePropertyVariantManager.h
@@ -23,7 +23,7 @@
 #include "ComboProperty.h"
 #include "GroupProperty.h"
 #include "MaterialProperty.h"
-#include "ScientificDoubleProperty.h"
+#include "ObsoleteScientificDoubleProperty.h"
 #include <QtVariantPropertyManager>
 
 class QObject;
@@ -58,7 +58,7 @@ protected:
 private:
     QMap<const QtProperty *, MaterialProperty> m_theMaterialValues;
     QMap<const QtProperty *, ColorProperty> m_theColorValues;
-    QMap<const QtProperty *, ScientificDoubleProperty> m_theScientificDoubleValues;
+    QMap<const QtProperty *, ObsoleteScientificDoubleProperty> m_theScientificDoubleValues;
     QMap<const QtProperty *, GroupProperty_t> m_theFancyGroupValues;
     QMap<const QtProperty *, ComboProperty> m_theComboValues;
 };
-- 
GitLab