improvements to the updated comments

--HG--
branch : develop
This commit is contained in:
Sabine Schmaltz 2014-03-18 23:36:32 +01:00
parent a8ec5d9f7d
commit d81c8d209f

View File

@ -6,8 +6,8 @@
** **
** @brief ** @brief
** @copyright ** @copyright
** This source code is part of the Valentine project, a pattern making ** This source code is part of the Valentina project, a pattern making
** program, whose allow create and modeling patterns of clothing. ** program that allows creating and modelling patterns of clothing.
** Copyright (C) 2013 Valentina project ** Copyright (C) 2013 Valentina project
** <https://bitbucket.org/dismine/valentina> All Rights Reserved. ** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
** **
@ -41,7 +41,8 @@
namespace Document namespace Document
{ {
/** /**
* @brief The Document enum types parse. * @brief Flags to determine the parsing mode in VDomDocument::Parse() and
* related functions.
*/ */
enum Document { LiteParse, FullParse}; enum Document { LiteParse, FullParse};
Q_DECLARE_FLAGS(Documents, Document) Q_DECLARE_FLAGS(Documents, Document)
@ -54,403 +55,424 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Document::Documents)
#endif #endif
/** /**
* @brief The VDomDocument class working with pattern file. * @brief The VDomDocument class represents a Valentina document (.val file).
*
* A Valentina document describes the construction of a sewing pattern. The
* information is stored in XML format. By parsing a VDomDocument, the contained
* pattern is rendered to a Valentina graphics scene (VMainGraphicsScene).
*
* A sewing pattern consists of zero or more increments and one
* or more pattern pieces.
*
* An increment is an auxiliary variable that is calculated from regular measurement
* variables (that belong to the standard measurements table). Increments are used to
* create a graduation schema for the sewing pattern.
*
* A pattern piece contains
* 1) auxiliary pattern construction elements (calculation),
* 2) pattern construction elements (modeling), and
* 3) special markers, e.g. seam allowances (details).
* Of these, 2) and 3) are visible in the final pattern (draw mode 'Modeling'),
* 1) is only displayed when editing (draw mode 'Calculation') the pattern.
*/ */
class VDomDocument : public QObject, public QDomDocument class VDomDocument : public QObject, public QDomDocument
{ {
Q_OBJECT Q_OBJECT
public: public:
/**
* @brief VDomDocument constructor.
* @param data container with variables.
* @param comboBoxDraws combobox for pattern peaces names.
* @param mode draw mode.
*/
VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode, QObject *parent = 0);
/**
* @brief VDomDocument constructor.
* @param name pattern peace name.
* @param data container with variables.
* @param comboBoxDraws combobox for pattern peaces names.
* @param mode draw mode.
*/
VDomDocument(const QString& name, VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode,
QObject *parent = 0);
/**
* @brief VDomDocument constructor.
* @param doc dom document container type.
* @param data container with variables.
* @param comboBoxDraws combobox for pattern peaces names.
* @param mode draw mode.
*/
VDomDocument(const QDomDocumentType& doctype, VContainer *data, QComboBox *comboBoxDraws,
Draw::Draws *mode, QObject *parent = 0);
~VDomDocument(){}
/** /**
* @brief elementById find element by id. * @param data container with variables
* @param comboBoxDraws pointer to the ComboBox that will hold the pattern piece names
* @param mode draw mode
* @param parent
*/
VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode, QObject *parent = 0);
/**
* @param name pattern piece name
* @param data container with variables
* @param comboBoxDraws pointer to the ComboBox that will hold the pattern piece names
* @param mode draw mode
* @param parent
*/
VDomDocument(const QString& name, VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode,
QObject *parent = 0);
/**
* @param doctype dom document container type
* @param data container with variables
* @param comboBoxDraws pointer to the ComboBox that will hold the pattern piece names
* @param mode draw mode
* @param parent
*/
VDomDocument(const QDomDocumentType& doctype, VContainer *data, QComboBox *comboBoxDraws,
Draw::Draws *mode, QObject *parent = 0);
~VDomDocument(){}
/**
* @brief Finds an element by id.
* @param id value id attribute. * @param id value id attribute.
* @return dom element. * @return dom element.
*/ */
QDomElement elementById(const QString& id); QDomElement elementById(const QString& id);
/** /**
* @brief removeAllChilds remove all tag childs. * @brief Removes all children of a given element tag. RENAME: removeAllChildren!
* @param element tag. * @param element tag
*/ */
void removeAllChilds(QDomElement &element); void removeAllChilds(QDomElement &element);
/** /**
* @brief CreateEmptyFile create minimal empty file. * @brief Create a minimal empty file.
*/ */
void CreateEmptyFile(); void CreateEmptyFile();
/** /**
* @brief ChangeActivDraw set new pattern peace name. * @brief Select pattern piece based on name. RENAME: ChangeActiveDraw? ChangeActivePatternPiece?
* @param name new name. * @param name pattern piece name
* @param parse parser file mode. * @param parse parsing mode
*/ */
void ChangeActivDraw(const QString& name, const Document::Documents &parse = Document::FullParse); void ChangeActivDraw(const QString& name, const Document::Documents &parse = Document::FullParse);
/** /**
* @brief GetNameActivDraw return current pattern peace name. * @brief Get selected pattern piece name. RENAME: GetNameOfActiveDraw? GetNameOfActivePatternPiece?
* @return pattern peace name. * @return name of the active pattern piece
*/ */
inline QString GetNameActivDraw() const {return nameActivDraw;} inline QString GetNameActivDraw() const {return nameActivDraw;}
/** /**
* @brief GetActivDrawElement return draw tag for current pattern peace. * @brief Finds the draw element of the selected pattern piece and returns it by reference. RENAME: GetActiveDrawElement?
* @param element draw tag. * @param element the returned draw element -- not used as input
* @return true if found. * @return true if found
*/ */
bool GetActivDrawElement(QDomElement &element); bool GetActivDrawElement(QDomElement &element);
/** /**
* @brief GetActivCalculationElement return calculation tag for current pattern peace. * @brief Finds the calculation element for the selected pattern piece and returns it by reference. RENAME: GetActiveCalculationElement?
* @param element calculation tag. * @param element the returned calculation element -- not used as input
* @return true if found. * @return true if found
*/ */
bool GetActivCalculationElement(QDomElement &element); bool GetActivCalculationElement(QDomElement &element);
/** /**
* @brief GetActivModelingElement return modeling tag for current pattern peace. * @brief Finds the modeling element for the selected pattern piece and returns it by reference. RENAME: GetActiveModelingElement?
* @param element modeling tag * @param element the returned modeling element -- not used as input
* @return true if found. * @return true if found
*/ */
bool GetActivModelingElement(QDomElement &element); bool GetActivModelingElement(QDomElement &element);
/** /**
* @brief GetActivDetailsElement return details tag for current pattern peace. * @brief Finds the details element for the selected pattern piece and returns it by reference. RENAME: GetActiveDetailsElement?
* @param element details tag. * @param element the returned details element -- not used as input
* @return true if found. * @return true if found
*/ */
bool GetActivDetailsElement(QDomElement &element); bool GetActivDetailsElement(QDomElement &element);
/** /**
* @brief appendDraw add new pattern peace structure to the file. * @brief Adds a new pattern piece to the document. NOTE: inconsistent capitalization
* @param name pattern peace name. * @param name pattern piece name.
* @return true if success. * @return true if successful
*/ */
bool appendDraw(const QString& name); bool appendDraw(const QString& name);
/** /**
* @brief SetNameDraw change current pattern peace. * @brief Sets the name of the selected pattern piece. RENAME: SetNameOfActiveDraw!
* @param name pattern peace name. * @param name pattern piece name.
* @return true if success. * @return true if successful
*/ */
bool SetNameDraw(const QString& name); bool SetNameDraw(const QString& name);
/** /**
* @brief Parse parse file. * @brief Parse the document, resulting in a rendering of the pattern in the graphics scenes.
* @param parse parser file mode. * @param parse parsing mode
* @param sceneDraw pointer to draw scene. * @param sceneDraw pointer to draw scene
* @param sceneDetail pointer to details scene. * @param sceneDetail pointer to details scene
*/ */
void Parse(const Document::Documents &parse, VMainGraphicsScene *sceneDraw, void Parse(const Document::Documents &parse, VMainGraphicsScene *sceneDraw,
VMainGraphicsScene *sceneDetail); VMainGraphicsScene *sceneDetail);
/** /**
* @brief getTools return list of tools pointers. * @brief Return the list of tool pointers. When we create lines, points, curves on scene we
* @return list. * use tools. This structure keeps the pointers to those tools.
* @return list of tool pointers
*/ */
inline QHash<qint64, VDataTool*>* getTools() {return &tools;} inline QHash<qint64, VDataTool*>* getTools() {return &tools;} // NOTE: inconsistent capitalization
/** /**
* @brief getTool return tool from tool list. * @brief Get a tool from the tool list by id.
* @param id tool id. * @param id tool id
* @return tool. * @return tool
*/ */
VDataTool* getTool(const qint64 &id); VDataTool* getTool(const qint64 &id); // NOTE: inconsistent capitalization
/** /**
* @brief getHistory return list with list of history records. * @brief Return a list of history record lists. The history keeps track of the tools the user used
* @return list of history records. * to create the pattern piece.
* @return list of history record lists
*/ */
inline QVector<VToolRecord> *getHistory() {return &history;} inline QVector<VToolRecord> *getHistory() {return &history;} // NOTE: inconsistent capitalization
/** /**
* @brief getCursor return cursor. * @brief Returns the cursor. Here, the cursor is the id of the tool after which a
* @return cursor. * new object will be added.
* @return cursor
*/ */
inline qint64 getCursor() const {return cursor;} inline qint64 getCursor() const {return cursor;} // NOTE: inconsistent capitalization
/** /**
* @brief setCursor set cursor. * @brief Set the cursor.
* @param value cursor. * @param value cursor
*/ */
void setCursor(const qint64 &value); void setCursor(const qint64 &value); // NOTE: inconsistent capitalization
/** /**
* @brief setCurrentData set current data set. * @brief Set current data set.
*/ */
void setCurrentData(); void setCurrentData(); // NOTE: inconsistent capitalization
/** /**
* @brief AddTool add tool to list tools. * @brief Add the given tool to the tools list.
* @param id tool id. * @param id tool id.
* @param tool tool. * @param tool tool.
*/ */
void AddTool(const qint64 &id, VDataTool *tool); void AddTool(const qint64 &id, VDataTool *tool);
/** /**
* @brief UpdateToolData update tool in list tools. * @brief Updates a given tool in the tools list.
* @param id tool id. * @param id id of the tool to update
* @param data container with variables. * @param data container with variables
*/ */
void UpdateToolData(const qint64 &id, VContainer *data); void UpdateToolData(const qint64 &id, VContainer *data);
/** /**
* @brief IncrementReferens increment reference parent objects. * @brief Increment reference parent objects. RENAME: IncrementReference?
* @param id parent object id. * @param id parent object id
*/ */
void IncrementReferens(qint64 id) const; void IncrementReferens(qint64 id) const;
/** /**
* @brief DecrementReferens decrement reference parent objects. * @brief Decrement reference parent objects. RENAME: like above
* @param id parent object id. * @param id parent object id
*/ */
void DecrementReferens(qint64 id) const; void DecrementReferens(qint64 id) const;
/** /**
* @brief TestUniqueId test exist unique id in pattern file. Each id must be unique. * @brief Throws an exception if there exists a duplicate id in the pattern file.
*/ */
void TestUniqueId() const; void TestUniqueId() const;
/** /**
* @brief GetParametrLongLong return long long value of attribute. * @brief Returns the long long value of the given attribute. RENAME: GetParameterLongLong?
* @param domElement tag in xml tree. * @param domElement tag in xml tree
* @param name attribute name. * @param name attribute name
* @return long long value. * @return long long value
*/ */
qint64 GetParametrLongLong(const QDomElement& domElement, const QString &name, qint64 GetParametrLongLong(const QDomElement& domElement, const QString &name,
const QString &defValue) const; const QString &defValue) const;
/** /**
* @brief GetParametrString return string value of attribute. * @brief Returns the string value of the given attribute. RENAME: see above
* @param domElement tag in xml tree. * @param domElement tag in xml tree
* @param name attribute name. * @param name attribute name
* @return attribute value. * @return attribute value
*/ */
QString GetParametrString(const QDomElement& domElement, const QString &name, const QString &defValue) const; QString GetParametrString(const QDomElement& domElement, const QString &name, const QString &defValue) const;
/** /**
* @brief GetParametrDouble return double value of attribute. * @brief Returns the double value of the given attribute.
* @param domElement tag in xml tree. * @param domElement tag in xml tree
* @param name attribute name. * @param name attribute name
* @return double value. * @return double value
*/ */
qreal GetParametrDouble(const QDomElement& domElement, const QString &name, const QString &defValue) const; qreal GetParametrDouble(const QDomElement& domElement, const QString &name, const QString &defValue) const;
/** /**
* @brief SPointActiveDraw return id base point current pattern peace. * @brief Returns the id of the base point of the current pattern piece.
* @return id base point. * @return id of base point
*/ */
qint64 SPointActiveDraw(); qint64 SPointActiveDraw();
bool isPatternModified() const; bool isPatternModified() const; // NOTE: inconsistent capitalization
void setPatternModified(bool value); void setPatternModified(bool value); // NOTE: inconsistent capitalization
QString UniqueTagText(const QString &tagName, const QString &defVal = QString()); QString UniqueTagText(const QString &tagName, const QString &defVal = QString());
signals: signals:
/** /**
* @brief ChangedActivDraw change active pattern peace. * @brief The active pattern piece was changed. RENAME: ChangedActiveDraw
* @param newName new pattern peace name. * @param newName new pattern piece name
*/ */
void ChangedActivDraw(const QString &newName); void ChangedActivDraw(const QString &newName);
/** /**
* @brief ChangedNameDraw save new name active pattern peace. * @brief The name of the selected pattern piece was changed.
* @param oldName old name. * @param oldName old name
* @param newName new name. * @param newName new name
*/ */
void ChangedNameDraw(const QString &oldName, const QString &newName); void ChangedNameDraw(const QString &oldName, const QString &newName);
/** /**
* @brief FullUpdateFromFile update tool data form file. * @brief Update tool data from file.
*/ */
void FullUpdateFromFile(); void FullUpdateFromFile();
/** /**
* @brief patternChanged emit if we have unsaved change. * @brief Emit if there exists an unsaved change to the pattern document.
*/ */
void patternChanged(); void patternChanged(); //NOTE: inconsistent capitalization
/** /**
* @brief ShowTool highlight tool. * @brief Highlight tool.
* @param id tool id. * @param id tool id
* @param color highlight color. * @param color highlight color
* @param enable enable or disable highlight. * @param enable enable or disable highlight
*/ */
void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); void ShowTool(qint64 id, Qt::GlobalColor color, bool enable);
/** /**
* @brief ChangedCursor change cursor position. * @brief The cursor position has changed.
* @param id tool id. * @param id tool id
*/ */
void ChangedCursor(qint64 id); void ChangedCursor(qint64 id);
public slots: public slots:
/** /**
* @brief FullUpdateTree lite parse file. * @brief Perform a lite parse run on the pattern document.
*/ */
void FullUpdateTree(); void FullUpdateTree();
/** /**
* @brief haveLiteChange we have unsaved change. * @brief Sets that we have an unsaved change on the pattern file. Emits patternChanged().
*/ */
void haveLiteChange(); void haveLiteChange(); //NOTE: inconsistent capitalization
/** /**
* @brief ShowHistoryTool hightlight tool. * @brief Highlights a tool by id.
* @param id tool id. * @param id tool id
* @param color hightlight color. * @param color highlight color
* @param enable enable or diasable hightlight. * @param enable enable or disable highlight
*/ */
void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable); void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable);
private: private:
Q_DISABLE_COPY(VDomDocument) Q_DISABLE_COPY(VDomDocument)
/** /**
* @brief map use for finding element by id. * @brief Map used for finding element by id.
*/ */
QHash<QString, QDomElement> map; QHash<QString, QDomElement> map;
/** /**
* @brief nameActivDraw name current pattern peace. * @brief Name of the selected pattern piece.
*/ */
QString nameActivDraw; QString nameActivDraw;
/** /**
* @brief data container with data. * @brief Container with pattern document data.
*/ */
VContainer *data; VContainer *data;
/** /**
* @brief tools list with pointer on tools. * @brief Tools map with pointers to tools.
*/ */
QHash<qint64, VDataTool*> tools; QHash<qint64, VDataTool*> tools;
/** /**
* @brief history history records. * @brief Tool history record.
*/ */
QVector<VToolRecord> history; QVector<VToolRecord> history;
/** /**
* @brief cursor cursor keep id tool after which we will add new tool in file. * @brief Cursor keep id tool after which we will add new tool in file. TODO: very unclear what does that mean?
*/ */
qint64 cursor; qint64 cursor;
/** /**
* @brief comboBoxDraws combobox with pattern peace names. * @brief A pointer to the QComboBox used to select pattern piece names.
*/ */
QComboBox *comboBoxDraws; QComboBox *comboBoxDraws;
/** /**
* @brief mode current draw mode. * @brief Current draw mode.
*/ */
Draw::Draws *mode; Draw::Draws *mode;
/** /**
* @brief fileModified true if exist change in file. * @brief True if there is an unsaved change in the document.
*/ */
bool patternModified; bool patternModified;
/** /**
* @brief find find element by id. * @brief Find element by id.
* @param node node. * @param node node
* @param id id value. * @param id id value
* @return true if found. * @return true if found
*/ */
bool find(const QDomElement &node, const QString& id); bool find(const QDomElement &node, const QString& id);
/** /**
* @brief CheckNameDraw check if exist pattern peace with this name. * @brief Checks whether there exists a pattern piece with the given name.
* @param name pattern peace name. * @param name pattern piece name
* @return true if exist. * @return true if it exists
*/ */
bool CheckNameDraw(const QString& name) const; bool CheckNameDraw(const QString& name) const;
/** /**
* @brief SetActivDraw set current pattern peace. * @brief Set selected pattern piece. RENAME: SetActiveDraw? SetActivePatternPiece?
* @param name pattern peace name. * @param name pattern piece name
*/ */
void SetActivDraw(const QString& name); void SetActivDraw(const QString& name);
/** /**
* @brief GetActivNodeElement find element in current pattern peace by name. * @brief Finds an element in the current pattern piece by name. RENAME: GetActiveNodeElement?
* @param name name tag. * @param name name tag
* @param element element. * @param element element returned by reference
* @return true if found. * @return true if found
*/ */
bool GetActivNodeElement(const QString& name, QDomElement& element); bool GetActivNodeElement(const QString& name, QDomElement& element);
/** /**
* @brief ParseDrawElement parse draw tag. * @brief Parses a draw tag.
* @param sceneDraw draw scene. * @param sceneDraw draw scene
* @param sceneDetail details scene. * @param sceneDetail details scene
* @param node node. * @param node node
* @param parse parser file mode. * @param parse parse mode
*/ */
void ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, void ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail,
const QDomNode& node, const Document::Documents &parse); const QDomNode& node, const Document::Documents &parse);
/** /**
* @brief ParseDrawMode parse draw tag with draw mode. * @brief Parses a draw tag in draw mode.
* @param sceneDraw draw scene. * @param sceneDraw draw scene
* @param sceneDetail details scene. * @param sceneDetail details scene
* @param node node. * @param node node
* @param parse parser file mode. * @param parse parse mode
* @param mode draw mode. * @param mode draw mode
*/ */
void ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, void ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail,
const QDomNode& node, const Document::Documents &parse, const Draw::Draws &mode); const QDomNode& node, const Document::Documents &parse, const Draw::Draws &mode);
/** /**
* @brief ParseDetailElement parse detail tag. * @brief Parses a detail element tag.
* @param sceneDetail detail scene. * @param sceneDetail details scene
* @param domElement tag in xml tree. * @param domElement tag in XML tree
* @param parse parser file mode. * @param parse parse mode
*/ */
void ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, void ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomElement &domElement,
const Document::Documents &parse); const Document::Documents &parse);
/** /**
* @brief ParseDetails parse details tag. * @brief Parses a details tag.
* @param sceneDetail detail scene. * @param sceneDetail details scene
* @param domElement tag in xml tree. * @param domElement tag in XML tree
* @param parse parser file mode. * @param parse parse mode
*/ */
void ParseDetails(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, void ParseDetails(VMainGraphicsScene *sceneDetail, const QDomElement &domElement,
const Document::Documents &parse); const Document::Documents &parse);
/** /**
* @brief ParsePointElement parse point tag. * @brief Parses a point element tag.
* @param scene scene. * @param scene scene
* @param domElement tag in xml tree. * @param domElement tag in XML tree
* @param parse parser file mode. * @param parse parse mode
* @param type type of point. * @param type type of point
* @param mode draw mode. * @param mode draw mode
*/ */
void ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement, void ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, const QString &type); const Document::Documents &parse, const QString &type);
/** /**
* @brief ParseLineElement parse line tag. * @brief Parses a line element tag.
* @param scene scene. * @param scene scene
* @param domElement tag in xml tree. * @param domElement tag in XML tree
* @param parse parser file mode. * @param parse parse mode
* @param mode draw mode. * @param mode draw mode
*/ */
void ParseLineElement(VMainGraphicsScene *scene, const QDomElement& domElement, void ParseLineElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse); const Document::Documents &parse);
/** /**
* @brief ParseSplineElement parse spline tag. * @brief Parses a spline element tag.
* @param scene scene. * @param scene scene
* @param domElement tag in xml tree. * @param domElement tag in XML tree
* @param parse parser file mode. * @param parse parse mode.
* @param type type of spline. * @param type type of spline
* @param mode draw mode. * @param mode draw mode
*/ */
void ParseSplineElement(VMainGraphicsScene *scene, const QDomElement& domElement, void ParseSplineElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, const QString& type); const Document::Documents &parse, const QString& type);
/** /**
* @brief ParseArcElement parse arc tag. * @brief Parses an arc element tag.
* @param scene scene. * @param scene scene
* @param domElement tag in xml tree. * @param domElement tag in XML tree
* @param parse parser file mode. * @param parse parse mode
* @param type type of spline. * @param type type of spline
* @param mode draw mode. * @param mode draw mode
*/ */
void ParseArcElement(VMainGraphicsScene *scene, const QDomElement& domElement, void ParseArcElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, const QString& type); const Document::Documents &parse, const QString& type);
/** /**
* @brief ParseToolsElement parse tools tag. * @brief Parses a tools element tag.
* @param scene scene. * @param scene scene
* @param domElement tag in xml tree. * @param domElement tag in XML tree
* @param parse parser file mode. * @param parse parse mode
* @param type type of spline. * @param type type of spline
*/ */
void ParseToolsElement(VMainGraphicsScene *scene, const QDomElement& domElement, void ParseToolsElement(VMainGraphicsScene *scene, const QDomElement& domElement,
const Document::Documents &parse, const QString& type); const Document::Documents &parse, const QString& type);
/** /**
* @brief ParseIncrementsElement parse increments tag. * @brief Parses an increments element tag.
* @param node tag in xml tree. * @param node tag in XML tree
*/ */
void ParseIncrementsElement(const QDomNode& node); void ParseIncrementsElement(const QDomNode& node);
/** /**
* @brief GetParametrId return value id attribute. * @brief Returns the id attribute of the given element. RENAME: GetParameterId?
* @param domElement tag in xml tree. * @param domElement tag in XML tree
* @return id value. * @return id value
*/ */
qint64 GetParametrId(const QDomElement& domElement) const; qint64 GetParametrId(const QDomElement& domElement) const;
/** /**
* @brief CollectId recursive function, try find id attribute in file. Throw exclusion if find not unique. * @brief Recursively collects all id attribute in file. Throws an exception if a duplicate is found.
* @param node tag in xml tree. * @param node tag in XML tree
* @param vector list with ids. * @param vector list with ids
*/ */
void CollectId(const QDomElement &node, QVector<qint64> &vector)const; void CollectId(const QDomElement &node, QVector<qint64> &vector)const;
}; };