From f722964c11644e5cc06ebc97caa8fa2c00b9181f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 16 Sep 2015 08:16:27 +0300 Subject: [PATCH] Add increment's formula to the export list. --HG-- branch : develop --- src/libs/ifc/xml/vabstractpattern.cpp | 23 +++++++++++++++++++++++ src/libs/ifc/xml/vabstractpattern.h | 1 + 2 files changed, 24 insertions(+) diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 79ca5f56d..acb1113f2 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -1018,6 +1018,7 @@ QStringList VAbstractPattern::ListExpressions() const list << ListPointExpressions(); list << ListArcExpressions(); list << ListSplineExpressions(); + list << ListIncrementExpressions(); return list; } @@ -1176,6 +1177,28 @@ QStringList VAbstractPattern::ListPathPointExpressions() const return expressions; } +//--------------------------------------------------------------------------------------------------------------------- +QStringList VAbstractPattern::ListIncrementExpressions() const +{ + QStringList expressions; + const QDomNodeList list = elementsByTagName(TagIncrement); + for (int i=0; i < list.size(); ++i) + { + const QDomElement dom = list.at(i).toElement(); + + try + { + expressions.append(GetParametrString(dom, IncrementFormula)); + } + catch (VExceptionEmptyParameter &e) + { + Q_UNUSED(e) + } + } + + return expressions; +} + //--------------------------------------------------------------------------------------------------------------------- bool VAbstractPattern::IsVariable(const QString &token) const { diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 4b03c80b0..e65a0d79c 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -248,6 +248,7 @@ private: QStringList ListArcExpressions() const; QStringList ListSplineExpressions() const; QStringList ListPathPointExpressions() const; + QStringList ListIncrementExpressions() const; bool IsVariable(const QString& token) const; bool IsPostfixOperator(const QString& token) const;