Return all formulas that provide tag Operation.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2016-05-16 21:11:48 +03:00
parent ac49d298f8
commit 048a49f784
2 changed files with 25 additions and 0 deletions

View File

@ -1203,6 +1203,7 @@ QStringList VAbstractPattern::ListExpressions() const
list << ListArcExpressions(); list << ListArcExpressions();
list << ListSplineExpressions(); list << ListSplineExpressions();
list << ListIncrementExpressions(); list << ListIncrementExpressions();
list << ListOperationExpressions();
return list; return list;
} }
@ -1393,6 +1394,29 @@ QStringList VAbstractPattern::ListIncrementExpressions() const
return expressions; return expressions;
} }
//---------------------------------------------------------------------------------------------------------------------
QStringList VAbstractPattern::ListOperationExpressions() const
{
QStringList expressions;
const QDomNodeList list = elementsByTagName(TagOperation);
for (int i=0; i < list.size(); ++i)
{
const QDomElement dom = list.at(i).toElement();
// Each tag can contains several attributes.
try
{
expressions.append(GetParametrString(dom, AttrAngle));
}
catch (VExceptionEmptyParameter &e)
{
Q_UNUSED(e)
}
}
return expressions;
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
bool VAbstractPattern::IsVariable(const QString &token) const bool VAbstractPattern::IsVariable(const QString &token) const
{ {

View File

@ -294,6 +294,7 @@ private:
QStringList ListSplineExpressions() const; QStringList ListSplineExpressions() const;
QStringList ListPathPointExpressions() const; QStringList ListPathPointExpressions() const;
QStringList ListIncrementExpressions() const; QStringList ListIncrementExpressions() const;
QStringList ListOperationExpressions() const;
bool IsVariable(const QString& token) const; bool IsVariable(const QString& token) const;
bool IsPostfixOperator(const QString& token) const; bool IsPostfixOperator(const QString& token) const;