From d969cfb2d5f1c1c9add2a19d2182361661d564b9 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 16 Jun 2015 12:04:48 +0300 Subject: [PATCH] Complited refactoring VPattern. --HG-- branch : feature --- src/app/xml/vpattern.cpp | 427 +------------------------ src/app/xml/vpattern.h | 41 +-- src/libs/ifc/xml/vabstractpattern.cpp | 433 +++++++++++++++++++++++++- src/libs/ifc/xml/vabstractpattern.h | 28 ++ 4 files changed, 468 insertions(+), 461 deletions(-) diff --git a/src/app/xml/vpattern.cpp b/src/app/xml/vpattern.cpp index c518d4fe3..d70dc53e5 100644 --- a/src/app/xml/vpattern.cpp +++ b/src/app/xml/vpattern.cpp @@ -52,8 +52,7 @@ //--------------------------------------------------------------------------------------------------------------------- VPattern::VPattern(VContainer *data, Draw *mode, VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, QObject *parent) - : VAbstractPattern(parent), data(data), patternPieces(QStringList()), mode(mode), sceneDraw(sceneDraw), - sceneDetail(sceneDetail) + : VAbstractPattern(parent), data(data), mode(mode), sceneDraw(sceneDraw), sceneDetail(sceneDetail) { SCASSERT(sceneDraw != nullptr); SCASSERT(sceneDetail != nullptr); @@ -409,38 +408,6 @@ void VPattern::LiteParseTree(const Document &parse) qCDebug(vXML, "Scene size updated."); } -//--------------------------------------------------------------------------------------------------------------------- -/** - * @brief haveLiteChange we have unsaved change. - */ -void VPattern::haveLiteChange() -{ - emit patternChanged(false); -} - -//--------------------------------------------------------------------------------------------------------------------- -/** - * @brief ShowHistoryTool hightlight tool. - * @param id tool id. - * @param enable enable or diasable hightlight. - */ -void VPattern::ShowHistoryTool(quint32 id, bool enable) -{ - emit ShowTool(id, enable); -} - -//--------------------------------------------------------------------------------------------------------------------- -void VPattern::NeedFullParsing() -{ - emit UndoCommand(); -} - -//--------------------------------------------------------------------------------------------------------------------- -void VPattern::ClearScene() -{ - emit ClearMainWindow(); -} - //--------------------------------------------------------------------------------------------------------------------- // cppcheck-suppress unusedFunction void VPattern::customEvent(QEvent *event) @@ -1356,75 +1323,6 @@ void VPattern::ParseCurrentPP() emit CheckLayout(); } -//--------------------------------------------------------------------------------------------------------------------- -void VPattern::CheckTagExists(const QString &tag) -{ - QDomNodeList list = elementsByTagName(tag); - if (list.size() == 0) - { - QStringList tags = QStringList() << TagVersion << TagAuthor << TagDescription << TagNotes << TagGradation; - QDomElement pattern = documentElement(); - switch (tags.indexOf(tag)) - { - case 0: //TagVersion - break;// Mandatory tag - case 1: //TagAuthor - pattern.insertAfter(createElement(TagAuthor), elementsByTagName(TagVersion).at(0)); - SetVersion(); - break; - case 2: //TagDescription - { - for (int i = tags.indexOf(tag)-1; i >= 0; --i) - { - QDomNodeList list = elementsByTagName(tags.at(i)); - if (list.isEmpty()) - { - continue; - } - pattern.insertAfter(createElement(TagDescription), list.at(0)); - } - SetVersion(); - break; - } - case 3: //TagNotes - { - for (int i = tags.indexOf(tag)-1; i >= 0; --i) - { - QDomNodeList list = elementsByTagName(tags.at(i)); - if (list.isEmpty()) - { - continue; - } - pattern.insertAfter(createElement(TagNotes), list.at(0)); - } - SetVersion(); - break; - } - case 4: //TagGradation - { - QDomElement gradation = createElement(TagGradation); - gradation.appendChild(createElement(TagHeights)); - gradation.appendChild(createElement(TagSizes)); - - for (int i = tags.indexOf(tag)-1; i >= 0; --i) - { - QDomNodeList list = elementsByTagName(tags.at(i)); - if (list.isEmpty()) - { - continue; - } - pattern.insertAfter(gradation, list.at(0)); - break; - } - SetVersion(); - break; - } - default: - break; - } - } -} - //--------------------------------------------------------------------------------------------------------------------- QString VPattern::GetLabelBase(unsigned int index) const { @@ -1834,288 +1732,6 @@ void VPattern::ParseIncrementsElement(const QDomNode &node) } } -//--------------------------------------------------------------------------------------------------------------------- -QMap VPattern::GetGradationHeights() const -{ - QMap map; - map.insert(GHeights::ALL, true); - map.insert(GHeights::H92, true); - map.insert(GHeights::H98, true); - map.insert(GHeights::H104, true); - map.insert(GHeights::H110, true); - map.insert(GHeights::H116, true); - map.insert(GHeights::H122, true); - map.insert(GHeights::H128, true); - map.insert(GHeights::H134, true); - map.insert(GHeights::H140, true); - map.insert(GHeights::H146, true); - map.insert(GHeights::H152, true); - map.insert(GHeights::H158, true); - map.insert(GHeights::H164, true); - map.insert(GHeights::H170, true); - map.insert(GHeights::H176, true); - map.insert(GHeights::H182, true); - map.insert(GHeights::H188, true); - map.insert(GHeights::H194, true); - - QDomNodeList tags = elementsByTagName(TagGradation); - if (tags.size() == 0) - { - return map; - } - - QStringList gTags = QStringList() << TagHeights << TagSizes; - QDomNode domNode = tags.at(0).firstChild(); - while (domNode.isNull() == false) - { - if (domNode.isElement()) - { - const QDomElement domElement = domNode.toElement(); - if (domElement.isNull() == false) - { - const QString defValue = QStringLiteral("true"); - switch (gTags.indexOf(domElement.tagName())) - { - case 0: // TagHeights - if (GetParametrBool(domElement, AttrAll, defValue)) - { - return map; - } - else - { - map.insert(GHeights::ALL, false); - } - - map.insert(GHeights::H92, GetParametrBool(domElement, AttrH92, defValue)); - map.insert(GHeights::H98, GetParametrBool(domElement, AttrH98, defValue)); - map.insert(GHeights::H104, GetParametrBool(domElement, AttrH104, defValue)); - map.insert(GHeights::H110, GetParametrBool(domElement, AttrH110, defValue)); - map.insert(GHeights::H116, GetParametrBool(domElement, AttrH116, defValue)); - map.insert(GHeights::H122, GetParametrBool(domElement, AttrH122, defValue)); - map.insert(GHeights::H128, GetParametrBool(domElement, AttrH128, defValue)); - map.insert(GHeights::H134, GetParametrBool(domElement, AttrH134, defValue)); - map.insert(GHeights::H140, GetParametrBool(domElement, AttrH140, defValue)); - map.insert(GHeights::H146, GetParametrBool(domElement, AttrH146, defValue)); - map.insert(GHeights::H152, GetParametrBool(domElement, AttrH152, defValue)); - map.insert(GHeights::H158, GetParametrBool(domElement, AttrH158, defValue)); - map.insert(GHeights::H164, GetParametrBool(domElement, AttrH164, defValue)); - map.insert(GHeights::H170, GetParametrBool(domElement, AttrH170, defValue)); - map.insert(GHeights::H176, GetParametrBool(domElement, AttrH176, defValue)); - map.insert(GHeights::H182, GetParametrBool(domElement, AttrH182, defValue)); - map.insert(GHeights::H188, GetParametrBool(domElement, AttrH188, defValue)); - map.insert(GHeights::H194, GetParametrBool(domElement, AttrH194, defValue)); - return map; - break; - case 1: // TagSizes - break; - default: - break; - } - } - } - domNode = domNode.nextSibling(); - } - return map; -} - -//--------------------------------------------------------------------------------------------------------------------- -void VPattern::SetGradationHeights(const QMap &options) -{ - CheckTagExists(TagGradation); - QDomNodeList tags = elementsByTagName(TagGradation); - if (tags.size() == 0) - { - qDebug()<<"Can't save tag "< VPattern::GetGradationSizes() const -{ - QMap map; - map.insert(GSizes::ALL, true); - map.insert(GSizes::S22, true); - map.insert(GSizes::S24, true); - map.insert(GSizes::S26, true); - map.insert(GSizes::S28, true); - map.insert(GSizes::S30, true); - map.insert(GSizes::S32, true); - map.insert(GSizes::S34, true); - map.insert(GSizes::S36, true); - map.insert(GSizes::S38, true); - map.insert(GSizes::S40, true); - map.insert(GSizes::S42, true); - map.insert(GSizes::S44, true); - map.insert(GSizes::S46, true); - map.insert(GSizes::S48, true); - map.insert(GSizes::S50, true); - map.insert(GSizes::S52, true); - map.insert(GSizes::S54, true); - map.insert(GSizes::S56, true); - - QDomNodeList tags = elementsByTagName(TagGradation); - if (tags.size() == 0) - { - return map; - } - - QStringList gTags = QStringList() << TagHeights << TagSizes; - QDomNode domNode = tags.at(0).firstChild(); - while (domNode.isNull() == false) - { - if (domNode.isElement()) - { - const QDomElement domElement = domNode.toElement(); - if (domElement.isNull() == false) - { - const QString defValue = QStringLiteral("true"); - switch (gTags.indexOf(domElement.tagName())) - { - case 0: // TagHeights - break; - case 1: // TagSizes - if (GetParametrBool(domElement, AttrAll, defValue)) - { - return map; - } - else - { - map.insert(GSizes::ALL, false); - } - - map.insert(GSizes::S22, GetParametrBool(domElement, AttrS22, defValue)); - map.insert(GSizes::S24, GetParametrBool(domElement, AttrS24, defValue)); - map.insert(GSizes::S26, GetParametrBool(domElement, AttrS26, defValue)); - map.insert(GSizes::S28, GetParametrBool(domElement, AttrS28, defValue)); - map.insert(GSizes::S30, GetParametrBool(domElement, AttrS30, defValue)); - map.insert(GSizes::S32, GetParametrBool(domElement, AttrS32, defValue)); - map.insert(GSizes::S34, GetParametrBool(domElement, AttrS34, defValue)); - map.insert(GSizes::S36, GetParametrBool(domElement, AttrS36, defValue)); - map.insert(GSizes::S38, GetParametrBool(domElement, AttrS38, defValue)); - map.insert(GSizes::S40, GetParametrBool(domElement, AttrS40, defValue)); - map.insert(GSizes::S42, GetParametrBool(domElement, AttrS42, defValue)); - map.insert(GSizes::S44, GetParametrBool(domElement, AttrS44, defValue)); - map.insert(GSizes::S46, GetParametrBool(domElement, AttrS46, defValue)); - map.insert(GSizes::S48, GetParametrBool(domElement, AttrS48, defValue)); - map.insert(GSizes::S50, GetParametrBool(domElement, AttrS50, defValue)); - map.insert(GSizes::S52, GetParametrBool(domElement, AttrS52, defValue)); - map.insert(GSizes::S54, GetParametrBool(domElement, AttrS54, defValue)); - map.insert(GSizes::S56, GetParametrBool(domElement, AttrS56, defValue)); - return map; - break; - default: - break; - } - } - } - domNode = domNode.nextSibling(); - } - return map; -} - -//--------------------------------------------------------------------------------------------------------------------- -void VPattern::SetGradationSizes(const QMap &options) -{ - CheckTagExists(TagGradation); - QDomNodeList tags = elementsByTagName(TagGradation); - if (tags.size() == 0) - { - qDebug()<<"Can't save tag "< GetGradationHeights() const; - void SetGradationHeights(const QMap &options); + QString GetAuthor() const; + void SetAuthor(const QString &text); - QMap GetGradationSizes() const; - void SetGradationSizes(const QMap &options); - - QString GetAuthor() const; - void SetAuthor(const QString &text); - - QString GetDescription() const; - void SetDescription(const QString &text); - - QString GetNotes() const; - void SetNotes(const QString &text); - - QString GetVersion() const; - void SetVersion(); - - QString GenerateLabel(const LabelType &type)const; + QString GenerateLabel(const LabelType &type)const; public slots: void LiteParseTree(const Document &parse); - void haveLiteChange(); - void ShowHistoryTool(quint32 id, bool enable); - void NeedFullParsing(); - void ClearScene(); + protected: virtual void customEvent(QEvent * event); + private: Q_DISABLE_COPY(VPattern) /** @brief data container with data. */ VContainer *data; - /** @brief patternPieces list of patern pieces names for combobox*/ - QStringList patternPieces; - /** @brief mode current draw mode. */ - Draw *mode; + Draw *mode; VMainGraphicsScene *sceneDraw; VMainGraphicsScene *sceneDetail; @@ -137,14 +117,7 @@ private: template QRectF ToolBoundingRect(const QRectF &rec, const quint32 &id) const; void ParseCurrentPP(); - void CheckTagExists(const QString &tag); QString GetLabelBase(unsigned int index)const; }; -//--------------------------------------------------------------------------------------------------------------------- -inline QStringList VPattern::getPatternPieces() const -{ - return patternPieces; -} - #endif // VPATTERN_H diff --git a/src/libs/ifc/xml/vabstractpattern.cpp b/src/libs/ifc/xml/vabstractpattern.cpp index 878fdef35..08a3a645e 100644 --- a/src/libs/ifc/xml/vabstractpattern.cpp +++ b/src/libs/ifc/xml/vabstractpattern.cpp @@ -29,6 +29,7 @@ #include "vabstractpattern.h" #include "../vmisc/def.h" #include "exception/vexceptionbadid.h" +#include "vpatternconverter.h" const QString VAbstractPattern::TagPattern = QStringLiteral("pattern"); const QString VAbstractPattern::TagCalculation = QStringLiteral("calculation"); @@ -103,7 +104,7 @@ const QString VAbstractPattern::IncrementDescription = QStringLiteral("descripti //--------------------------------------------------------------------------------------------------------------------- VAbstractPattern::VAbstractPattern(QObject *parent) : QObject(parent), VDomDocument(), nameActivPP(QString()), cursor(0), tools(QHash()), - history(QVector()) + history(QVector()), patternPieces(QStringList()) {} //--------------------------------------------------------------------------------------------------------------------- @@ -538,6 +539,367 @@ quint32 VAbstractPattern::SiblingNodeId(const quint32 &nodeId) const return siblingId; } +//--------------------------------------------------------------------------------------------------------------------- +QStringList VAbstractPattern::getPatternPieces() const +{ + return patternPieces; +} + +//--------------------------------------------------------------------------------------------------------------------- +QMap VAbstractPattern::GetGradationHeights() const +{ + QMap map; + map.insert(GHeights::ALL, true); + map.insert(GHeights::H92, true); + map.insert(GHeights::H98, true); + map.insert(GHeights::H104, true); + map.insert(GHeights::H110, true); + map.insert(GHeights::H116, true); + map.insert(GHeights::H122, true); + map.insert(GHeights::H128, true); + map.insert(GHeights::H134, true); + map.insert(GHeights::H140, true); + map.insert(GHeights::H146, true); + map.insert(GHeights::H152, true); + map.insert(GHeights::H158, true); + map.insert(GHeights::H164, true); + map.insert(GHeights::H170, true); + map.insert(GHeights::H176, true); + map.insert(GHeights::H182, true); + map.insert(GHeights::H188, true); + map.insert(GHeights::H194, true); + + QDomNodeList tags = elementsByTagName(TagGradation); + if (tags.size() == 0) + { + return map; + } + + QStringList gTags = QStringList() << TagHeights << TagSizes; + QDomNode domNode = tags.at(0).firstChild(); + while (domNode.isNull() == false) + { + if (domNode.isElement()) + { + const QDomElement domElement = domNode.toElement(); + if (domElement.isNull() == false) + { + const QString defValue = QStringLiteral("true"); + switch (gTags.indexOf(domElement.tagName())) + { + case 0: // TagHeights + if (GetParametrBool(domElement, AttrAll, defValue)) + { + return map; + } + else + { + map.insert(GHeights::ALL, false); + } + + map.insert(GHeights::H92, GetParametrBool(domElement, AttrH92, defValue)); + map.insert(GHeights::H98, GetParametrBool(domElement, AttrH98, defValue)); + map.insert(GHeights::H104, GetParametrBool(domElement, AttrH104, defValue)); + map.insert(GHeights::H110, GetParametrBool(domElement, AttrH110, defValue)); + map.insert(GHeights::H116, GetParametrBool(domElement, AttrH116, defValue)); + map.insert(GHeights::H122, GetParametrBool(domElement, AttrH122, defValue)); + map.insert(GHeights::H128, GetParametrBool(domElement, AttrH128, defValue)); + map.insert(GHeights::H134, GetParametrBool(domElement, AttrH134, defValue)); + map.insert(GHeights::H140, GetParametrBool(domElement, AttrH140, defValue)); + map.insert(GHeights::H146, GetParametrBool(domElement, AttrH146, defValue)); + map.insert(GHeights::H152, GetParametrBool(domElement, AttrH152, defValue)); + map.insert(GHeights::H158, GetParametrBool(domElement, AttrH158, defValue)); + map.insert(GHeights::H164, GetParametrBool(domElement, AttrH164, defValue)); + map.insert(GHeights::H170, GetParametrBool(domElement, AttrH170, defValue)); + map.insert(GHeights::H176, GetParametrBool(domElement, AttrH176, defValue)); + map.insert(GHeights::H182, GetParametrBool(domElement, AttrH182, defValue)); + map.insert(GHeights::H188, GetParametrBool(domElement, AttrH188, defValue)); + map.insert(GHeights::H194, GetParametrBool(domElement, AttrH194, defValue)); + return map; + break; + case 1: // TagSizes + break; + default: + break; + } + } + } + domNode = domNode.nextSibling(); + } + return map; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractPattern::SetGradationHeights(const QMap &options) +{ + CheckTagExists(TagGradation); + QDomNodeList tags = elementsByTagName(TagGradation); + if (tags.size() == 0) + { + qDebug()<<"Can't save tag "< VAbstractPattern::GetGradationSizes() const +{ + QMap map; + map.insert(GSizes::ALL, true); + map.insert(GSizes::S22, true); + map.insert(GSizes::S24, true); + map.insert(GSizes::S26, true); + map.insert(GSizes::S28, true); + map.insert(GSizes::S30, true); + map.insert(GSizes::S32, true); + map.insert(GSizes::S34, true); + map.insert(GSizes::S36, true); + map.insert(GSizes::S38, true); + map.insert(GSizes::S40, true); + map.insert(GSizes::S42, true); + map.insert(GSizes::S44, true); + map.insert(GSizes::S46, true); + map.insert(GSizes::S48, true); + map.insert(GSizes::S50, true); + map.insert(GSizes::S52, true); + map.insert(GSizes::S54, true); + map.insert(GSizes::S56, true); + + QDomNodeList tags = elementsByTagName(TagGradation); + if (tags.size() == 0) + { + return map; + } + + QStringList gTags = QStringList() << TagHeights << TagSizes; + QDomNode domNode = tags.at(0).firstChild(); + while (domNode.isNull() == false) + { + if (domNode.isElement()) + { + const QDomElement domElement = domNode.toElement(); + if (domElement.isNull() == false) + { + const QString defValue = QStringLiteral("true"); + switch (gTags.indexOf(domElement.tagName())) + { + case 0: // TagHeights + break; + case 1: // TagSizes + if (GetParametrBool(domElement, AttrAll, defValue)) + { + return map; + } + else + { + map.insert(GSizes::ALL, false); + } + + map.insert(GSizes::S22, GetParametrBool(domElement, AttrS22, defValue)); + map.insert(GSizes::S24, GetParametrBool(domElement, AttrS24, defValue)); + map.insert(GSizes::S26, GetParametrBool(domElement, AttrS26, defValue)); + map.insert(GSizes::S28, GetParametrBool(domElement, AttrS28, defValue)); + map.insert(GSizes::S30, GetParametrBool(domElement, AttrS30, defValue)); + map.insert(GSizes::S32, GetParametrBool(domElement, AttrS32, defValue)); + map.insert(GSizes::S34, GetParametrBool(domElement, AttrS34, defValue)); + map.insert(GSizes::S36, GetParametrBool(domElement, AttrS36, defValue)); + map.insert(GSizes::S38, GetParametrBool(domElement, AttrS38, defValue)); + map.insert(GSizes::S40, GetParametrBool(domElement, AttrS40, defValue)); + map.insert(GSizes::S42, GetParametrBool(domElement, AttrS42, defValue)); + map.insert(GSizes::S44, GetParametrBool(domElement, AttrS44, defValue)); + map.insert(GSizes::S46, GetParametrBool(domElement, AttrS46, defValue)); + map.insert(GSizes::S48, GetParametrBool(domElement, AttrS48, defValue)); + map.insert(GSizes::S50, GetParametrBool(domElement, AttrS50, defValue)); + map.insert(GSizes::S52, GetParametrBool(domElement, AttrS52, defValue)); + map.insert(GSizes::S54, GetParametrBool(domElement, AttrS54, defValue)); + map.insert(GSizes::S56, GetParametrBool(domElement, AttrS56, defValue)); + return map; + break; + default: + break; + } + } + } + domNode = domNode.nextSibling(); + } + return map; +} + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractPattern::SetGradationSizes(const QMap &options) +{ + CheckTagExists(TagGradation); + QDomNodeList tags = elementsByTagName(TagGradation); + if (tags.size() == 0) + { + qDebug()<<"Can't save tag "<nameActivPP = name; emit ChangedActivPP(name); } + +//--------------------------------------------------------------------------------------------------------------------- +void VAbstractPattern::CheckTagExists(const QString &tag) +{ + QDomNodeList list = elementsByTagName(tag); + if (list.size() == 0) + { + QStringList tags = QStringList() << TagVersion << TagAuthor << TagDescription << TagNotes << TagGradation; + QDomElement pattern = documentElement(); + switch (tags.indexOf(tag)) + { + case 0: //TagVersion + break;// Mandatory tag + case 1: //TagAuthor + pattern.insertAfter(createElement(TagAuthor), elementsByTagName(TagVersion).at(0)); + SetVersion(); + break; + case 2: //TagDescription + { + for (int i = tags.indexOf(tag)-1; i >= 0; --i) + { + QDomNodeList list = elementsByTagName(tags.at(i)); + if (list.isEmpty()) + { + continue; + } + pattern.insertAfter(createElement(TagDescription), list.at(0)); + } + SetVersion(); + break; + } + case 3: //TagNotes + { + for (int i = tags.indexOf(tag)-1; i >= 0; --i) + { + QDomNodeList list = elementsByTagName(tags.at(i)); + if (list.isEmpty()) + { + continue; + } + pattern.insertAfter(createElement(TagNotes), list.at(0)); + } + SetVersion(); + break; + } + case 4: //TagGradation + { + QDomElement gradation = createElement(TagGradation); + gradation.appendChild(createElement(TagHeights)); + gradation.appendChild(createElement(TagSizes)); + + for (int i = tags.indexOf(tag)-1; i >= 0; --i) + { + QDomNodeList list = elementsByTagName(tags.at(i)); + if (list.isEmpty()) + { + continue; + } + pattern.insertAfter(gradation, list.at(0)); + break; + } + SetVersion(); + break; + } + default: + break; + } + } +} diff --git a/src/libs/ifc/xml/vabstractpattern.h b/src/libs/ifc/xml/vabstractpattern.h index 4c3b16bbe..5c2511a5d 100644 --- a/src/libs/ifc/xml/vabstractpattern.h +++ b/src/libs/ifc/xml/vabstractpattern.h @@ -78,6 +78,23 @@ public: quint32 SiblingNodeId(const quint32 &nodeId) const; + QStringList getPatternPieces() const; + + QMap GetGradationHeights() const; + void SetGradationHeights(const QMap &options); + + QMap GetGradationSizes() const; + void SetGradationSizes(const QMap &options); + + QString GetDescription() const; + void SetDescription(const QString &text); + + QString GetNotes() const; + void SetNotes(const QString &text); + + QString GetVersion() const; + void SetVersion(); + static const QString TagPattern; static const QString TagCalculation; static const QString TagModeling; @@ -187,6 +204,12 @@ signals: void CheckLayout(); void SetCurrentPP(const QString &patterPiece); +public slots: + void haveLiteChange(); + void ShowHistoryTool(quint32 id, bool enable); + void NeedFullParsing(); + void ClearScene(); + protected: /** @brief nameActivDraw name current pattern peace. */ QString nameActivPP; @@ -200,10 +223,15 @@ protected: /** @brief history history records. */ QVector history; + /** @brief patternPieces list of patern pieces names for combobox*/ + QStringList patternPieces; + void ToolExists(const quint32 &id) const; void SetActivPP(const QString& name); + void CheckTagExists(const QString &tag); + private: Q_DISABLE_COPY(VAbstractPattern) };