diff --git a/GUI/Model/Sample/FTDecayFunctionItemCatalogs.cpp b/GUI/Model/Sample/FTDecayFunctionItemCatalogs.cpp index 1fcc568bb9f04eb7d87bfbeaf4fcc90fcb82868a..87680103e49dbbdfaec5444cb5ff14f0084c1fda 100644 --- a/GUI/Model/Sample/FTDecayFunctionItemCatalogs.cpp +++ b/GUI/Model/Sample/FTDecayFunctionItemCatalogs.cpp @@ -60,12 +60,12 @@ FTDecayFunction1DItemCatalog::UiInfo FTDecayFunction1DItemCatalog::uiInfo(Type t } } -FTDecayFunction1DItemCatalog::Type FTDecayFunction1DItemCatalog::type(CatalogedType* item) +FTDecayFunction1DItemCatalog::Type FTDecayFunction1DItemCatalog::type(const CatalogedType* item) { ASSERT(item); #define CHECK(type) \ - if (dynamic_cast<FTDecayFunction1D##type##Item*>(item)) \ + if (dynamic_cast<const FTDecayFunction1D##type##Item*>(item)) \ return Type::type CHECK(Cauchy); diff --git a/GUI/Model/Sample/FTDecayFunctionItemCatalogs.h b/GUI/Model/Sample/FTDecayFunctionItemCatalogs.h index 06676c9b1984b4141e489b61869bb744d120f803..295de4e3ec282add51e3a8b6f907044a2c148dc0 100644 --- a/GUI/Model/Sample/FTDecayFunctionItemCatalogs.h +++ b/GUI/Model/Sample/FTDecayFunctionItemCatalogs.h @@ -44,7 +44,7 @@ public: static UiInfo uiInfo(Type t); //! Returns the enum type of the given item. - static Type type(CatalogedType* item); + static Type type(const CatalogedType* item); }; class FTDecayFunction2DItemCatalog { diff --git a/GUI/Model/Sample/FTDistributionItemCatalogs.cpp b/GUI/Model/Sample/FTDistributionItemCatalogs.cpp index 6c483215be5823b3acb461f5057068039e7c5d87..4f283763d14463612a29856c950ba91b0e95ce52 100644 --- a/GUI/Model/Sample/FTDistributionItemCatalogs.cpp +++ b/GUI/Model/Sample/FTDistributionItemCatalogs.cpp @@ -68,12 +68,12 @@ FTDistribution1DItemCatalog::UiInfo FTDistribution1DItemCatalog::uiInfo(Type typ } } -FTDistribution1DItemCatalog::Type FTDistribution1DItemCatalog::type(CatalogedType* item) +FTDistribution1DItemCatalog::Type FTDistribution1DItemCatalog::type(const CatalogedType* item) { ASSERT(item); #define CHECK(type) \ - if (dynamic_cast<FTDistribution1D##type##Item*>(item)) \ + if (dynamic_cast<const FTDistribution1D##type##Item*>(item)) \ return Type::type CHECK(Cauchy); diff --git a/GUI/Model/Sample/FTDistributionItemCatalogs.h b/GUI/Model/Sample/FTDistributionItemCatalogs.h index 6b4b0f9820474cc42509fb82c973bfc3f622ee36..aa274f21712328010dde0aa8fe017fd32bc08e2a 100644 --- a/GUI/Model/Sample/FTDistributionItemCatalogs.h +++ b/GUI/Model/Sample/FTDistributionItemCatalogs.h @@ -51,7 +51,7 @@ public: static UiInfo uiInfo(Type t); //! Returns the enum type of the given item. - static Type type(CatalogedType* item); + static Type type(const CatalogedType* item); }; class FTDistribution2DItemCatalog { diff --git a/GUI/Model/Sample/InterferenceItems.cpp b/GUI/Model/Sample/InterferenceItems.cpp index 48909fb543449beefbeb41af5477b69b35530f7a..d132bc4c814a4d8ee58f45317e1e32eb99c2a9df 100644 --- a/GUI/Model/Sample/InterferenceItems.cpp +++ b/GUI/Model/Sample/InterferenceItems.cpp @@ -291,7 +291,7 @@ void InterferenceFinite2DLatticeItem::serialize(Serializer& s) s.rw(m_domainSize2); } -UIntDescriptor InterferenceFinite2DLatticeItem::domainSize1() +UIntDescriptor InterferenceFinite2DLatticeItem::domainSize1() const { return m_domainSize1; } @@ -301,7 +301,7 @@ void InterferenceFinite2DLatticeItem::setDomainSize1(const unsigned int size) m_domainSize1.set(size); } -UIntDescriptor InterferenceFinite2DLatticeItem::domainSize2() +UIntDescriptor InterferenceFinite2DLatticeItem::domainSize2() const { return m_domainSize2; } diff --git a/GUI/Model/Sample/InterferenceItems.h b/GUI/Model/Sample/InterferenceItems.h index 4c0496440a44b1cf91d369afa094b47a88930611..e86c2157db0695db3d678520bce8e69250f2cefa 100644 --- a/GUI/Model/Sample/InterferenceItems.h +++ b/GUI/Model/Sample/InterferenceItems.h @@ -131,9 +131,9 @@ public: std::unique_ptr<IInterference> createInterference() const override; void serialize(Serializer& s) override; - UIntDescriptor domainSize1(); + UIntDescriptor domainSize1() const; void setDomainSize1(unsigned int domain_size1); - UIntDescriptor domainSize2(); + UIntDescriptor domainSize2() const; void setDomainSize2(unsigned int domain_size2); private: diff --git a/GUI/Model/Sample/MesoCrystalItem.cpp b/GUI/Model/Sample/MesoCrystalItem.cpp index 200ab4b6e8aaa1e8b9c06574c5f8f681b7a786cc..feecb787e047e7da8fbe4f8167c06c7a7192908f 100644 --- a/GUI/Model/Sample/MesoCrystalItem.cpp +++ b/GUI/Model/Sample/MesoCrystalItem.cpp @@ -114,7 +114,7 @@ std::unique_ptr<IBornFF> MesoCrystalItem::getOuterShape() const return m_outerShape->createFormFactor(); } -SelectionDescriptor<FormFactorItem*> MesoCrystalItem::outerShape() +SelectionDescriptor<FormFactorItem*> MesoCrystalItem::outerShape() const { return m_outerShape; } diff --git a/GUI/Model/Sample/MesoCrystalItem.h b/GUI/Model/Sample/MesoCrystalItem.h index 9e1c89f22bcf71583fb9d716a91f0f7de7a7292f..0e9fd0746ba31d64478ffc68c74f31aba0444ee6 100644 --- a/GUI/Model/Sample/MesoCrystalItem.h +++ b/GUI/Model/Sample/MesoCrystalItem.h @@ -39,7 +39,7 @@ public: std::unique_ptr<IBornFF> getOuterShape() const; template <typename T> T* setOuterShapeType(); - SelectionDescriptor<FormFactorItem*> outerShape(); + SelectionDescriptor<FormFactorItem*> outerShape() const; void setOuterShape(FormFactorItem* p); ItemWithParticles* basisParticle() const;