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

Make CosineRippleGaussItem::P_* private

parent 1bbffd47
No related branches found
No related tags found
1 merge request!159Refactor model: formfactor items
......@@ -686,6 +686,21 @@ std::unique_ptr<IFormFactor> CosineRippleGaussItem::createFormFactor() const
getItemValue(P_HEIGHT).toDouble());
}
void CosineRippleGaussItem::setLength(const double length)
{
setItemValue(P_LENGTH, length);
}
void CosineRippleGaussItem::setWidth(const double width)
{
setItemValue(P_WIDTH, width);
}
void CosineRippleGaussItem::setHeight(const double height)
{
setItemValue(P_HEIGHT, height);
}
/* ------------------------------------------------ */
const QString CosineRippleLorentzItem::P_LENGTH("Length");
......
......@@ -322,15 +322,20 @@ public:
};
class BA_CORE_API_ CosineRippleGaussItem : public FormFactorItem {
public:
private:
static const QString P_LENGTH;
static const QString P_WIDTH;
static const QString P_HEIGHT;
public:
static const QString M_TYPE;
CosineRippleGaussItem();
std::unique_ptr<IFormFactor> createFormFactor() const override;
void setLength(double length);
void setWidth(double width);
void setHeight(double height);
};
class BA_CORE_API_ CosineRippleLorentzItem : public FormFactorItem {
......
......@@ -348,10 +348,10 @@ void GUIDomainSampleVisitor::visit(const FormFactorCosineRippleBox* sample)
void GUIDomainSampleVisitor::visit(const FormFactorCosineRippleGauss* sample)
{
SessionItem* particle_item = m_levelToParentItem[depth() - 1];
SessionItem* ff_item = AddFormFactorItem<CosineRippleGaussItem>(particle_item);
ff_item->setItemValue(CosineRippleGaussItem::P_LENGTH, sample->getLength());
ff_item->setItemValue(CosineRippleGaussItem::P_WIDTH, sample->getWidth());
ff_item->setItemValue(CosineRippleGaussItem::P_HEIGHT, sample->getHeight());
CosineRippleGaussItem* ff_item = AddFormFactorItem<CosineRippleGaussItem>(particle_item);
ff_item->setLength(sample->getLength());
ff_item->setWidth(sample->getWidth());
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.
Finish editing this message first!
Please register or to comment