diff --git a/GUI/coregui/Models/FTDistributionItems.cpp b/GUI/coregui/Models/FTDistributionItems.cpp index f9236ede67ff5988e1eaf5e74fc2008a43f7b201..e1db15d81a6e9c0a90c42fd1ea2d0629a9762ab4 100644 --- a/GUI/coregui/Models/FTDistributionItems.cpp +++ b/GUI/coregui/Models/FTDistributionItems.cpp @@ -124,11 +124,8 @@ std::unique_ptr<IFTDistribution1D> FTDistribution1DVoigtItem::createFTDistributi // --------------------------------------------------------------------------------------------- // -// TODO BACKCOMPATIBILITY (fix when we will break back compatibility) -// Make P_OMEGA_X, P_OMEGA_Y depend on BornAgain::OmegaX and OmegaY - -const QString FTDistribution2DItem::P_OMEGA_X = "CoherenceLengthX"; // temp FIXME -const QString FTDistribution2DItem::P_OMEGA_Y = "CoherenceLengthY"; // temp FIXME +const QString FTDistribution2DItem::P_OMEGA_X = QString::fromStdString(BornAgain::OmegaX); +const QString FTDistribution2DItem::P_OMEGA_Y = QString::fromStdString(BornAgain::OmegaY); const QString FTDistribution2DItem::P_GAMMA = QString::fromStdString(BornAgain::Gamma); FTDistribution2DItem::FTDistribution2DItem(const QString& name) @@ -138,14 +135,10 @@ FTDistribution2DItem::FTDistribution2DItem(const QString& name) void FTDistribution2DItem::add_omega_properties() { - // TODO BACKCOMPATIBILITY (remove setDisplayName when P_OMEGA_X will be "OmegaX") addProperty(P_OMEGA_X, 1.0)->setToolTip( - QStringLiteral("Half-width of the distribution along its x-axis in nanometers")) - .setDisplayName("OmegaX"); - + QStringLiteral("Half-width of the distribution along its x-axis in nanometers")); addProperty(P_OMEGA_Y, 1.0)->setToolTip( - QStringLiteral("Half-width of the distribution along its y-axis in nanometers")) - .setDisplayName("OmegaY"); + QStringLiteral("Half-width of the distribution along its y-axis in nanometers")); } void FTDistribution2DItem::add_gamma_property() diff --git a/GUI/coregui/Models/FTDistributionItems.h b/GUI/coregui/Models/FTDistributionItems.h index 4c63ded3d5b87e0f29af216adb665cce4ba48c22..ed07faf4c3f941d4d5b31ce72a0b29b35360cc84 100644 --- a/GUI/coregui/Models/FTDistributionItems.h +++ b/GUI/coregui/Models/FTDistributionItems.h @@ -85,7 +85,6 @@ public: static const QString P_GAMMA; explicit FTDistribution2DItem(const QString& name); virtual std::unique_ptr<IFTDistribution2D> createFTDistribution() const=0; - virtual ~FTDistribution2DItem(){} protected: void add_omega_properties(); void add_gamma_property(); diff --git a/GUI/coregui/Models/InterferenceFunctionItems.cpp b/GUI/coregui/Models/InterferenceFunctionItems.cpp index 459a4e05f65f7304b132a2fd1bc886b243ba9cbe..138b88534f08b13203e05c93d809390c65ddd47b 100644 --- a/GUI/coregui/Models/InterferenceFunctionItems.cpp +++ b/GUI/coregui/Models/InterferenceFunctionItems.cpp @@ -29,6 +29,10 @@ #include "InterferenceFunction1DLattice.h" #include "GroupItem.h" +namespace { + const QString decay_function_tag = "Decay Function"; +} + // TODO (when back compatibility will be broken again) // Make InterferenceFunction1DLatticeItem::P_DECAY_FUNCTION and // InterferenceFunction2DLatticeItem::P_DECAY_FUNCTION rely on same constant @@ -200,7 +204,7 @@ const QString InterferenceFunction1DLatticeItem::P_LENGTH = QString::fromStdString(BornAgain::Length); const QString InterferenceFunction1DLatticeItem::P_ROTATION_ANGLE = QString::fromStdString(BornAgain::Xi); -const QString InterferenceFunction1DLatticeItem::P_DECAY_FUNCTION = "Decay Function"; +const QString InterferenceFunction1DLatticeItem::P_DECAY_FUNCTION = decay_function_tag; InterferenceFunction1DLatticeItem::InterferenceFunction1DLatticeItem() : InterferenceFunctionItem(Constants::InterferenceFunction1DLatticeType) @@ -230,7 +234,7 @@ InterferenceFunction1DLatticeItem::createInterferenceFunction() const // --------------------------------------------------------------------------------------------- // const QString InterferenceFunction2DLatticeItem::P_LATTICE_TYPE = "LatticeType"; -const QString InterferenceFunction2DLatticeItem::P_DECAY_FUNCTION = "DecayFunction"; +const QString InterferenceFunction2DLatticeItem::P_DECAY_FUNCTION = decay_function_tag; const QString InterferenceFunction2DLatticeItem::P_XI_INTEGRATION = "Integration_over_xi"; InterferenceFunction2DLatticeItem::InterferenceFunction2DLatticeItem() diff --git a/GUI/coregui/Models/SessionModelDelegate.cpp b/GUI/coregui/Models/SessionModelDelegate.cpp index 5826b21be2a3ae243ba3767c79bc532915e93e5d..87f27f2f976f0071b05349c2c2f63f4748512223 100644 --- a/GUI/coregui/Models/SessionModelDelegate.cpp +++ b/GUI/coregui/Models/SessionModelDelegate.cpp @@ -30,7 +30,6 @@ bool isDoubleProperty(const QModelIndex& index) } //! Returns text representation of double value depending on user defined editor type. -//! FIXME Remove this temporary function after getting rid from ScientificDoubleProperty QString doubleToString(const SessionItem& item) { QString result;