Skip to content
Snippets Groups Projects
Commit b8c74447 authored by t.knopff's avatar t.knopff
Browse files

Make FullSpheroidItem::P_* private

parent c8d20be8
No related branches found
No related tags found
1 merge request!159Refactor model: formfactor items
......@@ -454,6 +454,16 @@ std::unique_ptr<IFormFactor> FullSpheroidItem::createFormFactor() const
getItemValue(P_HEIGHT).toDouble());
}
void FullSpheroidItem::setRadius(const double radius)
{
setItemValue(P_RADIUS, radius);
}
void FullSpheroidItem::setHeight(const double height)
{
setItemValue(P_HEIGHT, height);
}
/* ------------------------------------------------ */
const QString HemiEllipsoidItem::P_RADIUS_X("RadiusX");
......
......@@ -213,14 +213,18 @@ public:
};
class BA_CORE_API_ FullSpheroidItem : public FormFactorItem {
public:
private:
static const QString P_RADIUS;
static const QString P_HEIGHT;
public:
static const QString M_TYPE;
FullSpheroidItem();
std::unique_ptr<IFormFactor> createFormFactor() const override;
void setRadius(double radius);
void setHeight(double height);
};
class BA_CORE_API_ HemiEllipsoidItem : public FormFactorItem {
......
......@@ -283,9 +283,9 @@ void GUIDomainSampleVisitor::visit(const FormFactorFullSphere* sample)
void GUIDomainSampleVisitor::visit(const FormFactorFullSpheroid* sample)
{
SessionItem* particle_item = m_levelToParentItem[depth() - 1];
SessionItem* ff_item = AddFormFactorItem<FullSpheroidItem>(particle_item);
ff_item->setItemValue(FullSpheroidItem::P_RADIUS, sample->getRadius());
ff_item->setItemValue(FullSpheroidItem::P_HEIGHT, sample->getHeight());
FullSpheroidItem* ff_item = AddFormFactorItem<FullSpheroidItem>(particle_item);
ff_item->setRadius(sample->getRadius());
ff_item->setHeight(sample->getHeight());
m_levelToParentItem[depth()] = particle_item;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment