57 #include <QDataStream>
65 if (formula.isEmpty())
74 formula.replace(
"\n",
" ");
75 QScopedPointer<Calculator> cal(
new Calculator());
76 const qreal result = cal->EvalFormula(data->
DataVariables(), formula);
78 if (qIsInf(result) || qIsNaN(result))
95 #ifdef Q_COMPILER_RVALUE_REFS
97 { Swap(node);
return *
this; }
101 { std::swap(d, node.d); }
163 return d->m_typeTool;
169 d->m_typeTool = value;
183 d->m_reverse = reverse;
206 qreal value =
EvalFormula(data,
d->m_beforeWidthFormula);
217 return d->m_beforeWidthFormula;
225 d->m_beforeWidthFormula = formula;
248 qreal value =
EvalFormula(data,
d->m_afterWidthFormula);
259 return d->m_afterWidthFormula;
267 d->m_afterWidthFormula = formula;
274 return d->m_angleType;
282 d->m_angleType = type;
297 d->m_isNotch = notch;
304 return d->m_isMainPathNode;
310 d->m_isMainPathNode = value;
316 return d->m_notchType;
322 d->m_notchType = lineType;
328 return d->m_notchSubType;
334 d->m_notchSubType = notchSubType;
340 return d->m_showNotch;
346 d->m_showNotch = value;
352 return d->m_showSeamlineNotch;
358 d->m_showSeamlineNotch = value;
365 d->m_notchLength = notchLength;
371 return d->m_notchLength;
377 d->m_notchWidth = notchWidth;
383 return d->m_notchWidth;
389 d->m_notchAngle = notchAngle;
395 return d->m_notchAngle;
401 d->m_notchCount = notchCount;
407 return d->m_notchCount;
413 return d->m_excluded;
419 d->m_excluded = exclude;
The Calculator class for calculation formula.
The VContainer class container of all variables.
const QHash< QString, QSharedPointer< VInternalVariable > > * DataVariables() const
void setBeforeSAFormula(const QString &formula)
void setShowNotch(bool value)
qreal GetSABefore(const VContainer *data) const
void setNotchCount(int notchCount)
void SetExcluded(bool exclude)
void setNotch(bool notch)
void setNotchType(NotchType notchType)
void setAfterSAFormula(const QString &formula)
void SetTypeTool(Tool value)
PieceNodeAngle GetAngleType() const
void setNotchLength(qreal notchLength)
NotchType getNotchType() const
void Swap(VPieceNode &node) Q_DECL_NOTHROW
QString GetFormulaSAAfter() const
void setNotchWidth(qreal notchWidth)
qreal getNotchAngle() const
void SetMainPathNode(bool value)
QString GetFormulaSABefore() const
QSharedDataPointer< VPieceNodeData > d
void setShowSeamlineNotch(bool value)
void SetAngleType(PieceNodeAngle type)
qreal GetSAAfter(const VContainer *data) const
bool IsMainPathNode() const
qreal getNotchLength() const
VPieceNode & operator=(const VPieceNode &node)
void SetReverse(bool reverse)
int getNotchCount() const
void setNotchAngle(qreal notchAngle)
NotchSubType getNotchSubType() const
qreal getNotchWidth() const
bool showSeamlineNotch() const
void setNotchSubType(NotchSubType notchSubType)
Error class of the parser.
double ToPixel(double val, const Unit &unit)
const QString currentSeamAllowance
qreal EvalFormula(const VContainer *data, QString formula)
QDataStream & operator>>(QDataStream &in, VPieceNode &p)
QDataStream & operator<<(QDataStream &out, const VPieceNode &p)