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

Make SawtoothRippleLorentzItem::P_* private

parent e4b79a25
No related branches found
No related tags found
1 merge request!159Refactor model: formfactor items
...@@ -857,6 +857,27 @@ std::unique_ptr<IFormFactor> SawtoothRippleLorentzItem::createFormFactor() const ...@@ -857,6 +857,27 @@ std::unique_ptr<IFormFactor> SawtoothRippleLorentzItem::createFormFactor() const
getItemValue(P_HEIGHT).toDouble(), getItemValue(P_ASYMMETRY).toDouble()); getItemValue(P_HEIGHT).toDouble(), getItemValue(P_ASYMMETRY).toDouble());
} }
void SawtoothRippleLorentzItem::setLength(const double length)
{
setItemValue(P_LENGTH, length);
}
void SawtoothRippleLorentzItem::setWidth(const double width)
{
setItemValue(P_WIDTH, width);
}
void SawtoothRippleLorentzItem::setHeight(const double height)
{
setItemValue(P_HEIGHT, height);
}
void SawtoothRippleLorentzItem::setAsymmetry(const double asymmetry)
{
setItemValue(P_ASYMMETRY, asymmetry);
}
/* ------------------------------------------------ */ /* ------------------------------------------------ */
const QString TetrahedronItem::P_BASEEDGE("BaseEdge"); const QString TetrahedronItem::P_BASEEDGE("BaseEdge");
......
...@@ -394,16 +394,22 @@ public: ...@@ -394,16 +394,22 @@ public:
}; };
class BA_CORE_API_ SawtoothRippleLorentzItem : public FormFactorItem { class BA_CORE_API_ SawtoothRippleLorentzItem : public FormFactorItem {
public: private:
static const QString P_LENGTH; static const QString P_LENGTH;
static const QString P_WIDTH; static const QString P_WIDTH;
static const QString P_HEIGHT; static const QString P_HEIGHT;
static const QString P_ASYMMETRY; static const QString P_ASYMMETRY;
public:
static const QString M_TYPE; static const QString M_TYPE;
SawtoothRippleLorentzItem(); SawtoothRippleLorentzItem();
std::unique_ptr<IFormFactor> createFormFactor() const override; std::unique_ptr<IFormFactor> createFormFactor() const override;
void setLength(double length);
void setWidth(double width);
void setHeight(double height);
void setAsymmetry(double asymmetry);
}; };
class BA_CORE_API_ TetrahedronItem : public FormFactorItem { class BA_CORE_API_ TetrahedronItem : public FormFactorItem {
......
...@@ -390,11 +390,11 @@ void GUIDomainSampleVisitor::visit(const FormFactorSawtoothRippleGauss* sample) ...@@ -390,11 +390,11 @@ void GUIDomainSampleVisitor::visit(const FormFactorSawtoothRippleGauss* sample)
void GUIDomainSampleVisitor::visit(const FormFactorSawtoothRippleLorentz* sample) void GUIDomainSampleVisitor::visit(const FormFactorSawtoothRippleLorentz* sample)
{ {
SessionItem* particle_item = m_levelToParentItem[depth() - 1]; SessionItem* particle_item = m_levelToParentItem[depth() - 1];
SessionItem* ff_item = AddFormFactorItem<SawtoothRippleLorentzItem>(particle_item); SawtoothRippleLorentzItem* ff_item = AddFormFactorItem<SawtoothRippleLorentzItem>(particle_item);
ff_item->setItemValue(SawtoothRippleLorentzItem::P_LENGTH, sample->getLength()); ff_item->setLength(sample->getLength());
ff_item->setItemValue(SawtoothRippleLorentzItem::P_WIDTH, sample->getWidth()); ff_item->setWidth(sample->getWidth());
ff_item->setItemValue(SawtoothRippleLorentzItem::P_HEIGHT, sample->getHeight()); ff_item->setHeight(sample->getHeight());
ff_item->setItemValue(SawtoothRippleLorentzItem::P_ASYMMETRY, sample->getAsymmetry()); ff_item->setAsymmetry(sample->getAsymmetry());
m_levelToParentItem[depth()] = particle_item; 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