diff --git a/GUI/Model/Sample/InterferenceItems.h b/GUI/Model/Sample/InterferenceItems.h index 7316798a5583b836fb8fd5a46a57d240730d3e9e..dcb64d94501657ac65bfe3bff4ab744c98860c75 100644 --- a/GUI/Model/Sample/InterferenceItems.h +++ b/GUI/Model/Sample/InterferenceItems.h @@ -16,7 +16,7 @@ #define BORNAGAIN_GUI_MODEL_SAMPLE_INTERFERENCEITEMS_H #include "GUI/Model/Descriptor/DoubleProperty.h" -#include "GUI/Model/Descriptor/PolyItem.h" +#include "GUI/Model/Descriptor/PolyPtr.h" #include "GUI/Model/Sample/Lattice2DCatalog.h" #include "GUI/Model/Sample/Lattice2DItems.h" #include "GUI/Model/Sample/ProfileCatalogs.h" @@ -62,13 +62,13 @@ public: const DoubleProperty& rotationAngle() const { return m_rotation_angle; } void setRotationAngle(double v) { m_rotation_angle.setDVal(v); } - PolyItem<Profile1DCatalog>& decayFunctionSelection() { return m_decay_function; } + PolyPtr<Profile1DItem, Profile1DCatalog>& decayFunctionSelection() { return m_decay_function; } void setDecayFunctionType(Profile1DItem* p) { m_decay_function.setCertainItem(p); } private: DoubleProperty m_length; DoubleProperty m_rotation_angle; - PolyItem<Profile1DCatalog> m_decay_function; + PolyPtr<Profile1DItem, Profile1DCatalog> m_decay_function; }; // ------------------------------------------------------------------------------------------------ @@ -76,7 +76,7 @@ private: class Interference2DAbstractLatticeItem : public InterferenceItem { public: Lattice2DItem* latticeTypeItem() const { return m_lattice_type.certainItem(); } - PolyItem<Lattice2DCatalog>& latticeTypeSelection() { return m_lattice_type; } + PolyPtr<Lattice2DItem, Lattice2DCatalog>& latticeTypeSelection() { return m_lattice_type; } void setLatticeType(Lattice2DItem* p) { m_lattice_type.setCertainItem(p); } bool xiIntegration() const { return m_xi_integration; } @@ -89,7 +89,7 @@ protected: explicit Interference2DAbstractLatticeItem(bool xiIntegration); bool m_xi_integration; - PolyItem<Lattice2DCatalog> m_lattice_type; + PolyPtr<Lattice2DItem, Lattice2DCatalog> m_lattice_type; }; // ------------------------------------------------------------------------------------------------ @@ -102,11 +102,11 @@ public: void writeTo(QXmlStreamWriter* w) const override; void readFrom(QXmlStreamReader* r) override; - PolyItem<Profile2DCatalog>& decayFunctionSelection() { return m_decay_function; } + PolyPtr<Profile2DItem, Profile2DCatalog>& decayFunctionSelection() { return m_decay_function; } void setDecayFunctionType(Profile2DItem* p) { m_decay_function.setCertainItem(p); } protected: - PolyItem<Profile2DCatalog> m_decay_function; + PolyPtr<Profile2DItem, 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<Profile2DCatalog>& probabilityDistributionSelection1() { return m_pdf1; } + PolyPtr<Profile2DItem, Profile2DCatalog>& probabilityDistributionSelection1() { return m_pdf1; } void setPDF1Type(Profile2DItem* p) { m_pdf1.setCertainItem(p); } - PolyItem<Profile2DCatalog>& probabilityDistributionSelection2() { return m_pdf2; } + PolyPtr<Profile2DItem, 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<Profile2DCatalog> m_pdf1; - PolyItem<Profile2DCatalog> m_pdf2; + PolyPtr<Profile2DItem, Profile2DCatalog> m_pdf1; + PolyPtr<Profile2DItem, Profile2DCatalog> m_pdf2; }; // ------------------------------------------------------------------------------------------------ @@ -215,7 +215,7 @@ public: const DoubleProperty& kappa() const { return m_kappa; } void setKappa(double v) { m_kappa.setDVal(v); } - PolyItem<Profile1DCatalog>& probabilityDistributionSelection() { return m_pdf; } + PolyPtr<Profile1DItem, Profile1DCatalog>& probabilityDistributionSelection() { return m_pdf; } void setPDFType(Profile1DItem* p) { m_pdf.setCertainItem(p); } private: @@ -223,7 +223,7 @@ private: DoubleProperty m_damping_length; DoubleProperty m_domain_size; DoubleProperty m_kappa; - PolyItem<Profile1DCatalog> m_pdf; + PolyPtr<Profile1DItem, Profile1DCatalog> m_pdf; }; #endif // BORNAGAIN_GUI_MODEL_SAMPLE_INTERFERENCEITEMS_H