diff --git a/.hgignore b/.hgignore index 828b54ff8..bdc63555d 100644 --- a/.hgignore +++ b/.hgignore @@ -19,6 +19,11 @@ syntax: glob # Ignore this directory. html/ latex/ +bin/ +moc/ +obj/ +uic/ +rcc/ # Ignore file used QtCreator for user profile. *.pro.user @@ -28,3 +33,6 @@ latex/ # Ignore Mercurial .orig files *.orig + +# Ignore Makefile +Makefile diff --git a/.hgtags b/.hgtags new file mode 100644 index 000000000..18df6235f --- /dev/null +++ b/.hgtags @@ -0,0 +1,4 @@ +2ab78f901668c44312af334dd09ed90984df1a71 v0.1.0 +841f8c5c7d9689bb934a2abf3511b186eb2730b6 v0.2.0 +05574b36e68c06986e8d3a51106694bf54eef65c v0.2.1 +a734ccf61671ef07ba20b24878548174c4a6b092 v0.2.2 diff --git a/src/dialogs/tools/dialogalongline.cpp b/src/dialogs/tools/dialogalongline.cpp index d9c7b7532..32453506a 100644 --- a/src/dialogs/tools/dialogalongline.cpp +++ b/src/dialogs/tools/dialogalongline.cpp @@ -42,8 +42,8 @@ DialogAlongLine::DialogAlongLine(const VContainer *data, QWidget *parent) flagFormula = false; flagName = false; - CheckState(); InitOkCansel(ui); + CheckState(); FillComboBoxTypeLine(ui->comboBoxLineType); ui->comboBoxLineType->setCurrentIndex(0); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 82bf6651b..075b238b4 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -987,14 +987,14 @@ void MainWindow::PatternWasModified() void MainWindow::ChangedSize(const QString & text) { qint32 size = text.toInt(); - pattern->SetSize(size*10); + pattern->SetSize(size); doc->FullUpdateTree(); } void MainWindow::ChangedHeight(const QString &text) { qint32 growth = text.toInt(); - pattern->SetHeight(growth*10); + pattern->SetHeight(growth); doc->FullUpdateTree(); } diff --git a/src/xml/vdomdocument.h b/src/xml/vdomdocument.h index 01d03d5da..cab334494 100644 --- a/src/xml/vdomdocument.h +++ b/src/xml/vdomdocument.h @@ -6,8 +6,8 @@ ** ** @brief ** @copyright - ** This source code is part of the Valentine project, a pattern making - ** program, whose allow create and modeling patterns of clothing. + ** This source code is part of the Valentina project, a pattern making + ** program that allows creating and modelling patterns of clothing. ** Copyright (C) 2013 Valentina project ** All Rights Reserved. ** @@ -41,7 +41,25 @@ #endif /** - * @brief The VDomDocument class extend QDomDocument class. + * @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 QDomDocument { @@ -53,21 +71,22 @@ public: static const QString UnitCM; static const QString UnitINCH; /** - * @brief VDomDocument constructor. - * @param data container with variables. - * @param parent parent object - */ + * @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); virtual ~VDomDocument(){} /** - * @brief elementById find element by id. + * @brief Finds an element by id. * @param id value id attribute. * @return dom element. */ QDomElement elementById(const QString& id); /** - * @brief removeAllChilds remove all tag childs. - * @param element tag. + * @brief Removes all children of a given element tag. RENAME: removeAllChildren + * @param element tag */ void removeAllChilds(QDomElement &element); template @@ -76,6 +95,11 @@ public: * @param domElement element in xml tree. * @param name name of attribute. * @param value value of attribute. + * @param parse parsing mode + * @return list of tool pointers + * @return list of history record lists + * @return cursor + * @throw VExceptionUniqueId */ void SetAttribute(QDomElement &domElement, const QString &name, const T &value) { @@ -84,29 +108,27 @@ public: domElement.setAttribute(name, val); } /** - * @brief GetParametrLongLong return long long value of attribute. - * @param domElement tag in xml tree. - * @param name attribute name. - * @return long long value. + * @brief Returns the long long value of the given attribute. RENAME: GetParameterLongLong? + * @param domElement tag in xml tree + * @param name attribute name + * @return long long value */ quint32 GetParametrUInt(const QDomElement& domElement, const QString &name, const QString &defValue) const; /** - * @brief GetParametrString return string value of attribute. + * @brief Returns the string value of the given attribute. RENAME: see above * * if attribute empty return default value. If default value empty too throw exception. - * @param domElement tag in xml tree. - * @param name attribute name. + * @return attribute value * @throw VExceptionEmptyParameter when attribute is empty - * @return attribute value. */ QString GetParametrString(const QDomElement& domElement, const QString &name, const QString &defValue = QString()) const; /** - * @brief GetParametrDouble return double value of attribute. - * @param domElement tag in xml tree. - * @param name attribute name. - * @return double value. + * @brief Returns the double value of the given attribute. + * @param domElement tag in xml tree + * @param name attribute name + * @return double value */ qreal GetParametrDouble(const QDomElement& domElement, const QString &name, const QString &defValue) const; QString UniqueTagText(const QString &tagName, const QString &defVal = QString()) const; @@ -134,15 +156,15 @@ protected: private: Q_DISABLE_COPY(VDomDocument) /** - * @brief map use for finding element by id. + * @brief Map used for finding element by id. */ QHash map; /** - * @brief find find element by id. - * @param node node. - * @param id id value. - * @return true if found. + * @brief Find element by id. + * @param node node + * @param id id value + * @return true if found */ bool find(const QDomElement &node, const QString& id); };