From 2b1da2ac322e54129dc7c440d789003e0683a9b0 Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 7 Oct 2013 18:34:14 +0300 Subject: [PATCH 01/56] Documentation for classes. --HG-- branch : feature --- container/calculator.cpp | 78 +++-------- container/calculator.h | 168 ++++++++++++----------- container/vcontainer.h | 285 ++++++++++++++++++++++----------------- docs/Doxyfile | 4 +- 4 files changed, 270 insertions(+), 265 deletions(-) diff --git a/container/calculator.cpp b/container/calculator.cpp index d161724bb..d60077f27 100644 --- a/container/calculator.cpp +++ b/container/calculator.cpp @@ -40,12 +40,12 @@ qreal Calculator::eval(QString prog, QString *errorMsg){ this->errorMsg->clear(); debugFormula.clear(); this->prog = prog; - //qDebug()<<"Формула: "<0; --t) -// *r = (*r) * ex; break; } } -/* Изменение знака */ void Calculator::unary(QChar o, qreal *r){ if(o=='-') *r = -(*r); } -/* Поиск значения переменной */ qreal Calculator::find_var(QString s){ bool ok = false; qreal value = data->FindVar(s, &ok); if(!ok){ qDebug()<clear(); *errorMsg = e[error]; - qDebug()</*%^=()",c) || c=='\n' || c=='\r' || c=='\0') return true; return false; } -/* Возвращает 1, если "с" пробел или табуляция */ bool Calculator::iswhite(QChar c){ if(c==' ' || c=='\t') return true; @@ -257,14 +225,14 @@ void Calculator::get_token(){ token.clear(); temp=&token; - if(prog[index]=='\0') { /* Конец файла */ + if(prog[index]=='\0') { /* end of file */ token="\0"; tok=FINISHED; token_type=DELIMITER; return; } - while(iswhite(prog[index])) ++index; /* пропуск пробелов */ + while(iswhite(prog[index])) ++index; /* skip spaces */ if(prog[index]=='\r') { /* crtl */ ++index; ++index; @@ -274,15 +242,15 @@ void Calculator::get_token(){ return; } - if(StrChr("+-*^/%=;(),><", prog[index])) { /* разделитель */ + if(StrChr("+-*^/%=;(),><", prog[index])) { /* delimiter */ *temp=prog[index]; - index++; /* переход на следующую позицию */ + index++; /* jump to the next position */ temp->append("\0"); token_type=DELIMITER; debugFormula.append(token); return; } - if(prog[index]=='"') { /* строка в кавычках */ + if(prog[index]=='"') { /* quoted string */ index++; while(prog[index] != '"' && prog[index] != '\r'){ temp->append(prog[index]); @@ -294,7 +262,7 @@ void Calculator::get_token(){ token_type=QUOTE; return; } - if(prog[index].isDigit()) { /* число */ + if(prog[index].isDigit()) { /* number */ while(!isdelim(prog[index])){ temp->append(prog[index]); index++; @@ -304,7 +272,7 @@ void Calculator::get_token(){ return; } - if(prog[index].isPrint()) { /* переменная или команда */ + if(prog[index].isPrint()) { /* variable or command */ while(!isdelim(prog[index])){ temp->append(prog[index]); index++; @@ -313,13 +281,12 @@ void Calculator::get_token(){ } temp->append("\0"); - /* Просматривается, если строка есть команда или переменная */ + /* Seen if there is a command line or a variable */ if(token_type==STRING) { - tok=look_up(token); /* преобразование во внутренний - формат */ + tok=look_up(token); if(!tok) token_type = VARIABLE; - else token_type = COMMAND; /* это команда */ + else token_type = COMMAND; /* It is command */ } return; } @@ -328,7 +295,6 @@ bool Calculator::StrChr(QString string, QChar c){ return string.contains(c, Qt::CaseInsensitive); } -/* Возвращает лексему обратно во входной поток */ void Calculator::putback(){ QString t; t = token; diff --git a/container/calculator.h b/container/calculator.h index ad16c7f65..c6be25745 100644 --- a/container/calculator.h +++ b/container/calculator.h @@ -26,142 +26,148 @@ #include "vcontainer.h" /** - * @brief The Calculator клас калькулятора формул лекал. Виконує розрахунок формул з підставлянням - * значеннь зміних. + * @brief The Calculator class calculate formulas of pattern. Support operation +,-,/,* and braces. + * Can replace name of variables her value. */ -class Calculator -{ +class Calculator{ public: /** - * @brief Calculator конструктор класу. Використовується при розрахунку лекала. - * @param data покажчик на контейнер змінних + * @brief Calculator class constructor. + * @param data pointer to a variable container. */ - explicit Calculator(const VContainer *data); + explicit Calculator(const VContainer *data); /** - * @brief eval виконує розрахунок формули. - * @param prog рядко в якому зберігається формула. - * @return значення формули. + * @brief eval calculate formula. + * @param prog string of formula. + * @return value of formula. */ - qreal eval(QString prog, QString *errorMsg); + qreal eval(QString prog, QString *errorMsg); private: Q_DISABLE_COPY(Calculator) - QString *errorMsg; /** - * @brief token теперішня лексема. + * @brief errorMsg keeps error message of calculation. */ - QString token; + QString *errorMsg; /** - * @brief tok внутрішне представлення лексеми. + * @brief token current token. */ - qint32 tok; + QString token; /** - * @brief token_type тип лексеми. + * @brief tok internal representation of token. */ - qint32 token_type; + qint32 tok; /** - * @brief prog рядок в якому зберігається формула. + * @brief token_type type of token. */ - QString prog; /* Содержит анализируемое выражение */ + qint32 token_type; /** - * @brief index номер символу в рядку формули. + * @brief prog string where keeps formula. */ - qint32 index; /* Индекс символа в строке*/ + QString prog; /** - * @brief data контейнер усіх змінних. + * @brief index number character in string of formula. + */ + qint32 index; + /** + * @brief data container of all variables. */ const VContainer *data; /** - * @brief debugFormula рядок розшифрованої формули. + * @brief debugFormula decoded string of formula. */ - QString debugFormula; + QString debugFormula; /** - * @brief get_exp виконує розрахунок формули. - * @return значення формули. + * @brief get_exp calculate formula. + * @return value of formula. */ - qreal get_exp(); + qreal get_exp(); /** - * @brief get_token повертає наступну лексему. + * @brief get_token return next token. */ - void get_token();/* Получить лексему */ + void get_token(); /** - * @brief StrChr перевіряє чи символ належить рядку. - * @param string рядок - * @param c символ. - * @return true - належить рядку, false - не належить рядку. + * @brief StrChr checks whether the character belongs to the line. + * @param string string with formula + * @param c character. + * @return true - belongs to the line, false - don't belongs to the line. */ - static bool StrChr(QString string, QChar c); + static bool StrChr(QString string, QChar c); /** - * @brief putback повертає зчитану лексему назад у потік. + * @brief putback returns the readout token back into the flow. */ - void putback(); + void putback(); /** - * @brief level2 метод додавання і віднімання двух термів. - * @param result результат операції. + * @brief level2 method of addition and subtraction of two terms. + * @param result result of operation. */ - void level2(qreal *result); + void level2(qreal *result); /** - * @brief level3 метод множення, ділення, знаходження процентів. - * @param result результат операції. + * @brief level3 method of multiplication, division, finding percent. + * @param result result of operation. */ - void level3(qreal *result); + void level3(qreal *result); /** - * @brief level4 метод знаходження степені двох чисел. - * @param result результат операції. + * @brief level4 method of degree two numbers. + * @param result result of operation. */ - void level4(qreal *result); + void level4(qreal *result); /** - * @brief level5 метод знаходження унарного плюса чи мінуса. - * @param result результат операції. + * @brief level5 method for finding unary plus or minus. + * @param result result of operation. */ - void level5(qreal *result); + void level5(qreal *result); /** - * @brief level6 метод обробки виразу в круглих лапках. - * @param result результат операції. + * @brief level6 processing method of the expression in brackets. + * @param result result of operation. */ - void level6(qreal *result); + void level6(qreal *result); /** - * @brief primitive метод визначення значення зміної по її імені. - * @param result результат операції. + * @brief primitive method of determining the value of a variable by its name. + * @param result result of operation. */ - void primitive(qreal *result); + void primitive(qreal *result); /** - * @brief arith виконання специфікованої арифметики. Результат записується в перший елемент. - * @param o знак операції. - * @param r перший елемент. - * @param h другий елемент. + * @brief arith perform the specified arithmetic. The result is written to the first element. + * @param o sign operation. + * @param r first element. + * @param h second element. */ - static void arith(QChar o, qreal *r, qreal *h); + static void arith(QChar o, qreal *r, qreal *h); /** - * @brief unary метод зміни знаку. - * @param o символ знаку. - * @param r елемент. + * @brief unary method changes the sign. + * @param o sign of symbol. + * @param r element. */ - static void unary(QChar o, qreal *r); + static void unary(QChar o, qreal *r); /** - * @brief find_var метод знаходить змінну за іменем. - * @param s ім'я змінної. - * @return значення зміної. + * @brief find_var method is finding variable by name. + * @param s name of variable. + * @return value of variable. */ - qreal find_var(QString s); - void serror(qint32 error); + qreal find_var(QString s); /** - * @brief look_up пошук відповідного внутрішнього формату для теперішньої лексеми в таблиці лексем. текущей лексемы в таблице лексем - * @param s ім'я лексеми. - * @return внутрішній номер лексеми. + * @brief serror report an error + * @param error error code */ - static char look_up(QString s); + void serror(qint32 error); /** - * @brief isdelim повертає "істино", якщо с розділювач. - * @param c символ. - * @return розділювач, або ні. + * @brief look_up Finding the internal format for the current token in the token table. + * @param s name of token. + * @return internal number of token. */ - static bool isdelim(QChar c); + static char look_up(QString s); /** - * @brief iswhite перевіряє чи с пробіл чи табуляція. - * @param c символ. - * @return так або ні. + * @brief isdelim return true if c delimiter. + * @param c character. + * @return true - delimiter, false - do not delimiter. */ - static bool iswhite(QChar c); + static bool isdelim(QChar c); + /** + * @brief iswhite checks whether c space or tab. + * @param c character. + * @return true - space or tab, false - don't space and don't tab. + */ + static bool iswhite(QChar c); }; #endif // CALCULATOR_H diff --git a/container/vcontainer.h b/container/vcontainer.h index c7582b89d..a1b836594 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -32,146 +32,179 @@ #include /** - * @brief The VContainer class + * @brief The VContainer class container of all variables. */ -class VContainer -{ +class VContainer{ Q_DECLARE_TR_FUNCTIONS(VContainer) public: + /** + * @brief VContainer create empty container + */ + VContainer(); + /** + * @brief operator = copy constructor + * @param data container + * @return copy container + */ + VContainer &operator=(const VContainer &data); + /** + * @brief VContainer create container from another container + * @param data container + */ + VContainer(const VContainer &data); + /** + * @brief setData copy data from container + * @param data container + */ + void setData(const VContainer &data); /** - * @brief VContainer - */ - VContainer(); - VContainer &operator=(const VContainer &data); - VContainer(const VContainer &data); - void setData(const VContainer &data); - /** - * @brief GetPoint - * @param id + * @brief GetPoint returns a point by id + * @param id id of point + * @return point + */ + VPointF GetPoint(qint64 id) const; + /** + * @brief GetModelingPoint return a modeling point by id + * @param id id of modeling point + * @return modeling point + */ + VPointF GetModelingPoint(qint64 id) const; + /** + * @brief GetStandartTableCell + * @param name * @return */ - VPointF GetPoint(qint64 id) const; - VPointF GetModelingPoint(qint64 id) const; - VStandartTableCell GetStandartTableCell(const QString& name) const; - VIncrementTableRow GetIncrementTableRow(const QString& name) const; - qreal GetLine(const QString &name) const; - qreal GetLineArc(const QString &name) const; - VSpline GetSpline(qint64 id) const; - VSpline GetModelingSpline(qint64 id) const; - VArc GetArc(qint64 id) const; - VArc GetModelingArc(qint64 id) const; - VSplinePath GetSplinePath(qint64 id) const; - VSplinePath GetModelingSplinePath(qint64 id) const; - VDetail GetDetail(qint64 id) const; - static qint64 getId(); - qint64 AddPoint(const VPointF& point); - qint64 AddModelingPoint(const VPointF& point); - qint64 AddDetail(const VDetail& detail); - void AddStandartTableCell(const QString& name, const VStandartTableCell& cell); - void AddIncrementTableRow(const QString& name, const VIncrementTableRow &cell); - void AddLengthLine(const QString &name, const qreal &value); - void AddLengthSpline(const qint64 &firstPointId, const qint64 &secondPointId, - Draw::Draws mode = Draw::Calculation); - void AddLengthSpline(const QString &name, const qreal &value); - void AddLengthArc(const qint64 ¢er, const qint64 &id); - void AddLengthArc(const QString &name, const qreal &value); - void AddLineAngle(const QString &name, const qreal &value); - void AddLine(const qint64 &firstPointId, const qint64 &secondPointId, - Draw::Draws mode = Draw::Calculation); - qint64 AddSpline(const VSpline& spl); - qint64 AddModelingSpline(const VSpline& spl); - qint64 AddSplinePath(const VSplinePath& splPath); - qint64 AddModelingSplinePath(const VSplinePath& splPath); - qint64 AddArc(const VArc& arc); - qint64 AddModelingArc(const VArc& arc); - QString GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, - Draw::Draws mode = Draw::Calculation) const; - QString GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, - Draw::Draws mode = Draw::Calculation) const; - QString GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, - Draw::Draws mode = Draw::Calculation) const; - QString GetNameSplinePath(const VSplinePath &path, - Draw::Draws mode = Draw::Calculation) const; - QString GetNameArc(const qint64 ¢er, const qint64 &id, - Draw::Draws mode = Draw::Calculation) const; - void UpdatePoint(qint64 id, const VPointF& point); - void UpdateModelingPoint(qint64 id, const VPointF& point); - void UpdateDetail(qint64 id, const VDetail& detail); - void UpdateSpline(qint64 id, const VSpline& spl); - void UpdateModelingSpline(qint64 id, const VSpline& spl); - void UpdateSplinePath(qint64 id, const VSplinePath& splPath); - void UpdateModelingSplinePath(qint64 id, const VSplinePath& splPath); - void UpdateArc(qint64 id, const VArc& arc); - void UpdateModelingArc(qint64 id, const VArc& arc); - void UpdateStandartTableCell(const QString& name, const VStandartTableCell& cell); - void UpdateIncrementTableRow(const QString& name, const VIncrementTableRow& cell); - qreal GetValueStandartTableCell(const QString& name) const; - qreal GetValueIncrementTableRow(const QString& name) const; - void Clear(); - void ClearObject(); - void ClearIncrementTable(); - void ClearLengthLines(); - void ClearLengthSplines(); - void ClearLengthArcs(); - void ClearLineAngles(); - void SetSize(qint32 size); - void SetGrowth(qint32 growth); - qint32 size() const; - qint32 growth() const; - qreal FindVar(const QString& name, bool *ok)const; - bool IncrementTableContains(const QString& name); - static qint64 getNextId(); - void RemoveIncrementTableRow(const QString& name); - const QHash *DataPoints() const; - const QHash *DataModelingPoints() const; - const QHash *DataSplines() const; - const QHash *DataModelingSplines() const; - const QHash *DataArcs() const; - const QHash *DataModelingArcs() const; - const QHash *DataBase() const; + VStandartTableCell GetStandartTableCell(const QString& name) const; + VIncrementTableRow GetIncrementTableRow(const QString& name) const; + qreal GetLine(const QString &name) const; + qreal GetLineArc(const QString &name) const; + VSpline GetSpline(qint64 id) const; + VSpline GetModelingSpline(qint64 id) const; + VArc GetArc(qint64 id) const; + VArc GetModelingArc(qint64 id) const; + VSplinePath GetSplinePath(qint64 id) const; + VSplinePath GetModelingSplinePath(qint64 id) const; + VDetail GetDetail(qint64 id) const; + static qint64 getId(); + qint64 AddPoint(const VPointF& point); + qint64 AddModelingPoint(const VPointF& point); + qint64 AddDetail(const VDetail& detail); + void AddStandartTableCell(const QString& name, + const VStandartTableCell& cell); + void AddIncrementTableRow(const QString& name, + const VIncrementTableRow &cell); + void AddLengthLine(const QString &name, const qreal &value); + void AddLengthSpline(const qint64 &firstPointId, + const qint64 &secondPointId, + Draw::Draws mode = Draw::Calculation); + void AddLengthSpline(const QString &name, const qreal &value); + void AddLengthArc(const qint64 ¢er, const qint64 &id); + void AddLengthArc(const QString &name, const qreal &value); + void AddLineAngle(const QString &name, const qreal &value); + void AddLine(const qint64 &firstPointId, const qint64 &secondPointId, + Draw::Draws mode = Draw::Calculation); + qint64 AddSpline(const VSpline& spl); + qint64 AddModelingSpline(const VSpline& spl); + qint64 AddSplinePath(const VSplinePath& splPath); + qint64 AddModelingSplinePath(const VSplinePath& splPath); + qint64 AddArc(const VArc& arc); + qint64 AddModelingArc(const VArc& arc); + QString GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, + Draw::Draws mode = Draw::Calculation) const; + QString GetNameLineAngle(const qint64 &firstPoint, + const qint64 &secondPoint, + Draw::Draws mode = Draw::Calculation) const; + QString GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, + Draw::Draws mode = Draw::Calculation) const; + QString GetNameSplinePath(const VSplinePath &path, + Draw::Draws mode = Draw::Calculation) const; + QString GetNameArc(const qint64 ¢er, const qint64 &id, + Draw::Draws mode = Draw::Calculation) const; + void UpdatePoint(qint64 id, const VPointF& point); + void UpdateModelingPoint(qint64 id, const VPointF& point); + void UpdateDetail(qint64 id, const VDetail& detail); + void UpdateSpline(qint64 id, const VSpline& spl); + void UpdateModelingSpline(qint64 id, const VSpline& spl); + void UpdateSplinePath(qint64 id, const VSplinePath& splPath); + void UpdateModelingSplinePath(qint64 id, const VSplinePath& splPath); + void UpdateArc(qint64 id, const VArc& arc); + void UpdateModelingArc(qint64 id, const VArc& arc); + void UpdateStandartTableCell(const QString& name, + const VStandartTableCell& cell); + void UpdateIncrementTableRow(const QString& name, + const VIncrementTableRow& cell); + qreal GetValueStandartTableCell(const QString& name) const; + qreal GetValueIncrementTableRow(const QString& name) const; + void Clear(); + void ClearObject(); + void ClearIncrementTable(); + void ClearLengthLines(); + void ClearLengthSplines(); + void ClearLengthArcs(); + void ClearLineAngles(); + void SetSize(qint32 size); + void SetGrowth(qint32 growth); + qint32 size() const; + qint32 growth() const; + qreal FindVar(const QString& name, bool *ok)const; + bool IncrementTableContains(const QString& name); + static qint64 getNextId(); + void RemoveIncrementTableRow(const QString& name); + const QHash *DataPoints() const; + const QHash *DataModelingPoints() const; + const QHash *DataSplines() const; + const QHash *DataModelingSplines() const; + const QHash *DataArcs() const; + const QHash *DataModelingArcs() const; + const QHash *DataBase() const; const QHash *DataStandartTable() const; const QHash *DataIncrementTable() const; - const QHash *DataLengthLines() const; - const QHash *DataLengthSplines() const; - const QHash *DataLengthArcs() const; - const QHash *DataLineAngles() const; - const QHash *DataSplinePaths() const; - const QHash *DataModelingSplinePaths() const; - const QHash *DataDetails() const; - static void UpdateId(qint64 newId); - QPainterPath ContourPath(qint64 idDetail) const; - QPainterPath Equidistant(QVector points, const Detail::Equidistant &eqv, - const qreal &width)const; - static QLineF ParallelLine(const QLineF &line, qreal width ); - static QPointF SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width); - QVector EkvPoint(const QLineF &line1, const QLineF &line2, const qreal &width)const; - QVector CheckLoops(const QVector &points) const; - void PrepareDetails(QVector & list)const; + const QHash *DataLengthLines() const; + const QHash *DataLengthSplines() const; + const QHash *DataLengthArcs() const; + const QHash *DataLineAngles() const; + const QHash *DataSplinePaths() const; + const QHash *DataModelingSplinePaths() const; + const QHash *DataDetails() const; + static void UpdateId(qint64 newId); + QPainterPath ContourPath(qint64 idDetail) const; + QPainterPath Equidistant(QVector points, + const Detail::Equidistant &eqv, + const qreal &width)const; + static QLineF ParallelLine(const QLineF &line, qreal width ); + static QPointF SingleParallelPoint(const QLineF &line, const qreal &angle, + const qreal &width); + QVector EkvPoint(const QLineF &line1, const QLineF &line2, + const qreal &width)const; + QVector CheckLoops(const QVector &points) const; + void PrepareDetails(QVector & list)const; private: - static qint64 _id; - QHash base; - QHash points; - QHash modelingPoints; + static qint64 _id; + QHash base; + QHash points; + QHash modelingPoints; QHash standartTable; QHash incrementTable; - QHash lengthLines; - QHash lineAngles; - QHash splines; - QHash modelingSplines; - QHash lengthSplines; - QHash arcs; - QHash modelingArcs; - QHash lengthArcs; - QHash splinePaths; - QHash modelingSplinePaths; - QHash details; + QHash lengthLines; + QHash lineAngles; + QHash splines; + QHash modelingSplines; + QHash lengthSplines; + QHash arcs; + QHash modelingArcs; + QHash lengthArcs; + QHash splinePaths; + QHash modelingSplinePaths; + QHash details; template static val GetObject(const QHash &obj, key id); template static void UpdateObject(QHash &obj, const qint64 &id, const val& point); - template static qint64 AddObject(QHash &obj, const val& value); - void CreateManTableIGroup (); - QVector GetReversePoint(const QVector &points)const; - qreal GetLengthContour(const QVector &contour, const QVector &newPoints)const; + template static qint64 AddObject(QHash &obj, + const val& value); + void CreateManTableIGroup (); + QVector GetReversePoint(const QVector &points)const; + qreal GetLengthContour(const QVector &contour, + const QVector &newPoints)const; }; #endif // VCONTAINER_H diff --git a/docs/Doxyfile b/docs/Doxyfile index f47ebdb2c..2bb9214ea 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -74,7 +74,7 @@ CREATE_SUBDIRS = NO # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. -OUTPUT_LANGUAGE = Ukrainian +OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in @@ -369,7 +369,7 @@ EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. -EXTRACT_STATIC = NO +EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. From 6de60a4644dc710c4af982adaa485e6698dd3cdc Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 4 Nov 2013 22:35:15 +0200 Subject: [PATCH 02/56] New coding standart with Vera++. --HG-- branch : develop --- container/calculator.cpp | 172 ++-- container/calculator.h | 8 +- container/vcontainer.cpp | 628 ++++++++----- container/vcontainer.h | 5 +- container/vincrementtablerow.cpp | 12 +- container/vincrementtablerow.h | 3 +- container/vpointf.cpp | 3 +- container/vpointf.h | 3 +- container/vstandarttablecell.cpp | 9 +- container/vstandarttablecell.h | 3 +- dialogs/dialogalongline.cpp | 68 +- dialogs/dialogalongline.h | 12 +- dialogs/dialogarc.cpp | 98 +- dialogs/dialogarc.h | 8 +- dialogs/dialogbisector.cpp | 77 +- dialogs/dialogbisector.h | 9 +- dialogs/dialogdetail.cpp | 192 ++-- dialogs/dialogdetail.h | 9 +- dialogs/dialogendline.cpp | 53 +- dialogs/dialogendline.h | 13 +- dialogs/dialogheight.cpp | 94 +- dialogs/dialogheight.h | 10 +- dialogs/dialoghistory.cpp | 132 ++- dialogs/dialoghistory.h | 8 +- dialogs/dialogincrements.cpp | 125 ++- dialogs/dialogincrements.h | 10 +- dialogs/dialogline.cpp | 63 +- dialogs/dialogline.h | 13 +- dialogs/dialoglineintersect.cpp | 105 ++- dialogs/dialoglineintersect.h | 10 +- dialogs/dialognormal.cpp | 71 +- dialogs/dialognormal.h | 11 +- dialogs/dialogpointofcontact.cpp | 71 +- dialogs/dialogpointofcontact.h | 4 +- dialogs/dialogpointofintersection.cpp | 62 +- dialogs/dialogpointofintersection.h | 10 +- dialogs/dialogshoulderpoint.cpp | 77 +- dialogs/dialogshoulderpoint.h | 8 +- dialogs/dialogsinglepoint.cpp | 33 +- dialogs/dialogsinglepoint.h | 10 +- dialogs/dialogspline.cpp | 84 +- dialogs/dialogspline.h | 21 +- dialogs/dialogsplinepath.cpp | 86 +- dialogs/dialogsplinepath.h | 8 +- dialogs/dialogtool.cpp | 304 ++++--- dialogs/dialogtool.h | 6 +- dialogs/dialogtriangle.cpp | 104 ++- dialogs/dialogtriangle.h | 11 +- exception/vexception.cpp | 8 +- exception/vexception.h | 3 +- exception/vexceptionbadid.cpp | 11 +- exception/vexceptionbadid.h | 13 +- exception/vexceptionconversionerror.cpp | 8 +- exception/vexceptionconversionerror.h | 6 +- exception/vexceptionemptyparameter.cpp | 15 +- exception/vexceptionemptyparameter.h | 11 +- exception/vexceptionobjecterror.cpp | 26 +- exception/vexceptionobjecterror.h | 8 +- exception/vexceptionuniqueid.cpp | 11 +- exception/vexceptionuniqueid.h | 7 +- exception/vexceptionwrongparameterid.cpp | 13 +- exception/vexceptionwrongparameterid.h | 7 +- geometry/varc.cpp | 136 +-- geometry/varc.h | 9 +- geometry/vdetail.cpp | 35 +- geometry/vdetail.h | 6 +- geometry/vnodedetail.cpp | 19 +- geometry/vnodedetail.h | 6 +- geometry/vspline.cpp | 533 ++++++----- geometry/vspline.h | 15 +- geometry/vsplinepath.cpp | 92 +- geometry/vsplinepath.h | 10 +- geometry/vsplinepoint.cpp | 20 +- geometry/vsplinepoint.h | 3 +- main.cpp | 63 +- mainwindow.cpp | 735 +++++++++------ mainwindow.h | 17 +- options.h | 65 +- tablewindow.cpp | 197 ++-- tablewindow.h | 8 +- tools/drawTools/vdrawtool.cpp | 74 +- tools/drawTools/vdrawtool.h | 50 +- tools/drawTools/vtoolalongline.cpp | 78 +- tools/drawTools/vtoolalongline.h | 5 +- tools/drawTools/vtoolarc.cpp | 111 ++- tools/drawTools/vtoolarc.h | 3 +- tools/drawTools/vtoolbisector.cpp | 92 +- tools/drawTools/vtoolbisector.h | 3 +- tools/drawTools/vtoolendline.cpp | 62 +- tools/drawTools/vtoolendline.h | 3 +- tools/drawTools/vtoolheight.cpp | 65 +- tools/drawTools/vtoolheight.h | 3 +- tools/drawTools/vtoolline.cpp | 82 +- tools/drawTools/vtoolline.h | 3 +- tools/drawTools/vtoollineintersect.cpp | 81 +- tools/drawTools/vtoollineintersect.h | 3 +- tools/drawTools/vtoollinepoint.cpp | 36 +- tools/drawTools/vtoollinepoint.h | 5 +- tools/drawTools/vtoolnormal.cpp | 83 +- tools/drawTools/vtoolnormal.h | 3 +- tools/drawTools/vtoolpoint.cpp | 56 +- tools/drawTools/vtoolpoint.h | 3 +- tools/drawTools/vtoolpointofcontact.cpp | 89 +- tools/drawTools/vtoolpointofcontact.h | 3 +- tools/drawTools/vtoolpointofintersection.cpp | 54 +- tools/drawTools/vtoolpointofintersection.h | 3 +- tools/drawTools/vtoolshoulderpoint.cpp | 100 +- tools/drawTools/vtoolshoulderpoint.h | 3 +- tools/drawTools/vtoolsinglepoint.cpp | 71 +- tools/drawTools/vtoolsinglepoint.h | 3 +- tools/drawTools/vtoolspline.cpp | 121 ++- tools/drawTools/vtoolspline.h | 3 +- tools/drawTools/vtoolsplinepath.cpp | 143 +-- tools/drawTools/vtoolsplinepath.h | 3 +- tools/drawTools/vtooltriangle.cpp | 75 +- tools/drawTools/vtooltriangle.h | 3 +- tools/modelingTools/vmodelingalongline.cpp | 87 +- tools/modelingTools/vmodelingalongline.h | 3 +- tools/modelingTools/vmodelingarc.cpp | 91 +- tools/modelingTools/vmodelingarc.h | 3 +- tools/modelingTools/vmodelingbisector.cpp | 77 +- tools/modelingTools/vmodelingbisector.h | 3 +- tools/modelingTools/vmodelingendline.cpp | 61 +- tools/modelingTools/vmodelingendline.h | 3 +- tools/modelingTools/vmodelingheight.cpp | 52 +- tools/modelingTools/vmodelingheight.h | 3 +- tools/modelingTools/vmodelingline.cpp | 59 +- tools/modelingTools/vmodelingline.h | 3 +- .../modelingTools/vmodelinglineintersect.cpp | 75 +- tools/modelingTools/vmodelinglineintersect.h | 3 +- tools/modelingTools/vmodelinglinepoint.cpp | 24 +- tools/modelingTools/vmodelinglinepoint.h | 3 +- tools/modelingTools/vmodelingnormal.cpp | 90 +- tools/modelingTools/vmodelingnormal.h | 3 +- tools/modelingTools/vmodelingpoint.cpp | 40 +- tools/modelingTools/vmodelingpoint.h | 3 +- .../modelingTools/vmodelingpointofcontact.cpp | 78 +- tools/modelingTools/vmodelingpointofcontact.h | 3 +- .../vmodelingpointofintersection.cpp | 57 +- .../vmodelingpointofintersection.h | 3 +- .../modelingTools/vmodelingshoulderpoint.cpp | 80 +- tools/modelingTools/vmodelingshoulderpoint.h | 3 +- tools/modelingTools/vmodelingspline.cpp | 101 ++- tools/modelingTools/vmodelingspline.h | 3 +- tools/modelingTools/vmodelingsplinepath.cpp | 133 ++- tools/modelingTools/vmodelingsplinepath.h | 3 +- tools/modelingTools/vmodelingtool.cpp | 30 +- tools/modelingTools/vmodelingtool.h | 37 +- tools/modelingTools/vmodelingtriangle.cpp | 54 +- tools/modelingTools/vmodelingtriangle.h | 3 +- tools/nodeDetails/vabstractnode.cpp | 30 +- tools/nodeDetails/vabstractnode.h | 3 +- tools/nodeDetails/vnodearc.cpp | 48 +- tools/nodeDetails/vnodearc.h | 3 +- tools/nodeDetails/vnodepoint.cpp | 71 +- tools/nodeDetails/vnodepoint.h | 3 +- tools/nodeDetails/vnodespline.cpp | 48 +- tools/nodeDetails/vnodespline.h | 3 +- tools/nodeDetails/vnodesplinepath.cpp | 51 +- tools/nodeDetails/vnodesplinepath.h | 3 +- tools/vabstracttool.cpp | 77 +- tools/vabstracttool.h | 9 +- tools/vdatatool.cpp | 9 +- tools/vdatatool.h | 5 +- tools/vtooldetail.cpp | 473 +++++----- tools/vtooldetail.h | 9 +- version.h | 3 +- widgets/doubledelegate.cpp | 14 +- widgets/doubledelegate.h | 3 +- widgets/vapplication.cpp | 27 +- widgets/vapplication.h | 3 +- widgets/vcontrolpointspline.cpp | 68 +- widgets/vcontrolpointspline.h | 3 +- widgets/vgraphicssimpletextitem.cpp | 20 +- widgets/vgraphicssimpletextitem.h | 3 +- widgets/vitem.cpp | 34 +- widgets/vitem.h | 3 +- widgets/vmaingraphicsscene.cpp | 21 +- widgets/vmaingraphicsscene.h | 3 +- widgets/vmaingraphicsview.cpp | 69 +- widgets/vmaingraphicsview.h | 3 +- widgets/vtablegraphicsview.cpp | 156 ++-- widgets/vtablegraphicsview.h | 7 +- xml/vdomdocument.cpp | 856 ++++++++++++------ xml/vdomdocument.h | 11 +- xml/vtoolrecord.cpp | 9 +- xml/vtoolrecord.h | 3 +- 187 files changed, 6296 insertions(+), 3772 deletions(-) diff --git a/container/calculator.cpp b/container/calculator.cpp index 36e7202e9..1ba0a8477 100644 --- a/container/calculator.cpp +++ b/container/calculator.cpp @@ -30,11 +30,8 @@ #define FINISHED 10 #define EOL 9 -Calculator::Calculator(const VContainer *data):errorMsg(0), token(QString()), tok(0), token_type(0), - prog(QString()), index(0), data(data), debugFormula(QString()){ -} - -qreal Calculator::eval(QString prog, QString *errorMsg){ +qreal Calculator::eval(QString prog, QString *errorMsg) +{ this->errorMsg = errorMsg; this->errorMsg->clear(); debugFormula.clear(); @@ -48,10 +45,12 @@ qreal Calculator::eval(QString prog, QString *errorMsg){ return result; } -qreal Calculator::get_exp(){ +qreal Calculator::get_exp() +{ qreal result = 0; get_token(); - if(token.isEmpty()) { + if (token.isEmpty()) + { serror(2); return 0; } @@ -62,38 +61,44 @@ qreal Calculator::get_exp(){ } /* Сложение или вычитание двух термов */ -void Calculator::level2(qreal *result){ +void Calculator::level2(qreal *result) +{ QChar op; qreal hold; level3(result); - while((op=token[0]) == '+' || op == '-') { + while ((op=token[0]) == '+' || op == '-') + { get_token(); level3(&hold); - arith(op,result,&hold); + arith(op, result, &hold); } } /* Вычисление произведения или частного двух фвкторов */ -void Calculator::level3(qreal *result){ +void Calculator::level3(qreal *result) +{ QChar op; qreal hold; level4(result); - while((op = token[0]) == '*' || op == '/' || op == '%') { + while ((op = token[0]) == '*' || op == '/' || op == '%') + { get_token(); level4(&hold); - arith(op,result,&hold); + arith(op, result, &hold); } } /* Обработка степени числа (целочисленной) */ -void Calculator::level4(qreal *result){ +void Calculator::level4(qreal *result) +{ qreal hold; level5(result); - if(token[0] == '^') { + if (token[0] == '^') + { get_token(); level4(&hold); arith('^', result, &hold); @@ -101,35 +106,45 @@ void Calculator::level4(qreal *result){ } /* Унарный + или - */ -void Calculator::level5(qreal *result){ +void Calculator::level5(qreal *result) +{ QChar op; op = '\0'; - if((token_type==DELIMITER) && (token[0]=='+' || token[0]=='-')) { + if ((token_type==DELIMITER) && (token[0]=='+' || token[0]=='-')) + { op = token[0]; get_token(); } level6(result); - if(op != '\0') + if (op != '\0') + { unary(op, result); + } } /* Обработка выражения в круглых скобках */ -void Calculator::level6(qreal *result){ - if((token[0] == '(') && (token_type == DELIMITER)) { +void Calculator::level6(qreal *result) +{ + if ((token[0] == '(') && (token_type == DELIMITER)) + { get_token(); level2(result); - if(token[0] != ')') + if (token[0] != ')') + { serror(1); + } get_token(); } else primitive(result); } /* Определение значения переменной по ее имени */ -void Calculator::primitive(qreal *result){ +void Calculator::primitive(qreal *result) +{ QString str; - switch(token_type) { + switch (token_type) + { case VARIABLE: *result = find_var(token); str = QString("%1").arg(*result, 0, 'f', 3); @@ -148,10 +163,12 @@ void Calculator::primitive(qreal *result){ } /* Выполнение специфицированной арифметики */ -void Calculator::arith(QChar o, qreal *r, qreal *h){ +void Calculator::arith(QChar o, qreal *r, qreal *h) +{ qreal t;//, ex; - switch(o.toLatin1()) { + switch (o.toLatin1()) + { case '-': *r = *r-*h; break; @@ -177,21 +194,26 @@ void Calculator::arith(QChar o, qreal *r, qreal *h){ // } // for(t=*h-1; t>0; --t) // *r = (*r) * ex; - break; - } + break; + } } /* Изменение знака */ -void Calculator::unary(QChar o, qreal *r){ - if(o=='-') +void Calculator::unary(QChar o, qreal *r) +{ + if (o=='-') + { *r = -(*r); + } } /* Поиск значения переменной */ -qreal Calculator::find_var(QString s){ +qreal Calculator::find_var(QString s) +{ bool ok = false; qreal value = data->FindVar(s, &ok); - if(!ok){ + if (ok == false) + { qDebug()<clear(); *errorMsg = e[error]; - qDebug()</*%^=()",c) || c=='\n' || c=='\r' || c=='\0') +bool Calculator::isdelim(QChar c) +{ + if (StrChr(" ;,+-<>/*%^=()", c) || c=='\n' || c=='\r' || c=='\0') + { return true; + } return false; } /* Возвращает 1, если "с" пробел или табуляция */ -bool Calculator::iswhite(QChar c){ - if(c==' ' || c=='\t') +bool Calculator::iswhite(QChar c) +{ + if (c==' ' || c=='\t') + { return true; + } else + { return false; + } } -void Calculator::get_token(){ +void Calculator::get_token() +{ QString *temp; token_type=0; tok=0; token.clear(); temp=&token; - if(prog[index]=='\0') { /* Конец файла */ + if (prog[index]=='\0') + { /* Конец файла */ token="\0"; tok=FINISHED; token_type=DELIMITER; return; } - while(iswhite(prog[index])) ++index; /* пропуск пробелов */ + while (iswhite(prog[index])) + { + ++index; /* пропуск пробелов */ + } - if(prog[index]=='\r') { /* crtl */ + if (prog[index]=='\r') + { /* crtl */ ++index; ++index; tok= EOL; token='\r'; token.append('\n');token.append("\0"); @@ -273,7 +312,8 @@ void Calculator::get_token(){ return; } - if(StrChr("+-*^/%=;(),><", prog[index])) { /* разделитель */ + if (StrChr("+-*^/%=;(),><", prog[index])) + { /* разделитель */ *temp=prog[index]; index++; /* переход на следующую позицию */ temp->append("\0"); @@ -281,20 +321,26 @@ void Calculator::get_token(){ debugFormula.append(token); return; } - if(prog[index]=='"') { /* строка в кавычках */ + if (prog[index]=='"') + { /* строка в кавычках */ index++; - while(prog[index] != '"' && prog[index] != '\r'){ + while (prog[index] != '"' && prog[index] != '\r') + { temp->append(prog[index]); index++; } - if(prog[index]=='\r') + if (prog[index]=='\r') + { serror(1); + } index++;temp->append("\0"); token_type=QUOTE; return; } - if(prog[index].isDigit()) { /* число */ - while(!isdelim(prog[index])){ + if (prog[index].isDigit()) + { /* число */ + while (isdelim(prog[index]) == false) + { temp->append(prog[index]); index++; } @@ -303,8 +349,10 @@ void Calculator::get_token(){ return; } - if(prog[index].isPrint()) { /* переменная или команда */ - while(!isdelim(prog[index])){ + if (prog[index].isPrint()) + { /* переменная или команда */ + while (isdelim(prog[index]) == false) + { temp->append(prog[index]); index++; } @@ -313,22 +361,30 @@ void Calculator::get_token(){ temp->append("\0"); /* Просматривается, если строка есть команда или переменная */ - if(token_type==STRING) { + if (token_type==STRING) + { tok=look_up(token); /* преобразование во внутренний формат */ - if(!tok) + if (tok == false) + { token_type = VARIABLE; - else token_type = COMMAND; /* это команда */ - } + } + else + { + token_type = COMMAND; /* это команда */ + } + } return; } -bool Calculator::StrChr(QString string, QChar c){ +bool Calculator::StrChr(QString string, QChar c) +{ return string.contains(c, Qt::CaseInsensitive); } /* Возвращает лексему обратно во входной поток */ -void Calculator::putback(){ +void Calculator::putback() +{ QString t; t = token; index = index - t.size(); diff --git a/container/calculator.h b/container/calculator.h index 607dd648e..6fa29c3ed 100644 --- a/container/calculator.h +++ b/container/calculator.h @@ -28,13 +28,15 @@ * @brief The Calculator клас калькулятора формул лекал. Виконує розрахунок формул з підставлянням * значеннь зміних. */ -class Calculator{ +class Calculator +{ public: /** * @brief Calculator конструктор класу. Використовується при розрахунку лекала. * @param data покажчик на контейнер змінних */ - explicit Calculator(const VContainer *data); + explicit Calculator(const VContainer *data):errorMsg(0), token(QString()), tok(0), token_type(0), prog(QString()), + index(0), data(data), debugFormula(QString()){} /** * @brief eval виконує розрахунок формули. * @param prog рядко в якому зберігається формула. @@ -143,7 +145,7 @@ private: qreal find_var(QString s); void serror(qint32 error); /** - * @brief look_up пошук відповідного внутрішнього формату для теперішньої лексеми в таблиці лексем. текущей лексемы в таблице лексем + * @brief look_up пошук відповідного внутрішнього формату для теперішньої лексеми в таблиці лексем. * @param s ім'я лексеми. * @return внутрішній номер лексеми. */ diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 7b94c7ab2..2a6daca3d 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -24,7 +24,8 @@ qint64 VContainer::_id = 0; -VContainer::VContainer():base(QHash()), points(QHash()), +VContainer::VContainer() + :base(QHash()), points(QHash()), modelingPoints(QHash()), standartTable(QHash()), incrementTable(QHash()), lengthLines(QHash()), lineAngles(QHash()), splines(QHash()), @@ -32,18 +33,21 @@ VContainer::VContainer():base(QHash()), points(QHash()), arcs(QHash()), modelingArcs(QHash()), lengthArcs(QHash()), splinePaths(QHash()), modelingSplinePaths(QHash()), - details(QHash()){ + details(QHash()) +{ SetSize(500); SetGrowth(1760); CreateManTableIGroup (); } -VContainer &VContainer::operator =(const VContainer &data){ +VContainer &VContainer::operator =(const VContainer &data) +{ setData(data); return *this; } -VContainer::VContainer(const VContainer &data):base(QHash()), points(QHash()), +VContainer::VContainer(const VContainer &data) + :base(QHash()), points(QHash()), modelingPoints(QHash()), standartTable(QHash()), incrementTable(QHash()), lengthLines(QHash()), lineAngles(QHash()), splines(QHash()), @@ -51,11 +55,13 @@ VContainer::VContainer(const VContainer &data):base(QHash()), p lengthSplines(QHash()), arcs(QHash()), modelingArcs(QHash()), lengthArcs(QHash()), splinePaths(QHash()), modelingSplinePaths(QHash()), - details(QHash()){ + details(QHash()) +{ setData(data); } -void VContainer::setData(const VContainer &data){ +void VContainer::setData(const VContainer &data) +{ base = *data.DataBase(); points = *data.DataPoints(); modelingPoints = *data.DataModelingPoints(); @@ -75,158 +81,201 @@ void VContainer::setData(const VContainer &data){ } template -val VContainer::GetObject(const QHash &obj, key id){ - if(obj.contains(id)){ +val VContainer::GetObject(const QHash &obj, key id) +{ + if (obj.contains(id)) + { return obj.value(id); - } else { + } + else + { throw VExceptionBadId(tr("Can't find object"), id); } } -VStandartTableCell VContainer::GetStandartTableCell(const QString &name) const{ - Q_ASSERT(!name.isEmpty()); +VStandartTableCell VContainer::GetStandartTableCell(const QString &name) const +{ + Q_ASSERT(name.isEmpty()==false); return GetObject(standartTable, name); } -VIncrementTableRow VContainer::GetIncrementTableRow(const QString& name) const{ - Q_ASSERT(!name.isEmpty()); +VIncrementTableRow VContainer::GetIncrementTableRow(const QString& name) const +{ + Q_ASSERT(name.isEmpty()==false); return GetObject(incrementTable, name); } -qreal VContainer::GetLine(const QString &name) const{ - Q_ASSERT(!name.isEmpty()); +qreal VContainer::GetLine(const QString &name) const +{ + Q_ASSERT(name.isEmpty()==false); return GetObject(lengthLines, name); } -qreal VContainer::GetLengthArc(const QString &name) const{ - Q_ASSERT(!name.isEmpty()); +qreal VContainer::GetLengthArc(const QString &name) const +{ + Q_ASSERT(name.isEmpty()==false); return GetObject(lengthArcs, name); } -qreal VContainer::GetLengthSpline(const QString &name) const{ - Q_ASSERT(!name.isEmpty()); +qreal VContainer::GetLengthSpline(const QString &name) const +{ + Q_ASSERT(name.isEmpty()==false); return GetObject(lengthSplines, name); } -qreal VContainer::GetLineAngle(const QString &name) const{ - Q_ASSERT(!name.isEmpty()); +qreal VContainer::GetLineAngle(const QString &name) const +{ + Q_ASSERT(name.isEmpty()==false); return GetObject(lineAngles, name); } -qint64 VContainer::AddPoint(const VPointF &point){ +qint64 VContainer::AddPoint(const VPointF &point) +{ return AddObject(points, point); } -qint64 VContainer::AddModelingPoint(const VPointF &point){ -return AddObject(modelingPoints, point); +qint64 VContainer::AddModelingPoint(const VPointF &point) +{ + return AddObject(modelingPoints, point); } -qint64 VContainer::AddDetail(const VDetail &detail){ +qint64 VContainer::AddDetail(const VDetail &detail) +{ return AddObject(details, detail); } -qint64 VContainer::getNextId(){ +qint64 VContainer::getNextId() +{ _id++; return _id; } -void VContainer::UpdateId(qint64 newId){ - if(newId > _id){ +void VContainer::UpdateId(qint64 newId) +{ + if (newId > _id) + { _id = newId; } } -QPainterPath VContainer::ContourPath(qint64 idDetail) const{ +QPainterPath VContainer::ContourPath(qint64 idDetail) const +{ VDetail detail = GetDetail(idDetail); QVector points; QVector pointsEkv; - for(qint32 i = 0; i< detail.CountNode(); ++i){ - switch(detail[i].getTypeTool()){ - case(Tool::NodePoint):{ - VPointF point = GetModelingPoint(detail[i].getId()); - points.append(point.toQPointF()); - if(detail.getSupplement() == true){ - QPointF pEkv = point.toQPointF(); - pEkv.setX(pEkv.x()+detail[i].getMx()); - pEkv.setY(pEkv.y()+detail[i].getMy()); - pointsEkv.append(pEkv); - } - } - break; - case(Tool::NodeArc):{ - VArc arc = GetModelingArc(detail[i].getId()); - qreal len1 = GetLengthContour(points, arc.GetPoints()); - qreal lenReverse = GetLengthContour(points, GetReversePoint(arc.GetPoints())); - if(len1 <= lenReverse){ - points << arc.GetPoints(); - if(detail.getSupplement() == true){ - pointsEkv << biasPoints(arc.GetPoints(), detail[i].getMx(), detail[i].getMy()); + for (qint32 i = 0; i< detail.CountNode(); ++i) + { + switch (detail[i].getTypeTool()) + { + case (Tool::NodePoint): + { + VPointF point = GetModelingPoint(detail[i].getId()); + points.append(point.toQPointF()); + if (detail.getSupplement() == true) + { + QPointF pEkv = point.toQPointF(); + pEkv.setX(pEkv.x()+detail[i].getMx()); + pEkv.setY(pEkv.y()+detail[i].getMy()); + pointsEkv.append(pEkv); } - } else { - points << GetReversePoint(arc.GetPoints()); - if(detail.getSupplement() == true){ - pointsEkv << biasPoints(GetReversePoint(arc.GetPoints()), detail[i].getMx(), + } + break; + case (Tool::NodeArc): + { + VArc arc = GetModelingArc(detail[i].getId()); + qreal len1 = GetLengthContour(points, arc.GetPoints()); + qreal lenReverse = GetLengthContour(points, GetReversePoint(arc.GetPoints())); + if (len1 <= lenReverse) + { + points << arc.GetPoints(); + if (detail.getSupplement() == true) + { + pointsEkv << biasPoints(arc.GetPoints(), detail[i].getMx(), detail[i].getMy()); + } + } + else + { + points << GetReversePoint(arc.GetPoints()); + if (detail.getSupplement() == true) + { + pointsEkv << biasPoints(GetReversePoint(arc.GetPoints()), detail[i].getMx(), detail[i].getMy()); + } + } + } + break; + case (Tool::NodeSpline): + { + VSpline spline = GetModelingSpline(detail[i].getId()); + qreal len1 = GetLengthContour(points, spline.GetPoints()); + qreal lenReverse = GetLengthContour(points, GetReversePoint(spline.GetPoints())); + if (len1 <= lenReverse) + { + points << spline.GetPoints(); + if (detail.getSupplement() == true) + { + pointsEkv << biasPoints(spline.GetPoints(), detail[i].getMx(), detail[i].getMy()); + } + } + else + { + points << GetReversePoint(spline.GetPoints()); + if (detail.getSupplement() == true) + { + pointsEkv << biasPoints(GetReversePoint(spline.GetPoints()), detail[i].getMx(), detail[i].getMy()); + } } } - } break; - case(Tool::NodeSpline):{ - VSpline spline = GetModelingSpline(detail[i].getId()); - qreal len1 = GetLengthContour(points, spline.GetPoints()); - qreal lenReverse = GetLengthContour(points, GetReversePoint(spline.GetPoints())); - if(len1 <= lenReverse){ - points << spline.GetPoints(); - if(detail.getSupplement() == true){ - pointsEkv << biasPoints(spline.GetPoints(), detail[i].getMx(), detail[i].getMy()); + case (Tool::NodeSplinePath): + { + VSplinePath splinePath = GetModelingSplinePath(detail[i].getId()); + qreal len1 = GetLengthContour(points, splinePath.GetPathPoints()); + qreal lenReverse = GetLengthContour(points, GetReversePoint(splinePath.GetPathPoints())); + if (len1 <= lenReverse) + { + points << splinePath.GetPathPoints(); + if (detail.getSupplement() == true) + { + pointsEkv << biasPoints(splinePath.GetPathPoints(), detail[i].getMx(), detail[i].getMy()); + } } - } else { - points << GetReversePoint(spline.GetPoints()); - if(detail.getSupplement() == true){ - pointsEkv << biasPoints(GetReversePoint(spline.GetPoints()), detail[i].getMx(), - detail[i].getMy()); + else + { + points << GetReversePoint(splinePath.GetPathPoints()); + if (detail.getSupplement() == true) + { + pointsEkv << biasPoints(GetReversePoint(splinePath.GetPathPoints()), detail[i].getMx(), + detail[i].getMy()); + } } } + break; + case (Tool::SplineTool): + break;//Nothing to do, just ignore. + default: + qWarning()<<"Get wrong tool type. Ignore."< VContainer::biasPoints(const QVector &points, const qreal &mx, const qreal &my) const{ +QVector VContainer::biasPoints(const QVector &points, const qreal &mx, const qreal &my) const +{ QVector p; - for(qint32 i = 0; i < points.size(); ++i){ + for (qint32 i = 0; i < points.size(); ++i) + { QPointF point = points.at(i); point.setX(point.x() + mx); - point.setY(point.x() + my); + point.setY(point.y() + my); p.append(point); } return p; } -QPainterPath VContainer::Equidistant(QVector points, const Detail::Equidistant &eqv, - const qreal &width) const{ +QPainterPath VContainer::Equidistant(QVector points, const Detail::Equidistant &eqv, const qreal &width) const +{ QPainterPath ekv; QVector ekvPoints; - if ( points.size() < 3 ){ + if ( points.size() < 3 ) + { qDebug()<<"Not enough points for build equidistant.\n"; return ekv; } - for (qint32 i = 0; i < points.size(); ++i ){ - if(i != points.size()-1){ - if(points[i] == points[i+1]){ + for (qint32 i = 0; i < points.size(); ++i ) + { + if (i != points.size()-1) + { + if (points[i] == points[i+1]) + { points.remove(i+1); } - } else { - if(points[i] == points[0]){ + } + else + { + if (points[i] == points[0]) + { points.remove(i); } } } - if(eqv == Detail::CloseEquidistant){ + if (eqv == Detail::CloseEquidistant) + { points.append(points.at(0)); } - for (qint32 i = 0; i < points.size(); ++i ){ - if ( i == 0 && eqv == Detail::CloseEquidistant){//перша точка, ламана замкнена - ekvPoints< points, const Detail::Equi } ekvPoints = CheckLoops(ekvPoints); ekv.moveTo(ekvPoints[0]); - for (qint32 i = 1; i < ekvPoints.count(); ++i){ + for (qint32 i = 1; i < ekvPoints.count(); ++i) + { ekv.lineTo(ekvPoints[i]); } return ekv; } -QLineF VContainer::ParallelLine(const QLineF &line, qreal width){ +QLineF VContainer::ParallelLine(const QLineF &line, qreal width) +{ Q_ASSERT(width > 0); - QLineF paralel = QLineF (SingleParallelPoint(line, 90, width), - SingleParallelPoint(QLineF(line.p2(), line.p1()), -90, width)); + QLineF paralel = QLineF (SingleParallelPoint(line, 90, width), SingleParallelPoint(QLineF(line.p2(), line.p1()), + -90, width)); return paralel; } -QPointF VContainer::SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width){ +QPointF VContainer::SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width) +{ Q_ASSERT(width > 0); - QLineF l = line; - l.setAngle( l.angle() + angle ); - l.setLength( width ); - return l.p2(); + QLineF pLine = line; + pLine.setAngle( pLine.angle() + angle ); + pLine.setLength( width ); + return pLine.p2(); } -QVector VContainer::EkvPoint(const QLineF &line1, const QLineF &line2, const qreal &width) const{ +QVector VContainer::EkvPoint(const QLineF &line1, const QLineF &line2, const qreal &width) const +{ Q_ASSERT(width > 0); QVector points; - if(line1.p2() != line2.p2()){ + if (line1.p2() != line2.p2()) + { qWarning()<<"Last point of two lines must be equal."; } QPointF CrosPoint; QLineF bigLine1 = ParallelLine(line1, width ); QLineF bigLine2 = ParallelLine(QLineF(line2.p2(), line2.p1()), width ); QLineF::IntersectType type = bigLine1.intersect( bigLine2, &CrosPoint ); - switch(type){ - case(QLineF::BoundedIntersection): - points.append(CrosPoint); - return points; - break; - case(QLineF::UnboundedIntersection):{ - QLineF line( line1.p2(), CrosPoint ); - if(line.length() > width + toPixel(8)){ - QLineF l; - l = QLineF(bigLine1.p2(), CrosPoint); - l.setLength(width); - points.append(l.p2()); - - l = QLineF(bigLine2.p1(), CrosPoint); - l.setLength(width); - points.append(l.p2()); - } else { + switch (type) + { + case (QLineF::BoundedIntersection): points.append(CrosPoint); return points; + break; + case (QLineF::UnboundedIntersection): + { + QLineF line( line1.p2(), CrosPoint ); + if (line.length() > width + toPixel(8)) + { + QLineF lineL; + lineL = QLineF(bigLine1.p2(), CrosPoint); + lineL.setLength(width); + points.append(lineL.p2()); + + lineL = QLineF(bigLine2.p1(), CrosPoint); + lineL.setLength(width); + points.append(lineL.p2()); + } + else + { + points.append(CrosPoint); + return points; + } + break; } - break; - } - case(QLineF::NoIntersection): - /*If we have correct lines this means lines lie on a line.*/ - points.append(bigLine1.p2()); - return points; - break; + case (QLineF::NoIntersection): + /*If we have correct lines this means lines lie on a line.*/ + points.append(bigLine1.p2()); + return points; + break; } return points; } -QVector VContainer::CheckLoops(const QVector &points) const{ +QVector VContainer::CheckLoops(const QVector &points) const +{ QVector ekvPoints; /*If we got less than 4 points no need seek loops.*/ - if(points.size() < 4){ + if (points.size() < 4) + { return ekvPoints; } bool closed = false; - if(points.at(0) == points.at(points.size()-1)){ + if (points.at(0) == points.at(points.size()-1)) + { closed = true; } qint32 i, j; - for(i = 0; i < points.size(); ++i){ + for (i = 0; i < points.size(); ++i) + { /*Last three points no need check.*/ - if(i >= points.size()-3){ + if (i >= points.size()-3) + { ekvPoints.append(points.at(i)); continue; } QPointF crosPoint; QLineF::IntersectType intersect = QLineF::NoIntersection; - QLineF line1(points.at(i),points.at(i+1)); - for(j = i+2; j < points.size()-1; ++j){ - QLineF line2(points.at(j),points.at(j+1)); + QLineF line1(points.at(i), points.at(i+1)); + for (j = i+2; j < points.size()-1; ++j) + { + QLineF line2(points.at(j), points.at(j+1)); intersect = line1.intersect(line2, &crosPoint); - if(intersect == QLineF::BoundedIntersection){ + if (intersect == QLineF::BoundedIntersection) + { break; } } - if(intersect == QLineF::BoundedIntersection){ - if(i == 0 && j+1 == points.size()-1 && closed){ + if (intersect == QLineF::BoundedIntersection) + { + if (i == 0 && j+1 == points.size()-1 && closed) + { /*We got closed contour.*/ ekvPoints.append(points.at(i)); - } else { + } + else + { /*We found loop.*/ ekvPoints.append(points.at(i)); ekvPoints.append(crosPoint); ekvPoints.append(points.at(j+1)); i = j + 2; } - } else { + } + else + { /*We did not found loop.*/ ekvPoints.append(points.at(i)); } @@ -398,57 +487,67 @@ QVector VContainer::CheckLoops(const QVector &points) const{ return ekvPoints; } -void VContainer::PrepareDetails(QVector &list) const{ +void VContainer::PrepareDetails(QVector &list) const +{ QHashIterator iDetail(details); - while (iDetail.hasNext()) { + while (iDetail.hasNext()) + { iDetail.next(); list.append(new VItem(ContourPath(iDetail.key()), list.size())); } } template -void VContainer::UpdateObject(QHash &obj, const qint64 &id, const val& point){ +void VContainer::UpdateObject(QHash &obj, const qint64 &id, const val& point) +{ Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0"); obj[id] = point; UpdateId(id); } -void VContainer::AddLengthSpline(const QString &name, const qreal &value){ - Q_ASSERT(!name.isEmpty()); +void VContainer::AddLengthSpline(const QString &name, const qreal &value) +{ + Q_ASSERT(name.isEmpty() == false); lengthSplines[name] = value; } -void VContainer::AddLengthArc(const qint64 ¢er, const qint64 &id){ +void VContainer::AddLengthArc(const qint64 ¢er, const qint64 &id) +{ AddLengthArc(GetNameArc(center, id), toMM(GetArc(id).GetLength())); } -void VContainer::AddLengthArc(const QString &name, const qreal &value){ - Q_ASSERT(!name.isEmpty()); +void VContainer::AddLengthArc(const QString &name, const qreal &value) +{ + Q_ASSERT(name.isEmpty() == false); lengthArcs[name] = value; } -void VContainer::AddLineAngle(const QString &name, const qreal &value){ - Q_ASSERT(!name.isEmpty()); +void VContainer::AddLineAngle(const QString &name, const qreal &value) +{ + Q_ASSERT(name.isEmpty() == false); lineAngles[name] = value; } -qreal VContainer::GetValueStandartTableCell(const QString& name) const{ +qreal VContainer::GetValueStandartTableCell(const QString& name) const +{ VStandartTableCell cell = GetStandartTableCell(name); - qreal k_size = ( static_cast (size()/10.0) - 50.0 ) / 2.0; + qreal k_size = ( static_cast (size()/10.0) - 50.0 ) / 2.0; qreal k_growth = ( static_cast (growth()/10.0) - 176.0 ) / 6.0; - qreal value = cell.GetBase() + k_size*cell.GetKsize() + k_growth*cell.GetKgrowth(); + qreal value = cell.GetBase() + k_size*cell.GetKsize() + k_growth*cell.GetKgrowth(); return value; } -qreal VContainer::GetValueIncrementTableRow(const QString& name) const{ +qreal VContainer::GetValueIncrementTableRow(const QString& name) const +{ VIncrementTableRow cell = GetIncrementTableRow(name); - qreal k_size = ( static_cast (size()/10.0) - 50.0 ) / 2.0; + qreal k_size = ( static_cast (size()/10.0) - 50.0 ) / 2.0; qreal k_growth = ( static_cast (growth()/10.0) - 176.0 ) / 6.0; qreal value = cell.getBase() + k_size*cell.getKsize() + k_growth*cell.getKgrowth(); return value; } -void VContainer::Clear(){ +void VContainer::Clear() +{ _id = 0; standartTable.clear(); incrementTable.clear(); @@ -464,40 +563,49 @@ void VContainer::Clear(){ CreateManTableIGroup (); } -void VContainer::ClearObject(){ +void VContainer::ClearObject() +{ points.clear(); splines.clear(); arcs.clear(); splinePaths.clear(); } -qreal VContainer::FindVar(const QString &name, bool *ok)const{ - if(base.contains(name)){ +qreal VContainer::FindVar(const QString &name, bool *ok)const +{ + if (base.contains(name)) + { *ok = true; return base.value(name); } - if(standartTable.contains(name)){ + if (standartTable.contains(name)) + { *ok = true; return GetValueStandartTableCell(name); } - if(incrementTable.contains(name)){ + if (incrementTable.contains(name)) + { *ok = true; return GetValueIncrementTableRow(name); } - if(lengthLines.contains(name)){ + if (lengthLines.contains(name)) + { *ok = true; return lengthLines.value(name); } - if(lengthArcs.contains(name)){ + if (lengthArcs.contains(name)) + { *ok = true; return lengthArcs.value(name); } - if(lineAngles.contains(name)){ + if (lineAngles.contains(name)) + { *ok = true; return lineAngles.value(name); } - if(lengthSplines.contains(name)){ + if (lengthSplines.contains(name)) + { *ok = true; return lengthSplines.value(name); } @@ -505,14 +613,18 @@ qreal VContainer::FindVar(const QString &name, bool *ok)const{ return 0; } -void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId, Draw::Draws mode){ +void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId, Draw::Draws mode) +{ QString nameLine = GetNameLine(firstPointId, secondPointId, mode); VPointF first; VPointF second; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { first = GetPoint(firstPointId); second = GetPoint(secondPointId); - } else { + } + else + { first = GetModelingPoint(firstPointId); second = GetModelingPoint(secondPointId); } @@ -521,91 +633,114 @@ void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId AddLineAngle(nameLine, QLineF(first.toQPointF(), second.toQPointF()).angle()); } -qint64 VContainer::AddSpline(const VSpline &spl){ +qint64 VContainer::AddSpline(const VSpline &spl) +{ return AddObject(splines, spl); } -qint64 VContainer::AddModelingSpline(const VSpline &spl){ +qint64 VContainer::AddModelingSpline(const VSpline &spl) +{ return AddObject(modelingSplines, spl); } -qint64 VContainer::AddSplinePath(const VSplinePath &splPath){ +qint64 VContainer::AddSplinePath(const VSplinePath &splPath) +{ return AddObject(splinePaths, splPath); } -qint64 VContainer::AddModelingSplinePath(const VSplinePath &splPath){ +qint64 VContainer::AddModelingSplinePath(const VSplinePath &splPath) +{ return AddObject(modelingSplinePaths, splPath); } -qint64 VContainer::AddArc(const VArc &arc){ +qint64 VContainer::AddArc(const VArc &arc) +{ return AddObject(arcs, arc); } -qint64 VContainer::AddModelingArc(const VArc &arc){ +qint64 VContainer::AddModelingArc(const VArc &arc) +{ return AddObject(modelingArcs, arc); } template -qint64 VContainer::AddObject(QHash &obj, const val& value){ +qint64 VContainer::AddObject(QHash &obj, const val& value) +{ qint64 id = getNextId(); obj[id] = value; return id; } -QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const{ +QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const +{ VPointF first; VPointF second; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { first = GetPoint(firstPoint); second = GetPoint(secondPoint); - } else { + } + else + { first = GetModelingPoint(firstPoint); second = GetModelingPoint(secondPoint); } return QString("Line_%1_%2").arg(first.name(), second.name()); } -QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, - Draw::Draws mode) const{ +QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const +{ VPointF first; VPointF second; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { first = GetPoint(firstPoint); second = GetPoint(secondPoint); - } else { + } + else + { first = GetModelingPoint(firstPoint); second = GetModelingPoint(secondPoint); } return QString("AngleLine_%1_%2").arg(first.name(), second.name()); } -QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, - Draw::Draws mode) const{ +QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const +{ VPointF first; VPointF second; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { first = GetPoint(firstPoint); second = GetPoint(secondPoint); - } else { + } + else + { first = GetModelingPoint(firstPoint); second = GetModelingPoint(secondPoint); } return QString("Spl_%1_%2").arg(first.name(), second.name()); } -QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Draws mode) const{ - if(path.Count() == 0){ +QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Draws mode) const +{ + if (path.Count() == 0) + { return QString(); } QString name("SplPath"); - for(qint32 i = 1; i <= path.Count(); ++i){ + for (qint32 i = 1; i <= path.Count(); ++i) + { VSpline spl = path.GetSpline(i); VPointF first; VPointF second; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { first = GetPoint(spl.GetP1()); second = GetPoint(spl.GetP4()); - } else { + } + else + { first = GetModelingPoint(spl.GetP1()); second = GetModelingPoint(spl.GetP4()); } @@ -615,58 +750,73 @@ QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Draws mode) return name; } -QString VContainer::GetNameArc(const qint64 ¢er, const qint64 &id, Draw::Draws mode) const{ +QString VContainer::GetNameArc(const qint64 ¢er, const qint64 &id, Draw::Draws mode) const +{ VPointF centerPoint; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { centerPoint = GetPoint(center); - } else { + } + else + { centerPoint = GetModelingPoint(center); } return QString ("Arc_%1_%2").arg(centerPoint.name()).arg(id); } -void VContainer::UpdatePoint(qint64 id, const VPointF &point){ +void VContainer::UpdatePoint(qint64 id, const VPointF &point) +{ UpdateObject(points, id, point); } -void VContainer::UpdateModelingPoint(qint64 id, const VPointF &point){ +void VContainer::UpdateModelingPoint(qint64 id, const VPointF &point) +{ UpdateObject(modelingPoints, id, point); } -void VContainer::UpdateDetail(qint64 id, const VDetail &detail){ +void VContainer::UpdateDetail(qint64 id, const VDetail &detail) +{ UpdateObject(details, id, detail); } -void VContainer::UpdateSpline(qint64 id, const VSpline &spl){ +void VContainer::UpdateSpline(qint64 id, const VSpline &spl) +{ UpdateObject(splines, id, spl); } -void VContainer::UpdateModelingSpline(qint64 id, const VSpline &spl){ +void VContainer::UpdateModelingSpline(qint64 id, const VSpline &spl) +{ UpdateObject(modelingSplines, id, spl); } -void VContainer::UpdateSplinePath(qint64 id, const VSplinePath &splPath){ +void VContainer::UpdateSplinePath(qint64 id, const VSplinePath &splPath) +{ UpdateObject(splinePaths, id, splPath); } -void VContainer::UpdateModelingSplinePath(qint64 id, const VSplinePath &splPath){ +void VContainer::UpdateModelingSplinePath(qint64 id, const VSplinePath &splPath) +{ UpdateObject(modelingSplinePaths, id, splPath); } -void VContainer::UpdateArc(qint64 id, const VArc &arc){ +void VContainer::UpdateArc(qint64 id, const VArc &arc) +{ UpdateObject(arcs, id, arc); } -void VContainer::UpdateModelingArc(qint64 id, const VArc &arc){ +void VContainer::UpdateModelingArc(qint64 id, const VArc &arc) +{ UpdateObject(modelingArcs, id, arc); } -void VContainer::AddLengthLine(const QString &name, const qreal &value){ - Q_ASSERT(!name.isEmpty()); +void VContainer::AddLengthLine(const QString &name, const qreal &value) +{ + Q_ASSERT(name.isEmpty() == false); lengthLines[name] = value; } -void VContainer::CreateManTableIGroup (){ +void VContainer::CreateManTableIGroup () +{ AddStandartTableCell("Pkor", VStandartTableCell(84, 0, 3)); AddStandartTableCell("Pkor", VStandartTableCell(84, 0, 3)); AddStandartTableCell("Vtos", VStandartTableCell(1450, 2, 51)); @@ -679,7 +829,7 @@ void VContainer::CreateManTableIGroup (){ AddStandartTableCell("Vzy", VStandartTableCell(1328, 0, 49)); AddStandartTableCell("Vlop", VStandartTableCell(1320, 0, 49)); AddStandartTableCell("Vps", VStandartTableCell(811, -1, 36)); - AddStandartTableCell("Ssh", VStandartTableCell(202,4, 1)); + AddStandartTableCell("Ssh", VStandartTableCell(202, 4, 1)); AddStandartTableCell("SgI", VStandartTableCell(517, 18, 2)); AddStandartTableCell("SgII", VStandartTableCell(522, 19, 1)); AddStandartTableCell("SgIII", VStandartTableCell(500, 20, 0)); @@ -723,20 +873,24 @@ void VContainer::CreateManTableIGroup (){ AddStandartTableCell("Sb", VStandartTableCell(504, 15, 4)); } -QVector VContainer::GetReversePoint(const QVector &points) const{ +QVector VContainer::GetReversePoint(const QVector &points) const +{ Q_ASSERT(points.size() > 0); QVector reversePoints; - for (qint32 i = points.size() - 1; i >= 0; --i) { + for (qint32 i = points.size() - 1; i >= 0; --i) + { reversePoints.append(points.at(i)); } return reversePoints; } -qreal VContainer::GetLengthContour(const QVector &contour, const QVector &newPoints) const{ +qreal VContainer::GetLengthContour(const QVector &contour, const QVector &newPoints) const +{ qreal length = 0; QVector points; points << contour << newPoints; - for (qint32 i = 0; i < points.size()-1; ++i) { + for (qint32 i = 0; i < points.size()-1; ++i) + { QLineF line(points.at(i), points.at(i+1)); length += line.length(); } diff --git a/container/vcontainer.h b/container/vcontainer.h index 94c02498e..5937bb03e 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -32,7 +32,8 @@ /** * @brief The VContainer class */ -class VContainer{ +class VContainer +{ Q_DECLARE_TR_FUNCTIONS(VContainer) public: /** @@ -168,7 +169,7 @@ private: void CreateManTableIGroup (); QVector GetReversePoint(const QVector &points)const; qreal GetLengthContour(const QVector &contour, const QVector &newPoints)const; - template static val GetObject(const QHash &obj, key id); + template static val GetObject(const QHash &obj, key id); template static void UpdateObject(QHash &obj, const qint64 &id, const val& point); template static qint64 AddObject(QHash &obj, const val& value); }; diff --git a/container/vincrementtablerow.cpp b/container/vincrementtablerow.cpp index e6e3670a4..e7adbca73 100644 --- a/container/vincrementtablerow.cpp +++ b/container/vincrementtablerow.cpp @@ -21,12 +21,8 @@ #include "vincrementtablerow.h" -VIncrementTableRow::VIncrementTableRow():id(0), base(0), ksize(0), kgrowth(0), description(QString()){ -} - -VIncrementTableRow::VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth, - QString description):id(id), base(base), ksize(ksize), - kgrowth(kgrowth), description(description){ -} - +VIncrementTableRow::VIncrementTableRow() + :id(0), base(0), ksize(0), kgrowth(0), description(QString()){} +VIncrementTableRow::VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth, QString description) + :id(id), base(base), ksize(ksize), kgrowth(kgrowth), description(description){} diff --git a/container/vincrementtablerow.h b/container/vincrementtablerow.h index f04abd8bf..c3d82b6d4 100644 --- a/container/vincrementtablerow.h +++ b/container/vincrementtablerow.h @@ -22,7 +22,8 @@ #ifndef VINCREMENTTABLEROW_H #define VINCREMENTTABLEROW_H -class VIncrementTableRow{ +class VIncrementTableRow +{ public: VIncrementTableRow(); VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth, diff --git a/container/vpointf.cpp b/container/vpointf.cpp index 14f5aa2d6..bb5a2a8ad 100644 --- a/container/vpointf.cpp +++ b/container/vpointf.cpp @@ -21,7 +21,8 @@ #include "vpointf.h" -VPointF &VPointF::operator =(const VPointF &point){ +VPointF &VPointF::operator =(const VPointF &point) +{ _name = point.name(); _mx = point.mx(); _my = point.my(); diff --git a/container/vpointf.h b/container/vpointf.h index d51c13789..2a71599d0 100644 --- a/container/vpointf.h +++ b/container/vpointf.h @@ -22,7 +22,8 @@ #ifndef VPOINTF_H #define VPOINTF_H -class VPointF{ +class VPointF +{ public: inline VPointF () :_name(QString()), _mx(0), _my(0), _x(0), _y(0), mode(Draw::Calculation), idObject(0){} diff --git a/container/vstandarttablecell.cpp b/container/vstandarttablecell.cpp index 1eb2ff2f9..4f08ae346 100644 --- a/container/vstandarttablecell.cpp +++ b/container/vstandarttablecell.cpp @@ -21,9 +21,8 @@ #include "vstandarttablecell.h" -VStandartTableCell::VStandartTableCell():base(0), ksize(0), kgrowth(0), description(QString()){ -} +VStandartTableCell::VStandartTableCell() + :base(0), ksize(0), kgrowth(0), description(QString()){} -VStandartTableCell::VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description):base(base), - ksize(ksize), kgrowth(kgrowth), description(description){ -} +VStandartTableCell::VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description) + :base(base), ksize(ksize), kgrowth(kgrowth), description(description){} diff --git a/container/vstandarttablecell.h b/container/vstandarttablecell.h index d74f683ad..e5247f7a2 100644 --- a/container/vstandarttablecell.h +++ b/container/vstandarttablecell.h @@ -22,7 +22,8 @@ #ifndef VSTANDARTTABLECELL_H #define VSTANDARTTABLECELL_H -class VStandartTableCell{ +class VStandartTableCell +{ public: VStandartTableCell(); VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description = QString()); diff --git a/dialogs/dialogalongline.cpp b/dialogs/dialogalongline.cpp index 969107db7..00846dfa9 100644 --- a/dialogs/dialogalongline.cpp +++ b/dialogs/dialogalongline.cpp @@ -22,9 +22,10 @@ #include "dialogalongline.h" #include "ui_dialogalongline.h" -DialogAlongLine::DialogAlongLine(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogAlongLine), number(0), pointName(QString()), - typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0){ +DialogAlongLine::DialogAlongLine(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogAlongLine), number(0), pointName(QString()), + typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0) +{ ui->setupUi(this); listWidget = ui->listWidget; labelResultCalculation = ui->labelResultCalculation; @@ -66,53 +67,69 @@ DialogAlongLine::DialogAlongLine(const VContainer *data, Draw::Draws mode, QWidg connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogAlongLine::FormulaChanged); } -DialogAlongLine::~DialogAlongLine(){ +DialogAlongLine::~DialogAlongLine() +{ delete ui; } -void DialogAlongLine::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogAlongLine::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui->comboBoxFirstPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxFirstPoint->setCurrentIndex(index); number++; emit ToolTip(tr("Select second point of line")); return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui->comboBoxSecondPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxSecondPoint->setCurrentIndex(index); number = 0; emit ToolTip(""); } - if(!isInitialized){ + if (isInitialized == false) + { this->show(); } } } } -void DialogAlongLine::DialogAccepted(){ +void DialogAlongLine::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); typeLine = GetTypeLine(ui->comboBoxLineType); formula = ui->lineEditFormula->text(); @@ -121,25 +138,30 @@ void DialogAlongLine::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogAlongLine::setSecondPointId(const qint64 &value, const qint64 &id){ +void DialogAlongLine::setSecondPointId(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); } -void DialogAlongLine::setFirstPointId(const qint64 &value, const qint64 &id){ +void DialogAlongLine::setFirstPointId(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); } -void DialogAlongLine::setFormula(const QString &value){ +void DialogAlongLine::setFormula(const QString &value) +{ formula = value; ui->lineEditFormula->setText(formula); } -void DialogAlongLine::setTypeLine(const QString &value){ +void DialogAlongLine::setTypeLine(const QString &value) +{ typeLine = value; SetupTypeLine(ui->comboBoxLineType, value); } -void DialogAlongLine::setPointName(const QString &value){ +void DialogAlongLine::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } diff --git a/dialogs/dialogalongline.h b/dialogs/dialogalongline.h index 4b13fb25d..bda9b31f3 100644 --- a/dialogs/dialogalongline.h +++ b/dialogs/dialogalongline.h @@ -24,12 +24,14 @@ #include "dialogtool.h" -namespace Ui { -class DialogAlongLine; +namespace Ui +{ + class DialogAlongLine; } -class DialogAlongLine : public DialogTool{ - Q_OBJECT +class DialogAlongLine : public DialogTool +{ + Q_OBJECT public: DialogAlongLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); @@ -46,7 +48,7 @@ public: void setSecondPointId(const qint64 &value, const qint64 &id); public slots: virtual void ChoosedObject(qint64 id, Scene::Scenes type); - virtual void DialogAccepted(); + virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogAlongLine) Ui::DialogAlongLine *ui; diff --git a/dialogs/dialogarc.cpp b/dialogs/dialogarc.cpp index dbd6eff99..16989d44e 100644 --- a/dialogs/dialogarc.cpp +++ b/dialogs/dialogarc.cpp @@ -22,9 +22,10 @@ #include "dialogarc.h" #include "ui_dialogarc.h" -DialogArc::DialogArc(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false), - timerRadius(0), timerF1(0), timerF2(0), center(0), radius(QString()), f1(QString()), f2(QString()){ +DialogArc::DialogArc(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false), + timerRadius(0), timerF1(0), timerF2(0), center(0), radius(QString()), f1(QString()), f2(QString()) +{ ui->setupUi(this); timerRadius = new QTimer(this); @@ -77,47 +78,61 @@ DialogArc::DialogArc(const VContainer *data, Draw::Draws mode, QWidget *parent) connect(ui->lineEditF2, &QLineEdit::textChanged, this, &DialogArc::F2Changed); } -DialogArc::~DialogArc(){ +DialogArc::~DialogArc() +{ delete ui; } -void DialogArc::SetCenter(const qint64 &value){ +void DialogArc::SetCenter(const qint64 &value) +{ center = value; ChangeCurrentData(ui->comboBoxBasePoint, center); } -void DialogArc::SetF2(const QString &value){ +void DialogArc::SetF2(const QString &value) +{ f2 = value; ui->lineEditF2->setText(f2); } -void DialogArc::SetF1(const QString &value){ +void DialogArc::SetF1(const QString &value) +{ f1 = value; ui->lineEditF1->setText(f1); } -void DialogArc::SetRadius(const QString &value){ +void DialogArc::SetRadius(const QString &value) +{ radius = value; ui->lineEditRadius->setText(radius); } -void DialogArc::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogArc::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id)==false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } ChangeCurrentText(ui->comboBoxBasePoint, point.name()); @@ -126,7 +141,8 @@ void DialogArc::ChoosedObject(qint64 id, Scene::Scenes type){ } } -void DialogArc::DialogAccepted(){ +void DialogArc::DialogAccepted() +{ radius = ui->lineEditRadius->text(); f1 = ui->lineEditF1->text(); f2 = ui->lineEditF2->text(); @@ -134,12 +150,15 @@ void DialogArc::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogArc::ValChenged(int row){ - if(ui->listWidget->count() == 0){ +void DialogArc::ValChenged(int row) +{ + if (ui->listWidget->count() == 0) + { return; } QListWidgetItem *item = ui->listWidget->item( row ); - if(ui->radioButtonLineAngles->isChecked()){ + if (ui->radioButtonLineAngles->isChecked()) + { QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLineAngle(item->text())) .arg(tr("Value angle of line.")); ui->labelDescription->setText(desc); @@ -148,65 +167,78 @@ void DialogArc::ValChenged(int row){ DialogTool::ValChenged(row); } -void DialogArc::PutRadius(){ +void DialogArc::PutRadius() +{ PutValHere(ui->lineEditRadius, ui->listWidget); } -void DialogArc::PutF1(){ +void DialogArc::PutF1() +{ PutValHere(ui->lineEditF1, ui->listWidget); } -void DialogArc::PutF2(){ +void DialogArc::PutF2() +{ PutValHere(ui->lineEditF2, ui->listWidget); } -void DialogArc::LineAngles(){ +void DialogArc::LineAngles() +{ ShowLineAngles(); } -void DialogArc::RadiusChanged(){ +void DialogArc::RadiusChanged() +{ labelEditFormula = ui->labelEditRadius; ValFormulaChanged(flagRadius, ui->lineEditRadius, timerRadius); } -void DialogArc::F1Changed(){ +void DialogArc::F1Changed() +{ labelEditFormula = ui->labelEditF1; ValFormulaChanged(flagF1, ui->lineEditF1, timerF1); } -void DialogArc::F2Changed(){ +void DialogArc::F2Changed() +{ labelEditFormula = ui->labelEditF2; ValFormulaChanged(flagF2, ui->lineEditF2, timerF2); } -void DialogArc::CheckState(){ +void DialogArc::CheckState() +{ Q_ASSERT(bOk != 0); bOk->setEnabled(flagRadius && flagF1 && flagF2); } -void DialogArc::EvalRadius(){ +void DialogArc::EvalRadius() +{ labelEditFormula = ui->labelEditRadius; Eval(ui->lineEditRadius, flagRadius, timerRadius, ui->labelResultRadius); } -void DialogArc::EvalF1(){ +void DialogArc::EvalF1() +{ labelEditFormula = ui->labelEditF1; Eval(ui->lineEditF1, flagF1, timerF1, ui->labelResultF1); } -void DialogArc::EvalF2(){ +void DialogArc::EvalF2() +{ labelEditFormula = ui->labelEditF2; Eval(ui->lineEditF2, flagF2, timerF2, ui->labelResultF2); } -void DialogArc::ShowLineAngles(){ +void DialogArc::ShowLineAngles() +{ disconnect(ui->listWidget, &QListWidget::currentRowChanged, this, &DialogArc::ValChenged); ui->listWidget->clear(); connect(ui->listWidget, &QListWidget::currentRowChanged, this, &DialogArc::ValChenged); const QHash *lineAnglesTable = data->DataLineAngles(); Q_ASSERT(lineAnglesTable != 0); QHashIterator i(*lineAnglesTable); - while (i.hasNext()) { + while (i.hasNext()) + { i.next(); QListWidgetItem *item = new QListWidgetItem(i.key()); diff --git a/dialogs/dialogarc.h b/dialogs/dialogarc.h index 302737d50..c701ba582 100644 --- a/dialogs/dialogarc.h +++ b/dialogs/dialogarc.h @@ -24,11 +24,13 @@ #include "dialogtool.h" -namespace Ui { -class DialogArc; +namespace Ui +{ + class DialogArc; } -class DialogArc : public DialogTool{ +class DialogArc : public DialogTool +{ Q_OBJECT public: DialogArc(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); diff --git a/dialogs/dialogbisector.cpp b/dialogs/dialogbisector.cpp index e975b8559..afd97c41c 100644 --- a/dialogs/dialogbisector.cpp +++ b/dialogs/dialogbisector.cpp @@ -22,9 +22,10 @@ #include "dialogbisector.h" #include "ui_dialogbisector.h" -DialogBisector::DialogBisector(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogBisector), number(0), pointName(QString()), - typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0), thirdPointId(0){ +DialogBisector::DialogBisector(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogBisector), number(0), pointName(QString()), + typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0), thirdPointId(0) +{ ui->setupUi(this); listWidget = ui->listWidget; labelResultCalculation = ui->labelResultCalculation; @@ -66,89 +67,113 @@ DialogBisector::DialogBisector(const VContainer *data, Draw::Draws mode, QWidget connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogBisector::FormulaChanged); } -DialogBisector::~DialogBisector(){ +DialogBisector::~DialogBisector() +{ delete ui; } -void DialogBisector::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogBisector::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui->comboBoxFirstPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxFirstPoint->setCurrentIndex(index); number++; emit ToolTip(tr("Select second point of angle")); return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui->comboBoxSecondPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxSecondPoint->setCurrentIndex(index); number++; emit ToolTip(tr("Select third point of angle")); return; } } - if(number == 2){ + if (number == 2) + { qint32 index = ui->comboBoxThirdPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxThirdPoint->setCurrentIndex(index); number = 0; emit ToolTip(""); } - if(!isInitialized){ + if (isInitialized == false) + { this->show(); } } } } -void DialogBisector::setPointName(const QString &value){ +void DialogBisector::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } -void DialogBisector::setTypeLine(const QString &value){ +void DialogBisector::setTypeLine(const QString &value) +{ typeLine = value; SetupTypeLine(ui->comboBoxLineType, value); } -void DialogBisector::setFormula(const QString &value){ +void DialogBisector::setFormula(const QString &value) +{ formula = value; ui->lineEditFormula->setText(formula); } -void DialogBisector::setFirstPointId(const qint64 &value, const qint64 &id){ +void DialogBisector::setFirstPointId(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); } -void DialogBisector::setSecondPointId(const qint64 &value, const qint64 &id){ +void DialogBisector::setSecondPointId(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); } -void DialogBisector::setThirdPointId(const qint64 &value, const qint64 &id){ +void DialogBisector::setThirdPointId(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxThirdPoint, thirdPointId, value, id); } -void DialogBisector::DialogAccepted(){ +void DialogBisector::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); typeLine = GetTypeLine(ui->comboBoxLineType); formula = ui->lineEditFormula->text(); diff --git a/dialogs/dialogbisector.h b/dialogs/dialogbisector.h index 87b409421..c9b0260dc 100644 --- a/dialogs/dialogbisector.h +++ b/dialogs/dialogbisector.h @@ -24,13 +24,14 @@ #include "dialogtool.h" -namespace Ui { -class DialogBisector; +namespace Ui +{ + class DialogBisector; } -class DialogBisector : public DialogTool{ +class DialogBisector : public DialogTool +{ Q_OBJECT - public: explicit DialogBisector(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); diff --git a/dialogs/dialogdetail.cpp b/dialogs/dialogdetail.cpp index fb66961c5..add670998 100644 --- a/dialogs/dialogdetail.cpp +++ b/dialogs/dialogdetail.cpp @@ -21,8 +21,9 @@ #include "dialogdetail.h" -DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(), details(VDetail()), supplement(true), closed(true){ +DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(), details(VDetail()), supplement(true), closed(true) +{ ui.setupUi(this); labelEditNamePoint = ui.labelEditNameDetail; bOk = ui.buttonBox->button(QDialogButtonBox::Ok); @@ -42,43 +43,52 @@ DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *pa connect(ui.lineEditNameDetail, &QLineEdit::textChanged, this, &DialogDetail::NamePointChanged); } -void DialogDetail::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogDetail::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type != Scene::Line && type != Scene::Detail){ - switch(type){ - case(Scene::Arc): - NewItem(id, Tool::NodeArc, mode, NodeDetail::Contour); - break; - case(Scene::Point): - NewItem(id, Tool::NodePoint, mode, NodeDetail::Contour); - break; - case(Scene::Spline): - NewItem(id, Tool::NodeSpline, mode, NodeDetail::Contour); - break; - case(Scene::SplinePath): - NewItem(id, Tool::NodeSplinePath, mode, NodeDetail::Contour); - break; - default: - qWarning()<show(); } } -void DialogDetail::DialogAccepted(){ +void DialogDetail::DialogAccepted() +{ details.Clear(); - for(qint32 i = 0; i < ui.listWidget->count(); ++i){ + for (qint32 i = 0; i < ui.listWidget->count(); ++i) + { QListWidgetItem *item = ui.listWidget->item(i); details.append( qvariant_cast(item->data(Qt::UserRole))); } @@ -90,53 +100,71 @@ void DialogDetail::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogDetail::NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, qreal mx, - qreal my){ +void DialogDetail::NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, + qreal mx, qreal my) +{ QString name; - switch(typeTool){ - case(Tool::NodePoint):{ - VPointF point; - if(mode == Draw::Calculation){ - point = data->GetPoint(id); - } else { - point = data->GetModelingPoint(id); + switch (typeTool) + { + case (Tool::NodePoint): + { + VPointF point; + if (mode == Draw::Calculation) + { + point = data->GetPoint(id); + } + else + { + point = data->GetModelingPoint(id); + } + name = point.name(); + break; } - name = point.name(); - break; - } - case(Tool::NodeArc):{ - VArc arc; - if(mode == Draw::Calculation){ - arc = data->GetArc(id); - } else { - arc = data->GetModelingArc(id); + case (Tool::NodeArc): + { + VArc arc; + if (mode == Draw::Calculation) + { + arc = data->GetArc(id); + } + else + { + arc = data->GetModelingArc(id); + } + name = data->GetNameArc(arc.GetCenter(), id, mode); + break; } - name = data->GetNameArc(arc.GetCenter(), id, mode); - break; - } - case(Tool::NodeSpline):{ - VSpline spl; - if(mode == Draw::Calculation){ - spl = data->GetSpline(id); - } else { - spl = data->GetModelingSpline(id); + case (Tool::NodeSpline): + { + VSpline spl; + if (mode == Draw::Calculation) + { + spl = data->GetSpline(id); + } + else + { + spl = data->GetModelingSpline(id); + } + name = spl.GetName(); + break; } - name = spl.GetName(); - break; - } - case(Tool::NodeSplinePath):{ - VSplinePath splPath; - if(mode == Draw::Calculation){ - splPath = data->GetSplinePath(id); - } else { - splPath = data->GetModelingSplinePath(id); + case (Tool::NodeSplinePath): + { + VSplinePath splPath; + if (mode == Draw::Calculation) + { + splPath = data->GetSplinePath(id); + } + else + { + splPath = data->GetModelingSplinePath(id); + } + name = data->GetNameSplinePath(splPath, mode); + break; } - name = data->GetNameSplinePath(splPath, mode); - break; - } - default: - qWarning()<clear(); - for(qint32 i = 0; i < details.CountNode(); ++i){ - NewItem(details[i].getId(), details[i].getTypeTool(), details[i].getMode(), details[i].getTypeNode(), details[i].getMx(), - details[i].getMy()); + for (qint32 i = 0; i < details.CountNode(); ++i) + { + NewItem(details[i].getId(), details[i].getTypeTool(), details[i].getMode(), details[i].getTypeNode(), + details[i].getMx(), details[i].getMy()); } ui.lineEditNameDetail->setText(details.getName()); ui.checkBoxSeams->setChecked(details.getSupplement()); @@ -171,7 +201,8 @@ void DialogDetail::setDetails(const VDetail &value){ ui.listWidget->setFocus(Qt::OtherFocusReason); } -void DialogDetail::BiasXChanged(qreal d){ +void DialogDetail::BiasXChanged(qreal d) +{ qint32 row = ui.listWidget->currentRow(); QListWidgetItem *item = ui.listWidget->item( row ); VNodeDetail node = qvariant_cast(item->data(Qt::UserRole)); @@ -179,7 +210,8 @@ void DialogDetail::BiasXChanged(qreal d){ item->setData(Qt::UserRole, QVariant::fromValue(node)); } -void DialogDetail::BiasYChanged(qreal d){ +void DialogDetail::BiasYChanged(qreal d) +{ qint32 row = ui.listWidget->currentRow(); QListWidgetItem *item = ui.listWidget->item( row ); VNodeDetail node = qvariant_cast(item->data(Qt::UserRole)); @@ -187,18 +219,22 @@ void DialogDetail::BiasYChanged(qreal d){ item->setData(Qt::UserRole, QVariant::fromValue(node)); } -void DialogDetail::ClickedSeams(bool checked){ +void DialogDetail::ClickedSeams(bool checked) +{ supplement = checked; ui.checkBoxClosed->setEnabled(checked); ui.doubleSpinBoxSeams->setEnabled(checked); } -void DialogDetail::ClickedClosed(bool checked){ +void DialogDetail::ClickedClosed(bool checked) +{ closed = checked; } -void DialogDetail::ObjectChanged(int row){ - if(ui.listWidget->count() == 0){ +void DialogDetail::ObjectChanged(int row) +{ + if (ui.listWidget->count() == 0) + { return; } QListWidgetItem *item = ui.listWidget->item( row ); diff --git a/dialogs/dialogdetail.h b/dialogs/dialogdetail.h index 43a518e90..8a6a12cdf 100644 --- a/dialogs/dialogdetail.h +++ b/dialogs/dialogdetail.h @@ -25,8 +25,9 @@ #include "ui_dialogdetail.h" #include "dialogtool.h" -class DialogDetail : public DialogTool{ - Q_OBJECT +class DialogDetail : public DialogTool +{ + Q_OBJECT public: DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent = 0); inline VDetail getDetails() const {return details;} @@ -44,8 +45,8 @@ private: VDetail details; bool supplement; bool closed; - void NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, qreal mx = 0, - qreal my = 0); + void NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, + qreal mx = 0, qreal my = 0); }; #endif // DIALOGDETAIL_H diff --git a/dialogs/dialogendline.cpp b/dialogs/dialogendline.cpp index 011784d5c..9770166b0 100644 --- a/dialogs/dialogendline.cpp +++ b/dialogs/dialogendline.cpp @@ -22,9 +22,10 @@ #include "dialogendline.h" #include "ui_dialogendline.h" -DialogEndLine::DialogEndLine(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogEndLine), pointName(QString()), typeLine(QString()), - formula(QString()), angle(0), basePointId(0){ +DialogEndLine::DialogEndLine(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogEndLine), pointName(QString()), typeLine(QString()), + formula(QString()), angle(0), basePointId(0) +{ ui->setupUi(this); spinBoxAngle = ui->doubleSpinBoxAngle; listWidget = ui->listWidget; @@ -81,23 +82,32 @@ DialogEndLine::DialogEndLine(const VContainer *data, Draw::Draws mode, QWidget * connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogEndLine::FormulaChanged); } -void DialogEndLine::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogEndLine::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } ChangeCurrentText(ui->comboBoxBasePoint, point.name()); @@ -106,31 +116,37 @@ void DialogEndLine::ChoosedObject(qint64 id, Scene::Scenes type){ } } -void DialogEndLine::setPointName(const QString &value){ +void DialogEndLine::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } -void DialogEndLine::setTypeLine(const QString &value){ +void DialogEndLine::setTypeLine(const QString &value) +{ typeLine = value; SetupTypeLine(ui->comboBoxLineType, value); } -void DialogEndLine::setFormula(const QString &value){ +void DialogEndLine::setFormula(const QString &value) +{ formula = value; ui->lineEditFormula->setText(formula); } -void DialogEndLine::setAngle(const qreal &value){ +void DialogEndLine::setAngle(const qreal &value) +{ angle = value; ui->doubleSpinBoxAngle->setValue(angle); } -void DialogEndLine::setBasePointId(const qint64 &value, const qint64 &id){ +void DialogEndLine::setBasePointId(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id); } -void DialogEndLine::DialogAccepted(){ +void DialogEndLine::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); typeLine = GetTypeLine(ui->comboBoxLineType); formula = ui->lineEditFormula->text(); @@ -139,6 +155,7 @@ void DialogEndLine::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -DialogEndLine::~DialogEndLine(){ +DialogEndLine::~DialogEndLine() +{ delete ui; } diff --git a/dialogs/dialogendline.h b/dialogs/dialogendline.h index 4996f8fb8..489d264c4 100644 --- a/dialogs/dialogendline.h +++ b/dialogs/dialogendline.h @@ -24,15 +24,16 @@ #include "dialogtool.h" -namespace Ui { -class DialogEndLine; +namespace Ui +{ + class DialogEndLine; } -class DialogEndLine : public DialogTool{ - Q_OBJECT +class DialogEndLine : public DialogTool +{ + Q_OBJECT public: - explicit DialogEndLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, - QWidget *parent = 0); + DialogEndLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogEndLine(); inline QString getPointName() const {return pointName;} void setPointName(const QString &value); diff --git a/dialogs/dialogheight.cpp b/dialogs/dialogheight.cpp index 7024d94c1..4fdaa9761 100644 --- a/dialogs/dialogheight.cpp +++ b/dialogs/dialogheight.cpp @@ -1,9 +1,10 @@ #include "dialogheight.h" #include "ui_dialogheight.h" -DialogHeight::DialogHeight(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogHeight), number(0), pointName(QString()), - typeLine(QString()), basePointId(0), p1LineId(0), p2LineId(0){ +DialogHeight::DialogHeight(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogHeight), number(0), pointName(QString()), + typeLine(QString()), basePointId(0), p1LineId(0), p2LineId(0) +{ ui->setupUi(this); labelEditNamePoint = ui->labelEditNamePoint; bOk = ui->buttonBox->button(QDialogButtonBox::Ok); @@ -19,78 +20,96 @@ DialogHeight::DialogHeight(const VContainer *data, Draw::Draws mode, QWidget *pa connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogHeight::NamePointChanged); } -DialogHeight::~DialogHeight(){ +DialogHeight::~DialogHeight() +{ delete ui; } -void DialogHeight::setPointName(const QString &value){ +void DialogHeight::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } -void DialogHeight::setTypeLine(const QString &value){ +void DialogHeight::setTypeLine(const QString &value) +{ typeLine = value; SetupTypeLine(ui->comboBoxLineType, value); } -void DialogHeight::setBasePointId(const qint64 &value, const qint64 &id){ +void DialogHeight::setBasePointId(const qint64 &value, const qint64 &id) +{ basePointId = value; setCurrentPointId(ui->comboBoxBasePoint, basePointId, value, id); } -void DialogHeight::setP1LineId(const qint64 &value, const qint64 &id){ +void DialogHeight::setP1LineId(const qint64 &value, const qint64 &id) +{ p1LineId = value; setCurrentPointId(ui->comboBoxP1Line, p1LineId, value, id); } -void DialogHeight::setP2LineId(const qint64 &value, const qint64 &id){ +void DialogHeight::setP2LineId(const qint64 &value, const qint64 &id) +{ p2LineId = value; setCurrentPointId(ui->comboBoxP2Line, p2LineId, value, id); } -void DialogHeight::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogHeight::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - switch(number){ - case(0): - ChangeCurrentText(ui->comboBoxBasePoint, point.name()); - number++; - emit ToolTip(tr("Select first point of line")); - break; - case(1): - ChangeCurrentText(ui->comboBoxP1Line, point.name()); - number++; - emit ToolTip(tr("Select second point of line")); - break; - case(2): - ChangeCurrentText(ui->comboBoxP2Line, point.name()); - number = 0; - emit ToolTip(tr("")); - if(!isInitialized){ - this->show(); - } - break; + switch (number) + { + case (0): + ChangeCurrentText(ui->comboBoxBasePoint, point.name()); + number++; + emit ToolTip(tr("Select first point of line")); + break; + case (1): + ChangeCurrentText(ui->comboBoxP1Line, point.name()); + number++; + emit ToolTip(tr("Select second point of line")); + break; + case (2): + ChangeCurrentText(ui->comboBoxP2Line, point.name()); + number = 0; + emit ToolTip(tr("")); + if (isInitialized == false) + { + this->show(); + } + break; } } } -void DialogHeight::DialogAccepted(){ +void DialogHeight::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); typeLine = GetTypeLine(ui->comboBoxLineType); basePointId = getCurrentPointId(ui->comboBoxBasePoint); @@ -98,4 +117,3 @@ void DialogHeight::DialogAccepted(){ p2LineId = getCurrentPointId(ui->comboBoxP2Line); emit DialogClosed(QDialog::Accepted); } - diff --git a/dialogs/dialogheight.h b/dialogs/dialogheight.h index 933b2d786..e737ad5a3 100644 --- a/dialogs/dialogheight.h +++ b/dialogs/dialogheight.h @@ -24,14 +24,16 @@ #include "dialogtool.h" -namespace Ui { -class DialogHeight; +namespace Ui +{ + class DialogHeight; } -class DialogHeight : public DialogTool{ +class DialogHeight : public DialogTool +{ Q_OBJECT public: - explicit DialogHeight(const VContainer *data, Draw::Draws mode = Draw::Calculation, + DialogHeight(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogHeight(); inline QString getPointName() const {return pointName;} diff --git a/dialogs/dialoghistory.cpp b/dialogs/dialoghistory.cpp index 80b71d293..8b175b3f5 100644 --- a/dialogs/dialoghistory.cpp +++ b/dialogs/dialoghistory.cpp @@ -26,9 +26,10 @@ #include "geometry/vsplinepath.h" #include -DialogHistory::DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent) : - DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogHistory), doc(doc), cursorRow(0), - cursorToolRecordRow(0){ +DialogHistory::DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent) + :DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogHistory), doc(doc), cursorRow(0), + cursorToolRecordRow(0) +{ ui->setupUi(this); bOk = ui->buttonBox->button(QDialogButtonBox::Ok); connect(bOk, &QPushButton::clicked, this, &DialogHistory::DialogAccepted); @@ -42,19 +43,23 @@ DialogHistory::DialogHistory(VContainer *data, VDomDocument *doc, QWidget *paren ShowPoint(); } -DialogHistory::~DialogHistory(){ +DialogHistory::~DialogHistory() +{ delete ui; } -void DialogHistory::DialogAccepted(){ +void DialogHistory::DialogAccepted() +{ QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0); qint64 id = qvariant_cast(item->data(Qt::UserRole)); emit ShowHistoryTool(id, Qt::green, false); emit DialogClosed(QDialog::Accepted); } -void DialogHistory::cellClicked(int row, int column){ - if(column == 0){ +void DialogHistory::cellClicked(int row, int column) +{ + if (column == 0) + { QTableWidgetItem *item = ui->tableWidget->item(cursorRow, 0); item->setIcon(QIcon()); @@ -65,7 +70,9 @@ void DialogHistory::cellClicked(int row, int column){ disconnect(doc, &VDomDocument::ChangedCursor, this, &DialogHistory::ChangedCursor); doc->setCursor(id); connect(doc, &VDomDocument::ChangedCursor, this, &DialogHistory::ChangedCursor); - } else { + } + else + { QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0); qint64 id = qvariant_cast(item->data(Qt::UserRole)); emit ShowHistoryTool(id, Qt::green, false); @@ -77,11 +84,14 @@ void DialogHistory::cellClicked(int row, int column){ } } -void DialogHistory::ChangedCursor(qint64 id){ - for(qint32 i = 0; i< ui->tableWidget->rowCount(); ++i){ +void DialogHistory::ChangedCursor(qint64 id) +{ + for (qint32 i = 0; i< ui->tableWidget->rowCount(); ++i) + { QTableWidgetItem *item = ui->tableWidget->item(i, 0); qint64 rId = qvariant_cast(item->data(Qt::UserRole)); - if(rId == id){ + if (rId == id) + { QTableWidgetItem *oldCursorItem = ui->tableWidget->item(cursorRow, 0); oldCursorItem->setIcon(QIcon()); cursorRow = i; @@ -90,20 +100,24 @@ void DialogHistory::ChangedCursor(qint64 id){ } } -void DialogHistory::UpdateHistory(){ +void DialogHistory::UpdateHistory() +{ FillTable(); InitialTable(); } -void DialogHistory::FillTable(){ +void DialogHistory::FillTable() +{ ui->tableWidget->clear(); QVector *history = doc->getHistory(); qint32 currentRow = -1; qint32 count = 0; ui->tableWidget->setRowCount(history->size()); - for(qint32 i = 0; i< history->size(); ++i){ + for (qint32 i = 0; i< history->size(); ++i) + { VToolRecord tool = history->at(i); - if(tool.getNameDraw() != doc->GetNameActivDraw()){ + if (tool.getNameDraw() != doc->GetNameActivDraw()) + { continue; } currentRow++; @@ -121,7 +135,8 @@ void DialogHistory::FillTable(){ ++count; } ui->tableWidget->setRowCount(count); - if(history->size()>0){ + if (history->size()>0) + { cursorRow = currentRow; QTableWidgetItem *item = ui->tableWidget->item(cursorRow, 0); item->setIcon(QIcon("://icon/32x32/put_after.png")); @@ -131,7 +146,8 @@ void DialogHistory::FillTable(){ ui->tableWidget->verticalHeader()->setDefaultSectionSize(20); } -QString DialogHistory::Record(const VToolRecord &tool){ +QString DialogHistory::Record(const VToolRecord &tool) +{ QString record = QString(); qint64 basePointId = 0; qint64 secondPointId = 0; @@ -143,7 +159,8 @@ QString DialogHistory::Record(const VToolRecord &tool){ qint64 p2Line2 = 0; qint64 center = 0; QDomElement domElement; - switch( tool.getTypeTool() ){ + switch ( tool.getTypeTool() ) + { case Tool::ArrowTool: break; case Tool::SinglePointTool: @@ -151,7 +168,8 @@ QString DialogHistory::Record(const VToolRecord &tool){ break; case Tool::EndLineTool: domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { basePointId = domElement.attribute("basePoint", "").toLongLong(); } record = QString(tr("%1_%2 - Line from point %1 to point %2")).arg(data->GetPoint(basePointId).name(), @@ -159,7 +177,8 @@ QString DialogHistory::Record(const VToolRecord &tool){ break; case Tool::LineTool: domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { firstPointId = domElement.attribute("firstPoint", "").toLongLong(); secondPointId = domElement.attribute("secondPoint", "").toLongLong(); } @@ -168,7 +187,8 @@ QString DialogHistory::Record(const VToolRecord &tool){ break; case Tool::AlongLineTool: domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { basePointId = domElement.attribute("firstPoint", "").toLongLong(); secondPointId = domElement.attribute("secondPoint", "").toLongLong(); } @@ -181,7 +201,8 @@ QString DialogHistory::Record(const VToolRecord &tool){ break; case Tool::NormalTool: domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { basePointId = domElement.attribute("firstPoint", "").toLongLong(); secondPointId = domElement.attribute("secondPoint", "").toLongLong(); } @@ -191,7 +212,8 @@ QString DialogHistory::Record(const VToolRecord &tool){ break; case Tool::BisectorTool: domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { firstPointId = domElement.attribute("firstPoint", "").toLongLong(); basePointId = domElement.attribute("secondPoint", "").toLongLong(); thirdPointId = domElement.attribute("thirdPoint", "").toLongLong(); @@ -203,7 +225,8 @@ QString DialogHistory::Record(const VToolRecord &tool){ break; case Tool::LineIntersectTool: domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { p1Line1 = domElement.attribute("p1Line1", "").toLongLong(); p2Line1 = domElement.attribute("p2Line1", "").toLongLong(); p1Line2 = domElement.attribute("p1Line2", "").toLongLong(); @@ -213,69 +236,78 @@ QString DialogHistory::Record(const VToolRecord &tool){ data->GetPoint(p2Line1).name(), data->GetPoint(p1Line2).name(), data->GetPoint(p2Line2).name(), - data->GetPoint(tool.getId()).name()); + data->GetPoint(tool.getId()).name()); break; - case Tool::SplineTool:{ + case Tool::SplineTool: + { VSpline spl = data->GetSpline(tool.getId()); record = QString(tr("Curve %1_%2")).arg(data->GetPoint(spl.GetP1()).name(), data->GetPoint(spl.GetP4()).name()); } break; - case Tool::ArcTool:{ + case Tool::ArcTool: + { VArc arc = data->GetArc(tool.getId()); record = QString(tr("Arc with center in point %1")).arg(data->GetPoint(arc.GetCenter()).name()); } break; - case Tool::SplinePathTool:{ + case Tool::SplinePathTool: + { VSplinePath splPath = data->GetSplinePath(tool.getId()); QVector points = splPath.GetSplinePath(); - if(points.size() != 0 ){ + if (points.size() != 0 ) + { record = QString(tr("Curve point %1")).arg(data->GetPoint(points[0].P()).name()); - for(qint32 i = 1; i< points.size(); ++i){ + for (qint32 i = 1; i< points.size(); ++i) + { QString name = QString("_%1").arg(data->GetPoint(points[i].P()).name()); record.append(name); } } } - break; + break; case Tool::PointOfContact: domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { center = domElement.attribute("center", "").toLongLong(); firstPointId = domElement.attribute("firstPoint", "").toLongLong(); secondPointId = domElement.attribute("secondPoint", "").toLongLong(); } - record = QString(tr("%4 - Point of contact arc with center in point %1 and line %2_%3")).arg(data->GetPoint(center).name(), - data->GetPoint(firstPointId).name(), - data->GetPoint(secondPointId).name(), - data->GetPoint(tool.getId()).name()); + record = QString(tr("%4 - Point of contact arc with center in point %1 and line %2_%3")).arg( + data->GetPoint(center).name(), data->GetPoint(firstPointId).name(), + data->GetPoint(secondPointId).name(), data->GetPoint(tool.getId()).name()); break; - case Tool::Height:{ + case Tool::Height: + { qint64 p1LineId = 0; qint64 p2LineId = 0; domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { basePointId = domElement.attribute("basePoint", "").toLongLong(); p1LineId = domElement.attribute("p1Line", "").toLongLong(); p2LineId = domElement.attribute("p2Line", "").toLongLong(); } - record = QString(tr("Point of perpendical from point %1 to line %2_%3")).arg(data->GetPoint(basePointId).name(), - data->GetPoint(p1LineId).name(), - data->GetPoint(p2LineId).name()); + record = QString(tr("Point of perpendical from point %1 to line %2_%3")).arg( + data->GetPoint(basePointId).name(), data->GetPoint(p1LineId).name(), + data->GetPoint(p2LineId).name()); break; } - case Tool::Triangle:{ + case Tool::Triangle: + { qint64 axisP1Id = 0; qint64 axisP2Id = 0; domElement = doc->elementById(QString().setNum(tool.getId())); - if(domElement.isElement()){ + if (domElement.isElement()) + { axisP1Id = domElement.attribute("axisP1", "").toLongLong(); axisP2Id = domElement.attribute("axisP2", "").toLongLong(); firstPointId = domElement.attribute("firstPoint", "").toLongLong(); secondPointId = domElement.attribute("secondPoint", "").toLongLong(); } record = QString(tr("Triangle: axis %1_%2, points %3 and %4")).arg( - data->GetPoint(axisP1Id).name(),data->GetPoint(axisP2Id).name(), + data->GetPoint(axisP1Id).name(), data->GetPoint(axisP2Id).name(), data->GetPoint(firstPointId).name(), data->GetPoint(secondPointId).name()); break; } @@ -286,15 +318,18 @@ QString DialogHistory::Record(const VToolRecord &tool){ return record; } -void DialogHistory::InitialTable(){ +void DialogHistory::InitialTable() +{ ui->tableWidget->setSortingEnabled(false); ui->tableWidget->setHorizontalHeaderItem(0, new QTableWidgetItem(" ")); ui->tableWidget->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Tool"))); } -void DialogHistory::ShowPoint(){ +void DialogHistory::ShowPoint() +{ QVector *history = doc->getHistory(); - if(history->size()>0){ + if (history->size()>0) + { QTableWidgetItem *item = ui->tableWidget->item(0, 1); item->setSelected(true); cursorToolRecordRow = 0; @@ -304,7 +339,8 @@ void DialogHistory::ShowPoint(){ } } -void DialogHistory::closeEvent(QCloseEvent *event){ +void DialogHistory::closeEvent(QCloseEvent *event) +{ QTableWidgetItem *item = ui->tableWidget->item(cursorToolRecordRow, 0); qint64 id = qvariant_cast(item->data(Qt::UserRole)); emit ShowHistoryTool(id, Qt::green, false); diff --git a/dialogs/dialoghistory.h b/dialogs/dialoghistory.h index bd650452e..c3b51156c 100644 --- a/dialogs/dialoghistory.h +++ b/dialogs/dialoghistory.h @@ -25,11 +25,13 @@ #include "dialogtool.h" #include "xml/vdomdocument.h" -namespace Ui { -class DialogHistory; +namespace Ui +{ + class DialogHistory; } -class DialogHistory : public DialogTool{ +class DialogHistory : public DialogTool +{ Q_OBJECT public: DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent = 0); diff --git a/dialogs/dialogincrements.cpp b/dialogs/dialogincrements.cpp index 86f2348c6..0dd5e7298 100644 --- a/dialogs/dialogincrements.cpp +++ b/dialogs/dialogincrements.cpp @@ -24,9 +24,9 @@ #include #include -DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent) : - DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), - row(0), column(0){ +DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent) + :DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), row(0), column(0) +{ ui->setupUi(this); InitialStandartTable(); InitialIncrementTable(); @@ -58,12 +58,14 @@ DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget ui->tabWidget->setCurrentIndex(0); } -void DialogIncrements::FillStandartTable(){ +void DialogIncrements::FillStandartTable() +{ const QHash *standartTable = data->DataStandartTable(); qint32 currentRow = -1; QHashIterator i(*standartTable); ui->tableWidgetStandart->setRowCount ( standartTable->size() ); - while (i.hasNext()) { + while (i.hasNext()) + { i.next(); VStandartTableCell cell = i.value(); currentRow++; @@ -98,12 +100,14 @@ void DialogIncrements::FillStandartTable(){ ui->tableWidgetStandart->verticalHeader()->setDefaultSectionSize(20); } -void DialogIncrements::FillIncrementTable(){ +void DialogIncrements::FillIncrementTable() +{ const QHash *incrementTable = data->DataIncrementTable(); QHashIterator i(*incrementTable); QMap map; //Sorting QHash by id - while (i.hasNext()) { + while (i.hasNext()) + { i.next(); VIncrementTableRow cell = i.value(); map.insert(cell.getId(), i.key()); @@ -111,7 +115,8 @@ void DialogIncrements::FillIncrementTable(){ qint32 currentRow = -1; QMapIterator iMap(map); - while (iMap.hasNext()) { + while (iMap.hasNext()) + { iMap.next(); VIncrementTableRow cell = incrementTable->value(iMap.value()); currentRow++; @@ -147,7 +152,8 @@ void DialogIncrements::FillIncrementTable(){ item->setTextAlignment(Qt::AlignLeft); ui->tableWidgetIncrement->setItem(currentRow, 5, item); } - if(ui->tableWidgetIncrement->rowCount()>0){ + if (ui->tableWidgetIncrement->rowCount()>0) + { ui->toolButtonRemove->setEnabled(true); } ui->tableWidgetIncrement->resizeColumnsToContents(); @@ -155,19 +161,22 @@ void DialogIncrements::FillIncrementTable(){ ui->tableWidgetIncrement->setCurrentCell( row, column ); } -void DialogIncrements::FillLengthLines(){ +void DialogIncrements::FillLengthLines() +{ const QHash *linesTable = data->DataLengthLines(); QHashIterator iHash(*linesTable); QMap map; //Sorting QHash by name - while (iHash.hasNext()) { + while (iHash.hasNext()) + { iHash.next(); map.insert(iHash.key(), iHash.value()); } qint32 currentRow = -1; QMapIterator i(map); - while (i.hasNext()) { + while (i.hasNext()) + { i.next(); qreal length = i.value(); currentRow++; @@ -187,19 +196,22 @@ void DialogIncrements::FillLengthLines(){ ui->tableWidgetLines->verticalHeader()->setDefaultSectionSize(20); } -void DialogIncrements::FillLengthSplines(){ +void DialogIncrements::FillLengthSplines() +{ const QHash *splinesTable = data->DataLengthSplines(); QHashIterator iHash(*splinesTable); QMap map; //Sorting QHash by name - while (iHash.hasNext()) { + while (iHash.hasNext()) + { iHash.next(); map.insert(iHash.key(), iHash.value()); } qint32 currentRow = -1; QMapIterator i(map); - while (i.hasNext()) { + while (i.hasNext()) + { i.next(); qreal length = i.value(); currentRow++; @@ -219,19 +231,22 @@ void DialogIncrements::FillLengthSplines(){ ui->tableWidgetSplines->verticalHeader()->setDefaultSectionSize(20); } -void DialogIncrements::FillLengthArcs(){ +void DialogIncrements::FillLengthArcs() +{ const QHash *arcsTable = data->DataLengthArcs(); QHashIterator iHash(*arcsTable); QMap map; //Sorting QHash by name - while (iHash.hasNext()) { + while (iHash.hasNext()) + { iHash.next(); map.insert(iHash.key(), iHash.value()); } qint32 currentRow = -1; QMapIterator i(map); - while (i.hasNext()) { + while (i.hasNext()) + { i.next(); qreal length = i.value(); currentRow++; @@ -251,7 +266,8 @@ void DialogIncrements::FillLengthArcs(){ ui->tableWidgetArcs->verticalHeader()->setDefaultSectionSize(20); } -void DialogIncrements::FullUpdateFromFile(){ +void DialogIncrements::FullUpdateFromFile() +{ disconnect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::cellChanged); @@ -279,7 +295,8 @@ void DialogIncrements::FullUpdateFromFile(){ &DialogIncrements::cellChanged); } -void DialogIncrements::clickedToolButtonAdd(){ +void DialogIncrements::clickedToolButtonAdd() +{ disconnect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::cellChanged); ui->tableWidgetIncrement->setFocus(Qt::OtherFocusReason); @@ -288,10 +305,11 @@ void DialogIncrements::clickedToolButtonAdd(){ qint32 num = 1; QString name; - do{ + do + { name = QString(tr("Denotation %1")).arg(num); num++; - }while(data->IncrementTableContains(name)); + } while (data->IncrementTableContains(name)); qint64 id = data->getNextId(); qreal base = 0; @@ -340,7 +358,8 @@ void DialogIncrements::clickedToolButtonAdd(){ emit haveLiteChange(); } -void DialogIncrements::clickedToolButtonRemove(){ +void DialogIncrements::clickedToolButtonRemove() +{ disconnect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, &DialogIncrements::cellChanged); QTableWidgetItem *item = ui->tableWidgetIncrement->currentItem(); @@ -349,12 +368,14 @@ void DialogIncrements::clickedToolButtonRemove(){ data->RemoveIncrementTableRow(itemName->text()); qint64 id = qvariant_cast(item->data(Qt::UserRole)); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { QDomNodeList list = doc->elementsByTagName("increments"); list.at(0).removeChild(domElement); } ui->tableWidgetIncrement->removeRow(row); - if(ui->tableWidgetIncrement->rowCount() == 0){ + if (ui->tableWidgetIncrement->rowCount() == 0) + { ui->toolButtonRemove->setEnabled(false); } connect(ui->tableWidgetIncrement, &QTableWidget::cellChanged, this, @@ -362,8 +383,9 @@ void DialogIncrements::clickedToolButtonRemove(){ emit haveLiteChange(); } -void DialogIncrements::AddIncrementToFile(qint64 id, QString name, qreal base, qreal ksize, - qreal kgrowth, QString description){ +void DialogIncrements::AddIncrementToFile(qint64 id, QString name, qreal base, qreal ksize, qreal kgrowth, + QString description) +{ QDomNodeList list = doc->elementsByTagName("increments"); QDomElement element = doc->createElement("increment"); @@ -394,18 +416,21 @@ void DialogIncrements::AddIncrementToFile(qint64 id, QString name, qreal base, q list.at(0).appendChild(element); } -void DialogIncrements::cellChanged ( qint32 row, qint32 column ){ +void DialogIncrements::cellChanged ( qint32 row, qint32 column ) +{ QTableWidgetItem *item = 0; QTableWidgetItem *itemName = 0; qint64 id; QDomElement domElement; this->row = row; - switch(column) { + switch (column) + { case 0: item = ui->tableWidgetIncrement->item(row, 0); id = qvariant_cast(item->data(Qt::UserRole)); domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute("name", item->text()); data->ClearIncrementTable(); this->column = 2; @@ -417,14 +442,18 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ){ item = ui->tableWidgetIncrement->item(row, column); id = qvariant_cast(itemName->data(Qt::UserRole)); domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { bool ok = false; qreal value = item->text().toDouble(&ok); - if(ok){ + if (ok) + { domElement.setAttribute("base", value); this->column = 3; emit FullUpdateTree(); - } else { + } + else + { throw VException(tr("Can't convert toDouble value.")); } } @@ -434,7 +463,8 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ){ item = ui->tableWidgetIncrement->item(row, column); id = qvariant_cast(itemName->data(Qt::UserRole)); domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute("ksize", item->text().toDouble()); this->column = 4; emit FullUpdateTree(); @@ -445,7 +475,8 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ){ item = ui->tableWidgetIncrement->item(row, column); id = qvariant_cast(itemName->data(Qt::UserRole)); domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute("kgrowth", item->text().toDouble()); this->column = 5; emit FullUpdateTree(); @@ -456,7 +487,8 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ){ item = ui->tableWidgetIncrement->item(row, column); id = qvariant_cast(itemName->data(Qt::UserRole)); domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute("description", item->text()); VIncrementTableRow incr = data->GetIncrementTableRow(itemName->text()); incr.setDescription(item->text()); @@ -470,7 +502,8 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ){ } } -void DialogIncrements::InitialStandartTable(){ +void DialogIncrements::InitialStandartTable() +{ ui->tableWidgetStandart->setSortingEnabled(false); ui->tableWidgetStandart->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Denotation"))); ui->tableWidgetStandart->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Calculated value"))); @@ -480,7 +513,8 @@ void DialogIncrements::InitialStandartTable(){ ui->tableWidgetStandart->setHorizontalHeaderItem(5, new QTableWidgetItem(tr("Description"))); } -void DialogIncrements::InitialIncrementTable(){ +void DialogIncrements::InitialIncrementTable() +{ ui->tableWidgetIncrement->setSortingEnabled(false); ui->tableWidgetIncrement->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Denotation"))); ui->tableWidgetIncrement->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Calculated value"))); @@ -491,25 +525,30 @@ void DialogIncrements::InitialIncrementTable(){ ui->tableWidgetIncrement->verticalHeader()->setDefaultSectionSize(20); } -void DialogIncrements::InitialLinesTable(){ +void DialogIncrements::InitialLinesTable() +{ ui->tableWidgetLines->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Line"))); ui->tableWidgetLines->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Length"))); } -void DialogIncrements::InitialSplinesTable(){ +void DialogIncrements::InitialSplinesTable() +{ ui->tableWidgetSplines->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Curve"))); ui->tableWidgetSplines->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Length"))); } -void DialogIncrements::InitialArcsTable(){ +void DialogIncrements::InitialArcsTable() +{ ui->tableWidgetArcs->setHorizontalHeaderItem(0, new QTableWidgetItem(tr("Arc"))); ui->tableWidgetArcs->setHorizontalHeaderItem(1, new QTableWidgetItem(tr("Length"))); } -void DialogIncrements::DialogAccepted(){ +void DialogIncrements::DialogAccepted() +{ emit DialogClosed(QDialog::Accepted); } -DialogIncrements::~DialogIncrements(){ +DialogIncrements::~DialogIncrements() +{ delete ui; } diff --git a/dialogs/dialogincrements.h b/dialogs/dialogincrements.h index a9f5d9e8a..bc4260052 100644 --- a/dialogs/dialogincrements.h +++ b/dialogs/dialogincrements.h @@ -25,12 +25,14 @@ #include "dialogtool.h" #include "xml/vdomdocument.h" -namespace Ui { -class DialogIncrements; +namespace Ui +{ + class DialogIncrements; } -class DialogIncrements : public DialogTool{ - Q_OBJECT +class DialogIncrements : public DialogTool +{ + Q_OBJECT public: DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent = 0); ~DialogIncrements(); diff --git a/dialogs/dialogline.cpp b/dialogs/dialogline.cpp index a94b65fd5..ecdf6cb9d 100644 --- a/dialogs/dialogline.cpp +++ b/dialogs/dialogline.cpp @@ -22,8 +22,9 @@ #include "dialogline.h" #include "ui_dialogline.h" -DialogLine::DialogLine(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogLine), number(0), firstPoint(0), secondPoint(0){ +DialogLine::DialogLine(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogLine), number(0), firstPoint(0), secondPoint(0) +{ ui->setupUi(this); bOk = ui->buttonBox->button(QDialogButtonBox::Ok); connect(bOk, &QPushButton::clicked, this, &DialogLine::DialogAccepted); @@ -34,30 +35,36 @@ DialogLine::DialogLine(const VContainer *data, Draw::Draws mode, QWidget *parent number = 0; } -DialogLine::~DialogLine(){ +DialogLine::~DialogLine() +{ delete ui; } -void DialogLine::setSecondPoint(const qint64 &value){ +void DialogLine::setSecondPoint(const qint64 &value) +{ secondPoint = value; VPointF point = data->GetPoint(value); qint32 index = ui->comboBoxSecondPoint->findText(point.name()); - if(index != -1){ + if (index != -1) + { ui->comboBoxSecondPoint->setCurrentIndex(index); } } -void DialogLine::setFirstPoint(const qint64 &value){ +void DialogLine::setFirstPoint(const qint64 &value) +{ firstPoint = value; VPointF point = data->GetPoint(value); qint32 index = ui->comboBoxFirstPoint->findText(point.name()); - if(index != -1){ + if (index != -1) + { ui->comboBoxFirstPoint->setCurrentIndex(index); } } -void DialogLine::DialogAccepted(){ +void DialogLine::DialogAccepted() +{ qint32 index = ui->comboBoxFirstPoint->currentIndex(); firstPoint = qvariant_cast(ui->comboBoxFirstPoint->itemData(index)); index = ui->comboBoxSecondPoint->currentIndex(); @@ -65,42 +72,56 @@ void DialogLine::DialogAccepted(){ DialogClosed(QDialog::Accepted); } -void DialogLine::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogLine::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui->comboBoxFirstPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxFirstPoint->setCurrentIndex(index); number++; emit ToolTip(tr("Select second point")); return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui->comboBoxSecondPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxSecondPoint->setCurrentIndex(index); number = 0; emit ToolTip(""); } - if(!isInitialized){ + if (isInitialized == false) + { this->show(); } } diff --git a/dialogs/dialogline.h b/dialogs/dialogline.h index 99bc99d1a..9957eca16 100644 --- a/dialogs/dialogline.h +++ b/dialogs/dialogline.h @@ -24,16 +24,17 @@ #include "dialogtool.h" -namespace Ui { -class DialogLine; +namespace Ui +{ + class DialogLine; } -class DialogLine : public DialogTool{ +class DialogLine : public DialogTool +{ Q_OBJECT public: - explicit DialogLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, - QWidget *parent = 0); - ~DialogLine(); + DialogLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); + ~DialogLine(); inline qint64 getFirstPoint() const {return firstPoint;} void setFirstPoint(const qint64 &value); inline qint64 getSecondPoint() const {return secondPoint;} diff --git a/dialogs/dialoglineintersect.cpp b/dialogs/dialoglineintersect.cpp index 347c45815..4961e0db3 100644 --- a/dialogs/dialoglineintersect.cpp +++ b/dialogs/dialoglineintersect.cpp @@ -22,9 +22,10 @@ #include "dialoglineintersect.h" #include "ui_dialoglineintersect.h" -DialogLineIntersect::DialogLineIntersect(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogLineIntersect), number(0), pointName(QString()), - p1Line1(0), p2Line1(0), p1Line2(0), p2Line2(0), flagPoint(true){ +DialogLineIntersect::DialogLineIntersect(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogLineIntersect), number(0), pointName(QString()), + p1Line1(0), p2Line1(0), p1Line2(0), p2Line2(0), flagPoint(true) +{ ui->setupUi(this); number = 0; bOk = ui->buttonBox->button(QDialogButtonBox::Ok); @@ -41,32 +42,44 @@ DialogLineIntersect::DialogLineIntersect(const VContainer *data, Draw::Draws mod connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogLineIntersect::NamePointChanged); } -DialogLineIntersect::~DialogLineIntersect(){ +DialogLineIntersect::~DialogLineIntersect() +{ delete ui; } -void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui->comboBoxP1Line1->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxP1Line1->setCurrentIndex(index); p1Line1 = id; number++; @@ -74,9 +87,11 @@ void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Scenes type){ return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui->comboBoxP2Line1->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxP2Line1->setCurrentIndex(index); p2Line1 = id; number++; @@ -84,9 +99,11 @@ void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Scenes type){ return; } } - if(number == 2){ + if (number == 2) + { qint32 index = ui->comboBoxP1Line2->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxP1Line2->setCurrentIndex(index); p1Line2 = id; number++; @@ -94,15 +111,18 @@ void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Scenes type){ return; } } - if(number == 3){ + if (number == 3) + { qint32 index = ui->comboBoxP2Line2->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxP2Line2->setCurrentIndex(index); p2Line2 = id; number = 0; emit ToolTip(""); } - if(!isInitialized){ + if (isInitialized == false) + { flagPoint = CheckIntersecion(); CheckState(); this->show(); @@ -123,7 +143,8 @@ void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Scenes type){ } } -void DialogLineIntersect::DialogAccepted(){ +void DialogLineIntersect::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); p1Line1 = getCurrentPointId(ui->comboBoxP1Line1); p2Line1 = getCurrentPointId(ui->comboBoxP2Line1); @@ -132,36 +153,42 @@ void DialogLineIntersect::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogLineIntersect::P1Line1Changed( int index){ +void DialogLineIntersect::P1Line1Changed( int index) +{ p1Line1 = qvariant_cast(ui->comboBoxP1Line1->itemData(index)); flagPoint = CheckIntersecion(); CheckState(); } -void DialogLineIntersect::P2Line1Changed(int index){ +void DialogLineIntersect::P2Line1Changed(int index) +{ p2Line1 = qvariant_cast(ui->comboBoxP2Line1->itemData(index)); flagPoint = CheckIntersecion(); CheckState(); } -void DialogLineIntersect::P1Line2Changed(int index){ +void DialogLineIntersect::P1Line2Changed(int index) +{ p1Line2 = qvariant_cast(ui->comboBoxP1Line2->itemData(index)); flagPoint = CheckIntersecion(); CheckState(); } -void DialogLineIntersect::P2Line2Changed(int index){ +void DialogLineIntersect::P2Line2Changed(int index) +{ p2Line2 = qvariant_cast(ui->comboBoxP2Line2->itemData(index)); flagPoint = CheckIntersecion(); CheckState(); } -void DialogLineIntersect::CheckState(){ +void DialogLineIntersect::CheckState() +{ Q_ASSERT(bOk != 0); bOk->setEnabled(flagName && flagPoint); } -bool DialogLineIntersect::CheckIntersecion(){ +bool DialogLineIntersect::CheckIntersecion() +{ VPointF p1L1 = data->GetPoint(p1Line1); VPointF p2L1 = data->GetPoint(p2Line1); VPointF p1L2 = data->GetPoint(p1Line2); @@ -171,34 +198,42 @@ bool DialogLineIntersect::CheckIntersecion(){ QLineF line2(p1L2.toQPointF(), p2L2.toQPointF()); QPointF fPoint; QLineF::IntersectType intersect = line1.intersect(line2, &fPoint); - if(intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection){ + if (intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection) + { return true; - } else { + } + else + { return false; } } -void DialogLineIntersect::setP2Line2(const qint64 &value){ +void DialogLineIntersect::setP2Line2(const qint64 &value) +{ p2Line2 = value; ChangeCurrentData(ui->comboBoxP2Line2, value); } -void DialogLineIntersect::setP1Line2(const qint64 &value){ +void DialogLineIntersect::setP1Line2(const qint64 &value) +{ p1Line2 = value; ChangeCurrentData(ui->comboBoxP1Line2, value); } -void DialogLineIntersect::setP2Line1(const qint64 &value){ +void DialogLineIntersect::setP2Line1(const qint64 &value) +{ p2Line1 = value; ChangeCurrentData(ui->comboBoxP2Line1, value); } -void DialogLineIntersect::setP1Line1(const qint64 &value){ +void DialogLineIntersect::setP1Line1(const qint64 &value) +{ p1Line1 = value; ChangeCurrentData(ui->comboBoxP1Line1, value); } -void DialogLineIntersect::setPointName(const QString &value){ +void DialogLineIntersect::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } diff --git a/dialogs/dialoglineintersect.h b/dialogs/dialoglineintersect.h index 34cb19aeb..9c5195df5 100644 --- a/dialogs/dialoglineintersect.h +++ b/dialogs/dialoglineintersect.h @@ -24,14 +24,16 @@ #include "dialogtool.h" -namespace Ui { -class DialogLineIntersect; +namespace Ui +{ + class DialogLineIntersect; } -class DialogLineIntersect : public DialogTool{ +class DialogLineIntersect : public DialogTool +{ Q_OBJECT public: - explicit DialogLineIntersect(const VContainer *data, Draw::Draws mode = Draw::Calculation, + DialogLineIntersect(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogLineIntersect(); inline qint64 getP1Line1() const {return p1Line1;} diff --git a/dialogs/dialognormal.cpp b/dialogs/dialognormal.cpp index 0b467145e..d13aeab95 100644 --- a/dialogs/dialognormal.cpp +++ b/dialogs/dialognormal.cpp @@ -22,9 +22,10 @@ #include "dialognormal.h" #include "ui_dialognormal.h" -DialogNormal::DialogNormal(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogNormal), number(0), pointName(QString()), - typeLine(QString()), formula(QString()), angle(0), firstPointId(0), secondPointId(0){ +DialogNormal::DialogNormal(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogNormal), number(0), pointName(QString()), + typeLine(QString()), formula(QString()), angle(0), firstPointId(0), secondPointId(0) +{ ui->setupUi(this); spinBoxAngle = ui->doubleSpinBoxAngle; listWidget = ui->listWidget; @@ -82,53 +83,69 @@ DialogNormal::DialogNormal(const VContainer *data, Draw::Draws mode, QWidget *pa connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogNormal::FormulaChanged); } -DialogNormal::~DialogNormal(){ +DialogNormal::~DialogNormal() +{ delete ui; } -void DialogNormal::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogNormal::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui->comboBoxFirstPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxFirstPoint->setCurrentIndex(index); number++; emit ToolTip(tr("Select second point of line")); return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui->comboBoxSecondPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxSecondPoint->setCurrentIndex(index); number = 0; emit ToolTip(""); } - if(!isInitialized){ + if (isInitialized == false) + { this->show(); } } } } -void DialogNormal::DialogAccepted(){ +void DialogNormal::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); typeLine = GetTypeLine(ui->comboBoxLineType); formula = ui->lineEditFormula->text(); @@ -138,30 +155,36 @@ void DialogNormal::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogNormal::setSecondPointId(const qint64 &value, const qint64 &id){ +void DialogNormal::setSecondPointId(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); } -void DialogNormal::setFirstPointId(const qint64 &value, const qint64 &id){ +void DialogNormal::setFirstPointId(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); } -void DialogNormal::setAngle(const qreal &value){ +void DialogNormal::setAngle(const qreal &value) +{ angle = value; ui->doubleSpinBoxAngle->setValue(angle); } -void DialogNormal::setFormula(const QString &value){ +void DialogNormal::setFormula(const QString &value) +{ formula = value; ui->lineEditFormula->setText(formula); } -void DialogNormal::setTypeLine(const QString &value){ +void DialogNormal::setTypeLine(const QString &value) +{ typeLine = value; SetupTypeLine(ui->comboBoxLineType, value); } -void DialogNormal::setPointName(const QString &value){ +void DialogNormal::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } diff --git a/dialogs/dialognormal.h b/dialogs/dialognormal.h index e1f685e7f..84a661522 100644 --- a/dialogs/dialognormal.h +++ b/dialogs/dialognormal.h @@ -24,15 +24,16 @@ #include "dialogtool.h" -namespace Ui { -class DialogNormal; +namespace Ui +{ + class DialogNormal; } -class DialogNormal : public DialogTool{ +class DialogNormal : public DialogTool +{ Q_OBJECT public: - explicit DialogNormal(const VContainer *data, Draw::Draws mode = Draw::Calculation, - QWidget *parent = 0); + DialogNormal(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogNormal(); inline QString getPointName() const{return pointName;} void setPointName(const QString &value); diff --git a/dialogs/dialogpointofcontact.cpp b/dialogs/dialogpointofcontact.cpp index d09b7b021..6b551df7e 100644 --- a/dialogs/dialogpointofcontact.cpp +++ b/dialogs/dialogpointofcontact.cpp @@ -21,9 +21,10 @@ #include "dialogpointofcontact.h" -DialogPointOfContact::DialogPointOfContact(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(), number(0), pointName(QString()), radius(QString()), center(0), - firstPoint(0), secondPoint(0){ +DialogPointOfContact::DialogPointOfContact(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(), number(0), pointName(QString()), radius(QString()), center(0), + firstPoint(0), secondPoint(0) +{ ui.setupUi(this); listWidget = ui.listWidget; labelResultCalculation = ui.labelResultCalculation; @@ -64,58 +65,75 @@ DialogPointOfContact::DialogPointOfContact(const VContainer *data, Draw::Draws m connect(ui.lineEditFormula, &QLineEdit::textChanged, this, &DialogPointOfContact::FormulaChanged); } -void DialogPointOfContact::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogPointOfContact::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui.comboBoxFirstPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui.comboBoxFirstPoint->setCurrentIndex(index); number++; emit ToolTip(tr("Select second point of line")); return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui.comboBoxSecondPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui.comboBoxSecondPoint->setCurrentIndex(index); number++; emit ToolTip(tr("Select point of center of arc")); return; } } - if(number == 2){ + if (number == 2) + { qint32 index = ui.comboBoxCenter->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui.comboBoxCenter->setCurrentIndex(index); number = 0; emit ToolTip(""); } - if(!isInitialized){ + if (isInitialized == false) + { this->show(); } } } } -void DialogPointOfContact::DialogAccepted(){ +void DialogPointOfContact::DialogAccepted() +{ pointName = ui.lineEditNamePoint->text(); radius = ui.lineEditFormula->text(); center = getCurrentPointId(ui.comboBoxCenter); @@ -124,25 +142,30 @@ void DialogPointOfContact::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogPointOfContact::setSecondPoint(const qint64 &value, const qint64 &id){ +void DialogPointOfContact::setSecondPoint(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui.comboBoxSecondPoint, secondPoint, value, id); } -void DialogPointOfContact::setFirstPoint(const qint64 &value, const qint64 &id){ +void DialogPointOfContact::setFirstPoint(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui.comboBoxFirstPoint, firstPoint, value, id); } -void DialogPointOfContact::setCenter(const qint64 &value, const qint64 &id){ +void DialogPointOfContact::setCenter(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui.comboBoxCenter, center, value, id); center = value; } -void DialogPointOfContact::setRadius(const QString &value){ +void DialogPointOfContact::setRadius(const QString &value) +{ radius = value; ui.lineEditFormula->setText(radius); } -void DialogPointOfContact::setPointName(const QString &value){ +void DialogPointOfContact::setPointName(const QString &value) +{ pointName = value; ui.lineEditNamePoint->setText(pointName); } diff --git a/dialogs/dialogpointofcontact.h b/dialogs/dialogpointofcontact.h index 003c16001..35af0835a 100644 --- a/dialogs/dialogpointofcontact.h +++ b/dialogs/dialogpointofcontact.h @@ -25,9 +25,9 @@ #include "ui_dialogpointofcontact.h" #include "dialogtool.h" -class DialogPointOfContact : public DialogTool{ +class DialogPointOfContact : public DialogTool +{ Q_OBJECT - public: DialogPointOfContact(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); diff --git a/dialogs/dialogpointofintersection.cpp b/dialogs/dialogpointofintersection.cpp index 1172284fe..bf6fff658 100644 --- a/dialogs/dialogpointofintersection.cpp +++ b/dialogs/dialogpointofintersection.cpp @@ -1,9 +1,10 @@ #include "dialogpointofintersection.h" #include "ui_dialogpointofintersection.h" -DialogPointOfIntersection::DialogPointOfIntersection(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogPointOfIntersection), number(0), pointName(QString()), - firstPointId(0), secondPointId(0){ +DialogPointOfIntersection::DialogPointOfIntersection(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogPointOfIntersection), number(0), pointName(QString()), + firstPointId(0), secondPointId(0) +{ ui->setupUi(this); labelEditNamePoint = ui->labelEditNamePoint; bOk = ui->buttonBox->button(QDialogButtonBox::Ok); @@ -17,70 +18,89 @@ DialogPointOfIntersection::DialogPointOfIntersection(const VContainer *data, Dra connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogPointOfIntersection::NamePointChanged); } -DialogPointOfIntersection::~DialogPointOfIntersection(){ +DialogPointOfIntersection::~DialogPointOfIntersection() +{ delete ui; } -void DialogPointOfIntersection::setSecondPointId(const qint64 &value, const qint64 &id){ +void DialogPointOfIntersection::setSecondPointId(const qint64 &value, const qint64 &id) +{ secondPointId = value; setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); } -void DialogPointOfIntersection::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogPointOfIntersection::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui->comboBoxFirstPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxFirstPoint->setCurrentIndex(index); number++; emit ToolTip(tr("Select point horizontally")); return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui->comboBoxSecondPoint->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxSecondPoint->setCurrentIndex(index); number = 0; emit ToolTip(""); } - if(!isInitialized){ + if (isInitialized == false) + { this->show(); } } } } -void DialogPointOfIntersection::DialogAccepted(){ +void DialogPointOfIntersection::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); firstPointId = getCurrentPointId(ui->comboBoxFirstPoint); secondPointId = getCurrentPointId(ui->comboBoxSecondPoint); emit DialogClosed(QDialog::Accepted); } -void DialogPointOfIntersection::setFirstPointId(const qint64 &value, const qint64 &id){ +void DialogPointOfIntersection::setFirstPointId(const qint64 &value, const qint64 &id) +{ firstPointId = value; setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); } -void DialogPointOfIntersection::setPointName(const QString &value){ +void DialogPointOfIntersection::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } diff --git a/dialogs/dialogpointofintersection.h b/dialogs/dialogpointofintersection.h index 432105400..52a3ff7a2 100644 --- a/dialogs/dialogpointofintersection.h +++ b/dialogs/dialogpointofintersection.h @@ -3,12 +3,14 @@ #include "dialogtool.h" -namespace Ui { -class DialogPointOfIntersection; +namespace Ui +{ + class DialogPointOfIntersection; } -class DialogPointOfIntersection : public DialogTool{ - Q_OBJECT +class DialogPointOfIntersection : public DialogTool +{ + Q_OBJECT public: DialogPointOfIntersection(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); diff --git a/dialogs/dialogshoulderpoint.cpp b/dialogs/dialogshoulderpoint.cpp index 9c65ec76a..0224eb90b 100644 --- a/dialogs/dialogshoulderpoint.cpp +++ b/dialogs/dialogshoulderpoint.cpp @@ -22,9 +22,10 @@ #include "dialogshoulderpoint.h" #include "ui_dialogshoulderpoint.h" -DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogShoulderPoint), number(0), pointName(QString()), - typeLine(QString()), formula(QString()), p1Line(0), p2Line(0), pShoulder(0){ +DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogShoulderPoint), number(0), pointName(QString()), + typeLine(QString()), formula(QString()), p1Line(0), p2Line(0), pShoulder(0) +{ ui->setupUi(this); number = 0; listWidget = ui->listWidget; @@ -67,62 +68,80 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, Draw::Draws mod connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogShoulderPoint::FormulaChanged); } -DialogShoulderPoint::~DialogShoulderPoint(){ +DialogShoulderPoint::~DialogShoulderPoint() +{ delete ui; } -void DialogShoulderPoint::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogShoulderPoint::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui->comboBoxP1Line->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxP1Line->setCurrentIndex(index); number++; emit ToolTip(tr("Select second point of line")); return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui->comboBoxP2Line->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxP2Line->setCurrentIndex(index); number++; emit ToolTip(tr("Select point of shoulder")); return; } } - if(number == 2){ + if (number == 2) + { qint32 index = ui->comboBoxPShoulder->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxPShoulder->setCurrentIndex(index); number = 0; emit ToolTip(""); } - if(!isInitialized){ + if (isInitialized == false) + { this->show(); } } } } -void DialogShoulderPoint::DialogAccepted(){ +void DialogShoulderPoint::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); typeLine = GetTypeLine(ui->comboBoxLineType); formula = ui->lineEditFormula->text(); @@ -132,29 +151,35 @@ void DialogShoulderPoint::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogShoulderPoint::setPShoulder(const qint64 &value, const qint64 &id){ +void DialogShoulderPoint::setPShoulder(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxPShoulder, pShoulder, value, id); } -void DialogShoulderPoint::setP2Line(const qint64 &value, const qint64 &id){ +void DialogShoulderPoint::setP2Line(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxP2Line, p2Line, value, id); } -void DialogShoulderPoint::setP1Line(const qint64 &value, const qint64 &id){ +void DialogShoulderPoint::setP1Line(const qint64 &value, const qint64 &id) +{ setCurrentPointId(ui->comboBoxP1Line, p1Line, value, id); } -void DialogShoulderPoint::setFormula(const QString &value){ +void DialogShoulderPoint::setFormula(const QString &value) +{ formula = value; ui->lineEditFormula->setText(formula); } -void DialogShoulderPoint::setTypeLine(const QString &value){ +void DialogShoulderPoint::setTypeLine(const QString &value) +{ typeLine = value; SetupTypeLine(ui->comboBoxLineType, value); } -void DialogShoulderPoint::setPointName(const QString &value){ +void DialogShoulderPoint::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } diff --git a/dialogs/dialogshoulderpoint.h b/dialogs/dialogshoulderpoint.h index 44b315738..8d06393e6 100644 --- a/dialogs/dialogshoulderpoint.h +++ b/dialogs/dialogshoulderpoint.h @@ -24,11 +24,13 @@ #include "dialogtool.h" -namespace Ui { -class DialogShoulderPoint; +namespace Ui +{ + class DialogShoulderPoint; } -class DialogShoulderPoint : public DialogTool{ +class DialogShoulderPoint : public DialogTool +{ Q_OBJECT public: DialogShoulderPoint(const VContainer *data, Draw::Draws mode = Draw::Calculation, diff --git a/dialogs/dialogsinglepoint.cpp b/dialogs/dialogsinglepoint.cpp index 9bb6914d1..ddf12c14e 100644 --- a/dialogs/dialogsinglepoint.cpp +++ b/dialogs/dialogsinglepoint.cpp @@ -22,12 +22,13 @@ #include "dialogsinglepoint.h" #include "ui_dialogsinglepoint.h" -DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent) : - DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogSinglePoint), name(QString()), - point(QPointF()){ +DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent) + :DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogSinglePoint), name(QString()), + point(QPointF()) +{ ui->setupUi(this); - ui->doubleSpinBoxX->setRange(0,toMM(PaperSize)); - ui->doubleSpinBoxY->setRange(0,toMM(PaperSize)); + ui->doubleSpinBoxX->setRange(0, toMM(PaperSize)); + ui->doubleSpinBoxY->setRange(0, toMM(PaperSize)); bOk = ui->buttonBox->button(QDialogButtonBox::Ok); labelEditNamePoint = ui->labelEditName; flagName = false; @@ -35,27 +36,33 @@ DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent) : connect(bOk, &QPushButton::clicked, this, &DialogSinglePoint::DialogAccepted); QPushButton *bCansel = ui->buttonBox->button(QDialogButtonBox::Cancel); connect(bCansel, &QPushButton::clicked, this, &DialogSinglePoint::DialogRejected); - connect(ui->lineEditName,&QLineEdit::textChanged, this, &DialogSinglePoint::NamePointChanged); + connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogSinglePoint::NamePointChanged); } -void DialogSinglePoint::mousePress(QPointF scenePos){ - if(isInitialized == false){ +void DialogSinglePoint::mousePress(QPointF scenePos) +{ + if (isInitialized == false) + { ui->doubleSpinBoxX->setValue(toMM(scenePos.x())); ui->doubleSpinBoxY->setValue(toMM(scenePos.y())); this->show(); - } else { + } + else + { ui->doubleSpinBoxX->setValue(toMM(scenePos.x())); ui->doubleSpinBoxY->setValue(toMM(scenePos.y())); } } -void DialogSinglePoint::DialogAccepted(){ +void DialogSinglePoint::DialogAccepted() +{ point = QPointF(toPixel(ui->doubleSpinBoxX->value()), toPixel(ui->doubleSpinBoxY->value())); name = ui->lineEditName->text(); emit DialogClosed(QDialog::Accepted); } -void DialogSinglePoint::setData(const QString name, const QPointF point){ +void DialogSinglePoint::setData(const QString name, const QPointF point) +{ this->name = name; this->point = point; isInitialized = true; @@ -64,7 +71,7 @@ void DialogSinglePoint::setData(const QString name, const QPointF point){ ui->doubleSpinBoxY->setValue(toMM(point.y())); } -DialogSinglePoint::~DialogSinglePoint(){ +DialogSinglePoint::~DialogSinglePoint() +{ delete ui; } - diff --git a/dialogs/dialogsinglepoint.h b/dialogs/dialogsinglepoint.h index 3a4d1b860..48adcf8a9 100644 --- a/dialogs/dialogsinglepoint.h +++ b/dialogs/dialogsinglepoint.h @@ -24,12 +24,14 @@ #include "dialogtool.h" -namespace Ui { -class DialogSinglePoint; +namespace Ui +{ + class DialogSinglePoint; } -class DialogSinglePoint : public DialogTool{ - Q_OBJECT +class DialogSinglePoint : public DialogTool +{ + Q_OBJECT public: DialogSinglePoint(const VContainer *data, QWidget *parent = 0); void setData(const QString name, const QPointF point); diff --git a/dialogs/dialogspline.cpp b/dialogs/dialogspline.cpp index 08f8f331b..16baab710 100644 --- a/dialogs/dialogspline.cpp +++ b/dialogs/dialogspline.cpp @@ -22,58 +22,74 @@ #include "dialogspline.h" #include "ui_dialogspline.h" -DialogSpline::DialogSpline(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogSpline), number(0), p1(0), p4(0), angle1(0), angle2(0), - kAsm1(1), kAsm2(1), kCurve(1){ +DialogSpline::DialogSpline(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogSpline), number(0), p1(0), p4(0), angle1(0), angle2(0), + kAsm1(1), kAsm2(1), kCurve(1) +{ ui->setupUi(this); bOk = ui->buttonBox->button(QDialogButtonBox::Ok); connect(bOk, &QPushButton::clicked, this, &DialogSpline::DialogAccepted); QPushButton *bCansel = ui->buttonBox->button(QDialogButtonBox::Cancel); connect(bCansel, &QPushButton::clicked, this, &DialogSpline::DialogRejected); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { FillComboBoxPoints(ui->comboBoxP1); FillComboBoxPoints(ui->comboBoxP4); } } -DialogSpline::~DialogSpline(){ +DialogSpline::~DialogSpline() +{ delete ui; } -void DialogSpline::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogSpline::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; FillComboBoxPoints(ui->comboBoxP1); FillComboBoxPoints(ui->comboBoxP4); return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - if(number == 0){ + if (number == 0) + { qint32 index = ui->comboBoxP1->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxP1->setCurrentIndex(index); number++; emit ToolTip(tr("Select last point of curve")); return; } } - if(number == 1){ + if (number == 1) + { qint32 index = ui->comboBoxP4->findText(point.name()); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found ui->comboBoxP4->setCurrentIndex(index); number = 0; emit ToolTip(""); @@ -81,24 +97,29 @@ void DialogSpline::ChoosedObject(qint64 id, Scene::Scenes type){ qint64 p1Id = qvariant_cast(ui->comboBoxP1->itemData(index)); QPointF p1; QPointF p4; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { p1 = data->GetPoint(p1Id).toQPointF(); p4 = data->GetPoint(id).toQPointF(); - } else { + } + else + { p1 = data->GetModelingPoint(p1Id).toQPointF(); p4 = data->GetModelingPoint(id).toQPointF(); } ui->spinBoxAngle1->setValue(static_cast(QLineF(p1, p4).angle())); ui->spinBoxAngle2->setValue(static_cast(QLineF(p4, p1).angle())); } - if(!isInitialized){ + if (isInitialized == false) + { this->show(); } } } } -void DialogSpline::DialogAccepted(){ +void DialogSpline::DialogAccepted() +{ p1 = getCurrentPointId(ui->comboBoxP1); p4 = getCurrentPointId(ui->comboBoxP4); angle1 = ui->spinBoxAngle1->value(); @@ -109,37 +130,44 @@ void DialogSpline::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogSpline::setKCurve(const qreal &value){ +void DialogSpline::setKCurve(const qreal &value) +{ kCurve = value; ui->doubleSpinBoxKcurve->setValue(value); } -void DialogSpline::setKAsm2(const qreal &value){ +void DialogSpline::setKAsm2(const qreal &value) +{ kAsm2 = value; ui->doubleSpinBoxKasm2->setValue(value); } -void DialogSpline::setKAsm1(const qreal &value){ +void DialogSpline::setKAsm1(const qreal &value) +{ kAsm1 = value; ui->doubleSpinBoxKasm1->setValue(value); } -void DialogSpline::setAngle2(const qreal &value){ +void DialogSpline::setAngle2(const qreal &value) +{ angle2 = value; ui->spinBoxAngle2->setValue(static_cast(value)); } -void DialogSpline::setAngle1(const qreal &value){ +void DialogSpline::setAngle1(const qreal &value) +{ angle1 = value; ui->spinBoxAngle1->setValue(static_cast(value)); } -void DialogSpline::setP4(const qint64 &value){ +void DialogSpline::setP4(const qint64 &value) +{ p4 = value; ChangeCurrentData(ui->comboBoxP4, value); } -void DialogSpline::setP1(const qint64 &value){ +void DialogSpline::setP1(const qint64 &value) +{ p1 = value; ChangeCurrentData(ui->comboBoxP1, value); } diff --git a/dialogs/dialogspline.h b/dialogs/dialogspline.h index 310a679dc..bcb69ce87 100644 --- a/dialogs/dialogspline.h +++ b/dialogs/dialogspline.h @@ -24,15 +24,16 @@ #include "dialogtool.h" -namespace Ui { -class DialogSpline; +namespace Ui +{ + class DialogSpline; } -class DialogSpline : public DialogTool{ - Q_OBJECT +class DialogSpline : public DialogTool +{ + Q_OBJECT public: - explicit DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation, - QWidget *parent = 0); + DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogSpline(); inline qint64 getP1() const {return p1;} void setP1(const qint64 &value); @@ -55,10 +56,10 @@ private: Q_DISABLE_COPY(DialogSpline) Ui::DialogSpline *ui; qint32 number; - qint64 p1; // перша точка - qint64 p4; // четверта точка - qreal angle1; // кут нахилу дотичної в першій точці - qreal angle2; // кут нахилу дотичної в другій точці + qint64 p1; // перша точка + qint64 p4; // четверта точка + qreal angle1; // кут нахилу дотичної в першій точці + qreal angle2; // кут нахилу дотичної в другій точці qreal kAsm1; qreal kAsm2; qreal kCurve; diff --git a/dialogs/dialogsplinepath.cpp b/dialogs/dialogsplinepath.cpp index e3d45bdd0..d671ef182 100644 --- a/dialogs/dialogsplinepath.cpp +++ b/dialogs/dialogsplinepath.cpp @@ -23,8 +23,9 @@ #include "ui_dialogsplinepath.h" #include "geometry/vsplinepoint.h" -DialogSplinePath::DialogSplinePath(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogSplinePath), path(VSplinePath()){ +DialogSplinePath::DialogSplinePath(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogSplinePath), path(VSplinePath()) +{ ui->setupUi(this); bOk = ui->buttonBox->button(QDialogButtonBox::Ok); connect(bOk, &QPushButton::clicked, this, &DialogSplinePath::DialogAccepted); @@ -48,14 +49,17 @@ DialogSplinePath::DialogSplinePath(const VContainer *data, Draw::Draws mode, QWi this, &DialogSplinePath::KAsm2Changed); } -DialogSplinePath::~DialogSplinePath(){ +DialogSplinePath::~DialogSplinePath() +{ delete ui; } -void DialogSplinePath::SetPath(const VSplinePath &value){ +void DialogSplinePath::SetPath(const VSplinePath &value) +{ this->path = value; - ui->listWidget->clear(); - for(qint32 i = 0; i < path.CountPoint(); ++i){ + ui->listWidget->clear(); + for (qint32 i = 0; i < path.CountPoint(); ++i) + { NewItem(path[i].P(), path[i].KAsm1(), path[i].Angle2(), path[i].KAsm2()); } ui->listWidget->setFocus(Qt::OtherFocusReason); @@ -63,28 +67,36 @@ void DialogSplinePath::SetPath(const VSplinePath &value){ } -void DialogSplinePath::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogSplinePath::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { NewItem(id, 1, 0, 1); emit ToolTip(tr("Select point of curve path")); this->show(); } } -void DialogSplinePath::DialogAccepted(){ +void DialogSplinePath::DialogAccepted() +{ path.Clear(); - for(qint32 i = 0; i < ui->listWidget->count(); ++i){ + for (qint32 i = 0; i < ui->listWidget->count(); ++i) + { QListWidgetItem *item = ui->listWidget->item(i); path.append( qvariant_cast(item->data(Qt::UserRole))); } @@ -93,8 +105,10 @@ void DialogSplinePath::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogSplinePath::PointChenged(int row){ - if(ui->listWidget->count() == 0){ +void DialogSplinePath::PointChenged(int row) +{ + if (ui->listWidget->count() == 0) + { return; } QListWidgetItem *item = ui->listWidget->item( row ); @@ -103,7 +117,8 @@ void DialogSplinePath::PointChenged(int row){ EnableFields(); } -void DialogSplinePath::currentPointChanged(int index){ +void DialogSplinePath::currentPointChanged(int index) +{ qint64 id = qvariant_cast(ui->comboBoxPoint->itemData(index)); qint32 row = ui->listWidget->currentRow(); QListWidgetItem *item = ui->listWidget->item( row ); @@ -114,15 +129,18 @@ void DialogSplinePath::currentPointChanged(int index){ item->setData(Qt::UserRole, QVariant::fromValue(p)); } -void DialogSplinePath::Angle1Changed(int index){ +void DialogSplinePath::Angle1Changed(int index) +{ SetAngle(index+180); } -void DialogSplinePath::Angle2Changed(int index){ +void DialogSplinePath::Angle2Changed(int index) +{ SetAngle(index); } -void DialogSplinePath::KAsm1Changed(qreal d){ +void DialogSplinePath::KAsm1Changed(qreal d) +{ qint32 row = ui->listWidget->currentRow(); QListWidgetItem *item = ui->listWidget->item( row ); VSplinePoint p = qvariant_cast(item->data(Qt::UserRole)); @@ -130,7 +148,8 @@ void DialogSplinePath::KAsm1Changed(qreal d){ item->setData(Qt::UserRole, QVariant::fromValue(p)); } -void DialogSplinePath::KAsm2Changed(qreal d){ +void DialogSplinePath::KAsm2Changed(qreal d) +{ qint32 row = ui->listWidget->currentRow(); QListWidgetItem *item = ui->listWidget->item( row ); VSplinePoint p = qvariant_cast(item->data(Qt::UserRole)); @@ -138,11 +157,15 @@ void DialogSplinePath::KAsm2Changed(qreal d){ item->setData(Qt::UserRole, QVariant::fromValue(p)); } -void DialogSplinePath::NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2){ +void DialogSplinePath::NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2) +{ VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } QListWidgetItem *item = new QListWidgetItem(point.name()); @@ -154,7 +177,8 @@ void DialogSplinePath::NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2) EnableFields(); } -void DialogSplinePath::DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2){ +void DialogSplinePath::DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2) +{ disconnect(ui->comboBoxPoint, static_cast(&QComboBox::currentIndexChanged), this, &DialogSplinePath::currentPointChanged); disconnect(ui->spinBoxAngle1, static_cast(&QSpinBox::valueChanged), @@ -184,25 +208,29 @@ void DialogSplinePath::DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAs this, &DialogSplinePath::KAsm2Changed); } -void DialogSplinePath::EnableFields(){ +void DialogSplinePath::EnableFields() +{ ui->doubleSpinBoxKasm1->setEnabled(true); ui->spinBoxAngle1->setEnabled(true); ui->doubleSpinBoxKasm2->setEnabled(true); ui->spinBoxAngle2->setEnabled(true); qint32 row = ui->listWidget->currentRow(); - if(row == 0){ + if (row == 0) + { ui->doubleSpinBoxKasm1->setEnabled(false); ui->spinBoxAngle1->setEnabled(false); return; } - if(row == ui->listWidget->count()-1){ + if (row == ui->listWidget->count()-1) + { ui->doubleSpinBoxKasm2->setEnabled(false); ui->spinBoxAngle2->setEnabled(false); return; } } -void DialogSplinePath::SetAngle(qint32 angle){ +void DialogSplinePath::SetAngle(qint32 angle) +{ qint32 row = ui->listWidget->currentRow(); QListWidgetItem *item = ui->listWidget->item( row ); VSplinePoint p = qvariant_cast(item->data(Qt::UserRole)); diff --git a/dialogs/dialogsplinepath.h b/dialogs/dialogsplinepath.h index 922351a31..394e79356 100644 --- a/dialogs/dialogsplinepath.h +++ b/dialogs/dialogsplinepath.h @@ -25,11 +25,13 @@ #include "dialogtool.h" #include "geometry/vsplinepath.h" -namespace Ui { -class DialogSplinePath; +namespace Ui +{ + class DialogSplinePath; } -class DialogSplinePath : public DialogTool{ +class DialogSplinePath : public DialogTool +{ Q_OBJECT public: DialogSplinePath(const VContainer *data, Draw::Draws mode = Draw::Calculation, diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index c527cb383..3f3e0133a 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -22,60 +22,76 @@ #include "dialogtool.h" #include -DialogTool::DialogTool(const VContainer *data, Draw::Draws mode, QWidget *parent):QDialog(parent), data(data), - isInitialized(false), flagName(true), flagFormula(true), timerFormula(0), bOk(0), spinBoxAngle(0), - lineEditFormula(0), listWidget(0), labelResultCalculation(0), labelDescription(0), labelEditNamePoint(0), - labelEditFormula(0), radioButtonSizeGrowth(0), radioButtonStandartTable(0), radioButtonIncrements(0), - radioButtonLengthLine(0), radioButtonLengthArc(0), radioButtonLengthCurve(0), idDetail(0), mode(mode){ +DialogTool::DialogTool(const VContainer *data, Draw::Draws mode, QWidget *parent) + :QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), timerFormula(0), bOk(0), + spinBoxAngle(0), lineEditFormula(0), listWidget(0), labelResultCalculation(0), labelDescription(0), + labelEditNamePoint(0), labelEditFormula(0), radioButtonSizeGrowth(0), radioButtonStandartTable(0), + radioButtonIncrements(0), radioButtonLengthLine(0), radioButtonLengthArc(0), radioButtonLengthCurve(0), + idDetail(0), mode(mode) +{ Q_ASSERT(data != 0); timerFormula = new QTimer(this); connect(timerFormula, &QTimer::timeout, this, &DialogTool::EvalFormula); } -void DialogTool::closeEvent(QCloseEvent *event){ +void DialogTool::closeEvent(QCloseEvent *event) +{ DialogClosed(QDialog::Rejected); event->accept(); } -void DialogTool::showEvent(QShowEvent *event){ +void DialogTool::showEvent(QShowEvent *event) +{ QDialog::showEvent( event ); - if( event->spontaneous() ){ + if ( event->spontaneous() ) + { return; } - if(isInitialized){ + if (isInitialized) + { return; } isInitialized = true;//first show windows are held } -void DialogTool::FillComboBoxPoints(QComboBox *box, const qint64 &id) const{ +void DialogTool::FillComboBoxPoints(QComboBox *box, const qint64 &id) const +{ box->clear(); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { const QHash *points = data->DataPoints(); QHashIterator i(*points); - while (i.hasNext()) { + while (i.hasNext()) + { i.next(); - if(i.key() != id){ + if (i.key() != id) + { VPointF point = i.value(); box->addItem(point.name(), i.key()); } } - } else { - if(idDetail <= 0){ + } + else + { + if (idDetail <= 0) + { qWarning()<GetDetail(idDetail); - for(qint32 i = 0; i< det.CountNode(); ++i){ - if(det[i].getTypeTool() == Tool::NodePoint || - det[i].getTypeTool() == Tool::AlongLineTool || - det[i].getTypeTool() == Tool::BisectorTool || - det[i].getTypeTool() == Tool::EndLineTool || - det[i].getTypeTool() == Tool::LineIntersectTool || - det[i].getTypeTool() == Tool::NormalTool || - det[i].getTypeTool() == Tool::PointOfContact || - det[i].getTypeTool() == Tool::ShoulderPointTool){ - if(det[i].getId() != id){ + for (qint32 i = 0; i< det.CountNode(); ++i) + { + if (det[i].getTypeTool() == Tool::NodePoint || + det[i].getTypeTool() == Tool::AlongLineTool || + det[i].getTypeTool() == Tool::BisectorTool || + det[i].getTypeTool() == Tool::EndLineTool || + det[i].getTypeTool() == Tool::LineIntersectTool || + det[i].getTypeTool() == Tool::NormalTool || + det[i].getTypeTool() == Tool::PointOfContact || + det[i].getTypeTool() == Tool::ShoulderPointTool) + { + if (det[i].getId() != id) + { VPointF point = data->GetModelingPoint(det[i].getId()); box->addItem(point.name(), det[i].getId()); } @@ -84,53 +100,70 @@ void DialogTool::FillComboBoxPoints(QComboBox *box, const qint64 &id) const{ } } -void DialogTool::FillComboBoxTypeLine(QComboBox *box) const{ +void DialogTool::FillComboBoxTypeLine(QComboBox *box) const +{ Q_ASSERT(box != 0); QStringList list; list<addItems(list); } -QString DialogTool::GetTypeLine(const QComboBox *box) const{ - if(box->currentText()==tr("Line")){ +QString DialogTool::GetTypeLine(const QComboBox *box) const +{ + if (box->currentText()==tr("Line")) + { return QString("hair"); - } else { + } + else + { return QString("none"); } } -void DialogTool::SetupTypeLine(QComboBox *box, const QString &value){ - if(value == "hair"){ +void DialogTool::SetupTypeLine(QComboBox *box, const QString &value) +{ + if (value == "hair") + { qint32 index = box->findText(tr("Line")); - if(index != -1){ + if (index != -1) + { box->setCurrentIndex(index); } } - if(value == "none"){ + if (value == "none") + { qint32 index = box->findText(tr("No line")); - if(index != -1){ + if (index != -1) + { box->setCurrentIndex(index); } } } -void DialogTool::ChangeCurrentText(QComboBox *box, const QString &value){ +void DialogTool::ChangeCurrentText(QComboBox *box, const QString &value) +{ qint32 index = box->findText(value); - if(index != -1){ + if (index != -1) + { box->setCurrentIndex(index); - } else { + } + else + { qWarning()<findData(value); - if(index != -1){ + if (index != -1) + { box->setCurrentIndex(index); } } -void DialogTool::PutValHere(QLineEdit *lineEdit, QListWidget *listWidget){ +void DialogTool::PutValHere(QLineEdit *lineEdit, QListWidget *listWidget) +{ Q_ASSERT(lineEdit != 0); Q_ASSERT(listWidget != 0); QListWidgetItem *item = listWidget->currentItem(); @@ -140,11 +173,13 @@ void DialogTool::PutValHere(QLineEdit *lineEdit, QListWidget *listWidget){ lineEdit->setCursorPosition(pos + item->text().size()); } -void DialogTool::ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer *timer){ +void DialogTool::ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer *timer) +{ Q_ASSERT(edit != 0); Q_ASSERT(timer != 0); Q_ASSERT(labelEditFormula != 0); - if(edit->text().isEmpty()){ + if (edit->text().isEmpty()) + { flag = false; CheckState(); QPalette palette = labelEditFormula->palette(); @@ -155,27 +190,34 @@ void DialogTool::ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer *timer){ timer->start(1000); } -void DialogTool::Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label){ +void DialogTool::Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label) +{ Q_ASSERT(edit != 0); Q_ASSERT(timer != 0); Q_ASSERT(label != 0); Q_ASSERT(labelEditFormula != 0); QPalette palette = labelEditFormula->palette(); - if(edit->text().isEmpty()){ + if (edit->text().isEmpty()) + { flag = false; palette.setColor(labelEditFormula->foregroundRole(), Qt::red); - } else { + } + else + { Calculator cal(data); QString errorMsg; - qreal result = cal.eval(edit->text(),&errorMsg); - if(!errorMsg.isEmpty()){ + qreal result = cal.eval(edit->text(), &errorMsg); + if (errorMsg.isEmpty() == false) + { label->setText(tr("Error")); flag = false; palette.setColor(labelEditFormula->foregroundRole(), Qt::red); - } else { + } + else + { label->setText(QString().setNum(result)); flag = true; - palette.setColor(labelEditFormula->foregroundRole(), QColor(76,76,76)); + palette.setColor(labelEditFormula->foregroundRole(), QColor(76, 76, 76)); } } CheckState(); @@ -183,145 +225,177 @@ void DialogTool::Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label) labelEditFormula->setPalette(palette); } -void DialogTool::setCurrentPointId(QComboBox *box, qint64 &pointId, const qint64 &value, - const qint64 &id) const{ +void DialogTool::setCurrentPointId(QComboBox *box, qint64 &pointId, const qint64 &value, const qint64 &id) const +{ Q_ASSERT(box != 0); FillComboBoxPoints(box, id); pointId = value; ChangeCurrentData(box, value); } -qint64 DialogTool::getCurrentPointId(QComboBox *box) const{ +qint64 DialogTool::getCurrentPointId(QComboBox *box) const +{ Q_ASSERT(box != 0); qint32 index = box->currentIndex(); Q_ASSERT(index != -1); - if(index != -1){ + if (index != -1) + { return qvariant_cast(box->itemData(index)); - } else { + } + else + { return -1; } } -void DialogTool::CheckState(){ +void DialogTool::CheckState() +{ Q_ASSERT(bOk != 0); bOk->setEnabled(flagFormula && flagName); } -void DialogTool::ChoosedObject(qint64 id, Scene::Scenes type){ +void DialogTool::ChoosedObject(qint64 id, Scene::Scenes type) +{ Q_UNUSED(id); Q_UNUSED(type); } -void DialogTool::NamePointChanged(){ +void DialogTool::NamePointChanged() +{ Q_ASSERT(labelEditNamePoint != 0); QLineEdit* edit = qobject_cast(sender()); - if (edit){ + if (edit) + { QString name = edit->text(); - if(name.isEmpty() || name.contains(" ")){ + if (name.isEmpty() || name.contains(" ")) + { flagName = false; QPalette palette = labelEditNamePoint->palette(); palette.setColor(labelEditNamePoint->foregroundRole(), Qt::red); labelEditNamePoint->setPalette(palette); - } else { + } + else + { flagName = true; QPalette palette = labelEditNamePoint->palette(); - palette.setColor(labelEditNamePoint->foregroundRole(), QColor(76,76,76)); + palette.setColor(labelEditNamePoint->foregroundRole(), QColor(76, 76, 76)); labelEditNamePoint->setPalette(palette); } } CheckState(); } -void DialogTool::DialogAccepted(){ +void DialogTool::DialogAccepted() +{ emit DialogClosed(QDialog::Accepted); } -void DialogTool::DialogRejected(){ +void DialogTool::DialogRejected() +{ emit DialogClosed(QDialog::Rejected); } -void DialogTool::FormulaChanged(){ +void DialogTool::FormulaChanged() +{ QLineEdit* edit = qobject_cast(sender()); - if(edit){ + if (edit) + { ValFormulaChanged(flagFormula, edit, timerFormula); } } -void DialogTool::ArrowUp(){ +void DialogTool::ArrowUp() +{ Q_ASSERT(spinBoxAngle != 0); spinBoxAngle->setValue(90); } -void DialogTool::ArrowDown(){ +void DialogTool::ArrowDown() +{ Q_ASSERT(spinBoxAngle != 0); spinBoxAngle->setValue(270); } -void DialogTool::ArrowLeft(){ +void DialogTool::ArrowLeft() +{ Q_ASSERT(spinBoxAngle != 0); spinBoxAngle->setValue(180); } -void DialogTool::ArrowRight(){ +void DialogTool::ArrowRight() +{ Q_ASSERT(spinBoxAngle != 0); spinBoxAngle->setValue(0); } -void DialogTool::ArrowLeftUp(){ +void DialogTool::ArrowLeftUp() +{ Q_ASSERT(spinBoxAngle != 0); spinBoxAngle->setValue(135); } -void DialogTool::ArrowLeftDown(){ +void DialogTool::ArrowLeftDown() +{ Q_ASSERT(spinBoxAngle != 0); spinBoxAngle->setValue(225); } -void DialogTool::ArrowRightUp(){ +void DialogTool::ArrowRightUp() +{ Q_ASSERT(spinBoxAngle != 0); spinBoxAngle->setValue(45); } -void DialogTool::ArrowRightDown(){ +void DialogTool::ArrowRightDown() +{ Q_ASSERT(spinBoxAngle != 0); spinBoxAngle->setValue(315); } -void DialogTool::EvalFormula(){ +void DialogTool::EvalFormula() +{ Q_ASSERT(lineEditFormula != 0); Q_ASSERT(labelResultCalculation != 0); Eval(lineEditFormula, flagFormula, timerFormula, labelResultCalculation); } -void DialogTool::SizeGrowth(){ +void DialogTool::SizeGrowth() +{ ShowVariable(data->DataBase()); } -void DialogTool::StandartTable(){ +void DialogTool::StandartTable() +{ ShowVariable(data->DataStandartTable()); } -void DialogTool::LengthLines(){ +void DialogTool::LengthLines() +{ ShowVariable(data->DataLengthLines()); } -void DialogTool::LengthArcs(){ +void DialogTool::LengthArcs() +{ ShowVariable(data->DataLengthArcs()); } -void DialogTool::LengthCurves(){ +void DialogTool::LengthCurves() +{ ShowVariable(data->DataLengthSplines()); } -void DialogTool::Increments(){ +void DialogTool::Increments() +{ ShowVariable(data->DataIncrementTable()); } -void DialogTool::PutHere(){ +void DialogTool::PutHere() +{ PutValHere(lineEditFormula, listWidget); } -void DialogTool::PutVal(QListWidgetItem *item){ +void DialogTool::PutVal(QListWidgetItem *item) +{ Q_ASSERT(lineEditFormula != 0); Q_ASSERT(item != 0); int pos = lineEditFormula->cursorPosition(); @@ -331,7 +405,8 @@ void DialogTool::PutVal(QListWidgetItem *item){ lineEditFormula->setCursorPosition(pos + item->text().size()); } -void DialogTool::ValChenged(int row){ +void DialogTool::ValChenged(int row) +{ Q_ASSERT(listWidget != 0); Q_ASSERT(labelDescription != 0); Q_ASSERT(radioButtonSizeGrowth != 0); @@ -340,48 +415,57 @@ void DialogTool::ValChenged(int row){ Q_ASSERT(radioButtonLengthLine != 0); Q_ASSERT(radioButtonLengthArc != 0); Q_ASSERT(radioButtonLengthCurve != 0); - if(listWidget->count() == 0){ + if (listWidget->count() == 0) + { return; } QListWidgetItem *item = listWidget->item( row ); - if(radioButtonSizeGrowth->isChecked()){ - if(item->text()=="Р"){ + if (radioButtonSizeGrowth->isChecked()) + { + if (item->text()=="Р") + { QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->growth()).arg(tr("Growth")); labelDescription->setText(desc); } - if(item->text()=="Сг"){ + if (item->text()=="Сг") + { QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->size()).arg(tr("Size")); labelDescription->setText(desc); } return; } - if(radioButtonStandartTable->isChecked()){ + if (radioButtonStandartTable->isChecked()) + { VStandartTableCell stable = data->GetStandartTableCell(item->text()); QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetValueStandartTableCell(item->text())) .arg(stable.GetDescription()); labelDescription->setText(desc); return; } - if(radioButtonIncrements->isChecked()){ + if (radioButtonIncrements->isChecked()) + { VIncrementTableRow itable = data->GetIncrementTableRow(item->text()); QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetValueIncrementTableRow(item->text())) .arg(itable.getDescription()); labelDescription->setText(desc); return; } - if(radioButtonLengthLine->isChecked()){ + if (radioButtonLengthLine->isChecked()) + { QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLine(item->text())) .arg(tr("Line length")); labelDescription->setText(desc); return; } - if(radioButtonLengthArc->isChecked()){ + if (radioButtonLengthArc->isChecked()) + { QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLengthArc(item->text())) .arg(tr("Arc length")); labelDescription->setText(desc); return; } - if(radioButtonLengthCurve->isChecked()){ + if (radioButtonLengthCurve->isChecked()) + { QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetLengthSpline(item->text())) .arg(tr("Curve length")); labelDescription->setText(desc); @@ -389,7 +473,8 @@ void DialogTool::ValChenged(int row){ } } -void DialogTool::UpdateList(){ +void DialogTool::UpdateList() +{ Q_ASSERT(radioButtonSizeGrowth != 0); Q_ASSERT(radioButtonStandartTable != 0); Q_ASSERT(radioButtonIncrements != 0); @@ -397,28 +482,36 @@ void DialogTool::UpdateList(){ Q_ASSERT(radioButtonLengthArc != 0); Q_ASSERT(radioButtonLengthCurve != 0); - if(radioButtonSizeGrowth->isChecked()){ + if (radioButtonSizeGrowth->isChecked()) + { ShowVariable(data->DataBase()); } - if(radioButtonStandartTable->isChecked()){ + if (radioButtonStandartTable->isChecked()) + { ShowVariable(data->DataStandartTable()); } - if(radioButtonIncrements->isChecked()){ + if (radioButtonIncrements->isChecked()) + { ShowVariable(data->DataIncrementTable()); } - if(radioButtonLengthLine->isChecked()){ + if (radioButtonLengthLine->isChecked()) + { ShowVariable(data->DataLengthLines()); } - if(radioButtonLengthArc->isChecked()){ + if (radioButtonLengthArc->isChecked()) + { ShowVariable(data->DataLengthArcs()); } - if(radioButtonLengthCurve->isChecked()){ + if (radioButtonLengthCurve->isChecked()) + { ShowVariable(data->DataLengthSplines()); } } -bool DialogTool::CheckObject(const qint64 &id){ - if(mode == Draw::Calculation || idDetail == 0){ +bool DialogTool::CheckObject(const qint64 &id) +{ + if (mode == Draw::Calculation || idDetail == 0) + { return false; } VDetail det = data->GetDetail(idDetail); @@ -426,20 +519,23 @@ bool DialogTool::CheckObject(const qint64 &id){ } template -void DialogTool::ShowVariable(const QHash *var){ +void DialogTool::ShowVariable(const QHash *var) +{ Q_ASSERT(listWidget != 0); disconnect(listWidget, &QListWidget::currentRowChanged, this, &DialogTool::ValChenged); listWidget->clear(); QHashIterator i(*var); QMap map; - while (i.hasNext()) { + while (i.hasNext()) + { i.next(); map.insert(i.key(), i.value()); } QMapIterator iMap(map); - while (iMap.hasNext()) { + while (iMap.hasNext()) + { iMap.next(); QListWidgetItem *item = new QListWidgetItem(iMap.key()); item->setFont(QFont("Times", 12, QFont::Bold)); diff --git a/dialogs/dialogtool.h b/dialogs/dialogtool.h index 02b3d56f6..02eea1fad 100644 --- a/dialogs/dialogtool.h +++ b/dialogs/dialogtool.h @@ -25,11 +25,11 @@ #include #include -class DialogTool : public QDialog{ +class DialogTool : public QDialog +{ Q_OBJECT public: - DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation, - QWidget *parent = 0); + DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); virtual ~DialogTool() {} inline qint64 getIdDetail() const {return idDetail;} inline void setIdDetail(const qint64 &value) {idDetail = value;} diff --git a/dialogs/dialogtriangle.cpp b/dialogs/dialogtriangle.cpp index c86e3c008..336ddd7cc 100644 --- a/dialogs/dialogtriangle.cpp +++ b/dialogs/dialogtriangle.cpp @@ -1,9 +1,10 @@ #include "dialogtriangle.h" #include "ui_dialogtriangle.h" -DialogTriangle::DialogTriangle(const VContainer *data, Draw::Draws mode, QWidget *parent) : - DialogTool(data, mode, parent), ui(new Ui::DialogTriangle), number(0), pointName(QString()), axisP1Id(0), - axisP2Id(0), firstPointId(0), secondPointId(0){ +DialogTriangle::DialogTriangle(const VContainer *data, Draw::Draws mode, QWidget *parent) + :DialogTool(data, mode, parent), ui(new Ui::DialogTriangle), number(0), pointName(QString()), axisP1Id(0), + axisP2Id(0), firstPointId(0), secondPointId(0) +{ ui->setupUi(this); labelEditNamePoint = ui->labelEditNamePoint; bOk = ui->buttonBox->button(QDialogButtonBox::Ok); @@ -19,58 +20,71 @@ DialogTriangle::DialogTriangle(const VContainer *data, Draw::Draws mode, QWidget connect(ui->lineEditNamePoint, &QLineEdit::textChanged, this, &DialogTriangle::NamePointChanged); } -DialogTriangle::~DialogTriangle(){ +DialogTriangle::~DialogTriangle() +{ delete ui; } -void DialogTriangle::ChoosedObject(qint64 id, Scene::Scenes type){ - if(idDetail == 0 && mode == Draw::Modeling){ - if(type == Scene::Detail){ +void DialogTriangle::ChoosedObject(qint64 id, Scene::Scenes type) +{ + if (idDetail == 0 && mode == Draw::Modeling) + { + if (type == Scene::Detail) + { idDetail = id; return; } } - if(mode == Draw::Modeling){ - if(!CheckObject(id)){ + if (mode == Draw::Modeling) + { + if (CheckObject(id) == false) + { return; } } - if(type == Scene::Point){ + if (type == Scene::Point) + { VPointF point; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { point = data->GetPoint(id); - } else { + } + else + { point = data->GetModelingPoint(id); } - switch(number){ - case(0): - ChangeCurrentText(ui->comboBoxAxisP1, point.name()); - number++; - emit ToolTip(tr("Select second point of axis")); - break; - case(1): - ChangeCurrentText(ui->comboBoxAxisP2, point.name()); - number++; - emit ToolTip(tr("Select first point")); - break; - case(2): - ChangeCurrentText(ui->comboBoxFirstPoint, point.name()); - number++; - emit ToolTip(tr("Select second point")); - break; - case(3): - ChangeCurrentText(ui->comboBoxSecondPoint, point.name()); - number = 0; - emit ToolTip(tr("")); - if(!isInitialized){ - this->show(); - } - break; + switch (number) + { + case (0): + ChangeCurrentText(ui->comboBoxAxisP1, point.name()); + number++; + emit ToolTip(tr("Select second point of axis")); + break; + case (1): + ChangeCurrentText(ui->comboBoxAxisP2, point.name()); + number++; + emit ToolTip(tr("Select first point")); + break; + case (2): + ChangeCurrentText(ui->comboBoxFirstPoint, point.name()); + number++; + emit ToolTip(tr("Select second point")); + break; + case (3): + ChangeCurrentText(ui->comboBoxSecondPoint, point.name()); + number = 0; + emit ToolTip(tr("")); + if (isInitialized == false) + { + this->show(); + } + break; } } } -void DialogTriangle::DialogAccepted(){ +void DialogTriangle::DialogAccepted() +{ pointName = ui->lineEditNamePoint->text(); firstPointId = getCurrentPointId(ui->comboBoxFirstPoint); secondPointId = getCurrentPointId(ui->comboBoxSecondPoint); @@ -79,28 +93,32 @@ void DialogTriangle::DialogAccepted(){ emit DialogClosed(QDialog::Accepted); } -void DialogTriangle::setPointName(const QString &value){ +void DialogTriangle::setPointName(const QString &value) +{ pointName = value; ui->lineEditNamePoint->setText(pointName); } -void DialogTriangle::setSecondPointId(const qint64 &value, const qint64 &id){ +void DialogTriangle::setSecondPointId(const qint64 &value, const qint64 &id) +{ secondPointId = value; setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); } -void DialogTriangle::setFirstPointId(const qint64 &value, const qint64 &id){ +void DialogTriangle::setFirstPointId(const qint64 &value, const qint64 &id) +{ firstPointId = value; setCurrentPointId(ui->comboBoxFirstPoint, firstPointId, value, id); } -void DialogTriangle::setAxisP2Id(const qint64 &value, const qint64 &id){ +void DialogTriangle::setAxisP2Id(const qint64 &value, const qint64 &id) +{ axisP2Id = value; setCurrentPointId(ui->comboBoxAxisP2, axisP2Id, value, id); } -void DialogTriangle::setAxisP1Id(const qint64 &value, const qint64 &id){ +void DialogTriangle::setAxisP1Id(const qint64 &value, const qint64 &id) +{ axisP1Id = value; setCurrentPointId(ui->comboBoxAxisP1, axisP1Id, value, id); } - diff --git a/dialogs/dialogtriangle.h b/dialogs/dialogtriangle.h index 13b7c0c9d..3c43fc89f 100644 --- a/dialogs/dialogtriangle.h +++ b/dialogs/dialogtriangle.h @@ -24,15 +24,16 @@ #include "dialogtool.h" -namespace Ui { -class DialogTriangle; +namespace Ui +{ + class DialogTriangle; } -class DialogTriangle : public DialogTool{ +class DialogTriangle : public DialogTool +{ Q_OBJECT public: - DialogTriangle(const VContainer *data, Draw::Draws mode = Draw::Calculation, - QWidget *parent = 0); + DialogTriangle(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogTriangle(); inline qint64 getAxisP1Id() const {return axisP1Id;} void setAxisP1Id(const qint64 &value, const qint64 &id); diff --git a/exception/vexception.cpp b/exception/vexception.cpp index a32b8ebde..07aaa4795 100644 --- a/exception/vexception.cpp +++ b/exception/vexception.cpp @@ -21,11 +21,13 @@ #include "vexception.h" -VException::VException(const QString &what):QException(), what(what){ - Q_ASSERT_X(!what.isEmpty(), Q_FUNC_INFO, "Error message is empty"); +VException::VException(const QString &what):QException(), what(what) +{ + Q_ASSERT_X(what.isEmpty() == false, Q_FUNC_INFO, "Error message is empty"); } -QString VException::ErrorMessage() const{ +QString VException::ErrorMessage() const +{ QString error = QString("Exception: %1").arg(what); return error; } diff --git a/exception/vexception.h b/exception/vexception.h index 28fa4c037..87b34cfc0 100644 --- a/exception/vexception.h +++ b/exception/vexception.h @@ -25,7 +25,8 @@ #include -class VException : public QException{ +class VException : public QException +{ public: VException(const QString &what); VException(const VException &e):what(e.What()){} diff --git a/exception/vexceptionbadid.cpp b/exception/vexceptionbadid.cpp index 02bf10a76..f11841124 100644 --- a/exception/vexceptionbadid.cpp +++ b/exception/vexceptionbadid.cpp @@ -21,13 +21,16 @@ #include "vexceptionbadid.h" -QString VExceptionBadId::ErrorMessage() const{ +QString VExceptionBadId::ErrorMessage() const +{ QString error; - if(key.isEmpty()){ + if (key.isEmpty()) + { error = QString("ExceptionBadId: %1, id = %2").arg(what).arg(id); - } else { + } + else + { error = QString("ExceptionBadId: %1, id = %2").arg(what).arg(key); } return error; } - diff --git a/exception/vexceptionbadid.h b/exception/vexceptionbadid.h index 89959d5d8..6ddf034c5 100644 --- a/exception/vexceptionbadid.h +++ b/exception/vexceptionbadid.h @@ -24,12 +24,15 @@ #include "vexception.h" -class VExceptionBadId : public VException{ +class VExceptionBadId : public VException +{ public: - VExceptionBadId(const QString &what, const qint64 &id):VException(what), id(id), - key(QString()){} - VExceptionBadId(const QString &what, const QString &key):VException(what), id(0), key(key){} - VExceptionBadId(const VExceptionBadId &e):VException(e), id(e.BadId()), key(e.BadKey()){} + VExceptionBadId(const QString &what, const qint64 &id) + :VException(what), id(id), key(QString()){} + VExceptionBadId(const QString &what, const QString &key) + :VException(what), id(0), key(key){} + VExceptionBadId(const VExceptionBadId &e) + :VException(e), id(e.BadId()), key(e.BadKey()){} virtual ~VExceptionBadId() noexcept(true){} virtual QString ErrorMessage() const; inline qint64 BadId() const {return id; } diff --git a/exception/vexceptionconversionerror.cpp b/exception/vexceptionconversionerror.cpp index 487d7ad3b..9e53d1a54 100644 --- a/exception/vexceptionconversionerror.cpp +++ b/exception/vexceptionconversionerror.cpp @@ -22,11 +22,13 @@ #include "vexceptionconversionerror.h" VExceptionConversionError::VExceptionConversionError(const QString &what, const QString &str) - :VException(what), str(str){ - Q_ASSERT_X(!str.isEmpty(), Q_FUNC_INFO, "Error converting string is empty"); + :VException(what), str(str) +{ + Q_ASSERT_X(str.isEmpty() == false, Q_FUNC_INFO, "Error converting string is empty"); } -QString VExceptionConversionError::ErrorMessage() const{ +QString VExceptionConversionError::ErrorMessage() const +{ QString error = QString("ExceptionConversionError: %1 %2").arg(what, str); return error; } diff --git a/exception/vexceptionconversionerror.h b/exception/vexceptionconversionerror.h index 904093e63..bd8313b3d 100644 --- a/exception/vexceptionconversionerror.h +++ b/exception/vexceptionconversionerror.h @@ -24,10 +24,12 @@ #include "vexception.h" -class VExceptionConversionError : public VException{ +class VExceptionConversionError : public VException +{ public: VExceptionConversionError(const QString &what, const QString &str); - VExceptionConversionError(const VExceptionConversionError &e):VException(e), str(e.String()){} + VExceptionConversionError(const VExceptionConversionError &e) + :VException(e), str(e.String()){} virtual ~VExceptionConversionError() noexcept(true) {} virtual QString ErrorMessage() const; inline QString String() const {return str;} diff --git a/exception/vexceptionemptyparameter.cpp b/exception/vexceptionemptyparameter.cpp index 31dc1550f..038f98f1d 100644 --- a/exception/vexceptionemptyparameter.cpp +++ b/exception/vexceptionemptyparameter.cpp @@ -22,22 +22,25 @@ #include "vexceptionemptyparameter.h" VExceptionEmptyParameter::VExceptionEmptyParameter(const QString &what, const QString &name, - const QDomElement &domElement): VException(what), - name(name), tagText(QString()), tagName(QString()), lineNumber(-1){ - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); - Q_ASSERT_X(!name.isEmpty(), Q_FUNC_INFO, "Parameter name is empty"); + const QDomElement &domElement) + : VException(what), name(name), tagText(QString()), tagName(QString()), lineNumber(-1) +{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); + Q_ASSERT_X(name.isEmpty() == false, Q_FUNC_INFO, "Parameter name is empty"); QTextStream stream(&tagText); domElement.save(stream, 4); tagName = domElement.tagName(); lineNumber = domElement.lineNumber(); } -QString VExceptionEmptyParameter::ErrorMessage() const{ +QString VExceptionEmptyParameter::ErrorMessage() const +{ QString error = QString("ExceptionEmptyParameter: %1 %2").arg(what, name); return error; } -QString VExceptionEmptyParameter::DetailedInformation() const{ +QString VExceptionEmptyParameter::DetailedInformation() const +{ QString detail = QString("tag: %1 in line %2\nFull tag:\n%3").arg(tagName).arg(lineNumber).arg(tagText); return detail; } diff --git a/exception/vexceptionemptyparameter.h b/exception/vexceptionemptyparameter.h index f03be1cec..c7fbae985 100644 --- a/exception/vexceptionemptyparameter.h +++ b/exception/vexceptionemptyparameter.h @@ -24,12 +24,13 @@ #include "vexception.h" -class VExceptionEmptyParameter : public VException{ +class VExceptionEmptyParameter : public VException +{ public: - VExceptionEmptyParameter(const QString &what, const QString &name, - const QDomElement &domElement); - VExceptionEmptyParameter(const VExceptionEmptyParameter &e):VException(e), name(e.Name()), - tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} + VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement); + VExceptionEmptyParameter(const VExceptionEmptyParameter &e) + :VException(e), name(e.Name()), tagText(e.TagText()), tagName(e.TagName()), + lineNumber(e.LineNumber()){} virtual ~VExceptionEmptyParameter() noexcept(true) {} virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; diff --git a/exception/vexceptionobjecterror.cpp b/exception/vexceptionobjecterror.cpp index 11d5be2b6..b1dcbfd5c 100644 --- a/exception/vexceptionobjecterror.cpp +++ b/exception/vexceptionobjecterror.cpp @@ -22,33 +22,41 @@ #include "vexceptionobjecterror.h" #include -VExceptionObjectError::VExceptionObjectError(const QString &what, const QDomElement &domElement): - VException(what), tagText(QString()), tagName(QString()), lineNumber(-1), moreInfo(QString()){ - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); +VExceptionObjectError::VExceptionObjectError(const QString &what, const QDomElement &domElement) + :VException(what), tagText(QString()), tagName(QString()), lineNumber(-1), moreInfo(QString()) +{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); QTextStream stream(&tagText); domElement.save(stream, 4); tagName = domElement.tagName(); lineNumber = domElement.lineNumber(); } -QString VExceptionObjectError::ErrorMessage() const{ +QString VExceptionObjectError::ErrorMessage() const +{ QString error = QString("ExceptionObjectError: %1").arg(what); return error; } -QString VExceptionObjectError::DetailedInformation() const{ +QString VExceptionObjectError::DetailedInformation() const +{ QString detail; - if(!moreInfo.isEmpty()){ + if (moreInfo.isEmpty() == false) + { QString i = QString("tag: %1 in line %2\n%3").arg(tagName).arg(lineNumber).arg(tagText); detail = QString("%1\n%2").arg(moreInfo, i); - } else { + } + else + { detail = QString("tag: %1 in line %2\n%3").arg(tagName).arg(lineNumber).arg(tagText); } return detail; } -void VExceptionObjectError::AddMoreInformation(const QString &info){ - if(info.isEmpty()){ +void VExceptionObjectError::AddMoreInformation(const QString &info) +{ + if (info.isEmpty()) + { qWarning()<<"Error additional information is empty."<moreInfo.append(info); diff --git a/exception/vexceptionobjecterror.h b/exception/vexceptionobjecterror.h index db12bb943..f564347b8 100644 --- a/exception/vexceptionobjecterror.h +++ b/exception/vexceptionobjecterror.h @@ -24,11 +24,13 @@ #include "vexception.h" -class VExceptionObjectError : public VException{ +class VExceptionObjectError : public VException +{ public: VExceptionObjectError(const QString &what, const QDomElement &domElement); - VExceptionObjectError(const VExceptionObjectError &e):VException(e), tagText(e.TagText()), - tagName(e.TagName()), lineNumber(e.LineNumber()), moreInfo(e.MoreInformation()){} + VExceptionObjectError(const VExceptionObjectError &e) + :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()), + moreInfo(e.MoreInformation()){} virtual ~VExceptionObjectError() noexcept(true) {} virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; diff --git a/exception/vexceptionuniqueid.cpp b/exception/vexceptionuniqueid.cpp index c33fb592d..9f38b31a7 100644 --- a/exception/vexceptionuniqueid.cpp +++ b/exception/vexceptionuniqueid.cpp @@ -1,20 +1,23 @@ #include "vexceptionuniqueid.h" VExceptionUniqueId::VExceptionUniqueId(const QString &what, const QDomElement &domElement) - :VException(what), tagText(QString()), tagName(QString()), lineNumber(-1){ - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); + :VException(what), tagText(QString()), tagName(QString()), lineNumber(-1) +{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); QTextStream stream(&tagText); domElement.save(stream, 4); tagName = domElement.tagName(); lineNumber = domElement.lineNumber(); } -QString VExceptionUniqueId::ErrorMessage() const{ +QString VExceptionUniqueId::ErrorMessage() const +{ QString error = QString("ExceptionUniqueId: %1").arg(what); return error; } -QString VExceptionUniqueId::DetailedInformation() const{ +QString VExceptionUniqueId::DetailedInformation() const +{ QString detail = QString("tag: %1 in line %2\nFull tag:\n%3").arg(tagName).arg(lineNumber).arg(tagText); return detail; } diff --git a/exception/vexceptionuniqueid.h b/exception/vexceptionuniqueid.h index d2e9cb5bd..bd5b833d1 100644 --- a/exception/vexceptionuniqueid.h +++ b/exception/vexceptionuniqueid.h @@ -3,11 +3,12 @@ #include "vexception.h" -class VExceptionUniqueId : public VException{ +class VExceptionUniqueId : public VException +{ public: VExceptionUniqueId(const QString &what, const QDomElement &domElement); - VExceptionUniqueId(const VExceptionUniqueId &e):VException(e), tagText(e.TagText()), - tagName(e.TagName()), lineNumber(e.LineNumber()){} + VExceptionUniqueId(const VExceptionUniqueId &e) + :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionUniqueId() noexcept(true){} virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; diff --git a/exception/vexceptionwrongparameterid.cpp b/exception/vexceptionwrongparameterid.cpp index 1ee8d090b..4e10560e3 100644 --- a/exception/vexceptionwrongparameterid.cpp +++ b/exception/vexceptionwrongparameterid.cpp @@ -22,21 +22,24 @@ #include "vexceptionwrongparameterid.h" #include -VExceptionWrongParameterId::VExceptionWrongParameterId(const QString &what, const QDomElement &domElement): - VException(what), tagText(QString()), tagName(QString()), lineNumber(-1){ - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); +VExceptionWrongParameterId::VExceptionWrongParameterId(const QString &what, const QDomElement &domElement) + :VException(what), tagText(QString()), tagName(QString()), lineNumber(-1) +{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); QTextStream stream(&tagText); domElement.save(stream, 4); tagName = domElement.tagName(); lineNumber = domElement.lineNumber(); } -QString VExceptionWrongParameterId::ErrorMessage() const{ +QString VExceptionWrongParameterId::ErrorMessage() const +{ QString error = QString("ExceptionWrongParameterId: %1").arg(what); return error; } -QString VExceptionWrongParameterId::DetailedInformation() const{ +QString VExceptionWrongParameterId::DetailedInformation() const +{ QString detail = QString("tag: %1 in line %2\n%3").arg(tagName).arg(lineNumber).arg(tagText); return detail; } diff --git a/exception/vexceptionwrongparameterid.h b/exception/vexceptionwrongparameterid.h index 6e81fcb43..905f32f11 100644 --- a/exception/vexceptionwrongparameterid.h +++ b/exception/vexceptionwrongparameterid.h @@ -24,11 +24,12 @@ #include "vexception.h" -class VExceptionWrongParameterId : public VException{ +class VExceptionWrongParameterId : public VException +{ public: VExceptionWrongParameterId(const QString &what, const QDomElement &domElement); - VExceptionWrongParameterId(const VExceptionWrongParameterId &e):VException(e),tagText(e.TagText()), - tagName(e.TagName()), lineNumber(e.LineNumber()){} + VExceptionWrongParameterId(const VExceptionWrongParameterId &e) + :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionWrongParameterId() noexcept(true){} virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; diff --git a/geometry/varc.cpp b/geometry/varc.cpp index cff5c6119..14528dd22 100644 --- a/geometry/varc.cpp +++ b/geometry/varc.cpp @@ -22,23 +22,23 @@ #include "varc.h" #include -VArc::VArc () : f1(0), formulaF1(QString()), f2(0), formulaF2(QString()), radius(0), formulaRadius(QString()), - center(0), points(QHash()), mode(Draw::Calculation), idObject(0){ -} +VArc::VArc () + : f1(0), formulaF1(QString()), f2(0), formulaF2(QString()), radius(0), formulaRadius(QString()), + center(0), points(QHash()), mode(Draw::Calculation), idObject(0){} VArc::VArc (const QHash *points, qint64 center, qreal radius, QString formulaRadius, qreal f1, QString formulaF1, qreal f2, QString formulaF2, Draw::Draws mode, qint64 idObject) : f1(f1), formulaF1(formulaF1), f2(f2), formulaF2(formulaF2), radius(radius), formulaRadius(formulaRadius), - center(center), points(*points), mode(mode), idObject(idObject){ -} + center(center), points(*points), mode(mode), idObject(idObject){} -VArc::VArc(const VArc &arc): f1(arc.GetF1()), formulaF1(arc.GetFormulaF1()), f2(arc.GetF2()), +VArc::VArc(const VArc &arc) + : f1(arc.GetF1()), formulaF1(arc.GetFormulaF1()), f2(arc.GetF2()), formulaF2(arc.GetFormulaF2()), radius(arc.GetRadius()), formulaRadius(arc.GetFormulaRadius()), center(arc.GetCenter()), points(arc.GetDataPoints()), mode(arc.getMode()), - idObject(arc.getIdObject()){ -} + idObject(arc.getIdObject()){} -VArc &VArc::operator =(const VArc &arc){ +VArc &VArc::operator =(const VArc &arc) +{ this->points = arc.GetDataPoints(); this->f1 = arc.GetF1(); this->formulaF1 = arc.GetFormulaF1(); @@ -52,35 +52,43 @@ VArc &VArc::operator =(const VArc &arc){ return *this; } -QPointF VArc::GetCenterPoint() const{ - if(points.contains(center)){ +QPointF VArc::GetCenterPoint() const +{ + if (points.contains(center)) + { return points.value(center).toQPointF(); - } else { + } + else + { QString error = QString(tr("Can't find id = %1 in table.")).arg(center); throw VException(error); } return QPointF(); } -QPointF VArc::GetP1() const{ +QPointF VArc::GetP1() const +{ QPointF p1 ( GetCenterPoint().x () + radius, GetCenterPoint().y () ); QLineF centerP1(GetCenterPoint(), p1); centerP1.setAngle(f1); return centerP1.p2(); } -QPointF VArc::GetP2 () const{ +QPointF VArc::GetP2 () const +{ QPointF p2 ( GetCenterPoint().x () + radius, GetCenterPoint().y () ); QLineF centerP2(GetCenterPoint(), p2); centerP2.setAngle(f2); return centerP2.p2(); } -const QHash VArc::GetDataPoints() const{ +const QHash VArc::GetDataPoints() const +{ return points; } -QPainterPath VArc::GetPath() const{ +QPainterPath VArc::GetPath() const +{ QPainterPath Path; QPointF center = GetCenterPoint(); QRectF rect(center.x()-radius, center.y()-radius, radius*2, radius*2); @@ -90,74 +98,96 @@ QPainterPath VArc::GetPath() const{ return Path; } -qreal VArc::AngleArc() const{ - QLineF l1(0,0, 100, 100); +qreal VArc::AngleArc() const +{ + QLineF l1(0, 0, 100, 100); l1.setAngle(f1); - QLineF l2(0,0, 100, 100); + QLineF l2(0, 0, 100, 100); l2.setAngle(f2); return l1.angleTo(l2); } -qint32 VArc::NumberSplOfArc() const{ +qint32 VArc::NumberSplOfArc() const +{ qint32 angArc = static_cast (AngleArc ()); - switch( angArc ){ - case 0:{ - QString error = QString(tr("Angle of arc can't be 0 degree.")); - throw VException(error); - } - case 90: - return 1; - case 180: - return 2; - case 270: - return 3; - case 360: - return 4; - default : - return static_cast (AngleArc ( ) / 90 + 1); + switch ( angArc ) + { + case 0: + { + QString error = QString(tr("Angle of arc can't be 0 degree.")); + throw VException(error); + } + case 90: + return 1; + case 180: + return 2; + case 270: + return 3; + case 360: + return 4; + default: + return static_cast (AngleArc ( ) / 90 + 1); } } -QVector VArc::GetPoints() const{ +QVector VArc::GetPoints() const +{ QVector points; qint32 numberSpl = NumberSplOfArc(); - for(qint32 i = 1; i <= numberSpl; ++i){ + for (qint32 i = 1; i <= numberSpl; ++i) + { points< VArc::SplOfArc(qint32 number) const{ +QVector VArc::SplOfArc(qint32 number) const +{ qint32 n = NumberSplOfArc (); - if( number > n ){ + if ( number > n ) + { QString error = QString(tr("Arc have not this number of part.")); throw VException(error); } qreal f1 = GetF1 (); qreal f2 = GetF2 (); qint32 i; - for ( i = 0; i < n; ++i ){ - if ( i == n - 1 ){ + for ( i = 0; i < n; ++i ) + { + if ( i == n - 1 ) + { f2 = GetF2 (); - } else { - if ( f1 + 90 > 360 ){ + } + else + { + if ( f1 + 90 > 360 ) + { f2 = f1 + 90 - 360; - } else { + } + else + { f2 = f1 + 90; } } qreal anglF1, anglF2; - if ( f1 + 90 > 360 ){ - anglF1 = f1 + 90 - 360 ; - } else { - anglF1 = f1 + 90 ; + if ( f1 + 90 > 360 ) + { + anglF1 = f1 + 90 - 360; } - if ( f2 - 90 < 0 ){ - anglF2 = 360 + f2 - 90 ; - } else { - anglF2 = f2 - 90 ; + else + { + anglF1 = f1 + 90; } - if ( i + 1 == number ){ + if ( f2 - 90 < 0 ) + { + anglF2 = 360 + f2 - 90; + } + else + { + anglF2 = f2 - 90; + } + if ( i + 1 == number ) + { f1 = f2; return VSpline::SplinePoints(GetP1 (), GetP2 (), anglF1, anglF2, 1., 1., 1.); } diff --git a/geometry/varc.h b/geometry/varc.h index 1de78e3fd..6f4b4771b 100644 --- a/geometry/varc.h +++ b/geometry/varc.h @@ -27,7 +27,8 @@ /** * @brief VArc клас, що реалізує дугу. Дуга розраховується за годиниковою стрілкою. */ -class VArc{ +class VArc +{ Q_DECLARE_TR_FUNCTIONS(VArc) public: /** @@ -42,7 +43,7 @@ public: * @param f2 кінцевий кут в градусах. */ VArc (const QHash *points, qint64 center, qreal radius, QString formulaRadius, - qreal f1, QString formulaF1, qreal f2 , QString formulaF2, + qreal f1, QString formulaF1, qreal f2, QString formulaF2, Draw::Draws mode = Draw::Calculation, qint64 idObject = 0); VArc(const VArc &arc); VArc& operator= (const VArc &arc); @@ -103,12 +104,12 @@ private: /** * @brief f1 початковий кут в градусах */ - qreal f1; // початковий кут нахилу дуги (градуси) + qreal f1; // початковий кут нахилу дуги (градуси) QString formulaF1; /** * @brief f2 кінцевий кут в градусах */ - qreal f2; // кінцевий кут нахилу дуги (градуси) + qreal f2; // кінцевий кут нахилу дуги (градуси) QString formulaF2; /** * @brief radius радіус дуги. diff --git a/geometry/vdetail.cpp b/geometry/vdetail.cpp index 2b4433444..6bfdf3add 100644 --- a/geometry/vdetail.cpp +++ b/geometry/vdetail.cpp @@ -21,20 +21,21 @@ #include "vdetail.h" -VDetail::VDetail():nodes(QVector()),name(QString()), mx(0), my(0), supplement(true), closed(true), - width(10){ -} +VDetail::VDetail() + :nodes(QVector()), name(QString()), mx(0), my(0), supplement(true), closed(true), width(10){} -VDetail::VDetail(const QString &name, const QVector &nodes):nodes(QVector()), - name(name), mx(0), my(0), supplement(true), closed(true), width(10){ +VDetail::VDetail(const QString &name, const QVector &nodes) + :nodes(QVector()), name(name), mx(0), my(0), supplement(true), closed(true), width(10) +{ this->nodes = nodes; } -VDetail::VDetail(const VDetail &detail):nodes(detail.getNodes()), name(detail.getName()), mx(detail.getMx()), - my(detail.getMy()), supplement(detail.getSupplement()), closed(detail.getClosed()), width(detail.getWidth()){ -} +VDetail::VDetail(const VDetail &detail) + :nodes(detail.getNodes()), name(detail.getName()), mx(detail.getMx()), my(detail.getMy()), + supplement(detail.getSupplement()), closed(detail.getClosed()), width(detail.getWidth()){} -VDetail &VDetail::operator =(const VDetail &detail){ +VDetail &VDetail::operator =(const VDetail &detail) +{ nodes = detail.getNodes(); name = detail.getName(); mx = detail.getMx(); @@ -45,7 +46,8 @@ VDetail &VDetail::operator =(const VDetail &detail){ return *this; } -void VDetail::Clear(){ +void VDetail::Clear() +{ nodes.clear(); name.clear(); mx = 0; @@ -55,17 +57,20 @@ void VDetail::Clear(){ width = 10; } -bool VDetail::Containes(const qint64 &id) const{ - for(qint32 i = 0; i < nodes.size(); ++i){ +bool VDetail::Containes(const qint64 &id) const +{ + for (qint32 i = 0; i < nodes.size(); ++i) + { VNodeDetail node = nodes[i]; - if(node.getId() == id){ + if (node.getId() == id) + { return true; } } return false; } -VNodeDetail &VDetail::operator [](int indx){ +VNodeDetail &VDetail::operator [](int indx) +{ return nodes[indx]; } - diff --git a/geometry/vdetail.h b/geometry/vdetail.h index f042f93a9..c715ea8da 100644 --- a/geometry/vdetail.h +++ b/geometry/vdetail.h @@ -24,7 +24,8 @@ #include "vnodedetail.h" -namespace Detail { +namespace Detail +{ enum Contour { OpenContour, CloseContour }; Q_DECLARE_FLAGS(Contours, Contour) @@ -34,7 +35,8 @@ namespace Detail { Q_DECLARE_OPERATORS_FOR_FLAGS(Detail::Contours) Q_DECLARE_OPERATORS_FOR_FLAGS(Detail::Equidistants) -class VDetail{ +class VDetail +{ public: VDetail(); VDetail(const QString &name, const QVector &nodes); diff --git a/geometry/vnodedetail.cpp b/geometry/vnodedetail.cpp index 33a5a1407..a3e62e51f 100644 --- a/geometry/vnodedetail.cpp +++ b/geometry/vnodedetail.cpp @@ -21,20 +21,19 @@ #include "vnodedetail.h" -VNodeDetail::VNodeDetail():id(0), typeTool(Tool::NodePoint), mode(Draw::Modeling), - typeNode(NodeDetail::Contour), mx(0), my(0){ -} +VNodeDetail::VNodeDetail() + :id(0), typeTool(Tool::NodePoint), mode(Draw::Modeling), typeNode(NodeDetail::Contour), mx(0), my(0){} VNodeDetail::VNodeDetail(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, - qreal mx, qreal my):id(id), typeTool(typeTool), mode(mode), typeNode(typeNode), - mx(mx), my(my){ -} + qreal mx, qreal my) + :id(id), typeTool(typeTool), mode(mode), typeNode(typeNode), mx(mx), my(my){} -VNodeDetail::VNodeDetail(const VNodeDetail &node):id(node.getId()), typeTool(node.getTypeTool()), - mode(node.getMode()), typeNode(node.getTypeNode()), mx(node.getMx()), my(node.getMy()){ -} +VNodeDetail::VNodeDetail(const VNodeDetail &node) + :id(node.getId()), typeTool(node.getTypeTool()), mode(node.getMode()), typeNode(node.getTypeNode()), + mx(node.getMx()), my(node.getMy()){} -VNodeDetail &VNodeDetail::operator =(const VNodeDetail &node){ +VNodeDetail &VNodeDetail::operator =(const VNodeDetail &node) +{ id = node.getId(); typeTool = node.getTypeTool(); mode = node.getMode(); diff --git a/geometry/vnodedetail.h b/geometry/vnodedetail.h index 1b433aaa9..9735445d4 100644 --- a/geometry/vnodedetail.h +++ b/geometry/vnodedetail.h @@ -25,13 +25,15 @@ #include #include "options.h" -namespace NodeDetail { +namespace NodeDetail +{ enum NodeDetail { Contour, Modeling }; Q_DECLARE_FLAGS(NodeDetails, NodeDetail) } Q_DECLARE_OPERATORS_FOR_FLAGS(NodeDetail::NodeDetails) -class VNodeDetail{ +class VNodeDetail +{ public: VNodeDetail(); VNodeDetail(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, diff --git a/geometry/vspline.cpp b/geometry/vspline.cpp index 1273a7f30..67ab29023 100644 --- a/geometry/vspline.cpp +++ b/geometry/vspline.cpp @@ -21,31 +21,34 @@ #include "vspline.h" -VSpline::VSpline():p1(0), p2(QPointF()), p3(QPointF()), p4(0), angle1(0), angle2(0), kAsm1(1), kAsm2(1), - kCurve(1), points(QHash()), mode(Draw::Calculation), idObject(0){ -} +VSpline::VSpline() + :p1(0), p2(QPointF()), p3(QPointF()), p4(0), angle1(0), angle2(0), kAsm1(1), kAsm2(1), kCurve(1), + points(QHash()), mode(Draw::Calculation), idObject(0){} -VSpline::VSpline ( const VSpline & spline ):p1(spline.GetP1 ()), p2(spline.GetP2 ()), p3(spline.GetP3 ()), - p4(spline.GetP4 ()), angle1(spline.GetAngle1 ()), angle2(spline.GetAngle2 ()), kAsm1(spline.GetKasm1()), - kAsm2(spline.GetKasm2()), kCurve(spline.GetKcurve()), points(spline.GetDataPoints()), - mode(spline.getMode()), idObject(spline.getIdObject()){ -} +VSpline::VSpline ( const VSpline & spline ) + :p1(spline.GetP1 ()), p2(spline.GetP2 ()), p3(spline.GetP3 ()), p4(spline.GetP4 ()), angle1(spline.GetAngle1 ()), + angle2(spline.GetAngle2 ()), kAsm1(spline.GetKasm1()), kAsm2(spline.GetKasm2()), kCurve(spline.GetKcurve()), + points(spline.GetDataPoints()), mode(spline.getMode()), idObject(spline.getIdObject()){} VSpline::VSpline (const QHash *points, qint64 p1, qint64 p4, qreal angle1, qreal angle2, - qreal kAsm1, qreal kAsm2 , qreal kCurve, Draw::Draws mode, qint64 idObject):p1(p1), p2(QPointF()), - p3(QPointF()), p4(p4), angle1(angle1), angle2(angle2), kAsm1(kAsm1), kAsm2(kAsm2), kCurve(kCurve), points(*points), - mode(mode), idObject(idObject){ + qreal kAsm1, qreal kAsm2, qreal kCurve, Draw::Draws mode, qint64 idObject) + :p1(p1), p2(QPointF()), p3(QPointF()), p4(p4), angle1(angle1), angle2(angle2), kAsm1(kAsm1), kAsm2(kAsm2), + kCurve(kCurve), points(*points), mode(mode), idObject(idObject) +{ ModifiSpl ( p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve ); } VSpline::VSpline (const QHash *points, qint64 p1, QPointF p2, QPointF p3, qint64 p4, - qreal kCurve, Draw::Draws mode, qint64 idObject):p1(p1), p2(p2), p3(p3), p4(p4), angle1(0), - angle2(0), kAsm1(1), kAsm2(1), kCurve(1), points(*points), mode(mode), idObject(idObject){ + qreal kCurve, Draw::Draws mode, qint64 idObject) + :p1(p1), p2(p2), p3(p3), p4(p4), angle1(0), angle2(0), kAsm1(1), kAsm2(1), kCurve(1), points(*points), mode(mode), + idObject(idObject) +{ ModifiSpl ( p1, p2, p3, p4, kCurve); } void VSpline::ModifiSpl ( qint64 p1, qint64 p4, qreal angle1, qreal angle2, - qreal kAsm1, qreal kAsm2, qreal kCurve){ + qreal kAsm1, qreal kAsm2, qreal kCurve) +{ this->p1 = p1; this->p4 = p4; this->angle1 = angle1; @@ -62,7 +65,7 @@ void VSpline::ModifiSpl ( qint64 p1, qint64 p4, qreal angle1, qreal angle2, // } QPointF point1 = GetPointP1().toQPointF(); QPointF point4 = GetPointP4().toQPointF(); - radius = QLineF(QPointF(point1.x(), point4.y()),point4).length(); + radius = QLineF(QPointF(point1.x(), point4.y()), point4).length(); // radius = QLineF(GetPointP1(), GetPointP4()).length() / 2 / sin( angle * M_PI / 180.0 ); L = kCurve * radius * 4 / 3 * tan( angle * M_PI / 180.0 / 4 ); QLineF p1p2(GetPointP1().x(), GetPointP1().y(), GetPointP1().x() + L * kAsm1, GetPointP1().y()); @@ -73,7 +76,8 @@ void VSpline::ModifiSpl ( qint64 p1, qint64 p4, qreal angle1, qreal angle2, this->p3 = p4p3.p2(); } -void VSpline::ModifiSpl (qint64 p1, QPointF p2, QPointF p3, qint64 p4, qreal kCurve){ +void VSpline::ModifiSpl (qint64 p1, QPointF p2, QPointF p3, qint64 p4, qreal kCurve) +{ this->p1 = p1; this->p2 = p2; this->p3 = p3; @@ -90,7 +94,7 @@ void VSpline::ModifiSpl (qint64 p1, QPointF p2, QPointF p3, qint64 p4, qreal kCu // } QPointF point1 = GetPointP1().toQPointF(); QPointF point4 = GetPointP4().toQPointF(); - radius = QLineF(QPointF(point1.x(), point4.y()),point4).length(); + radius = QLineF(QPointF(point1.x(), point4.y()), point4).length(); // radius = QLineF(GetPointP1(), GetPointP4()).length() / 2 / sin( angle * M_PI / 180.0 ); L = kCurve * radius * 4 / 3 * tan( angle * M_PI / 180.0 / 4 ); @@ -123,37 +127,48 @@ void VSpline::ModifiSpl (qint64 p1, QPointF p2, QPointF p3, qint64 p4, qreal kCu // p4 = QPointF(p4.x()+mx, p4.y()+my); //} -VPointF VSpline::GetPointP1() const{ - if(points.contains(p1)){ +VPointF VSpline::GetPointP1() const +{ + if (points.contains(p1)) + { return points.value(p1); - } else { + } + else + { qCritical()<<"Не можу знайти id = "<p2, this->p3, GetPointP4().toQPointF()); } -QString VSpline::GetName() const{ +QString VSpline::GetName() const +{ VPointF first = GetPointP1(); VPointF second = GetPointP4(); return QString("Spl_%1_%2").arg(first.name(), second.name()); } -QLineF::IntersectType VSpline::CrossingSplLine ( const QLineF &line, QPointF *intersectionPoint ) const{ +QLineF::IntersectType VSpline::CrossingSplLine ( const QLineF &line, QPointF *intersectionPoint ) const +{ QVector px; QVector py; px.append ( GetPointP1 ().x () ); @@ -168,10 +183,12 @@ QLineF::IntersectType VSpline::CrossingSplLine ( const QLineF &line, QPointF *in qint32 i = 0; QPointF crosPoint; QLineF::IntersectType type = QLineF::NoIntersection; - for ( i = 0; i < px.count()-1; ++i ){ + for ( i = 0; i < px.count()-1; ++i ) + { type = line.intersect(QLineF ( QPointF ( px[i], py[i] ), QPointF ( px[i+1], py[i+1] )), &crosPoint); - if ( type == QLineF::BoundedIntersection ){ + if ( type == QLineF::BoundedIntersection ) + { *intersectionPoint = crosPoint; return type; } @@ -236,7 +253,8 @@ QLineF::IntersectType VSpline::CrossingSplLine ( const QLineF &line, QPointF *in // } //} -QVector VSpline::GetPoints () const{ +QVector VSpline::GetPoints () const +{ return GetPoints(GetPointP1().toQPointF(), p2, p3, GetPointP4().toQPointF()); // QLineF line1(points.at(0).toPoint(), points.at(1).toPoint()); // line1.setLength(500); @@ -260,7 +278,8 @@ QVector VSpline::GetPoints () const{ // } } -QVector VSpline::GetPoints (QPointF p1, QPointF p2, QPointF p3, QPointF p4){ +QVector VSpline::GetPoints (QPointF p1, QPointF p2, QPointF p3, QPointF p4) +{ QVector pvector; QVector x; QVector y; @@ -272,17 +291,20 @@ QVector VSpline::GetPoints (QPointF p1, QPointF p2, QPointF p3, QPointF p3.x (), p3.y (), p4.x (), p4.y (), 0, wx, wy ); x.append ( p4.x () ); y.append ( p4.y () ); - for ( qint32 i = 0; i < x.count(); ++i ){ + for ( qint32 i = 0; i < x.count(); ++i ) + { pvector.append( QPointF ( x[i], y[i] ) ); } return pvector; } -qreal VSpline::LengthBezier ( QPointF p1, QPointF p2, QPointF p3, QPointF p4 ) const{ +qreal VSpline::LengthBezier ( QPointF p1, QPointF p2, QPointF p3, QPointF p4 ) const +{ QPainterPath splinePath; QVector points = GetPoints (p1, p2, p3, p4); splinePath.moveTo(points[0]); - for (qint32 i = 1; i < points.count(); ++i){ + for (qint32 i = 1; i < points.count(); ++i) + { splinePath.lineTo(points[i]); } return splinePath.length(); @@ -290,9 +312,10 @@ qreal VSpline::LengthBezier ( QPointF p1, QPointF p2, QPointF p3, QPointF p4 ) c void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, qreal x3, qreal y3, qreal x4, qreal y4, - qint16 level, QVector &px, QVector &py){ - const double curve_collinearity_epsilon = 1e-30; - const double curve_angle_tolerance_epsilon = 0.01; + qint16 level, QVector &px, QVector &py) +{ + const double curve_collinearity_epsilon = 1e-30; + const double curve_angle_tolerance_epsilon = 0.01; const double m_angle_tolerance = 0.0; enum curve_recursion_limit_e { curve_recursion_limit = 32 }; const double m_cusp_limit = 0.0; @@ -302,7 +325,7 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, m_distance_tolerance_square = 0.5 / m_approximation_scale; m_distance_tolerance_square *= m_distance_tolerance_square; - if(level > curve_recursion_limit) + if (level > curve_recursion_limit) { return; } @@ -332,217 +355,240 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, double d3 = fabs(((x3 - x4) * dy - (y3 - y4) * dx)); double da1, da2, k; - switch((static_cast(d2 > curve_collinearity_epsilon) << 1) + - static_cast(d3 > curve_collinearity_epsilon)) + switch ((static_cast(d2 > curve_collinearity_epsilon) << 1) + + static_cast(d3 > curve_collinearity_epsilon)) { - case 0: - // All collinear OR p1==p4 - //---------------------- - k = dx*dx + dy*dy; - if(k == 0) - { - d2 = CalcSqDistance(x1, y1, x2, y2); - d3 = CalcSqDistance(x4, y4, x3, y3); - } - else - { - k = 1 / k; - da1 = x2 - x1; - da2 = y2 - y1; - d2 = k * (da1*dx + da2*dy); - da1 = x3 - x1; - da2 = y3 - y1; - d3 = k * (da1*dx + da2*dy); - if(d2 > 0 && d2 < 1 && d3 > 0 && d3 < 1) - { - // Simple collinear case, 1---2---3---4 - // We can leave just two endpoints - return; - } - if(d2 <= 0) - d2 = CalcSqDistance(x2, y2, x1, y1); - else if(d2 >= 1) - d2 = CalcSqDistance(x2, y2, x4, y4); - else - d2 = CalcSqDistance(x2, y2, x1 + d2*dx, y1 + d2*dy); - - if(d3 <= 0) - d3 = CalcSqDistance(x3, y3, x1, y1); - else if(d3 >= 1) - d3 = CalcSqDistance(x3, y3, x4, y4); - else - d3 = CalcSqDistance(x3, y3, x1 + d3*dx, y1 + d3*dy); - } - if(d2 > d3) - { - if(d2 < m_distance_tolerance_square) - { - - px.append(x2); - py.append(y2); - //m_points.add(point_d(x2, y2)); - return; - } - } - else - { - if(d3 < m_distance_tolerance_square) - { - - px.append(x3); - py.append(y3); - //m_points.add(point_d(x3, y3)); - return; - } - } - break; - case 1: - // p1,p2,p4 are collinear, p3 is significant - //---------------------- - if(d3 * d3 <= m_distance_tolerance_square * (dx*dx + dy*dy)) - { - if(m_angle_tolerance < curve_angle_tolerance_epsilon) - { - - px.append(x23); - py.append(y23); - //m_points.add(point_d(x23, y23)); - return; - } - - // Angle Condition + case 0: + // All collinear OR p1==p4 //---------------------- - da1 = fabs(atan2(y4 - y3, x4 - x3) - atan2(y3 - y2, x3 - x2)); - if(da1 >= M_PI) - da1 = 2*M_PI - da1; - - if(da1 < m_angle_tolerance) + k = dx*dx + dy*dy; + if (k == 0) { - - px.append(x2); - py.append(y2); - - px.append(x3); - py.append(y3); - //m_points.add(point_d(x2, y2)); - //m_points.add(point_d(x3, y3)); - return; + d2 = CalcSqDistance(x1, y1, x2, y2); + d3 = CalcSqDistance(x4, y4, x3, y3); } - - if(m_cusp_limit != 0.0) + else { - if(da1 > m_cusp_limit) + k = 1 / k; + da1 = x2 - x1; + da2 = y2 - y1; + d2 = k * (da1*dx + da2*dy); + da1 = x3 - x1; + da2 = y3 - y1; + d3 = k * (da1*dx + da2*dy); + if (d2 > 0 && d2 < 1 && d3 > 0 && d3 < 1) { - + // Simple collinear case, 1---2---3---4 + // We can leave just two endpoints + return; + } + if (d2 <= 0) + { + d2 = CalcSqDistance(x2, y2, x1, y1); + } + else if (d2 >= 1) + { + d2 = CalcSqDistance(x2, y2, x4, y4); + } + else + { + d2 = CalcSqDistance(x2, y2, x1 + d2*dx, y1 + d2*dy); + } + + if (d3 <= 0) + { + d3 = CalcSqDistance(x3, y3, x1, y1); + } + else if (d3 >= 1) + { + d3 = CalcSqDistance(x3, y3, x4, y4); + } + else + { + d3 = CalcSqDistance(x3, y3, x1 + d3*dx, y1 + d3*dy); + } + } + if (d2 > d3) + { + if (d2 < m_distance_tolerance_square) + { + + px.append(x2); + py.append(y2); + //m_points.add(point_d(x2, y2)); + return; + } + } + else + { + if (d3 < m_distance_tolerance_square) + { + px.append(x3); py.append(y3); //m_points.add(point_d(x3, y3)); return; } } - } - break; - - case 2: - // p1,p3,p4 are collinear, p2 is significant - //---------------------- - if(d2 * d2 <= m_distance_tolerance_square * (dx*dx + dy*dy)) - { - if(m_angle_tolerance < curve_angle_tolerance_epsilon) - { - - px.append(x23); - py.append(y23); - //m_points.add(point_d(x23, y23)); - return; - } - - // Angle Condition + break; + case 1: + // p1,p2,p4 are collinear, p3 is significant //---------------------- - da1 = fabs(atan2(y3 - y2, x3 - x2) - atan2(y2 - y1, x2 - x1)); - if(da1 >= M_PI) da1 = 2*M_PI - da1; - - if(da1 < m_angle_tolerance) + if (d3 * d3 <= m_distance_tolerance_square * (dx*dx + dy*dy)) { - - px.append(x2); - py.append(y2); - - px.append(x3); - py.append(y3); - //m_points.add(point_d(x2, y2)); - //m_points.add(point_d(x3, y3)); - return; - } - - if(m_cusp_limit != 0.0) - { - if(da1 > m_cusp_limit) + if (m_angle_tolerance < curve_angle_tolerance_epsilon) { - px.append(x2); - py.append(y2); - - //m_points.add(point_d(x2, y2)); + + px.append(x23); + py.append(y23); + //m_points.add(point_d(x23, y23)); return; } - } - } - break; - - case 3: - // Regular case - //----------------- - if((d2 + d3)*(d2 + d3) <= m_distance_tolerance_square * (dx*dx + dy*dy)) - { - // If the curvature doesn't exceed the distance_tolerance value - // we tend to finish subdivisions. - //---------------------- - if(m_angle_tolerance < curve_angle_tolerance_epsilon) - { - - px.append(x23); - py.append(y23); - //m_points.add(point_d(x23, y23)); - return; - } - - // Angle & Cusp Condition - //---------------------- - k = atan2(y3 - y2, x3 - x2); - da1 = fabs(k - atan2(y2 - y1, x2 - x1)); - da2 = fabs(atan2(y4 - y3, x4 - x3) - k); - if(da1 >= M_PI) da1 = 2*M_PI - da1; - if(da2 >= M_PI) da2 = 2*M_PI - da2; - - if(da1 + da2 < m_angle_tolerance) - { - // Finally we can stop the recursion + + // Angle Condition //---------------------- - - px.append(x23); - py.append(y23); - //m_points.add(point_d(x23, y23)); - return; - } - - if(m_cusp_limit != 0.0) - { - if(da1 > m_cusp_limit) + da1 = fabs(atan2(y4 - y3, x4 - x3) - atan2(y3 - y2, x3 - x2)); + if (da1 >= M_PI) { + da1 = 2*M_PI - da1; + } + + if (da1 < m_angle_tolerance) + { + px.append(x2); py.append(y2); - return; - } - - if(da2 > m_cusp_limit) - { + px.append(x3); py.append(y3); + //m_points.add(point_d(x2, y2)); + //m_points.add(point_d(x3, y3)); return; } + + if (m_cusp_limit != 0.0) + { + if (da1 > m_cusp_limit) + { + + px.append(x3); + py.append(y3); + //m_points.add(point_d(x3, y3)); + return; + } + } } - } - break; + break; + + case 2: + // p1,p3,p4 are collinear, p2 is significant + //---------------------- + if (d2 * d2 <= m_distance_tolerance_square * (dx*dx + dy*dy)) + { + if (m_angle_tolerance < curve_angle_tolerance_epsilon) + { + + px.append(x23); + py.append(y23); + //m_points.add(point_d(x23, y23)); + return; + } + + // Angle Condition + //---------------------- + da1 = fabs(atan2(y3 - y2, x3 - x2) - atan2(y2 - y1, x2 - x1)); + if (da1 >= M_PI) + { + da1 = 2*M_PI - da1; + } + + if (da1 < m_angle_tolerance) + { + + px.append(x2); + py.append(y2); + + px.append(x3); + py.append(y3); + //m_points.add(point_d(x2, y2)); + //m_points.add(point_d(x3, y3)); + return; + } + + if (m_cusp_limit != 0.0) + { + if (da1 > m_cusp_limit) + { + px.append(x2); + py.append(y2); + + //m_points.add(point_d(x2, y2)); + return; + } + } + } + break; + + case 3: + // Regular case + //----------------- + if ((d2 + d3)*(d2 + d3) <= m_distance_tolerance_square * (dx*dx + dy*dy)) + { + // If the curvature doesn't exceed the distance_tolerance value + // we tend to finish subdivisions. + //---------------------- + if (m_angle_tolerance < curve_angle_tolerance_epsilon) + { + + px.append(x23); + py.append(y23); + //m_points.add(point_d(x23, y23)); + return; + } + + // Angle & Cusp Condition + //---------------------- + k = atan2(y3 - y2, x3 - x2); + da1 = fabs(k - atan2(y2 - y1, x2 - x1)); + da2 = fabs(atan2(y4 - y3, x4 - x3) - k); + if (da1 >= M_PI) + { + da1 = 2*M_PI - da1; + } + if (da2 >= M_PI) + { + da2 = 2*M_PI - da2; + } + + if (da1 + da2 < m_angle_tolerance) + { + // Finally we can stop the recursion + //---------------------- + + px.append(x23); + py.append(y23); + //m_points.add(point_d(x23, y23)); + return; + } + + if (m_cusp_limit != 0.0) + { + if (da1 > m_cusp_limit) + { + px.append(x2); + py.append(y2); + return; + } + + if (da2 > m_cusp_limit) + { + px.append(x3); + py.append(y3); + return; + } + } + } + break; } // Continue subdivision @@ -551,28 +597,33 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, PointBezier_r(x1234, y1234, x234, y234, x34, y34, x4, y4, static_cast(level + 1), px, py); } -qreal VSpline::CalcSqDistance (qreal x1, qreal y1, qreal x2, qreal y2){ +qreal VSpline::CalcSqDistance (qreal x1, qreal y1, qreal x2, qreal y2) +{ qreal dx = x2 - x1; qreal dy = y2 - y1; return dx * dx + dy * dy; } -QPainterPath VSpline::GetPath() const{ +QPainterPath VSpline::GetPath() const +{ QPainterPath splinePath; QVector points = GetPoints (); - if(points.count() >= 2){ - for (qint32 i = 0; i < points.count()-1; ++i){ + if (points.count() >= 2) + { + for (qint32 i = 0; i < points.count()-1; ++i) + { splinePath.moveTo(points[i]); splinePath.lineTo(points[i+1]); } - } else { + } + else + { qWarning()<<"points.count() < 2"<(malloc(3*sizeof(qreal))); // P1 = curve_coord1; // P2 = curve_coord2; // P3 = curve_coord3; // P4 = curve_coord4; // Bt = point_coord; - +// // a = -P1 + 3*P2 - 3*P3 + P4; // b = 3*P1 - 6*P2 + 3*P3; // c = -3*P1 + 3*P2; // d = -Bt + P1; - +// // if(Cubic(t, b/a, c/a, d/a) == 3){ // ret_t = t[2]; // } else { @@ -651,7 +702,7 @@ QPainterPath VSpline::GetPath() const{ // * Повертається три значення, але експереминтально знайдено що шукане // * значення знаходиться в третьому. // */ - +// // free(t); // if(ret_t<0 || ret_t>1){ // qDebug()<<"Неправильне значення параметра. фунція calc_t"; @@ -675,7 +726,7 @@ QPainterPath VSpline::GetPath() const{ // else // return t_y; //} - +// //void VSpline::Mirror(const QPointF Pmirror){ // QPointF P1 = p1; // P1 = QPointF(P1.x() - Pmirror.x(), P1.y() - Pmirror.y()); @@ -697,11 +748,12 @@ QPainterPath VSpline::GetPath() const{ //} QVector VSpline::SplinePoints(QPointF p1, QPointF p4, qreal angle1, qreal angle2, qreal kAsm1, - qreal kAsm2, qreal kCurve){ + qreal kAsm2, qreal kCurve) +{ QLineF p1pX(p1.x(), p1.y(), p1.x() + 100, p1.y()); p1pX.setAngle( angle1 ); qreal L = 0, radius = 0, angle = 90; - radius = QLineF(QPointF(p1.x(), p4.y()),p4).length(); + radius = QLineF(QPointF(p1.x(), p4.y()), p4).length(); L = kCurve * radius * 4 / 3 * tan( angle * M_PI / 180.0 / 4 ); QLineF p1p2(p1.x(), p1.y(), p1.x() + L * kAsm1, p1.y()); p1p2.setAngle(angle1); @@ -712,7 +764,8 @@ QVector VSpline::SplinePoints(QPointF p1, QPointF p4, qreal angle1, qre return GetPoints(p1, p2, p3, p4); } -VSpline &VSpline::operator =(const VSpline &spline){ +VSpline &VSpline::operator =(const VSpline &spline) +{ this->p1 = spline.GetP1 (); this->p2 = spline.GetP2 (); this->p3 = spline.GetP3 (); diff --git a/geometry/vspline.h b/geometry/vspline.h index 0b2b6dd40..cc85542c0 100644 --- a/geometry/vspline.h +++ b/geometry/vspline.h @@ -29,7 +29,8 @@ /** * @brief VSpline клас, що реалізує сплайн. */ -class VSpline{ +class VSpline +{ public: VSpline(); /** @@ -196,27 +197,27 @@ private: /** * @brief p1 початкова точка сплайну */ - qint64 p1; // перша точка + qint64 p1; // перша точка /** * @brief p2 перша контрольна точка сплайну. */ - QPointF p2; // друга точка + QPointF p2; // друга точка /** * @brief p3 друга контрольна точка сплайну. */ - QPointF p3; // третя точка + QPointF p3; // третя точка /** * @brief p4 кінцеві точка сплайну. */ - qint64 p4; // четверта точка + qint64 p4; // четверта точка /** * @brief angle1 кут в градусах першої напрямної. */ - qreal angle1; // кут нахилу дотичної в першій точці + qreal angle1; // кут нахилу дотичної в першій точці /** * @brief angle2 кут в градусах другої напрямної. */ - qreal angle2; // кут нахилу дотичної в другій точці + qreal angle2; // кут нахилу дотичної в другій точці qreal kAsm1; qreal kAsm2; qreal kCurve; diff --git a/geometry/vsplinepath.cpp b/geometry/vsplinepath.cpp index bfd448753..efbeacd20 100644 --- a/geometry/vsplinepath.cpp +++ b/geometry/vsplinepath.cpp @@ -22,36 +22,41 @@ #include "vsplinepath.h" #include -VSplinePath::VSplinePath(): path(QVector()), kCurve(1), mode(Draw::Calculation), - points(QHash()), idObject(0){ -} +VSplinePath::VSplinePath() + : path(QVector()), kCurve(1), mode(Draw::Calculation), points(QHash()), idObject(0){} -VSplinePath::VSplinePath(const QHash *points, qreal kCurve, Draw::Draws mode, qint64 idObject): path(QVector()), - kCurve(kCurve), mode(mode), points(*points), idObject(idObject){ -} +VSplinePath::VSplinePath(const QHash *points, qreal kCurve, Draw::Draws mode, qint64 idObject) + : path(QVector()), kCurve(kCurve), mode(mode), points(*points), idObject(idObject){} -VSplinePath::VSplinePath(const VSplinePath &splPath): path(*splPath.GetPoint()), - kCurve(splPath.getKCurve()), mode(splPath.getMode()), points(splPath.GetDataPoints()), - idObject(splPath.getIdObject()){ -} +VSplinePath::VSplinePath(const VSplinePath &splPath) + : path(*splPath.GetPoint()), kCurve(splPath.getKCurve()), mode(splPath.getMode()), points(splPath.GetDataPoints()), + idObject(splPath.getIdObject()){} -void VSplinePath::append(VSplinePoint point){ +void VSplinePath::append(VSplinePoint point) +{ path.append(point); } -qint32 VSplinePath::Count() const{ - if(path.size() == 0){ +qint32 VSplinePath::Count() const +{ + if (path.size() == 0) + { return 0; - } else { + } + else + { return path.size() - 1; } } -VSpline VSplinePath::GetSpline(qint32 index) const{ - if(Count()<1){ +VSpline VSplinePath::GetSpline(qint32 index) const +{ + if (Count()<1) + { throw VException(tr("Not enough points to create the spline.")); } - if(index < 1 || index > Count()){ + if (index < 1 || index > Count()) + { throw VException(tr("This spline is not exist.")); } VSpline spl(&points, path[index-1].P(), path[index].P(), path[index-1].Angle2(), path[index].Angle1(), @@ -59,9 +64,11 @@ VSpline VSplinePath::GetSpline(qint32 index) const{ return spl; } -QPainterPath VSplinePath::GetPath() const{ +QPainterPath VSplinePath::GetPath() const +{ QPainterPath painterPath; - for(qint32 i = 1; i <= Count(); ++i){ + for (qint32 i = 1; i <= Count(); ++i) + { VSpline spl(&points, path[i-1].P(), path[i].P(), path[i-1].Angle2(), path[i].Angle1(), path[i-1].KAsm2(), path[i].KAsm1(), this->kCurve); painterPath.addPath(spl.GetPath()); @@ -69,22 +76,27 @@ QPainterPath VSplinePath::GetPath() const{ return painterPath; } -QVector VSplinePath::GetPathPoints() const{ +QVector VSplinePath::GetPathPoints() const +{ QVector pathPoints; - for(qint32 i = 1; i <= Count(); ++i){ + for (qint32 i = 1; i <= Count(); ++i) + { VSpline spl(&points, path[i-1].P(), path[i].P(), path[i-1].Angle2(), path[i].Angle1(), path[i-1].KAsm2(), path[i].KAsm1(), this->kCurve); QVector splP = spl.GetPoints(); - for(qint32 j = 0; j < splP.size(); ++j){ + for (qint32 j = 0; j < splP.size(); ++j) + { pathPoints.append(splP[j]); } } return pathPoints; } -qreal VSplinePath::GetLength() const{ +qreal VSplinePath::GetLength() const +{ qreal length = 0; - for(qint32 i = 1; i <= Count(); ++i){ + for (qint32 i = 1; i <= Count(); ++i) + { VSpline spl(&points, path[i-1].P(), path[i].P(), path[i-1].Angle2(), path[i].Angle1(), path[i-1].KAsm2(), path[i].KAsm1(), kCurve); length += spl.GetLength(); @@ -92,29 +104,40 @@ qreal VSplinePath::GetLength() const{ return length; } -void VSplinePath::UpdatePoint(qint32 indexSpline, SplinePoint::Position pos, VSplinePoint point){ - if(indexSpline < 1 || indexSpline > Count()){ +void VSplinePath::UpdatePoint(qint32 indexSpline, SplinePoint::Position pos, VSplinePoint point) +{ + if (indexSpline < 1 || indexSpline > Count()) + { throw VException(tr("This spline is not exist.")); } - if(pos == SplinePoint::FirstPoint){ + if (pos == SplinePoint::FirstPoint) + { path[indexSpline-1] = point; - } else { + } + else + { path[indexSpline] = point; } } -VSplinePoint VSplinePath::GetSplinePoint(qint32 indexSpline, SplinePoint::Position pos) const{ - if(indexSpline < 1 || indexSpline > Count()){ +VSplinePoint VSplinePath::GetSplinePoint(qint32 indexSpline, SplinePoint::Position pos) const +{ + if (indexSpline < 1 || indexSpline > Count()) + { throw VException(tr("This spline is not exist.")); } - if(pos == SplinePoint::FirstPoint){ + if (pos == SplinePoint::FirstPoint) + { return path.at(indexSpline-1); - } else { + } + else + { return path.at(indexSpline); } } -VSplinePath &VSplinePath::operator =(const VSplinePath &path){ +VSplinePath &VSplinePath::operator =(const VSplinePath &path) +{ this->path = path.GetSplinePath(); this->kCurve = path.getKCurve(); this->mode = path.getMode(); @@ -123,6 +146,7 @@ VSplinePath &VSplinePath::operator =(const VSplinePath &path){ return *this; } -VSplinePoint & VSplinePath::operator[](int indx){ +VSplinePoint & VSplinePath::operator[](int indx) +{ return path[indx]; } diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index d8012b1ce..6ac235ec7 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -27,16 +27,18 @@ #include "vspline.h" #include -namespace SplinePoint{ -enum Position { FirstPoint, LastPoint }; -Q_DECLARE_FLAGS(Positions, Position) +namespace SplinePoint +{ + enum Position { FirstPoint, LastPoint }; + Q_DECLARE_FLAGS(Positions, Position) } Q_DECLARE_OPERATORS_FOR_FLAGS( SplinePoint::Positions ) /** * @brief The VSplinePath клас, що розраховує шлях сплайнів. */ -class VSplinePath{ +class VSplinePath +{ Q_DECLARE_TR_FUNCTIONS(VSplinePath) public: /** diff --git a/geometry/vsplinepoint.cpp b/geometry/vsplinepoint.cpp index 93ad612ab..7913d0fe9 100644 --- a/geometry/vsplinepoint.cpp +++ b/geometry/vsplinepoint.cpp @@ -21,19 +21,11 @@ #include "vsplinepoint.h" -VSplinePoint::VSplinePoint():pSpline(0), angle(0), kAsm1(1), kAsm2(1){ -} - -VSplinePoint::VSplinePoint(qint64 pSpline, qreal kAsm1, qreal angle , qreal kAsm2):pSpline(pSpline), - angle(angle), kAsm1(kAsm1), kAsm2(kAsm2){ -} - -VSplinePoint::VSplinePoint(const VSplinePoint &point):pSpline(point.P()), angle(point.Angle2()), - kAsm1(point.KAsm1()), kAsm2(point.KAsm2()){ -} - - - - +VSplinePoint::VSplinePoint() + :pSpline(0), angle(0), kAsm1(1), kAsm2(1){} +VSplinePoint::VSplinePoint(qint64 pSpline, qreal kAsm1, qreal angle, qreal kAsm2) + :pSpline(pSpline), angle(angle), kAsm1(kAsm1), kAsm2(kAsm2){} +VSplinePoint::VSplinePoint(const VSplinePoint &point) + :pSpline(point.P()), angle(point.Angle2()), kAsm1(point.KAsm1()), kAsm2(point.KAsm2()){} diff --git a/geometry/vsplinepoint.h b/geometry/vsplinepoint.h index 58fb845c8..41f2f9672 100644 --- a/geometry/vsplinepoint.h +++ b/geometry/vsplinepoint.h @@ -27,7 +27,8 @@ /** * @brief The VSplinePoint клас, що містить у собі інформацію про точки сплайну. */ -class VSplinePoint{ +class VSplinePoint +{ public: /** * @brief VSplinePoint конструктор по замповчуванню. diff --git a/main.cpp b/main.cpp index 0ff386dd9..bc8d1598c 100644 --- a/main.cpp +++ b/main.cpp @@ -24,29 +24,32 @@ #include #include "tablewindow.h" -void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg){ +void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) +{ QByteArray localMsg = msg.toLocal8Bit(); - switch (type) { - case QtDebugMsg: - fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, - context.function); - break; - case QtWarningMsg: - fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, - context.function); - break; - case QtCriticalMsg: - fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, - context.function); - break; - case QtFatalMsg: - fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, - context.function); - abort(); + switch (type) + { + case QtDebugMsg: + fprintf(stderr, "Debug: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, + context.function); + break; + case QtWarningMsg: + fprintf(stderr, "Warning: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, + context.function); + break; + case QtCriticalMsg: + fprintf(stderr, "Critical: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, + context.function); + break; + case QtFatalMsg: + fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, + context.function); + abort(); } } -int main(int argc, char *argv[]){ +int main(int argc, char *argv[]) +{ qInstallMessageHandler(myMessageOutput); VApplication app(argc, argv); @@ -56,7 +59,7 @@ int main(int argc, char *argv[]){ app.installTranslator(&qtTranslator); QTranslator appTranslator; - appTranslator.load("valentina_" + QLocale::system().name(),"."); + appTranslator.load("valentina_" + QLocale::system().name(), "."); app.installTranslator(&appTranslator); MainWindow w; @@ -70,23 +73,31 @@ int main(int argc, char *argv[]){ QString fileName; QRegExp rxArgOpenFile("-o");//parameter open file - if(args.size()>1){ - for (int i = 1; i < args.size(); ++i) { - if (rxArgOpenFile.indexIn(args.at(i)) != -1 ) { - if(args.at(i+1).isEmpty() == false){ + if (args.size()>1) + { + for (int i = 1; i < args.size(); ++i) + { + if (rxArgOpenFile.indexIn(args.at(i)) != -1 ) + { + if (args.at(i+1).isEmpty() == false) + { fileName = args.at(i+1); qDebug() << args.at(i)<< ":" << fileName; w.OpenPattern(fileName); } w.show(); break; - } else { + } + else + { qDebug() << "Uknown arg:" << args.at(i); w.show(); break; } } - } else { + } + else + { w.show(); } return app.exec(); diff --git a/mainwindow.cpp b/mainwindow.cpp index 536c86482..167d19f71 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -29,8 +29,8 @@ #include "exception/vexceptionuniqueid.h" #include "version.h" -MainWindow::MainWindow(QWidget *parent) : - QMainWindow(parent), ui(new Ui::MainWindow), tool(Tool::ArrowTool), currentScene(0), sceneDraw(0), +MainWindow::MainWindow(QWidget *parent) + :QMainWindow(parent), ui(new Ui::MainWindow), tool(Tool::ArrowTool), currentScene(0), sceneDraw(0), sceneDetails(0), mouseCoordinate(0), helpLabel(0), view(0), isInitialized(false), dialogTable(0), dialogEndLine(QSharedPointer()), dialogLine(QSharedPointer()), dialogAlongLine(QSharedPointer()), @@ -43,7 +43,8 @@ MainWindow::MainWindow(QWidget *parent) : dialogTriangle(QSharedPointer()), dialogPointOfIntersection(QSharedPointer()), dialogHistory(0), doc(0), data(0), comboBoxDraws(0), fileName(QString()), changeInFile(false), - mode(Draw::Calculation){ + mode(Draw::Calculation) +{ ui->setupUi(this); ToolBarOption(); ToolBarDraws(); @@ -111,7 +112,8 @@ MainWindow::MainWindow(QWidget *parent) : ui->toolBox->setCurrentIndex(0); } -void MainWindow::ActionNewDraw(){ +void MainWindow::ActionNewDraw() +{ QString nameDraw; bool bOk; qint32 index; @@ -121,25 +123,31 @@ void MainWindow::ActionNewDraw(){ dlg->setLabelText(tr("Drawing:")); dlg->setTextEchoMode(QLineEdit::Normal); dlg->setWindowTitle(tr("Enter a name for the drawing.")); - dlg->resize(300,100); + dlg->resize(300, 100); dlg->setTextValue(nDraw); - while(1){ + while (1) + { bOk = dlg->exec(); nameDraw = dlg->textValue(); - if(!bOk || nameDraw.isEmpty()){ + if (bOk == false || nameDraw.isEmpty()) + { delete dlg; return; } index = comboBoxDraws->findText(nameDraw); - if(index != -1){//we already have this name + if (index != -1) + {//we already have this name qCritical()<appendDraw(nameDraw); - if(bOk == false){ + if (bOk == false) + { qCritical()<addItem(nameDraw); index = comboBoxDraws->findText(nameDraw); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found comboBoxDraws->setCurrentIndex(index); currentDrawChanged( index ); } @@ -168,9 +177,9 @@ void MainWindow::ActionNewDraw(){ changeInFile = true; } -void MainWindow::OptionDraw(){ +void MainWindow::OptionDraw() +{ QString nameDraw; - bool bOk = false; qint32 index; QString nDraw = doc->GetNameActivDraw(); QInputDialog *dlg = new QInputDialog(this); @@ -178,27 +187,35 @@ void MainWindow::OptionDraw(){ dlg->setLabelText(tr("Drawing:")); dlg->setTextEchoMode(QLineEdit::Normal); dlg->setWindowTitle(tr("Enter a new name for the drawing.")); - dlg->resize(300,100); + dlg->resize(300, 100); dlg->setTextValue(nDraw); - while(1){ - bOk = dlg->exec(); + while (1) + { + bool bOk = dlg->exec(); nameDraw = dlg->textValue(); - if(!bOk || nameDraw.isEmpty()){ + if (bOk == false || nameDraw.isEmpty()) + { delete dlg; return; } index = comboBoxDraws->findText(nameDraw); - if(index != -1){//we already have this name + if (index != -1) + {//we already have this name qCritical()<findText(doc->GetNameActivDraw()); - if(doc->SetNameDraw(nameDraw)){ + if (doc->SetNameDraw(nameDraw)) + { comboBoxDraws->setItemText(index, nameDraw); - } else { + } + else + { QMessageBox::warning(this, tr("Error saving change!!!"), tr("Can't save new name of drawing")); } @@ -206,8 +223,10 @@ void MainWindow::OptionDraw(){ template void MainWindow::SetToolButton(bool checked, Tool::Tools t, const QString &cursor, const QString &toolTip, - QSharedPointer &dialog, Func closeDialogSlot){ - if(checked){ + QSharedPointer &dialog, Func closeDialogSlot) +{ + if (checked) + { CanselTool(); tool = t; QPixmap pixmap(cursor); @@ -219,8 +238,11 @@ void MainWindow::SetToolButton(bool checked, Tool::Tools t, const QString &curso connect(dialog.data(), &Dialog::DialogClosed, this, closeDialogSlot); connect(dialog.data(), &Dialog::ToolTip, this, &MainWindow::ShowToolTip); connect(doc, &VDomDocument::FullUpdateFromFile, dialog.data(), &Dialog::UpdateList); - } else { - if(QToolButton *tButton = qobject_cast< QToolButton * >(this->sender())){ + } + else + { + if (QToolButton *tButton = qobject_cast< QToolButton * >(this->sender())) + { Q_ASSERT(tButton != 0); tButton->setChecked(true); } @@ -228,7 +250,8 @@ void MainWindow::SetToolButton(bool checked, Tool::Tools t, const QString &curso } template -void MainWindow::AddToolToDetail(T *tool, const qint64 &id, Tool::Tools typeTool, const qint64 &idDetail){ +void MainWindow::AddToolToDetail(T *tool, const qint64 &id, Tool::Tools typeTool, const qint64 &idDetail) +{ QHash* tools = doc->getTools(); VToolDetail *det = qobject_cast(tools->value(idDetail)); Q_ASSERT(det != 0); @@ -236,11 +259,16 @@ void MainWindow::AddToolToDetail(T *tool, const qint64 &id, Tool::Tools typeTool } template -void MainWindow::ClosedDialog(QSharedPointer &dialog, int result){ - if(result == QDialog::Accepted){ - if(mode == Draw::Calculation){ +void MainWindow::ClosedDialog(QSharedPointer &dialog, int result) +{ + if (result == QDialog::Accepted) + { + if (mode == Draw::Calculation) + { DrawTool::Create(dialog, currentScene, doc, data); - } else { + } + else + { ModelingTool *endLine = ModelingTool::Create(dialog, doc, data); AddToolToDetail(endLine, endLine->getId(), tool, dialog->getIdDetail()); } @@ -248,111 +276,135 @@ void MainWindow::ClosedDialog(QSharedPointer &dialog, int result){ ArrowTool(); } -void MainWindow::ToolEndLine(bool checked){ +void MainWindow::ToolEndLine(bool checked) +{ SetToolButton(checked, Tool::EndLineTool, ":/cursor/endline_cursor.png", tr("Select point"), dialogEndLine, &MainWindow::ClosedDialogEndLine); } -void MainWindow::ClosedDialogEndLine(int result){ +void MainWindow::ClosedDialogEndLine(int result) +{ ClosedDialog(dialogEndLine, result); } -void MainWindow::ToolLine(bool checked){ +void MainWindow::ToolLine(bool checked) +{ SetToolButton(checked, Tool::LineTool, ":/cursor/line_cursor.png", tr("Select first point"), dialogLine, &MainWindow::ClosedDialogLine); } -void MainWindow::ClosedDialogLine(int result){ +void MainWindow::ClosedDialogLine(int result) +{ ClosedDialog(dialogLine, result); } -void MainWindow::ToolAlongLine(bool checked){ +void MainWindow::ToolAlongLine(bool checked) +{ SetToolButton(checked, Tool::AlongLineTool, ":/cursor/alongline_cursor.png", tr("Select point"), dialogAlongLine, &MainWindow::ClosedDialogAlongLine); } -void MainWindow::ClosedDialogAlongLine(int result){ +void MainWindow::ClosedDialogAlongLine(int result) +{ ClosedDialog(dialogAlongLine, result); } -void MainWindow::ToolShoulderPoint(bool checked){ +void MainWindow::ToolShoulderPoint(bool checked) +{ SetToolButton(checked, Tool::ShoulderPointTool, ":/cursor/shoulder_cursor.png", tr("Select first point of line"), dialogShoulderPoint, &MainWindow::ClosedDialogShoulderPoint); } -void MainWindow::ClosedDialogShoulderPoint(int result){ +void MainWindow::ClosedDialogShoulderPoint(int result) +{ ClosedDialog(dialogShoulderPoint, result); } -void MainWindow::ToolNormal(bool checked){ +void MainWindow::ToolNormal(bool checked) +{ SetToolButton(checked, Tool::NormalTool, ":/cursor/normal_cursor.png", tr("Select first point of line"), dialogNormal, &MainWindow::ClosedDialogNormal); } -void MainWindow::ClosedDialogNormal(int result){ +void MainWindow::ClosedDialogNormal(int result) +{ ClosedDialog(dialogNormal, result); } -void MainWindow::ToolBisector(bool checked){ +void MainWindow::ToolBisector(bool checked) +{ SetToolButton(checked, Tool::BisectorTool, ":/cursor/bisector_cursor.png", tr("Select first point of angle"), dialogBisector, &MainWindow::ClosedDialogBisector); } -void MainWindow::ClosedDialogBisector(int result){ +void MainWindow::ClosedDialogBisector(int result) +{ ClosedDialog(dialogBisector, result); } -void MainWindow::ToolLineIntersect(bool checked){ +void MainWindow::ToolLineIntersect(bool checked) +{ SetToolButton(checked, Tool::LineIntersectTool, ":/cursor/intersect_cursor.png", tr("Select first point of first line"), dialogLineIntersect, &MainWindow::ClosedDialogLineIntersect); } -void MainWindow::ClosedDialogLineIntersect(int result){ +void MainWindow::ClosedDialogLineIntersect(int result) +{ ClosedDialog(dialogLineIntersect, result); } -void MainWindow::ToolSpline(bool checked){ +void MainWindow::ToolSpline(bool checked) +{ SetToolButton(checked, Tool::SplineTool, ":/cursor/spline_cursor.png", tr("Select first point curve"), dialogSpline, &MainWindow::ClosedDialogSpline); } -void MainWindow::ClosedDialogSpline(int result){ +void MainWindow::ClosedDialogSpline(int result) +{ ClosedDialog(dialogSpline, result); } -void MainWindow::ToolArc(bool checked){ +void MainWindow::ToolArc(bool checked) +{ SetToolButton(checked, Tool::ArcTool, ":/cursor/arc_cursor.png", tr("Select point of center of arc"), dialogArc, &MainWindow::ClosedDialogArc); } -void MainWindow::ClosedDialogArc(int result){ +void MainWindow::ClosedDialogArc(int result) +{ ClosedDialog(dialogArc, result); } -void MainWindow::ToolSplinePath(bool checked){ +void MainWindow::ToolSplinePath(bool checked) +{ SetToolButton(checked, Tool::SplinePathTool, ":/cursor/splinepath_cursor.png", tr("Select point of curve path"), dialogSplinePath, &MainWindow::ClosedDialogSplinePath); } -void MainWindow::ClosedDialogSplinePath(int result){ +void MainWindow::ClosedDialogSplinePath(int result) +{ ClosedDialog(dialogSplinePath, result); } -void MainWindow::ToolPointOfContact(bool checked){ +void MainWindow::ToolPointOfContact(bool checked) +{ SetToolButton(checked, Tool::PointOfContact, ":/cursor/pointcontact_cursor.png", tr("Select first point of line"), dialogPointOfContact, &MainWindow::ClosedDialogPointOfContact); } -void MainWindow::ClosedDialogPointOfContact(int result){ +void MainWindow::ClosedDialogPointOfContact(int result) +{ ClosedDialog(dialogPointOfContact, result); } -void MainWindow::ToolDetail(bool checked){ - if(checked){ +void MainWindow::ToolDetail(bool checked) +{ + if (checked) + { CanselTool(); tool = Tool::Detail; QPixmap pixmap("://cursor/new_detail_cursor.png"); @@ -364,76 +416,95 @@ void MainWindow::ToolDetail(bool checked){ &DialogDetail::ChoosedObject); connect(dialogDetail.data(), &DialogDetail::DialogClosed, this, &MainWindow::ClosedDialogDetail); connect(doc, &VDomDocument::FullUpdateFromFile, dialogDetail.data(), &DialogDetail::UpdateList); - } else { - if(QToolButton *tButton = qobject_cast< QToolButton * >(this->sender())){ + } + else + { + if (QToolButton *tButton = qobject_cast< QToolButton * >(this->sender())) + { tButton->setChecked(true); } } } -void MainWindow::ClosedDialogDetail(int result){ - if(result == QDialog::Accepted){ +void MainWindow::ClosedDialogDetail(int result) +{ + if (result == QDialog::Accepted) + { VToolDetail::Create(dialogDetail, sceneDetails, doc, data); } ArrowTool(); } -void MainWindow::ToolHeight(bool checked){ +void MainWindow::ToolHeight(bool checked) +{ SetToolButton(checked, Tool::Height, ":/cursor/height_cursor.png", tr("Select base point"), dialogHeight, &MainWindow::ClosedDialogHeight); } -void MainWindow::ClosedDialogHeight(int result){ +void MainWindow::ClosedDialogHeight(int result) +{ ClosedDialog(dialogHeight, result); } -void MainWindow::ToolTriangle(bool checked){ +void MainWindow::ToolTriangle(bool checked) +{ SetToolButton(checked, Tool::Triangle, ":/cursor/triangle_cursor.png", tr("Select first point of axis"), dialogTriangle, &MainWindow::ClosedDialogTriangle); } -void MainWindow::ClosedDialogTriangle(int result){ +void MainWindow::ClosedDialogTriangle(int result) +{ ClosedDialog(dialogTriangle, result); } -void MainWindow::ToolPointOfIntersection(bool checked){ +void MainWindow::ToolPointOfIntersection(bool checked) +{ SetToolButton(checked, Tool::PointOfIntersection, ":/cursor/pointofintersect_cursor.png", tr("Select point vertically"), dialogPointOfIntersection, &MainWindow::ClosedDialogPointOfIntersection); } -void MainWindow::ClosedDialogPointOfIntersection(int result){ +void MainWindow::ClosedDialogPointOfIntersection(int result) +{ ClosedDialog(dialogPointOfIntersection, result); } -void MainWindow::About(){ +void MainWindow::About() +{ QString fullName = QString("Valentina %1").arg(APP_VERSION); QString qtBase(tr("Based on Qt %2 (32 bit)").arg(QT_VERSION_STR)); QString buildOn(tr("Built on %3 at %4").arg(__DATE__).arg(__TIME__)); - QString about = QString(tr("

%1

%2

%3

%4")).arg(fullName).arg(qtBase).arg(buildOn).arg(WARRANTY); + QString about = QString(tr("

%1

%2

%3

%4")).arg(fullName).arg(qtBase).arg( + buildOn).arg(WARRANTY); QMessageBox::about(this, tr("About Valentina"), about); } -void MainWindow::AboutQt(){ +void MainWindow::AboutQt() +{ QMessageBox::aboutQt(this, tr("About Qt")); } -void MainWindow::ShowToolTip(const QString &toolTip){ +void MainWindow::ShowToolTip(const QString &toolTip) +{ helpLabel->setText(toolTip); } -void MainWindow::tableClosed(){ +void MainWindow::tableClosed() +{ show(); MinimumScrollBar(); } -void MainWindow::showEvent( QShowEvent *event ){ +void MainWindow::showEvent( QShowEvent *event ) +{ QMainWindow::showEvent( event ); - if( event->spontaneous() ){ + if ( event->spontaneous() ) + { return; } - if(isInitialized){ + if (isInitialized) + { return; } // do your init stuff here @@ -442,8 +513,10 @@ void MainWindow::showEvent( QShowEvent *event ){ isInitialized = true;//first show windows are held } -void MainWindow::closeEvent(QCloseEvent *event){ - if(changeInFile == true){ +void MainWindow::closeEvent(QCloseEvent *event) +{ + if (changeInFile == true) + { QMessageBox msgBox; msgBox.setText(tr("The pattern has been modified.")); msgBox.setInformativeText(tr("Do you want to save your changes?")); @@ -451,50 +524,58 @@ void MainWindow::closeEvent(QCloseEvent *event){ msgBox.setDefaultButton(QMessageBox::Save); msgBox.setIcon(QMessageBox::Question); int ret = msgBox.exec(); - switch (ret) { - case QMessageBox::Save: - // Save was clicked - if(fileName.isEmpty()){ - ActionSaveAs(); - } else { - ActionSave(); - } - if(changeInFile){ - // We did't save file - event->ignore(); - } else { - // We have successfully saved the file + switch (ret) + { + case QMessageBox::Save: + // Save was clicked + if (fileName.isEmpty()) + { + ActionSaveAs(); + } + else + { + ActionSave(); + } + if (changeInFile) + { + // We did't save file + event->ignore(); + } + else + { + // We have successfully saved the file + event->accept(); + } + break; + case QMessageBox::Discard: + // Don't Save was clicked event->accept(); - } - break; - case QMessageBox::Discard: - // Don't Save was clicked - event->accept(); - break; - case QMessageBox::Cancel: - // Cancel was clicked - event->ignore(); - break; - default: - // should never be reached - event->accept(); - break; + break; + case QMessageBox::Cancel: + // Cancel was clicked + event->ignore(); + break; + default: + // should never be reached + event->accept(); + break; } } } -void MainWindow::ToolBarOption(){ +void MainWindow::ToolBarOption() +{ QLabel * labelGrowth = new QLabel; labelGrowth->setText(tr("Growth: ")); ui->toolBarOption->addWidget(labelGrowth); QStringList list; - list << "104"<<"110"<<"116"<<"122"<<"128"<<"134"<<"140"<<"146"<<"152"<<"158"<<"164"<<"170"<<"176" - << "182" << "188"; + list <<"92"<<"98"<<"104"<<"110"<<"116"<<"122"<<"128"<<"134"<<"140"<<"146"<<"152"<<"158"<<"164"<<"170"<<"176" + <<"182"<<"188"; QComboBox *comboBoxGrow = new QComboBox; comboBoxGrow->clear(); comboBoxGrow->addItems(list); - comboBoxGrow->setCurrentIndex(12); + comboBoxGrow->setCurrentIndex(14); ui->toolBarOption->addWidget(comboBoxGrow); connect(comboBoxGrow, static_cast(&QComboBox::currentIndexChanged), @@ -505,11 +586,11 @@ void MainWindow::ToolBarOption(){ ui->toolBarOption->addWidget(labelSize); list.clear(); - list << "28"<<"30"<<"32"<<"34"<<"36"<<"38"<<"40"<<"42"<<"44"<<"46"<<"48"<<"50" << "52" << "54" << "56"; + list <<"22"<<"24"<<"26"<<"28"<<"30"<<"32"<<"34"<<"36"<<"38"<<"40"<<"42"<<"44"<<"46"<<"48"<<"50"<<"52"<<"54"<<"56"; QComboBox *comboBoxSize = new QComboBox; comboBoxSize->clear(); comboBoxSize->addItems(list); - comboBoxSize->setCurrentIndex(11); + comboBoxSize->setCurrentIndex(14); ui->toolBarOption->addWidget(comboBoxSize); connect(comboBoxSize, static_cast(&QComboBox::currentIndexChanged), @@ -523,7 +604,8 @@ void MainWindow::ToolBarOption(){ } -void MainWindow::ToolBarDraws(){ +void MainWindow::ToolBarDraws() +{ QLabel * labelNameDraw = new QLabel; labelNameDraw ->setText(tr("Drawing: ")); ui->toolBarDraws->addWidget(labelNameDraw); @@ -548,125 +630,131 @@ void MainWindow::ToolBarDraws(){ connect(ui->actionLayout, &QAction::triggered, this, &MainWindow::ActionLayout); } -void MainWindow::currentDrawChanged( int index ){ - if(index != -1) { +void MainWindow::currentDrawChanged( int index ) +{ + if (index != -1) + { doc->setCurrentData(); doc->ChangeActivDraw(comboBoxDraws->itemText(index)); } } -void MainWindow::mouseMove(QPointF scenePos){ +void MainWindow::mouseMove(QPointF scenePos) +{ QString string = QString("%1, %2") .arg(static_cast(toMM(scenePos.x()))) .arg(static_cast(toMM(scenePos.y()))); mouseCoordinate->setText(string); } -void MainWindow::CanselTool(){ - switch( tool ){ - case Tool::ArrowTool: - ui->actionArrowTool->setChecked(false); - helpLabel->setText(""); - break; - case Tool::SinglePointTool: - Q_UNREACHABLE(); - //Nothing to do here because we can't create this tool from main window. - break; - case Tool::EndLineTool: - dialogEndLine.clear(); - ui->toolButtonEndLine->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::LineTool: - dialogLine.clear(); - ui->toolButtonLine->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearFocus(); - break; - case Tool::AlongLineTool: - dialogAlongLine.clear(); - ui->toolButtonAlongLine->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::ShoulderPointTool: - dialogShoulderPoint.clear(); - ui->toolButtonShoulderPoint->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::NormalTool: - dialogNormal.clear(); - ui->toolButtonNormal->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::BisectorTool: - dialogBisector.clear(); - ui->toolButtonBisector->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::LineIntersectTool: - dialogLineIntersect.clear(); - ui->toolButtonLineIntersect->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::SplineTool: - dialogSpline.clear(); - ui->toolButtonSpline->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::ArcTool: - dialogArc.clear(); - ui->toolButtonArc->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::SplinePathTool: - dialogSplinePath.clear(); - ui->toolButtonSplinePath->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::PointOfContact: - dialogPointOfContact.clear(); - ui->toolButtonPointOfContact->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::Detail: - dialogDetail.clear(); - ui->toolButtonNewDetail->setChecked(false); - break; - case Tool::Height: - dialogHeight.clear(); - ui->toolButtonHeight->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::Triangle: - dialogTriangle.clear(); - ui->toolButtonTriangle->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - case Tool::PointOfIntersection: - dialogPointOfIntersection.clear(); - ui->toolButtonPointOfIntersection->setChecked(false); - currentScene->setFocus(Qt::OtherFocusReason); - currentScene->clearSelection(); - break; - default: - qWarning()<<"Get wrong tool type. Ignore."; - break; +void MainWindow::CanselTool() +{ + switch ( tool ) + { + case Tool::ArrowTool: + ui->actionArrowTool->setChecked(false); + helpLabel->setText(""); + break; + case Tool::SinglePointTool: + Q_UNREACHABLE(); + //Nothing to do here because we can't create this tool from main window. + break; + case Tool::EndLineTool: + dialogEndLine.clear(); + ui->toolButtonEndLine->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::LineTool: + dialogLine.clear(); + ui->toolButtonLine->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearFocus(); + break; + case Tool::AlongLineTool: + dialogAlongLine.clear(); + ui->toolButtonAlongLine->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::ShoulderPointTool: + dialogShoulderPoint.clear(); + ui->toolButtonShoulderPoint->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::NormalTool: + dialogNormal.clear(); + ui->toolButtonNormal->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::BisectorTool: + dialogBisector.clear(); + ui->toolButtonBisector->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::LineIntersectTool: + dialogLineIntersect.clear(); + ui->toolButtonLineIntersect->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::SplineTool: + dialogSpline.clear(); + ui->toolButtonSpline->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::ArcTool: + dialogArc.clear(); + ui->toolButtonArc->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::SplinePathTool: + dialogSplinePath.clear(); + ui->toolButtonSplinePath->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::PointOfContact: + dialogPointOfContact.clear(); + ui->toolButtonPointOfContact->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::Detail: + dialogDetail.clear(); + ui->toolButtonNewDetail->setChecked(false); + break; + case Tool::Height: + dialogHeight.clear(); + ui->toolButtonHeight->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::Triangle: + dialogTriangle.clear(); + ui->toolButtonTriangle->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + case Tool::PointOfIntersection: + dialogPointOfIntersection.clear(); + ui->toolButtonPointOfIntersection->setChecked(false); + currentScene->setFocus(Qt::OtherFocusReason); + currentScene->clearSelection(); + break; + default: + qWarning()<<"Get wrong tool type. Ignore."; + break; } } -void MainWindow::ArrowTool(){ +void MainWindow::ArrowTool() +{ CanselTool(); ui->actionArrowTool->setChecked(true); tool = Tool::ArrowTool; @@ -675,12 +763,15 @@ void MainWindow::ArrowTool(){ helpLabel->setText(""); } -void MainWindow::ActionAroowTool(){ +void MainWindow::ActionAroowTool() +{ ArrowTool(); } -void MainWindow::keyPressEvent ( QKeyEvent * event ){ - switch(event->key()){ +void MainWindow::keyPressEvent ( QKeyEvent * event ) +{ + switch (event->key()) + { case Qt::Key_Escape: ArrowTool(); break; @@ -688,8 +779,10 @@ void MainWindow::keyPressEvent ( QKeyEvent * event ){ QMainWindow::keyPressEvent ( event ); } -void MainWindow::ActionDraw(bool checked){ - if(checked){ +void MainWindow::ActionDraw(bool checked) +{ + if (checked) + { ui->actionDetails->setChecked(false); /*Save scroll bars value for previous scene.*/ QScrollBar *horScrollBar = view->horizontalScrollBar(); @@ -707,13 +800,17 @@ void MainWindow::ActionDraw(bool checked){ mode = Draw::Calculation; doc->setCurrentData(); - } else { + } + else + { ui->actionDraw->setChecked(true); } } -void MainWindow::ActionDetails(bool checked){ - if(checked){ +void MainWindow::ActionDetails(bool checked) +{ + if (checked) + { ui->actionDraw->setChecked(false); /*Save scroll bars value for previous scene.*/ QScrollBar *horScrollBar = view->horizontalScrollBar(); @@ -729,19 +826,25 @@ void MainWindow::ActionDetails(bool checked){ verScrollBar = view->verticalScrollBar(); verScrollBar->setValue(currentScene->getVerScrollBar()); mode = Draw::Modeling; - } else { + } + else + { ui->actionDetails->setChecked(true); } } -void MainWindow::ActionSaveAs(){ +void MainWindow::ActionSaveAs() +{ QString filters(tr("Lekalo files (*.xml);;All files (*.*)")); QString defaultFilter(tr("Lekalo files (*.xml)")); QString fName = QFileDialog::getSaveFileName(this, tr("Save as"), QDir::homePath(), filters, &defaultFilter); - if(fName.isEmpty()) + if (fName.isEmpty()) + { return; - if(fName.indexOf(".xml",fName.size()-4)<0){ + } + if (fName.indexOf(".xml", fName.size()-4)<0) + { fName.append(".xml"); } fileName = fName; @@ -749,17 +852,22 @@ void MainWindow::ActionSaveAs(){ ActionSave(); } -void MainWindow::ActionSave(){ - if(!fileName.isEmpty()){ +void MainWindow::ActionSave() +{ + if (fileName.isEmpty() == false) + { bool result = SafeSaveing(fileName); - if(result){ + if (result) + { ui->actionSave->setEnabled(false); changeInFile = false; QFileInfo info(fileName); QString title(info.fileName()); title.append("-Valentina"); setWindowTitle(title); - } else { + } + else + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error saving file. Can't save file.")); @@ -771,14 +879,20 @@ void MainWindow::ActionSave(){ } } -void MainWindow::ActionOpen(){ +void MainWindow::ActionOpen() +{ QString filter(tr("Lekalo files (*.xml)")); QString fName = QFileDialog::getOpenFileName(this, tr("Open file"), QDir::homePath(), filter); - if(fName.isEmpty()) + if (fName.isEmpty()) + { return; - if(fileName.isEmpty() && changeInFile == false){ + } + if (fileName.isEmpty() && changeInFile == false) + { OpenPattern(fName); - } else { + } + else + { /*Open new copy application*/ QProcess *v = new QProcess(this); QStringList arguments; @@ -788,7 +902,8 @@ void MainWindow::ActionOpen(){ } } -void MainWindow::Clear(){ +void MainWindow::Clear() +{ setWindowTitle("Valentina"); fileName.clear(); data->Clear(); @@ -803,14 +918,17 @@ void MainWindow::Clear(){ SetEnableTool(false); } -void MainWindow::ActionNew(){ +void MainWindow::ActionNew() +{ QProcess *v = new QProcess(this); v->startDetached(QCoreApplication::applicationFilePath ()); delete v; } -void MainWindow::haveChange(){ - if(!fileName.isEmpty()){ +void MainWindow::haveChange() +{ + if (fileName.isEmpty() == false) + { ui->actionSave->setEnabled(true); changeInFile = true; QFileInfo info(fileName); @@ -820,61 +938,75 @@ void MainWindow::haveChange(){ } } -void MainWindow::ChangedSize(const QString & text){ +void MainWindow::ChangedSize(const QString & text) +{ qint32 size = text.toInt(); data->SetSize(size*10); doc->FullUpdateTree(); } -void MainWindow::ChangedGrowth(const QString &text){ +void MainWindow::ChangedGrowth(const QString &text) +{ qint32 growth = text.toInt(); data->SetGrowth(growth*10); doc->FullUpdateTree(); } -void MainWindow::SetEnableWidgets(bool enable){ +void MainWindow::SetEnableWidgets(bool enable) +{ ui->actionSaveAs->setEnabled(enable); ui->actionDraw->setEnabled(enable); ui->actionDetails->setEnabled(enable); ui->actionOptionDraw->setEnabled(enable); - if(enable == true && !fileName.isEmpty()){ + if (enable == true && fileName.isEmpty() == false) + { ui->actionSave->setEnabled(enable); } ui->actionTable->setEnabled(enable); ui->actionHistory->setEnabled(enable); } -void MainWindow::ActionTable(bool checked){ - if(checked){ +void MainWindow::ActionTable(bool checked) +{ + if (checked) + { dialogTable = new DialogIncrements(data, doc, this); connect(dialogTable, &DialogIncrements::DialogClosed, this, &MainWindow::ClosedActionTable); dialogTable->show(); - } else { + } + else + { ui->actionTable->setChecked(true); dialogTable->activateWindow(); } } -void MainWindow::ClosedActionTable(){ +void MainWindow::ClosedActionTable() +{ ui->actionTable->setChecked(false); delete dialogTable; } -void MainWindow::ActionHistory(bool checked){ - if(checked){ +void MainWindow::ActionHistory(bool checked) +{ + if (checked) + { dialogHistory = new DialogHistory(data, doc, this); dialogHistory->setWindowFlags(Qt::Window); connect(dialogHistory, &DialogHistory::DialogClosed, this, &MainWindow::ClosedActionHistory); dialogHistory->show(); - } else { + } + else + { ui->actionHistory->setChecked(true); dialogHistory->activateWindow(); } } -void MainWindow::ActionLayout(bool checked){ +void MainWindow::ActionLayout(bool checked) +{ Q_UNUSED(checked); hide(); QVector listDetails; @@ -882,12 +1014,14 @@ void MainWindow::ActionLayout(bool checked){ emit ModelChosen(listDetails); } -void MainWindow::ClosedActionHistory(){ +void MainWindow::ClosedActionHistory() +{ ui->actionHistory->setChecked(false); delete dialogHistory; } -void MainWindow::SetEnableTool(bool enable){ +void MainWindow::SetEnableTool(bool enable) +{ ui->toolButtonEndLine->setEnabled(enable); ui->toolButtonLine->setEnabled(enable); ui->toolButtonAlongLine->setEnabled(enable); @@ -905,18 +1039,22 @@ void MainWindow::SetEnableTool(bool enable){ ui->toolButtonPointOfIntersection->setEnabled(enable); } -void MainWindow::MinimumScrollBar(){ +void MainWindow::MinimumScrollBar() +{ QScrollBar *horScrollBar = view->horizontalScrollBar(); horScrollBar->setValue(horScrollBar->minimum()); QScrollBar *verScrollBar = view->verticalScrollBar(); verScrollBar->setValue(verScrollBar->minimum()); } -bool MainWindow::SafeSaveing(const QString &fileName) const{ - try{ +bool MainWindow::SafeSaveing(const QString &fileName) const +{ + try + { doc->TestUniqueId(); } - catch(const VExceptionUniqueId &e){ + catch (const VExceptionUniqueId &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error don't unique id.")); @@ -928,7 +1066,8 @@ bool MainWindow::SafeSaveing(const QString &fileName) const{ msgBox.exec(); return false; } - if(fileName.isEmpty()){ + if (fileName.isEmpty()) + { qWarning()<save(out, Indent); @@ -948,31 +1088,42 @@ bool MainWindow::SafeSaveing(const QString &fileName) const{ QFile patternFile(fileName); // We need here temporary file because we need restore pattern after error of copying temp file. QTemporaryFile tempOfPattern; - if (tempOfPattern.open()) { + if (tempOfPattern.open()) + { patternFile.copy(tempOfPattern.fileName()); } - if ( !patternFile.exists() || patternFile.remove() ) { - if ( !tempFile.copy(patternFile.fileName()) ){ + if ( patternFile.exists() == false || patternFile.remove() ) + { + if ( tempFile.copy(patternFile.fileName()) == false ) + { qCritical()<actionSave->setEnabled(false); changeInFile = false; QFileInfo info(fileName); @@ -983,18 +1134,22 @@ void MainWindow::AutoSavePattern(){ } } -MainWindow::~MainWindow(){ +MainWindow::~MainWindow() +{ CanselTool(); delete ui; delete data; - if(!doc->isNull()){ + if (doc->isNull() == false) + { delete doc; } } -void MainWindow::OpenPattern(const QString &fileName){ - if(fileName.isEmpty()){ +void MainWindow::OpenPattern(const QString &fileName) +{ + if (fileName.isEmpty()) + { qWarning()<setContent(&file, &errorMsg, &errorLine, &errorColumn)){ + if (file.open(QIODevice::ReadOnly)) + { + if (doc->setContent(&file, &errorMsg, &errorLine, &errorColumn)) + { disconnect(comboBoxDraws, static_cast(&QComboBox::currentIndexChanged), this, &MainWindow::currentDrawChanged); - try{ - doc->Parse(Document::FullParse, sceneDraw, sceneDetails); + try + { + doc->Parse(Document::FullParse, sceneDraw, sceneDetails); } - catch(const VExceptionObjectError &e){ + catch (const VExceptionObjectError &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error parsing file.")); @@ -1023,7 +1182,8 @@ void MainWindow::OpenPattern(const QString &fileName){ Clear(); return; } - catch(const VExceptionConversionError &e){ + catch (const VExceptionConversionError &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error can't convert value.")); @@ -1036,7 +1196,8 @@ void MainWindow::OpenPattern(const QString &fileName){ Clear(); return; } - catch(const VExceptionEmptyParameter &e){ + catch (const VExceptionEmptyParameter &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error empty parameter.")); @@ -1050,7 +1211,8 @@ void MainWindow::OpenPattern(const QString &fileName){ Clear(); return; } - catch(const VExceptionWrongParameterId &e){ + catch (const VExceptionWrongParameterId &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error wrong id.")); @@ -1064,7 +1226,8 @@ void MainWindow::OpenPattern(const QString &fileName){ Clear(); return; } - catch(const VExceptionUniqueId &e){ + catch (const VExceptionUniqueId &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error don't unique id.")); @@ -1082,16 +1245,22 @@ void MainWindow::OpenPattern(const QString &fileName){ this, &MainWindow::currentDrawChanged); QString nameDraw = doc->GetNameActivDraw(); qint32 index = comboBoxDraws->findText(nameDraw); - if ( index != -1 ) { // -1 for not found + if ( index != -1 ) + { // -1 for not found comboBoxDraws->setCurrentIndex(index); } - if(comboBoxDraws->count() > 0){ + if (comboBoxDraws->count() > 0) + { SetEnableTool(true); - } else { + } + else + { SetEnableTool(false); } SetEnableWidgets(true); - } else { + } + else + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error parsing pattern file.")); diff --git a/mainwindow.h b/mainwindow.h index 76a331375..5d8027420 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -32,14 +32,16 @@ #include "tools/modelingTools/modelingtools.h" #include "xml/vdomdocument.h" -namespace Ui { -class MainWindow; +namespace Ui +{ + class MainWindow; } -class MainWindow : public QMainWindow{ - Q_OBJECT +class MainWindow : public QMainWindow +{ + Q_OBJECT public: - explicit MainWindow(QWidget *parent = 0); + explicit MainWindow(QWidget *parent = 0); ~MainWindow(); void OpenPattern(const QString &fileName); public slots: @@ -152,9 +154,8 @@ private: void SetEnableWidgets(bool enable); void SetEnableTool(bool enable); template - void SetToolButton(bool checked, Tool::Tools t, const QString &cursor, - const QString &toolTip,QSharedPointer &dialog, - Func closeDialogSlot); + void SetToolButton(bool checked, Tool::Tools t, const QString &cursor, const QString &toolTip, + QSharedPointer &dialog, Func closeDialogSlot); void MinimumScrollBar(); template void AddToolToDetail(T *tool, const qint64 &id, Tool::Tools typeTool, diff --git a/options.h b/options.h index 06dcc5a69..bf2fbad48 100644 --- a/options.h +++ b/options.h @@ -31,44 +31,49 @@ #define widthMainLine toPixel(1.2) #define widthHairLine widthMainLine/3 -namespace Scene{ -enum Scene { Point, Line, Spline, Arc, SplinePath, Detail }; -Q_DECLARE_FLAGS(Scenes, Scene) +namespace Scene +{ + enum Scene { Point, Line, Spline, Arc, SplinePath, Detail }; + Q_DECLARE_FLAGS(Scenes, Scene) } Q_DECLARE_OPERATORS_FOR_FLAGS( Scene::Scenes ) -namespace Tool{ -enum Tool {ArrowTool, - SinglePointTool, - EndLineTool, - LineTool, - AlongLineTool, - ShoulderPointTool, - NormalTool, - BisectorTool, - LineIntersectTool, - SplineTool, - ArcTool, - SplinePathTool, - PointOfContact, - Detail, - NodePoint, - NodeArc, - NodeSpline, - NodeSplinePath, - Height, - Triangle, - PointOfIntersection -}; -Q_DECLARE_FLAGS(Tools, Tool) +namespace Tool +{ + enum Tool + { + ArrowTool, + SinglePointTool, + EndLineTool, + LineTool, + AlongLineTool, + ShoulderPointTool, + NormalTool, + BisectorTool, + LineIntersectTool, + SplineTool, + ArcTool, + SplinePathTool, + PointOfContact, + Detail, + NodePoint, + NodeArc, + NodeSpline, + NodeSplinePath, + Height, + Triangle, + PointOfIntersection + }; + Q_DECLARE_FLAGS(Tools, Tool) -enum Source { FromGui, FromFile }; -Q_DECLARE_FLAGS(Sources, Source) + enum Source { FromGui, FromFile }; + Q_DECLARE_FLAGS(Sources, Source) } Q_DECLARE_OPERATORS_FOR_FLAGS( Tool::Tools ) Q_DECLARE_OPERATORS_FOR_FLAGS( Tool::Sources ) -namespace Draw { +namespace Draw +{ enum Draw { Calculation, Modeling }; Q_DECLARE_FLAGS(Draws, Draw) } diff --git a/tablewindow.cpp b/tablewindow.cpp index c23c5c1f1..d597590ff 100644 --- a/tablewindow.cpp +++ b/tablewindow.cpp @@ -24,11 +24,12 @@ #include "widgets/vtablegraphicsview.h" #include "options.h" -TableWindow::TableWindow(QWidget *parent) : - QMainWindow(parent), numberDetal(0), colission(0), ui(new Ui::TableWindow), +TableWindow::TableWindow(QWidget *parent) + :QMainWindow(parent), numberDetal(0), colission(0), ui(new Ui::TableWindow), listDetails(QVector()), outItems(false), collidingItems(false), currentScene(0), paper(0), shadowPaper(0), listOutItems(0), listCollidingItems(QList()), - indexDetail(0), sceneRect(QRectF()){ + indexDetail(0), sceneRect(QRectF()) +{ ui->setupUi(this); numberDetal = new QLabel("Залишилось 0 деталей.", this); colission = new QLabel("Колізій не знайдено.", this); @@ -43,7 +44,7 @@ TableWindow::TableWindow(QWidget *parent) : brush->setColor( QColor( Qt::gray ) ); currentScene->setBackgroundBrush( *brush ); VTableGraphicsView* view = new VTableGraphicsView(currentScene); - view->fitInView(view->scene()->sceneRect(),Qt::KeepAspectRatio); + view->fitInView(view->scene()->sceneRect(), Qt::KeepAspectRatio); ui->horizontalLayout->addWidget(view); connect(ui->actionTurn, &QAction::triggered, view, &VTableGraphicsView::rotateItems); connect(ui->actionMirror, &QAction::triggered, view, &VTableGraphicsView::MirrorItem); @@ -57,30 +58,34 @@ TableWindow::TableWindow(QWidget *parent) : connect(view, &VTableGraphicsView::itemChect, this, &TableWindow::itemChect); } -TableWindow::~TableWindow(){ +TableWindow::~TableWindow() +{ delete ui; } -void TableWindow::AddPaper(){ +void TableWindow::AddPaper() +{ qreal x1, y1, x2, y2; sceneRect.getCoords(&x1, &y1, &x2, &y2); - shadowPaper = new QGraphicsRectItem(QRectF(x1+4,y1+4,x2+4, y2+4)); + shadowPaper = new QGraphicsRectItem(QRectF(x1+4, y1+4, x2+4, y2+4)); shadowPaper->setBrush(QBrush(Qt::black)); currentScene->addItem(shadowPaper); - paper = new QGraphicsRectItem(QRectF(x1,y1,x2, y2)); + paper = new QGraphicsRectItem(QRectF(x1, y1, x2, y2)); paper->setPen(QPen(Qt::black, toPixel(widthMainLine))); paper->setBrush(QBrush(Qt::white)); currentScene->addItem(paper); qDebug()<rect().size().toSize(); } -void TableWindow::AddDetail(){ - if(indexDetailclearSelection(); VItem* Detail = listDetails[indexDetail]; - QObject::connect(Detail, SIGNAL(itemOut(int,bool)), this, SLOT(itemOut(int,bool))); - QObject::connect(Detail, SIGNAL(itemColliding(QList,int)), this, - SLOT(itemColliding(QList,int))); + QObject::connect(Detail, SIGNAL(itemOut(int, bool)), this, SLOT(itemOut(int, bool))); + QObject::connect(Detail, SIGNAL(itemColliding(QList, int)), this, + SLOT(itemColliding(QList, int))); QObject::connect(this, SIGNAL(LengthChanged()), Detail, SLOT(LengthChanged())); Detail->setPen(QPen(Qt::black, toPixel(widthMainLine))); Detail->setBrush(QBrush(Qt::white)); @@ -91,7 +96,8 @@ void TableWindow::AddDetail(){ Detail->setParentItem(paper); Detail->setSelected(true); indexDetail++; - if(indexDetail==listDetails.count()){ + if (indexDetail==listDetails.count()) + { ui->actionSave->setEnabled(true); } } @@ -101,7 +107,8 @@ void TableWindow::AddDetail(){ /* * Отримуємо деталі розрахованої моделі для подальшого укладання. */ -void TableWindow::ModelChosen(QVector listDetails){ +void TableWindow::ModelChosen(QVector listDetails) +{ this->listDetails = listDetails; listOutItems = new QBitArray(this->listDetails.count()); AddPaper(); @@ -110,23 +117,27 @@ void TableWindow::ModelChosen(QVector listDetails){ show(); } -void TableWindow::closeEvent(QCloseEvent *event){ +void TableWindow::closeEvent(QCloseEvent *event) +{ event->ignore(); StopTable(); } -void TableWindow::moveToCenter(){ +void TableWindow::moveToCenter() +{ QRect rect = frameGeometry(); rect.moveCenter(QDesktopWidget().availableGeometry().center()); move(rect.topLeft()); } -void TableWindow::showEvent ( QShowEvent * event ){ +void TableWindow::showEvent ( QShowEvent * event ) +{ QMainWindow::showEvent(event); moveToCenter(); } -void TableWindow::StopTable(){ +void TableWindow::StopTable() +{ hide(); currentScene->clear(); delete listOutItems; @@ -136,9 +147,11 @@ void TableWindow::StopTable(){ emit closed(); } -void TableWindow::saveScene(){ +void TableWindow::saveScene() +{ QString name = QFileDialog::getSaveFileName(0, tr("Save layout"), "", "Images (*.png);;Svg files (*.svg)"); - if(name.isNull()){ + if (name.isNull()) + { return; } @@ -153,9 +166,12 @@ void TableWindow::saveScene(){ currentScene->setSceneRect(currentScene->itemsBoundingRect()); QFileInfo fi(name); - if(fi.suffix() == "svg"){ + if (fi.suffix() == "svg") + { SvgFile(name); - } else if(fi.suffix() == "png"){ + } + else if (fi.suffix() == "png") + { PngFile(name); } @@ -166,32 +182,43 @@ void TableWindow::saveScene(){ shadowPaper->setBrush(QBrush(Qt::black)); } -void TableWindow::itemChect(bool flag){ +void TableWindow::itemChect(bool flag) +{ ui->actionTurn->setDisabled(flag); ui->actionMirror->setDisabled(flag); } -void TableWindow::checkNext(){ - if(outItems == true && collidingItems == true){ +void TableWindow::checkNext() +{ + if (outItems == true && collidingItems == true) + { colission->setText("Колізій не знайдено."); - if(indexDetail==listDetails.count()){ + if (indexDetail==listDetails.count()) + { ui->actionSave->setEnabled(true); ui->actionNext->setDisabled(true); - } else { + } + else + { ui->actionNext->setDisabled(false); ui->actionSave->setEnabled(false); } - } else { + } + else + { colission->setText("Знайдено колізії."); ui->actionNext->setDisabled(true); ui->actionSave->setEnabled(false); } } -void TableWindow::itemOut(int number, bool flag){ - listOutItems->setBit(number,flag); - for( int i = 0; i < listOutItems->count(); ++i ){ - if(listOutItems->at(i)==true){ +void TableWindow::itemOut(int number, bool flag) +{ + listOutItems->setBit(number, flag); + for ( int i = 0; i < listOutItems->count(); ++i ) + { + if (listOutItems->at(i)==true) + { outItems=false; qDebug()<<"itemOut::outItems="< list, int number){ +void TableWindow::itemColliding(QList list, int number) +{ //qDebug()<<"number="<1){ - for( int i = 0; i < listCollidingItems.count(); ++i ){ - QList l = listCollidingItems.at(i)->collidingItems(); - if(l.size()-2 <= 0){ + if (listCollidingItems.size()>1) + { + for ( int i = 0; i < listCollidingItems.count(); ++i ) + { + QList lis = listCollidingItems.at(i)->collidingItems(); + if (lis.size()-2 <= 0) + { VItem * bitem = qgraphicsitem_cast ( listCollidingItems.at(i) ); - if (bitem == 0){ + if (bitem == 0) + { qDebug()<<"Не можу привести тип об'єкту"; - } else { + } + else + { bitem->setPen(QPen(Qt::black, toPixel(widthMainLine))); } listCollidingItems.removeAt(i); } } - } else if(listCollidingItems.size()==1){ + } + else if (listCollidingItems.size()==1) + { VItem * bitem = qgraphicsitem_cast ( listCollidingItems.at(0) ); - if (bitem == 0){ + if (bitem == 0) + { qDebug()<<"Не можу привести тип об'єкту"; - } else { + } + else + { bitem->setPen(QPen(Qt::black, toPixel(widthMainLine))); } listCollidingItems.clear(); collidingItems = true; } - } else { + } + else + { collidingItems = true; } - } else { + } + else + { collidingItems = true; } - } else if(number==1){ - if(list.contains(paper)==true){ + } + else if (number==1) + { + if (list.contains(paper)==true) + { list.removeAt(list.indexOf(paper)); } - if(list.contains(shadowPaper)==true){ + if (list.contains(shadowPaper)==true) + { list.removeAt(list.indexOf(shadowPaper)); } - for( int i = 0; i < list.count(); ++i ){ - if(listCollidingItems.contains(list.at(i))==false){ + for ( int i = 0; i < list.count(); ++i ) + { + if (listCollidingItems.contains(list.at(i))==false) + { listCollidingItems.append(list.at(i)); } } @@ -255,11 +307,13 @@ void TableWindow::itemColliding(QList list, int number){ checkNext(); } -void TableWindow::GetNextDetail(){ +void TableWindow::GetNextDetail() +{ AddDetail(); } -void TableWindow::AddLength(){ +void TableWindow::AddLength() +{ QRectF rect = currentScene->sceneRect(); rect.setHeight(rect.height()+toPixel(279)); currentScene->setSceneRect(rect); @@ -273,8 +327,10 @@ void TableWindow::AddLength(){ emit LengthChanged(); } -void TableWindow::RemoveLength(){ - if(sceneRect.height()<=currentScene->sceneRect().height()-100){ +void TableWindow::RemoveLength() +{ + if (sceneRect.height()<=currentScene->sceneRect().height()-100) + { QRectF rect = currentScene->sceneRect(); rect.setHeight(rect.height()-toPixel(279)); currentScene->setSceneRect(rect); @@ -284,18 +340,24 @@ void TableWindow::RemoveLength(){ rect = paper->rect(); rect.setHeight(rect.height()-toPixel(279)); paper->setRect(rect); - if(sceneRect.height()==currentScene->sceneRect().height()){ + if (sceneRect.height()==currentScene->sceneRect().height()) + { ui->actionRemove->setDisabled(true); } emit LengthChanged(); - } else { + } + else + { ui->actionRemove->setDisabled(true); } } -void TableWindow::keyPressEvent ( QKeyEvent * event ){ - if( event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return ){ - if(ui->actionNext->isEnabled() == true ){ +void TableWindow::keyPressEvent ( QKeyEvent * event ) +{ + if ( event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return ) + { + if (ui->actionNext->isEnabled() == true ) + { AddDetail(); qDebug()<<"Додали деталь."; } @@ -304,7 +366,8 @@ void TableWindow::keyPressEvent ( QKeyEvent * event ){ } -void TableWindow::SvgFile(const QString &name) const{ +void TableWindow::SvgFile(const QString &name) const +{ QSvgGenerator generator; generator.setFileName(name); generator.setSize(paper->rect().size().toSize()); @@ -322,11 +385,13 @@ void TableWindow::SvgFile(const QString &name) const{ painter.end(); } -void TableWindow::PngFile(const QString &name) const{ +void TableWindow::PngFile(const QString &name) const +{ QRectF r = paper->rect(); qreal x=0, y=0, w=0, h=0; - r.getRect(&x,&y,&w,&h);// Re-shrink the scene to it's bounding contents - QImage image(QSize(static_cast(w), static_cast(h)), QImage::Format_ARGB32); // Create the image with the exact size of the shrunk scene + r.getRect(&x, &y, &w, &h);// Re-shrink the scene to it's bounding contents + // Create the image with the exact size of the shrunk scene + QImage image(QSize(static_cast(w), static_cast(h)), QImage::Format_ARGB32); image.fill(Qt::transparent); // Start all pixels transparent QPainter painter(&image); painter.setFont( QFont( "Arial", 8, QFont::Normal ) ); diff --git a/tablewindow.h b/tablewindow.h index bda643db8..33facb88e 100644 --- a/tablewindow.h +++ b/tablewindow.h @@ -25,14 +25,16 @@ #include #include "widgets/vitem.h" -namespace Ui { +namespace Ui +{ class TableWindow; } /** * @brief TableWindow клас вікна створення розкладки. */ -class TableWindow : public QMainWindow{ +class TableWindow : public QMainWindow +{ Q_OBJECT public: /** @@ -47,7 +49,7 @@ public: * @brief TableWindow Конструктор класу вікна створення розкладки. * @param parent Батько об'єкту. За замовчуванням = 0. */ - explicit TableWindow(QWidget *parent = 0); + explicit TableWindow(QWidget *parent = 0); /** * @brief ~TableWindow Деструктор класу вікна. */ diff --git a/tools/drawTools/vdrawtool.cpp b/tools/drawTools/vdrawtool.cpp index b6290d45a..28e3a859b 100644 --- a/tools/drawTools/vdrawtool.cpp +++ b/tools/drawTools/vdrawtool.cpp @@ -23,24 +23,31 @@ qreal VDrawTool::factor = 1; -VDrawTool::VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent) : - VAbstractTool(doc, data, id, parent), ignoreContextMenuEvent(false), ignoreFullUpdate(false), - nameActivDraw(doc->GetNameActivDraw()){ +VDrawTool::VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent) + :VAbstractTool(doc, data, id, parent), ignoreContextMenuEvent(false), ignoreFullUpdate(false), + nameActivDraw(doc->GetNameActivDraw()) +{ connect(this->doc, &VDomDocument::ChangedActivDraw, this, &VDrawTool::ChangedActivDraw); connect(this->doc, &VDomDocument::ChangedNameDraw, this, &VDrawTool::ChangedNameDraw); connect(this->doc, &VDomDocument::ShowTool, this, &VDrawTool::ShowTool); } -void VDrawTool::AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *doc){ +void VDrawTool::AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *doc) +{ qint64 cursor = doc->getCursor(); QVector *history = doc->getHistory(); - if(cursor <= 0){ + if (cursor <= 0) + { history->append(VToolRecord(id, toolType, doc->GetNameActivDraw())); - } else { + } + else + { qint32 index = 0; - for(qint32 i = 0; isize(); ++i){ + for (qint32 i = 0; isize(); ++i) + { VToolRecord rec = history->at(i); - if(rec.getId() == cursor){ + if (rec.getId() == cursor) + { index = i; break; } @@ -49,49 +56,68 @@ void VDrawTool::AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *d } } -void VDrawTool::ShowTool(qint64 id, Qt::GlobalColor color, bool enable){ +void VDrawTool::ShowTool(qint64 id, Qt::GlobalColor color, bool enable) +{ Q_UNUSED(id); Q_UNUSED(color); Q_UNUSED(enable); } -void VDrawTool::ChangedActivDraw(const QString newName){ - if(nameActivDraw == newName){ +void VDrawTool::ChangedActivDraw(const QString newName) +{ + if (nameActivDraw == newName) + { ignoreContextMenuEvent = false; - } else { + } + else + { ignoreContextMenuEvent = true; } } -void VDrawTool::ChangedNameDraw(const QString oldName, const QString newName){ - if(nameActivDraw == oldName){ +void VDrawTool::ChangedNameDraw(const QString oldName, const QString newName) +{ + if (nameActivDraw == oldName) + { nameActivDraw = newName; } } -void VDrawTool::SetFactor(qreal factor){ - if(factor <= 2 && factor >= 0.5){ +void VDrawTool::SetFactor(qreal factor) +{ + if (factor <= 2 && factor >= 0.5) + { this->factor = factor; } } -void VDrawTool::AddToCalculation(const QDomElement &domElement){ +void VDrawTool::AddToCalculation(const QDomElement &domElement) +{ QDomElement calcElement; bool ok = doc->GetActivCalculationElement(calcElement); - if(ok){ + if (ok) + { qint64 id = doc->getCursor(); - if(id <= 0){ + if (id <= 0) + { calcElement.appendChild(domElement); - } else { + } + else + { QDomElement refElement = doc->elementById(QString().setNum(doc->getCursor())); - if(refElement.isElement()){ - calcElement.insertAfter(domElement,refElement); + if (refElement.isElement()) + { + calcElement.insertAfter(domElement, refElement); doc->setCursor(0); - } else { + } + else + { qCritical()< void ContextMenu(QSharedPointer &dialog, Tool *tool, QGraphicsSceneContextMenuEvent *event, - bool showRemove = true){ + bool showRemove = true) + { Q_ASSERT(tool != 0); Q_ASSERT(event != 0); - if(!ignoreContextMenuEvent){ + if (ignoreContextMenuEvent == false) + { QMenu menu; QAction *actionOption = menu.addAction(tr("Options")); QAction *actionRemove = 0; - if(showRemove){ + if (showRemove) + { actionRemove = menu.addAction(tr("Delete")); - if(_referens > 1){ + if (_referens > 1) + { actionRemove->setEnabled(false); - } else { + } + else + { actionRemove->setEnabled(true); } } QAction *selectedAction = menu.exec(event->screenPos()); - if(selectedAction == actionOption){ + if (selectedAction == actionOption) + { dialog = QSharedPointer(new Dialog(getData())); connect(qobject_cast< VMainGraphicsScene * >(tool->scene()), &VMainGraphicsScene::ChoosedObject, dialog.data(), &Dialog::ChoosedObject); connect(dialog.data(), &Dialog::DialogClosed, tool, &Tool::FullUpdateFromGui); - if(!ignoreFullUpdate){ + if (ignoreFullUpdate == false) + { connect(doc, &VDomDocument::FullUpdateFromFile, dialog.data(), &Dialog::UpdateList); } @@ -76,16 +85,20 @@ protected: dialog->show(); } - if(showRemove){ - if(selectedAction == actionRemove){ + if (showRemove) + { + if (selectedAction == actionRemove) + { //deincrement referens RemoveReferens(); //remove form xml file QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { QDomElement element; bool ok = doc->GetActivCalculationElement(element); - if(ok){ + if (ok) + { element.removeChild(domElement); //update xml file emit FullUpdateTree(); @@ -98,12 +111,17 @@ protected: } } template - void ShowItem(Item *item, qint64 id, Qt::GlobalColor color, bool enable){ + void ShowItem(Item *item, qint64 id, Qt::GlobalColor color, bool enable) + { Q_ASSERT(item != 0); - if(id == item->id){ - if(enable == false){ + if (id == item->id) + { + if (enable == false) + { currentColor = baseColor; - } else { + } + else + { currentColor = color; } item->setPen(QPen(currentColor, widthHairLine/factor)); diff --git a/tools/drawTools/vtoolalongline.cpp b/tools/drawTools/vtoolalongline.cpp index 3df25583e..e95cd586e 100644 --- a/tools/drawTools/vtoolalongline.cpp +++ b/tools/drawTools/vtoolalongline.cpp @@ -27,18 +27,22 @@ const QString VToolAlongLine::ToolType = QStringLiteral("alongLine"); VToolAlongLine::VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, Tool::Sources typeCreation, - QGraphicsItem *parent): - VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId), - dialogAlongLine(QSharedPointer()){ + QGraphicsItem *parent) + :VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId), + dialogAlongLine(QSharedPointer()) +{ - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolAlongLine::FullUpdateFromFile(){ +void VToolAlongLine::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); basePointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -47,10 +51,13 @@ void VToolAlongLine::FullUpdateFromFile(){ RefreshGeometry(); } -void VToolAlongLine::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolAlongLine::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogAlongLine->getPointName()); domElement.setAttribute(AttrTypeLine, dialogAlongLine->getTypeLine()); domElement.setAttribute(AttrLength, dialogAlongLine->getFormula()); @@ -62,16 +69,19 @@ void VToolAlongLine::FullUpdateFromGui(int result){ dialogAlongLine.clear(); } -void VToolAlongLine::SetFactor(qreal factor){ +void VToolAlongLine::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } -void VToolAlongLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolAlongLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogAlongLine, this, event); } -void VToolAlongLine::AddToFile(){ +void VToolAlongLine::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -89,25 +99,26 @@ void VToolAlongLine::AddToFile(){ AddToCalculation(domElement); } -void VToolAlongLine::RemoveReferens(){ +void VToolAlongLine::RemoveReferens() +{ doc->DecrementReferens(secondPointId); VToolLinePoint::RemoveReferens(); } -void VToolAlongLine::setDialog(){ - Q_ASSERT(!dialogAlongLine.isNull()); - if(!dialogAlongLine.isNull()){ - VPointF p = VAbstractTool::data.GetPoint(id); - dialogAlongLine->setTypeLine(typeLine); - dialogAlongLine->setFormula(formula); - dialogAlongLine->setFirstPointId(basePointId, id); - dialogAlongLine->setSecondPointId(secondPointId, id); - dialogAlongLine->setPointName(p.name()); - } +void VToolAlongLine::setDialog() +{ + Q_ASSERT(dialogAlongLine.isNull() == false); + VPointF p = VAbstractTool::data.GetPoint(id); + dialogAlongLine->setTypeLine(typeLine); + dialogAlongLine->setFormula(formula); + dialogAlongLine->setFirstPointId(basePointId, id); + dialogAlongLine->setSecondPointId(secondPointId, id); + dialogAlongLine->setPointName(p.name()); } void VToolAlongLine::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ QString formula = dialog->getFormula(); qint64 firstPointId = dialog->getFirstPointId(); qint64 secondPointId = dialog->getSecondPointId(); @@ -120,30 +131,37 @@ void VToolAlongLine::Create(QSharedPointer &dialog, VMainGraphi void VToolAlongLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){ + VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) +{ VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); QLineF line = QLineF(firstPoint.toQPointF(), secondPoint.toQPointF()); Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { line.setLength(toPixel(result)); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); data->AddLine(firstPointId, id); data->AddLine(id, secondPointId); - } else { + } + else + { data->UpdatePoint(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); data->AddLine(firstPointId, id); data->AddLine(id, secondPointId); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::AlongLineTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolAlongLine *point = new VToolAlongLine(doc, data, id, formula, firstPointId, secondPointId, typeLine, typeCreation); scene->addItem(point); diff --git a/tools/drawTools/vtoolalongline.h b/tools/drawTools/vtoolalongline.h index 35734aab9..22b0e7996 100644 --- a/tools/drawTools/vtoolalongline.h +++ b/tools/drawTools/vtoolalongline.h @@ -25,7 +25,8 @@ #include "vtoollinepoint.h" #include "dialogs/dialogalongline.h" -class VToolAlongLine : public VToolLinePoint{ +class VToolAlongLine : public VToolLinePoint +{ Q_OBJECT public: VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, @@ -49,7 +50,7 @@ protected: virtual void RemoveReferens(); private: qint64 secondPointId; - QSharedPointer dialogAlongLine; + QSharedPointer dialogAlongLine; }; #endif // VTOOLALONGLINE_H diff --git a/tools/drawTools/vtoolarc.cpp b/tools/drawTools/vtoolarc.cpp index 149560c3d..bda386b36 100644 --- a/tools/drawTools/vtoolarc.cpp +++ b/tools/drawTools/vtoolarc.cpp @@ -26,8 +26,9 @@ const QString VToolArc::TagName = QStringLiteral("arc"); const QString VToolArc::ToolType = QStringLiteral("simple"); VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, - QGraphicsItem *parent):VDrawTool(doc, data, id), QGraphicsPathItem(parent), - dialogArc(QSharedPointer()){ + QGraphicsItem *parent) + :VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogArc(QSharedPointer()) +{ VArc arc = data->GetArc(id); QPainterPath path; path.addPath(arc.GetPath()); @@ -37,24 +38,25 @@ VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolArc::setDialog(){ - Q_ASSERT(!dialogArc.isNull()); - if(!dialogArc.isNull()){ - VArc arc = VAbstractTool::data.GetArc(id); - dialogArc->SetCenter(arc.GetCenter()); - dialogArc->SetF1(arc.GetFormulaF1()); - dialogArc->SetF2(arc.GetFormulaF2()); - dialogArc->SetRadius(arc.GetFormulaRadius()); - } +void VToolArc::setDialog() +{ + Q_ASSERT(dialogArc.isNull() == false); + VArc arc = VAbstractTool::data.GetArc(id); + dialogArc->SetCenter(arc.GetCenter()); + dialogArc->SetF1(arc.GetFormulaF1()); + dialogArc->SetF2(arc.GetFormulaF2()); + dialogArc->SetRadius(arc.GetFormulaRadius()); } void VToolArc::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data){ + VContainer *data) +{ qint64 center = dialog->GetCenter(); QString radius = dialog->GetRadius(); QString f1 = dialog->GetF1(); @@ -63,43 +65,52 @@ void VToolArc::Create(QSharedPointer &dialog, VMainGraphicsScene *sce } void VToolArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, - const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){ + const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, + const Document::Documents &parse, Tool::Sources typeCreation) +{ qreal calcRadius = 0, calcF1 = 0, calcF2 = 0; Calculator cal(data); QString errorMsg; qreal result = cal.eval(radius, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { calcRadius = toPixel(result); } errorMsg.clear(); result = cal.eval(f1, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { calcF1 = result; } errorMsg.clear(); result = cal.eval(f2, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { calcF2 = result; } VArc arc = VArc(data->DataPoints(), center, calcRadius, radius, calcF1, f1, calcF2, f2 ); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddArc(arc); - data->AddLengthArc(data->GetNameArc(center,id), toMM(arc.GetLength())); - } else { + data->AddLengthArc(data->GetNameArc(center, id), toMM(arc.GetLength())); + } + else + { data->UpdateArc(id, arc); - data->AddLengthArc(data->GetNameArc(center,id), toMM(arc.GetLength())); - if(parse != Document::FullParse){ + data->AddLengthArc(data->GetNameArc(center, id), toMM(arc.GetLength())); + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::ArcTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolArc *toolArc = new VToolArc(doc, data, id, typeCreation); scene->addItem(toolArc); connect(toolArc, &VToolArc::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); @@ -109,14 +120,18 @@ void VToolArc::Create(const qint64 _id, const qint64 ¢er, const QString &rad } } -void VToolArc::FullUpdateFromFile(){ +void VToolArc::FullUpdateFromFile() +{ RefreshGeometry(); } -void VToolArc::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolArc::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrCenter, QString().setNum(dialogArc->GetCenter())); domElement.setAttribute(AttrRadius, dialogArc->GetRadius()); domElement.setAttribute(AttrAngle1, dialogArc->GetF1()); @@ -127,12 +142,16 @@ void VToolArc::FullUpdateFromGui(int result){ dialogArc.clear(); } -void VToolArc::ChangedActivDraw(const QString newName){ +void VToolArc::ChangedActivDraw(const QString newName) +{ bool selectable = false; - if(nameActivDraw == newName){ + if (nameActivDraw == newName) + { selectable = true; currentColor = Qt::black; - } else { + } + else + { selectable = false; currentColor = Qt::gray; } @@ -142,20 +161,24 @@ void VToolArc::ChangedActivDraw(const QString newName){ VDrawTool::ChangedActivDraw(newName); } -void VToolArc::ShowTool(qint64 id, Qt::GlobalColor color, bool enable){ +void VToolArc::ShowTool(qint64 id, Qt::GlobalColor color, bool enable) +{ ShowItem(this, id, color, enable); } -void VToolArc::SetFactor(qreal factor){ +void VToolArc::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } -void VToolArc::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolArc::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogArc, this, event); } -void VToolArc::AddToFile(){ +void VToolArc::AddToFile() +{ VArc arc = VAbstractTool::data.GetArc(id); QDomElement domElement = doc->createElement(TagName); @@ -169,29 +192,35 @@ void VToolArc::AddToFile(){ AddToCalculation(domElement); } -void VToolArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VToolArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Arc); } QGraphicsItem::mouseReleaseEvent(event); } -void VToolArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VToolArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine/factor)); } -void VToolArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VToolArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine/factor)); } -void VToolArc::RemoveReferens(){ +void VToolArc::RemoveReferens() +{ VArc arc = VAbstractTool::data.GetArc(id); doc->DecrementReferens(arc.GetCenter()); } -void VToolArc::RefreshGeometry(){ +void VToolArc::RefreshGeometry() +{ this->setPen(QPen(currentColor, widthHairLine/factor)); VArc arc = VAbstractTool::data.GetArc(id); QPainterPath path; diff --git a/tools/drawTools/vtoolarc.h b/tools/drawTools/vtoolarc.h index a743b96e1..75ea37bfa 100644 --- a/tools/drawTools/vtoolarc.h +++ b/tools/drawTools/vtoolarc.h @@ -27,7 +27,8 @@ #include "dialogs/dialogarc.h" #include "widgets/vcontrolpointspline.h" -class VToolArc :public VDrawTool, public QGraphicsPathItem{ +class VToolArc :public VDrawTool, public QGraphicsPathItem +{ Q_OBJECT public: VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, diff --git a/tools/drawTools/vtoolbisector.cpp b/tools/drawTools/vtoolbisector.cpp index 9e21737ab..26af32886 100644 --- a/tools/drawTools/vtoolbisector.cpp +++ b/tools/drawTools/vtoolbisector.cpp @@ -27,47 +27,53 @@ const QString VToolBisector::ToolType = QStringLiteral("bisector"); VToolBisector::VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation, - QGraphicsItem *parent): - VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), - thirdPointId(0), dialogBisector(QSharedPointer()){ + QGraphicsItem *parent) + :VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), + thirdPointId(0), dialogBisector(QSharedPointer()) +{ this->firstPointId = firstPointId; this->thirdPointId = thirdPointId; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } QPointF VToolBisector::FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, - const QPointF &thirdPoint, const qreal &length){ + const QPointF &thirdPoint, const qreal &length) +{ QLineF line1(secondPoint, firstPoint); QLineF line2(secondPoint, thirdPoint); qreal angle = line1.angleTo(line2); - if(angle>180){ + if (angle>180) + { angle = 360 - angle; line1.setAngle(line1.angle()-angle/2); - } else { + } + else + { line1.setAngle(line1.angle()+angle/2); } line1.setLength(length); return line1.p2(); } -void VToolBisector::setDialog(){ - Q_ASSERT(!dialogBisector.isNull()); - if(!dialogBisector.isNull()){ - VPointF p = VAbstractTool::data.GetPoint(id); - dialogBisector->setTypeLine(typeLine); - dialogBisector->setFormula(formula); - dialogBisector->setFirstPointId(firstPointId, id); - dialogBisector->setSecondPointId(basePointId, id); - dialogBisector->setThirdPointId(thirdPointId, id); - dialogBisector->setPointName(p.name()); - } +void VToolBisector::setDialog() +{ + Q_ASSERT(dialogBisector.isNull() == false); + VPointF p = VAbstractTool::data.GetPoint(id); + dialogBisector->setTypeLine(typeLine); + dialogBisector->setFormula(formula); + dialogBisector->setFirstPointId(firstPointId, id); + dialogBisector->setSecondPointId(basePointId, id); + dialogBisector->setThirdPointId(thirdPointId, id); + dialogBisector->setPointName(p.name()); } -void VToolBisector::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ +void VToolBisector::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, + VContainer *data) +{ QString formula = dialog->getFormula(); qint64 firstPointId = dialog->getFirstPointId(); qint64 secondPointId = dialog->getSecondPointId(); @@ -82,7 +88,8 @@ void VToolBisector::Create(const qint64 _id, const QString &formula, const qint6 const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation){ + const Document::Documents &parse, Tool::Sources typeCreation) +{ VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); VPointF thirdPoint = data->GetPoint(thirdPointId); @@ -90,22 +97,28 @@ void VToolBisector::Create(const qint64 _id, const QString &formula, const qint6 Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { QPointF fPoint = VToolBisector::FindPoint(firstPoint.toQPointF(), secondPoint.toQPointF(), thirdPoint.toQPointF(), toPixel(result)); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(firstPointId, id); - } else { + } + else + { data->UpdatePoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(firstPointId, id); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::BisectorTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolBisector *point = new VToolBisector(doc, data, id, typeLine, formula, firstPointId, secondPointId, thirdPointId, typeCreation); scene->addItem(point); @@ -120,9 +133,11 @@ void VToolBisector::Create(const qint64 _id, const QString &formula, const qint6 } } -void VToolBisector::FullUpdateFromFile(){ +void VToolBisector::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -132,10 +147,13 @@ void VToolBisector::FullUpdateFromFile(){ RefreshGeometry(); } -void VToolBisector::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolBisector::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogBisector->getPointName()); domElement.setAttribute(AttrTypeLine, dialogBisector->getTypeLine()); domElement.setAttribute(AttrLength, dialogBisector->getFormula()); @@ -148,16 +166,19 @@ void VToolBisector::FullUpdateFromGui(int result){ dialogBisector.clear(); } -void VToolBisector::SetFactor(qreal factor){ +void VToolBisector::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } -void VToolBisector::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolBisector::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogBisector, this, event); } -void VToolBisector::AddToFile(){ +void VToolBisector::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -176,7 +197,8 @@ void VToolBisector::AddToFile(){ AddToCalculation(domElement); } -void VToolBisector::RemoveReferens(){ +void VToolBisector::RemoveReferens() +{ doc->DecrementReferens(firstPointId); doc->DecrementReferens(thirdPointId); VToolLinePoint::RemoveReferens(); diff --git a/tools/drawTools/vtoolbisector.h b/tools/drawTools/vtoolbisector.h index 6e0603f01..9f7434538 100644 --- a/tools/drawTools/vtoolbisector.h +++ b/tools/drawTools/vtoolbisector.h @@ -25,7 +25,8 @@ #include "vtoollinepoint.h" #include "dialogs/dialogbisector.h" -class VToolBisector : public VToolLinePoint{ +class VToolBisector : public VToolLinePoint +{ public: VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, diff --git a/tools/drawTools/vtoolendline.cpp b/tools/drawTools/vtoolendline.cpp index d2b58d931..cbd18add4 100644 --- a/tools/drawTools/vtoolendline.cpp +++ b/tools/drawTools/vtoolendline.cpp @@ -27,17 +27,20 @@ const QString VToolEndLine::ToolType = QStringLiteral("endLine"); VToolEndLine::VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, - Tool::Sources typeCreation, QGraphicsItem *parent): - VToolLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent), - dialogEndLine(QSharedPointer()){ + Tool::Sources typeCreation, QGraphicsItem *parent) + :VToolLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent), + dialogEndLine(QSharedPointer()) +{ - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolEndLine::setDialog(){ - Q_ASSERT(!dialogEndLine.isNull()); +void VToolEndLine::setDialog() +{ + Q_ASSERT(dialogEndLine.isNull() == false); VPointF p = VAbstractTool::data.GetPoint(id); dialogEndLine->setTypeLine(typeLine); dialogEndLine->setFormula(formula); @@ -46,8 +49,9 @@ void VToolEndLine::setDialog(){ dialogEndLine->setPointName(p.name()); } -void VToolEndLine::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ +void VToolEndLine::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, + VContainer *data) +{ QString pointName = dialog->getPointName(); QString typeLine = dialog->getTypeLine(); QString formula = dialog->getFormula(); @@ -60,29 +64,35 @@ void VToolEndLine::Create(QSharedPointer &dialog, VMainGraphicsSc void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){ - + VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) +{ VPointF basePoint = data->GetPoint(basePointId); QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y())); Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { line.setLength(toPixel(result)); line.setAngle(angle); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); data->AddLine(basePointId, id); - } else { + } + else + { data->UpdatePoint(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); data->AddLine(basePointId, id); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::EndLineTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolEndLine *point = new VToolEndLine(doc, data, id, typeLine, formula, angle, basePointId, typeCreation); scene->addItem(point); @@ -95,9 +105,11 @@ void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QStr } } -void VToolEndLine::FullUpdateFromFile(){ +void VToolEndLine::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); basePointId = domElement.attribute(AttrBasePoint, "").toLongLong(); @@ -106,14 +118,18 @@ void VToolEndLine::FullUpdateFromFile(){ RefreshGeometry(); } -void VToolEndLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolEndLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogEndLine, this, event); } -void VToolEndLine::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolEndLine::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogEndLine->getPointName()); domElement.setAttribute(AttrTypeLine, dialogEndLine->getTypeLine()); domElement.setAttribute(AttrLength, dialogEndLine->getFormula()); @@ -125,7 +141,8 @@ void VToolEndLine::FullUpdateFromGui(int result){ dialogEndLine.clear(); } -void VToolEndLine::AddToFile(){ +void VToolEndLine::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -142,4 +159,3 @@ void VToolEndLine::AddToFile(){ AddToCalculation(domElement); } - diff --git a/tools/drawTools/vtoolendline.h b/tools/drawTools/vtoolendline.h index 75ce3cfeb..9e7171a7f 100644 --- a/tools/drawTools/vtoolendline.h +++ b/tools/drawTools/vtoolendline.h @@ -25,7 +25,8 @@ #include "vtoollinepoint.h" #include "dialogs/dialogendline.h" -class VToolEndLine : public VToolLinePoint{ +class VToolEndLine : public VToolLinePoint +{ Q_OBJECT public: VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, diff --git a/tools/drawTools/vtoolheight.cpp b/tools/drawTools/vtoolheight.cpp index 0ab9ff998..e8b4d502f 100644 --- a/tools/drawTools/vtoolheight.cpp +++ b/tools/drawTools/vtoolheight.cpp @@ -6,15 +6,18 @@ VToolHeight::VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, Tool::Sources typeCreation, QGraphicsItem * parent) :VToolLinePoint(doc, data, id, typeLine, QString(), basePointId, 0, parent), - dialogHeight(QSharedPointer()), p1LineId(p1LineId), p2LineId(p2LineId){ + dialogHeight(QSharedPointer()), p1LineId(p1LineId), p2LineId(p2LineId) +{ ignoreFullUpdate = true; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolHeight::setDialog(){ - Q_ASSERT(!dialogHeight.isNull()); +void VToolHeight::setDialog() +{ + Q_ASSERT(dialogHeight.isNull() == false); VPointF p = VAbstractTool::data.GetPoint(id); dialogHeight->setTypeLine(typeLine); dialogHeight->setBasePointId(basePointId, id); @@ -24,7 +27,8 @@ void VToolHeight::setDialog(){ } void VToolHeight::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data){ + VContainer *data) +{ disconnect(doc, &VDomDocument::FullUpdateFromFile, dialog.data(), &DialogHeight::UpdateList); QString pointName = dialog->getPointName(); QString typeLine = dialog->getTypeLine(); @@ -38,29 +42,35 @@ void VToolHeight::Create(QSharedPointer &dialog, VMainGraphicsScen void VToolHeight::Create(const qint64 _id, const QString &pointName, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){ + VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) +{ VPointF basePoint = data->GetPoint(basePointId); VPointF p1Line = data->GetPoint(p1LineId); VPointF p2Line = data->GetPoint(p2LineId); QPointF pHeight = FindPoint(QLineF(p1Line.toQPointF(), p2Line.toQPointF()), basePoint.toQPointF()); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(pHeight.x(), pHeight.y(), pointName, mx, my)); data->AddLine(basePointId, id); data->AddLine(p1LineId, id); data->AddLine(p2LineId, id); - } else { + } + else + { data->UpdatePoint(id, VPointF(pHeight.x(), pHeight.y(), pointName, mx, my)); data->AddLine(basePointId, id); data->AddLine(p1LineId, id); data->AddLine(p2LineId, id); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::Height, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolHeight *point = new VToolHeight(doc, data, id, typeLine, basePointId, p1LineId, p2LineId, typeCreation); scene->addItem(point); @@ -74,24 +84,30 @@ void VToolHeight::Create(const qint64 _id, const QString &pointName, const QStri } } -QPointF VToolHeight::FindPoint(const QLineF &line, const QPointF &point){ +QPointF VToolHeight::FindPoint(const QLineF &line, const QPointF &point) +{ qreal a = 0, b = 0, c = 0; LineCoefficients(line, &a, &b, &c); qreal x = point.x() + a; qreal y = b + point.y(); - QLineF l (point, QPointF(x, y)); + QLineF lin (point, QPointF(x, y)); QPointF p; - QLineF::IntersectType intersect = line.intersect(l, &p); - if(intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection){ + QLineF::IntersectType intersect = line.intersect(lin, &p); + if (intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection) + { return p; - } else { + } + else + { return QPointF(); } } -void VToolHeight::FullUpdateFromFile(){ +void VToolHeight::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); basePointId = domElement.attribute(AttrBasePoint, "").toLongLong(); p1LineId = domElement.attribute(AttrP1Line, "").toLongLong(); @@ -101,10 +117,13 @@ void VToolHeight::FullUpdateFromFile(){ } -void VToolHeight::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolHeight::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogHeight->getPointName()); domElement.setAttribute(AttrTypeLine, dialogHeight->getTypeLine()); domElement.setAttribute(AttrBasePoint, QString().setNum(dialogHeight->getBasePointId())); @@ -116,11 +135,13 @@ void VToolHeight::FullUpdateFromGui(int result){ dialogHeight.clear(); } -void VToolHeight::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolHeight::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogHeight, this, event); } -void VToolHeight::AddToFile(){ +void VToolHeight::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); diff --git a/tools/drawTools/vtoolheight.h b/tools/drawTools/vtoolheight.h index 06158aca4..2dd0145e7 100644 --- a/tools/drawTools/vtoolheight.h +++ b/tools/drawTools/vtoolheight.h @@ -25,7 +25,8 @@ #include "vtoollinepoint.h" #include "dialogs/dialogheight.h" -class VToolHeight: public VToolLinePoint{ +class VToolHeight: public VToolLinePoint +{ Q_OBJECT public: VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, diff --git a/tools/drawTools/vtoolline.cpp b/tools/drawTools/vtoolline.cpp index 98d24fb94..2dccf5b97 100644 --- a/tools/drawTools/vtoolline.cpp +++ b/tools/drawTools/vtoolline.cpp @@ -24,9 +24,10 @@ const QString VToolLine::TagName = QStringLiteral("line"); VToolLine::VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint, - Tool::Sources typeCreation, QGraphicsItem *parent):VDrawTool(doc, data, id), - QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint), - dialogLine(QSharedPointer()){ + Tool::Sources typeCreation, QGraphicsItem *parent) + :VDrawTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint), + dialogLine(QSharedPointer()) +{ ignoreFullUpdate = true; //Лінія VPointF first = data->GetPoint(firstPoint); @@ -37,18 +38,21 @@ VToolLine::VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firs this->setAcceptHoverEvents(true); this->setPen(QPen(Qt::black, widthHairLine/factor)); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolLine::setDialog(){ +void VToolLine::setDialog() +{ dialogLine->setFirstPoint(firstPoint); dialogLine->setSecondPoint(secondPoint); } void VToolLine::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data){ + VContainer *data) +{ qint64 firstPoint = dialog->getFirstPoint(); qint64 secondPoint = dialog->getSecondPoint(); Create(0, firstPoint, secondPoint, scene, doc, data, Document::FullParse, Tool::FromGui); @@ -56,23 +60,29 @@ void VToolLine::Create(QSharedPointer &dialog, VMainGraphicsScene *s void VToolLine::Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation){ + const Document::Documents &parse, Tool::Sources typeCreation) +{ Q_ASSERT(scene != 0); Q_ASSERT(doc != 0); Q_ASSERT(data != 0); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->getNextId(); data->AddLine(firstPoint, secondPoint); - } else { + } + else + { data->UpdateId(id); data->AddLine(firstPoint, secondPoint); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::LineTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolLine *line = new VToolLine(doc, data, id, firstPoint, secondPoint, typeCreation); Q_ASSERT(line != 0); scene->addItem(line); @@ -85,14 +95,18 @@ void VToolLine::Create(const qint64 &_id, const qint64 &firstPoint, const qint64 } } -void VToolLine::FullUpdateFromFile(){ +void VToolLine::FullUpdateFromFile() +{ RefreshGeometry(); } -void VToolLine::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolLine::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogLine->getFirstPoint())); domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogLine->getSecondPoint())); emit FullUpdateTree(); @@ -101,21 +115,27 @@ void VToolLine::FullUpdateFromGui(int result){ dialogLine.clear(); } -void VToolLine::ShowTool(qint64 id, Qt::GlobalColor color, bool enable){ +void VToolLine::ShowTool(qint64 id, Qt::GlobalColor color, bool enable) +{ ShowItem(this, id, color, enable); } -void VToolLine::SetFactor(qreal factor){ +void VToolLine::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } -void VToolLine::ChangedActivDraw(const QString newName){ +void VToolLine::ChangedActivDraw(const QString newName) +{ bool selectable = false; - if(nameActivDraw == newName){ + if (nameActivDraw == newName) + { selectable = true; currentColor = Qt::black; - } else { + } + else + { selectable = false; currentColor = Qt::gray; } @@ -124,11 +144,13 @@ void VToolLine::ChangedActivDraw(const QString newName){ VDrawTool::ChangedActivDraw(newName); } -void VToolLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogLine, this, event); } -void VToolLine::AddToFile(){ +void VToolLine::AddToFile() +{ QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); AddAttribute(domElement, AttrFirstPoint, firstPoint); @@ -137,24 +159,29 @@ void VToolLine::AddToFile(){ AddToCalculation(domElement); } -void VToolLine::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VToolLine::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine/factor)); } -void VToolLine::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VToolLine::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine/factor)); } -void VToolLine::RemoveReferens(){ +void VToolLine::RemoveReferens() +{ doc->DecrementReferens(firstPoint); doc->DecrementReferens(secondPoint); } -void VToolLine::RefreshGeometry(){ +void VToolLine::RefreshGeometry() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { firstPoint = domElement.attribute(AttrFirstPoint, "").toLongLong(); secondPoint = domElement.attribute(AttrSecondPoint, "").toLongLong(); } @@ -163,4 +190,3 @@ void VToolLine::RefreshGeometry(){ this->setLine(QLineF(first.toQPointF(), second.toQPointF())); this->setPen(QPen(currentColor, widthHairLine/factor)); } - diff --git a/tools/drawTools/vtoolline.h b/tools/drawTools/vtoolline.h index c88e6fb21..43469b535 100644 --- a/tools/drawTools/vtoolline.h +++ b/tools/drawTools/vtoolline.h @@ -26,7 +26,8 @@ #include "QGraphicsLineItem" #include "dialogs/dialogline.h" -class VToolLine: public VDrawTool, public QGraphicsLineItem{ +class VToolLine: public VDrawTool, public QGraphicsLineItem +{ Q_OBJECT public: VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, diff --git a/tools/drawTools/vtoollineintersect.cpp b/tools/drawTools/vtoollineintersect.cpp index b0eb6696a..f02c897cf 100644 --- a/tools/drawTools/vtoollineintersect.cpp +++ b/tools/drawTools/vtoollineintersect.cpp @@ -26,29 +26,31 @@ const QString VToolLineIntersect::ToolType = QStringLiteral("lineIntersect"); VToolLineIntersect::VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, Tool::Sources typeCreation, - QGraphicsItem *parent): - VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2), - p2Line2(p2Line2), dialogLineIntersect(QSharedPointer()){ + QGraphicsItem *parent) + :VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2), + p2Line2(p2Line2), dialogLineIntersect(QSharedPointer()) +{ ignoreFullUpdate = true; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolLineIntersect::setDialog(){ - Q_ASSERT(!dialogLineIntersect.isNull()); - if(!dialogLineIntersect.isNull()){ - VPointF p = VAbstractTool::data.GetPoint(id); - dialogLineIntersect->setP1Line1(p1Line1); - dialogLineIntersect->setP2Line1(p2Line1); - dialogLineIntersect->setP1Line2(p1Line2); - dialogLineIntersect->setP2Line2(p2Line2); - dialogLineIntersect->setPointName(p.name()); - } +void VToolLineIntersect::setDialog() +{ + Q_ASSERT(dialogLineIntersect.isNull() == false); + VPointF p = VAbstractTool::data.GetPoint(id); + dialogLineIntersect->setP1Line1(p1Line1); + dialogLineIntersect->setP2Line1(p2Line1); + dialogLineIntersect->setP1Line2(p1Line2); + dialogLineIntersect->setP2Line2(p2Line2); + dialogLineIntersect->setPointName(p.name()); } void VToolLineIntersect::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ qint64 p1Line1Id = dialog->getP1Line1(); qint64 p2Line1Id = dialog->getP2Line1(); qint64 p1Line2Id = dialog->getP1Line2(); @@ -62,7 +64,8 @@ void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ VPointF p1Line1 = data->GetPoint(p1Line1Id); VPointF p2Line1 = data->GetPoint(p2Line1Id); VPointF p1Line2 = data->GetPoint(p1Line2Id); @@ -72,28 +75,33 @@ void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const QLineF line2(p1Line2.toQPointF(), p2Line2.toQPointF()); QPointF fPoint; QLineF::IntersectType intersect = line1.intersect(line2, &fPoint); - if(intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection){ + if (intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection) + { qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(p1Line1Id, id); data->AddLine(id, p2Line1Id); data->AddLine(p1Line2Id, id); data->AddLine(id, p2Line2Id); - } else { + } + else + { data->UpdatePoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(p1Line1Id, id); data->AddLine(id, p2Line1Id); data->AddLine(p1Line2Id, id); data->AddLine(id, p2Line2Id); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::LineIntersectTool, doc); - if(parse == Document::FullParse){ - VToolLineIntersect *point = new VToolLineIntersect(doc, data, id, p1Line1Id, - p2Line1Id, p1Line2Id, + if (parse == Document::FullParse) + { + VToolLineIntersect *point = new VToolLineIntersect(doc, data, id, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, typeCreation); scene->addItem(point); connect(point, &VToolLineIntersect::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); @@ -108,9 +116,11 @@ void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const } } -void VToolLineIntersect::FullUpdateFromFile(){ +void VToolLineIntersect::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { p1Line1 = domElement.attribute(AttrP1Line1, "").toLongLong(); p2Line1 = domElement.attribute(AttrP2Line1, "").toLongLong(); p1Line2 = domElement.attribute(AttrP1Line2, "").toLongLong(); @@ -119,10 +129,13 @@ void VToolLineIntersect::FullUpdateFromFile(){ RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } -void VToolLineIntersect::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolLineIntersect::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogLineIntersect->getPointName()); domElement.setAttribute(AttrP1Line1, QString().setNum(dialogLineIntersect->getP1Line1())); domElement.setAttribute(AttrP2Line1, QString().setNum(dialogLineIntersect->getP2Line1())); @@ -134,16 +147,19 @@ void VToolLineIntersect::FullUpdateFromGui(int result){ dialogLineIntersect.clear(); } -void VToolLineIntersect::SetFactor(qreal factor){ +void VToolLineIntersect::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } -void VToolLineIntersect::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolLineIntersect::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogLineIntersect, this, event); } -void VToolLineIntersect::AddToFile(){ +void VToolLineIntersect::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -161,7 +177,8 @@ void VToolLineIntersect::AddToFile(){ AddToCalculation(domElement); } -void VToolLineIntersect::RemoveReferens(){ +void VToolLineIntersect::RemoveReferens() +{ doc->DecrementReferens(p1Line1); doc->DecrementReferens(p2Line1); doc->DecrementReferens(p1Line2); diff --git a/tools/drawTools/vtoollineintersect.h b/tools/drawTools/vtoollineintersect.h index 2cea55c28..5d9058dbd 100644 --- a/tools/drawTools/vtoollineintersect.h +++ b/tools/drawTools/vtoollineintersect.h @@ -25,7 +25,8 @@ #include "vtoolpoint.h" #include "dialogs/dialoglineintersect.h" -class VToolLineIntersect:public VToolPoint{ +class VToolLineIntersect:public VToolPoint +{ Q_OBJECT public: VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, diff --git a/tools/drawTools/vtoollinepoint.cpp b/tools/drawTools/vtoollinepoint.cpp index 3c5c11785..4ebfa443b 100644 --- a/tools/drawTools/vtoollinepoint.cpp +++ b/tools/drawTools/vtoollinepoint.cpp @@ -23,8 +23,10 @@ VToolLinePoint::VToolLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &basePointId, - const qreal &angle, QGraphicsItem *parent):VToolPoint(doc, data, id, parent), - typeLine(typeLine), formula(formula), angle(angle), basePointId(basePointId), mainLine(0){ + const qreal &angle, QGraphicsItem *parent) + :VToolPoint(doc, data, id, parent), typeLine(typeLine), formula(formula), angle(angle), basePointId(basePointId), + mainLine(0) +{ Q_ASSERT_X(basePointId > 0, Q_FUNC_INFO, "basePointId <= 0"); //Лінія, що з'єднує дві точки QPointF point1 = data->GetPoint(basePointId).toQPointF(); @@ -32,37 +34,49 @@ VToolLinePoint::VToolLinePoint(VDomDocument *doc, VContainer *data, const qint64 mainLine = new QGraphicsLineItem(QLineF(point1 - point2, QPointF()), this); mainLine->setPen(QPen(Qt::black, widthHairLine/factor)); mainLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true); - if(typeLine == TypeLineNone){ + if (typeLine == TypeLineNone) + { mainLine->setVisible(false); - } else { + } + else + { mainLine->setVisible(true); } } -void VToolLinePoint::ChangedActivDraw(const QString newName){ - if(nameActivDraw == newName){ +void VToolLinePoint::ChangedActivDraw(const QString newName) +{ + if (nameActivDraw == newName) + { currentColor = Qt::black; - } else { + } + else + { currentColor = Qt::gray; } mainLine->setPen(QPen(currentColor, widthHairLine/factor)); VToolPoint::ChangedActivDraw(newName); } -void VToolLinePoint::RefreshGeometry(){ +void VToolLinePoint::RefreshGeometry() +{ mainLine->setPen(QPen(currentColor, widthHairLine/factor)); VToolPoint::RefreshPointGeometry(VDrawTool::data.GetPoint(id)); QPointF point = VDrawTool::data.GetPoint(id).toQPointF(); QPointF basePoint = VDrawTool::data.GetPoint(basePointId).toQPointF(); mainLine->setLine(QLineF(basePoint - point, QPointF())); - if(typeLine == TypeLineNone){ + if (typeLine == TypeLineNone) + { mainLine->setVisible(false); - } else { + } + else + { mainLine->setVisible(true); } } -void VToolLinePoint::SetFactor(qreal factor){ +void VToolLinePoint::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } diff --git a/tools/drawTools/vtoollinepoint.h b/tools/drawTools/vtoollinepoint.h index b349fac6c..3a0e0e9f0 100644 --- a/tools/drawTools/vtoollinepoint.h +++ b/tools/drawTools/vtoollinepoint.h @@ -24,14 +24,15 @@ #include "vtoolpoint.h" -class VToolLinePoint : public VToolPoint{ +class VToolLinePoint : public VToolPoint +{ Q_OBJECT public: VToolLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &basePointId, const qreal &angle, QGraphicsItem * parent = 0); public slots: - virtual void ChangedActivDraw(const QString newName); + virtual void ChangedActivDraw(const QString newName); virtual void SetFactor(qreal factor); protected: QString typeLine; diff --git a/tools/drawTools/vtoolnormal.cpp b/tools/drawTools/vtoolnormal.cpp index 0dd4fd809..967d7c2c6 100644 --- a/tools/drawTools/vtoolnormal.cpp +++ b/tools/drawTools/vtoolnormal.cpp @@ -26,31 +26,33 @@ const QString VToolNormal::ToolType = QStringLiteral("normal"); VToolNormal::VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, - const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent): - VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent), - secondPointId(secondPointId), dialogNormal(QSharedPointer()){ + const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) + :VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent), + secondPointId(secondPointId), dialogNormal(QSharedPointer()) +{ - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolNormal::setDialog(){ - Q_ASSERT(!dialogNormal.isNull()); - if(!dialogNormal.isNull()){ - VPointF p = VAbstractTool::data.GetPoint(id); - dialogNormal->setTypeLine(typeLine); - dialogNormal->setFormula(formula); - dialogNormal->setAngle(angle); - dialogNormal->setFirstPointId(basePointId, id); - dialogNormal->setSecondPointId(secondPointId, id); - dialogNormal->setPointName(p.name()); - } +void VToolNormal::setDialog() +{ + Q_ASSERT(dialogNormal.isNull() == false); + VPointF p = VAbstractTool::data.GetPoint(id); + dialogNormal->setTypeLine(typeLine); + dialogNormal->setFormula(formula); + dialogNormal->setAngle(angle); + dialogNormal->setFirstPointId(basePointId, id); + dialogNormal->setSecondPointId(secondPointId, id); + dialogNormal->setPointName(p.name()); } void VToolNormal::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data){ + VContainer *data) +{ QString formula = dialog->getFormula(); qint64 firstPointId = dialog->getFirstPointId(); qint64 secondPointId = dialog->getSecondPointId(); @@ -65,28 +67,35 @@ void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64 const qint64 &secondPointId, const QString typeLine, const QString pointName, const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { QPointF fPoint = VToolNormal::FindPoint(firstPoint.toQPointF(), secondPoint.toQPointF(), toPixel(result), angle); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(firstPointId, id); - } else { + } + else + { data->UpdatePoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(firstPointId, id); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::NormalTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolNormal *point = new VToolNormal(doc, data, id, typeLine, formula, angle, firstPointId, secondPointId, typeCreation); scene->addItem(point); @@ -101,7 +110,8 @@ void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64 } QPointF VToolNormal::FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const qreal &length, - const qreal &angle){ + const qreal &angle) +{ QLineF line(firstPoint, secondPoint); QLineF normal = line.normalVector(); normal.setAngle(normal.angle()+angle); @@ -109,9 +119,11 @@ QPointF VToolNormal::FindPoint(const QPointF &firstPoint, const QPointF &secondP return normal.p2(); } -void VToolNormal::FullUpdateFromFile(){ +void VToolNormal::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); basePointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -121,10 +133,13 @@ void VToolNormal::FullUpdateFromFile(){ RefreshGeometry(); } -void VToolNormal::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolNormal::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogNormal->getPointName()); domElement.setAttribute(AttrTypeLine, dialogNormal->getTypeLine()); domElement.setAttribute(AttrLength, dialogNormal->getFormula()); @@ -137,16 +152,19 @@ void VToolNormal::FullUpdateFromGui(int result){ dialogNormal.clear(); } -void VToolNormal::SetFactor(qreal factor){ +void VToolNormal::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } -void VToolNormal::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolNormal::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogNormal, this, event); } -void VToolNormal::AddToFile(){ +void VToolNormal::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -165,7 +183,8 @@ void VToolNormal::AddToFile(){ AddToCalculation(domElement); } -void VToolNormal::RemoveReferens(){ +void VToolNormal::RemoveReferens() +{ doc->DecrementReferens(secondPointId); VToolLinePoint::RemoveReferens(); } diff --git a/tools/drawTools/vtoolnormal.h b/tools/drawTools/vtoolnormal.h index 3370d2c90..2ce571cd7 100644 --- a/tools/drawTools/vtoolnormal.h +++ b/tools/drawTools/vtoolnormal.h @@ -25,7 +25,8 @@ #include "vtoollinepoint.h" #include "dialogs/dialognormal.h" -class VToolNormal : public VToolLinePoint{ +class VToolNormal : public VToolLinePoint +{ Q_OBJECT public: VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, diff --git a/tools/drawTools/vtoolpoint.cpp b/tools/drawTools/vtoolpoint.cpp index fc94cd91a..cc12a21c6 100644 --- a/tools/drawTools/vtoolpoint.cpp +++ b/tools/drawTools/vtoolpoint.cpp @@ -23,9 +23,9 @@ const QString VToolPoint::TagName = QStringLiteral("point"); -VToolPoint::VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, - QGraphicsItem *parent):VDrawTool(doc, data, id), - QGraphicsEllipseItem(parent), radius(toPixel(2)), namePoint(0), lineName(0){ +VToolPoint::VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem *parent):VDrawTool(doc, data, id), + QGraphicsEllipseItem(parent), radius(toPixel(2)), namePoint(0), lineName(0) +{ namePoint = new VGraphicsSimpleTextItem(this); lineName = new QGraphicsLineItem(this); connect(namePoint, &VGraphicsSimpleTextItem::NameChangePosition, this, @@ -36,7 +36,8 @@ VToolPoint::VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } -void VToolPoint::NameChangePosition(const QPointF pos){ +void VToolPoint::NameChangePosition(const QPointF pos) +{ VPointF point = VAbstractTool::data.GetPoint(id); QPointF p = pos - this->pos(); point.setMx(p.x()); @@ -46,21 +47,27 @@ void VToolPoint::NameChangePosition(const QPointF pos){ VAbstractTool::data.UpdatePoint(id, point); } -void VToolPoint::UpdateNamePosition(qreal mx, qreal my){ +void VToolPoint::UpdateNamePosition(qreal mx, qreal my) +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrMx, QString().setNum(toMM(mx))); domElement.setAttribute(AttrMy, QString().setNum(toMM(my))); emit toolhaveChange(); } } -void VToolPoint::ChangedActivDraw(const QString newName){ +void VToolPoint::ChangedActivDraw(const QString newName) +{ bool selectable = false; - if(nameActivDraw == newName){ + if (nameActivDraw == newName) + { selectable = true; currentColor = Qt::black; - } else { + } + else + { selectable = false; currentColor = Qt::gray; } @@ -76,33 +83,40 @@ void VToolPoint::ChangedActivDraw(const QString newName){ VDrawTool::ChangedActivDraw(newName); } -void VToolPoint::ShowTool(qint64 id, Qt::GlobalColor color, bool enable){ +void VToolPoint::ShowTool(qint64 id, Qt::GlobalColor color, bool enable) +{ ShowItem(this, id, color, enable); } -void VToolPoint::SetFactor(qreal factor){ +void VToolPoint::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } -void VToolPoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VToolPoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Point); } QGraphicsItem::mouseReleaseEvent(event); } -void VToolPoint::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VToolPoint::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine/factor)); } -void VToolPoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VToolPoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine/factor)); } -void VToolPoint::RefreshPointGeometry(const VPointF &point){ +void VToolPoint::RefreshPointGeometry(const VPointF &point) +{ this->setPen(QPen(currentColor, widthHairLine/factor)); QRectF rec = QRectF(0, 0, radius*2/factor, radius*2/factor); rec.translate(-rec.center().x(), -rec.center().y()); @@ -120,16 +134,20 @@ void VToolPoint::RefreshPointGeometry(const VPointF &point){ RefreshLine(); } -void VToolPoint::RefreshLine(){ +void VToolPoint::RefreshLine() +{ QRectF nameRec = namePoint->sceneBoundingRect(); QPointF p1, p2; LineIntersectCircle(QPointF(), radius/factor, QLineF(QPointF(), nameRec.center()- scenePos()), p1, p2); QPointF pRec = LineIntersectRect(nameRec, QLineF(scenePos(), nameRec.center())); lineName->setLine(QLineF(p1, pRec - scenePos())); lineName->setPen(QPen(currentColor, widthHairLine/factor)); - if(QLineF(p1, pRec - scenePos()).length() <= toPixel(4)){ + if (QLineF(p1, pRec - scenePos()).length() <= toPixel(4)) + { lineName->setVisible(false); - } else { + } + else + { lineName->setVisible(true); } } diff --git a/tools/drawTools/vtoolpoint.h b/tools/drawTools/vtoolpoint.h index 924f5c593..ae04e6fb7 100644 --- a/tools/drawTools/vtoolpoint.h +++ b/tools/drawTools/vtoolpoint.h @@ -25,7 +25,8 @@ #include "vdrawtool.h" #include "widgets/vgraphicssimpletextitem.h" -class VToolPoint: public VDrawTool, public QGraphicsEllipseItem{ +class VToolPoint: public VDrawTool, public QGraphicsEllipseItem +{ Q_OBJECT public: VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0); diff --git a/tools/drawTools/vtoolpointofcontact.cpp b/tools/drawTools/vtoolpointofcontact.cpp index f068aecb2..35ee84e7c 100644 --- a/tools/drawTools/vtoolpointofcontact.cpp +++ b/tools/drawTools/vtoolpointofcontact.cpp @@ -29,39 +29,43 @@ VToolPointOfContact::VToolPointOfContact(VDomDocument *doc, VContainer *data, co const qint64 &firstPointId, const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) : VToolPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId), - secondPointId(secondPointId), dialogPointOfContact(QSharedPointer()){ - - if(typeCreation == Tool::FromGui){ + secondPointId(secondPointId), dialogPointOfContact(QSharedPointer()) +{ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolPointOfContact::setDialog(){ - Q_ASSERT(!dialogPointOfContact.isNull()); - if(!dialogPointOfContact.isNull()){ - VPointF p = VAbstractTool::data.GetPoint(id); - dialogPointOfContact->setRadius(radius); - dialogPointOfContact->setCenter(center, id); - dialogPointOfContact->setFirstPoint(firstPointId, id); - dialogPointOfContact->setSecondPoint(secondPointId, id); - dialogPointOfContact->setPointName(p.name()); - } +void VToolPointOfContact::setDialog() +{ + Q_ASSERT(dialogPointOfContact.isNull() == false); + VPointF p = VAbstractTool::data.GetPoint(id); + dialogPointOfContact->setRadius(radius); + dialogPointOfContact->setCenter(center, id); + dialogPointOfContact->setFirstPoint(firstPointId, id); + dialogPointOfContact->setSecondPoint(secondPointId, id); + dialogPointOfContact->setPointName(p.name()); } QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint, - const QPointF &secondPoint){ + const QPointF &secondPoint) +{ QPointF pArc; qreal s = 0.0, s_x, s_y, step = 0.01, distans; - while( s < 1){ + while ( s < 1) + { s_x = secondPoint.x()-(qAbs(secondPoint.x()-firstPoint.x()))*s; s_y = secondPoint.y()-(qAbs(secondPoint.y()-firstPoint.y()))*s; distans = QLineF(center.x(), center.y(), s_x, s_y).length(); - if(ceil(distans*10) == ceil(radius*10)){ + if (ceil(distans*10) == ceil(radius*10)) + { pArc.rx() = s_x; pArc.ry() = s_y; break; } - if(distans &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ QString radius = dialog->getRadius(); qint64 center = dialog->getCenter(); qint64 firstPointId = dialog->getFirstPoint(); @@ -85,7 +90,8 @@ void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation){ + const Document::Documents &parse, Tool::Sources typeCreation) +{ VPointF centerP = data->GetPoint(center); VPointF firstP = data->GetPoint(firstPointId); VPointF secondP = data->GetPoint(secondPointId); @@ -93,26 +99,32 @@ void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const Calculator cal(data); QString errorMsg; qreal result = cal.eval(radius, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { QPointF fPoint = VToolPointOfContact::FindPoint(toPixel(result), centerP.toQPointF(), firstP.toQPointF(), secondP.toQPointF()); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(firstPointId, id); data->AddLine(secondPointId, id); data->AddLine(center, id); - } else { - data->UpdatePoint(id,VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + } + else + { + data->UpdatePoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(firstPointId, id); data->AddLine(secondPointId, id); data->AddLine(center, id); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::PointOfContact, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolPointOfContact *point = new VToolPointOfContact(doc, data, id, radius, center, firstPointId, secondPointId, typeCreation); scene->addItem(point); @@ -127,9 +139,11 @@ void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const } } -void VToolPointOfContact::FullUpdateFromFile(){ +void VToolPointOfContact::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { radius = domElement.attribute(AttrRadius, ""); center = domElement.attribute(AttrCenter, "").toLongLong(); firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -138,10 +152,13 @@ void VToolPointOfContact::FullUpdateFromFile(){ RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } -void VToolPointOfContact::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolPointOfContact::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogPointOfContact->getPointName()); domElement.setAttribute(AttrRadius, dialogPointOfContact->getRadius()); domElement.setAttribute(AttrCenter, QString().setNum(dialogPointOfContact->getCenter())); @@ -153,16 +170,19 @@ void VToolPointOfContact::FullUpdateFromGui(int result){ dialogPointOfContact.clear(); } -void VToolPointOfContact::SetFactor(qreal factor){ +void VToolPointOfContact::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } -void VToolPointOfContact::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolPointOfContact::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogPointOfContact, this, event); } -void VToolPointOfContact::AddToFile(){ +void VToolPointOfContact::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -180,7 +200,8 @@ void VToolPointOfContact::AddToFile(){ AddToCalculation(domElement); } -void VToolPointOfContact::RemoveReferens(){ +void VToolPointOfContact::RemoveReferens() +{ doc->DecrementReferens(center); doc->DecrementReferens(firstPointId); doc->DecrementReferens(secondPointId); diff --git a/tools/drawTools/vtoolpointofcontact.h b/tools/drawTools/vtoolpointofcontact.h index 852329aa5..a5f76f046 100644 --- a/tools/drawTools/vtoolpointofcontact.h +++ b/tools/drawTools/vtoolpointofcontact.h @@ -25,7 +25,8 @@ #include "vtoolpoint.h" #include "dialogs/dialogpointofcontact.h" -class VToolPointOfContact : public VToolPoint{ +class VToolPointOfContact : public VToolPoint +{ public: VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, diff --git a/tools/drawTools/vtoolpointofintersection.cpp b/tools/drawTools/vtoolpointofintersection.cpp index ceff574c3..8c23281aa 100644 --- a/tools/drawTools/vtoolpointofintersection.cpp +++ b/tools/drawTools/vtoolpointofintersection.cpp @@ -6,15 +6,18 @@ VToolPointOfIntersection::VToolPointOfIntersection(VDomDocument *doc, VContainer const qint64 &firstPointId, const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId), - dialogPointOfIntersection(QSharedPointer()) { + dialogPointOfIntersection(QSharedPointer()) +{ ignoreFullUpdate = true; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolPointOfIntersection::setDialog(){ - Q_ASSERT(!dialogPointOfIntersection.isNull()); +void VToolPointOfIntersection::setDialog() +{ + Q_ASSERT(dialogPointOfIntersection.isNull() == false); VPointF p = VAbstractTool::data.GetPoint(id); dialogPointOfIntersection->setFirstPointId(firstPointId, id); dialogPointOfIntersection->setSecondPointId(secondPointId, id); @@ -22,7 +25,8 @@ void VToolPointOfIntersection::setDialog(){ } void VToolPointOfIntersection::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ qint64 firstPointId = dialog->getFirstPointId(); qint64 secondPointId = dialog->getSecondPointId(); QString pointName = dialog->getPointName(); @@ -32,22 +36,28 @@ void VToolPointOfIntersection::Create(QSharedPointer void VToolPointOfIntersection::Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation){ + const Document::Documents &parse, Tool::Sources typeCreation) +{ VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); QPointF point(firstPoint.x(), secondPoint.y()); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(point.x(), point.y(), pointName, mx, my)); - } else { + } + else + { data->UpdatePoint(id, VPointF(point.x(), point.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::Triangle, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolPointOfIntersection *point = new VToolPointOfIntersection(doc, data, id, firstPointId, secondPointId, typeCreation); scene->addItem(point); @@ -60,19 +70,24 @@ void VToolPointOfIntersection::Create(const qint64 _id, const QString &pointName } } -void VToolPointOfIntersection::FullUpdateFromFile(){ +void VToolPointOfIntersection::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); secondPointId = domElement.attribute(AttrSecondPoint, "").toLongLong(); } VToolPoint::RefreshPointGeometry(VDrawTool::data.GetPoint(id)); } -void VToolPointOfIntersection::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolPointOfIntersection::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogPointOfIntersection->getPointName()); domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogPointOfIntersection->getFirstPointId())); domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogPointOfIntersection->getSecondPointId())); @@ -82,16 +97,19 @@ void VToolPointOfIntersection::FullUpdateFromGui(int result){ dialogPointOfIntersection.clear(); } -void VToolPointOfIntersection::RemoveReferens(){ +void VToolPointOfIntersection::RemoveReferens() +{ doc->DecrementReferens(firstPointId); doc->DecrementReferens(secondPointId); } -void VToolPointOfIntersection::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolPointOfIntersection::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogPointOfIntersection, this, event); } -void VToolPointOfIntersection::AddToFile(){ +void VToolPointOfIntersection::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); diff --git a/tools/drawTools/vtoolpointofintersection.h b/tools/drawTools/vtoolpointofintersection.h index 6aa69cd3c..d65f31ad6 100644 --- a/tools/drawTools/vtoolpointofintersection.h +++ b/tools/drawTools/vtoolpointofintersection.h @@ -4,7 +4,8 @@ #include "vtoolpoint.h" #include "dialogs/dialogpointofintersection.h" -class VToolPointOfIntersection : public VToolPoint{ +class VToolPointOfIntersection : public VToolPoint +{ Q_OBJECT public: VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, diff --git a/tools/drawTools/vtoolshoulderpoint.cpp b/tools/drawTools/vtoolshoulderpoint.cpp index 77b2510e9..894a448f1 100644 --- a/tools/drawTools/vtoolshoulderpoint.cpp +++ b/tools/drawTools/vtoolshoulderpoint.cpp @@ -27,51 +27,57 @@ const QString VToolShoulderPoint::ToolType = QStringLiteral("shoulder"); VToolShoulderPoint::VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation, - QGraphicsItem * parent): - VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder), - dialogShoulderPoint(QSharedPointer()){ - - if(typeCreation == Tool::FromGui){ + QGraphicsItem * parent) + :VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder), + dialogShoulderPoint(QSharedPointer()) +{ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolShoulderPoint::setDialog(){ - Q_ASSERT(!dialogShoulderPoint.isNull()); - if(!dialogShoulderPoint.isNull()){ - VPointF p = VAbstractTool::data.GetPoint(id); - dialogShoulderPoint->setTypeLine(typeLine); - dialogShoulderPoint->setFormula(formula); - dialogShoulderPoint->setP1Line(basePointId, id); - dialogShoulderPoint->setP2Line(p2Line, id); - dialogShoulderPoint->setPShoulder(pShoulder, id); - dialogShoulderPoint->setPointName(p.name()); - } +void VToolShoulderPoint::setDialog() +{ + Q_ASSERT(dialogShoulderPoint.isNull() == false); + VPointF p = VAbstractTool::data.GetPoint(id); + dialogShoulderPoint->setTypeLine(typeLine); + dialogShoulderPoint->setFormula(formula); + dialogShoulderPoint->setP1Line(basePointId, id); + dialogShoulderPoint->setP2Line(p2Line, id); + dialogShoulderPoint->setPShoulder(pShoulder, id); + dialogShoulderPoint->setPointName(p.name()); } QPointF VToolShoulderPoint::FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder, - const qreal &length){ + const qreal &length) +{ QLineF line = QLineF(p1Line, p2Line); qreal dist = line.length(); - if(dist>length){ + if (dist>length) + { qDebug()<<"A3П2="<=length){ + if (line2.length()>=length) + { return line.p2(); } } } void VToolShoulderPoint::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ QString formula = dialog->getFormula(); qint64 p1Line = dialog->getP1Line(); qint64 p2Line = dialog->getP2Line(); @@ -86,7 +92,8 @@ void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation){ + const Document::Documents &parse, Tool::Sources typeCreation) +{ VPointF firstPoint = data->GetPoint(p1Line); VPointF secondPoint = data->GetPoint(p2Line); VPointF shoulderPoint = data->GetPoint(pShoulder); @@ -94,24 +101,30 @@ void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { QPointF fPoint = VToolShoulderPoint::FindPoint(firstPoint.toQPointF(), secondPoint.toQPointF(), shoulderPoint.toQPointF(), toPixel(result)); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(p1Line, id); data->AddLine(p2Line, id); - } else { - data->UpdatePoint(id,VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + } + else + { + data->UpdatePoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); data->AddLine(p1Line, id); data->AddLine(p2Line, id); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::ShoulderPointTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolShoulderPoint *point = new VToolShoulderPoint(doc, data, id, typeLine, formula, p1Line, p2Line, pShoulder, typeCreation); @@ -127,9 +140,11 @@ void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const } } -void VToolShoulderPoint::FullUpdateFromFile(){ +void VToolShoulderPoint::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); basePointId = domElement.attribute(AttrP1Line, "").toLongLong(); @@ -139,10 +154,13 @@ void VToolShoulderPoint::FullUpdateFromFile(){ RefreshGeometry(); } -void VToolShoulderPoint::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolShoulderPoint::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogShoulderPoint->getPointName()); domElement.setAttribute(AttrTypeLine, dialogShoulderPoint->getTypeLine()); domElement.setAttribute(AttrLength, dialogShoulderPoint->getFormula()); @@ -155,16 +173,19 @@ void VToolShoulderPoint::FullUpdateFromGui(int result){ dialogShoulderPoint.clear(); } -void VToolShoulderPoint::SetFactor(qreal factor){ +void VToolShoulderPoint::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } -void VToolShoulderPoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolShoulderPoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogShoulderPoint, this, event); } -void VToolShoulderPoint::AddToFile(){ +void VToolShoulderPoint::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -183,7 +204,8 @@ void VToolShoulderPoint::AddToFile(){ AddToCalculation(domElement); } -void VToolShoulderPoint::RemoveReferens(){ +void VToolShoulderPoint::RemoveReferens() +{ doc->DecrementReferens(p2Line); doc->DecrementReferens(pShoulder); VToolLinePoint::RemoveReferens(); diff --git a/tools/drawTools/vtoolshoulderpoint.h b/tools/drawTools/vtoolshoulderpoint.h index c56277620..e557fdbb2 100644 --- a/tools/drawTools/vtoolshoulderpoint.h +++ b/tools/drawTools/vtoolshoulderpoint.h @@ -25,7 +25,8 @@ #include "vtoollinepoint.h" #include "dialogs/dialogshoulderpoint.h" -class VToolShoulderPoint : public VToolLinePoint{ +class VToolShoulderPoint : public VToolLinePoint +{ public: VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, diff --git a/tools/drawTools/vtoolsinglepoint.cpp b/tools/drawTools/vtoolsinglepoint.cpp index 79f39759e..043c80a69 100644 --- a/tools/drawTools/vtoolsinglepoint.cpp +++ b/tools/drawTools/vtoolsinglepoint.cpp @@ -24,25 +24,27 @@ const QString VToolSinglePoint::ToolType = QStringLiteral("single"); VToolSinglePoint::VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, - QGraphicsItem * parent ):VToolPoint(doc, data, id, parent), - dialogSinglePoint(QSharedPointer()){ + QGraphicsItem * parent ) + :VToolPoint(doc, data, id, parent), dialogSinglePoint(QSharedPointer()) +{ ignoreFullUpdate = true; this->setFlag(QGraphicsItem::ItemIsMovable, true); this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolSinglePoint::setDialog(){ - Q_ASSERT(!dialogSinglePoint.isNull()); - if(!dialogSinglePoint.isNull()){ - VPointF p = VAbstractTool::data.GetPoint(id); - dialogSinglePoint->setData(p.name(), p.toQPointF()); - } +void VToolSinglePoint::setDialog() +{ + Q_ASSERT(dialogSinglePoint.isNull() == false); + VPointF p = VAbstractTool::data.GetPoint(id); + dialogSinglePoint->setData(p.name(), p.toQPointF()); } -void VToolSinglePoint::AddToFile(){ +void VToolSinglePoint::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -57,23 +59,28 @@ void VToolSinglePoint::AddToFile(){ AddToCalculation(domElement); } -QVariant VToolSinglePoint::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value){ - if (change == ItemPositionChange && scene()) { +QVariant VToolSinglePoint::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) +{ + if (change == ItemPositionChange && scene()) + { // value - это новое положение. QPointF newPos = value.toPointF(); QRectF rect = scene()->sceneRect(); - if (!rect.contains(newPos)) { + if (rect.contains(newPos) == false) + { // Сохраняем элемент внутри прямоугольника сцены. newPos.setX(qMin(rect.right(), qMax(newPos.x(), rect.left()))); newPos.setY(qMin(rect.bottom(), qMax(newPos.y(), rect.top()))); return newPos; } } - if (change == ItemPositionHasChanged && scene()) { + if (change == ItemPositionHasChanged && scene()) + { // value - это новое положение. QPointF newPos = value.toPointF(); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrX, QString().setNum(toMM(newPos.x()))); domElement.setAttribute(AttrY, QString().setNum(toMM(newPos.y()))); //I don't now why but signal does not work. @@ -83,26 +90,33 @@ QVariant VToolSinglePoint::itemChange(QGraphicsItem::GraphicsItemChange change, return QGraphicsItem::itemChange(change, value); } -void VToolSinglePoint::decrementReferens(){ - if(_referens > 1){ +void VToolSinglePoint::decrementReferens() +{ + if (_referens > 1) + { --_referens; } } -void VToolSinglePoint::contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ){ +void VToolSinglePoint::contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ) +{ ContextMenu(dialogSinglePoint, this, event, false); } -void VToolSinglePoint::FullUpdateFromFile(){ +void VToolSinglePoint::FullUpdateFromFile() +{ RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } -void VToolSinglePoint::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolSinglePoint::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QPointF p = dialogSinglePoint->getPoint(); QString name = dialogSinglePoint->getName(); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, name); domElement.setAttribute(AttrX, QString().setNum(toMM(p.x()))); domElement.setAttribute(AttrY, QString().setNum(toMM(p.y()))); @@ -113,17 +127,22 @@ void VToolSinglePoint::FullUpdateFromGui(int result){ dialogSinglePoint.clear(); } -void VToolSinglePoint::ChangedActivDraw(const QString newName){ - if(nameActivDraw == newName){ +void VToolSinglePoint::ChangedActivDraw(const QString newName) +{ + if (nameActivDraw == newName) + { this->setFlag(QGraphicsItem::ItemIsSelectable, true); VToolPoint::ChangedActivDraw(newName); - } else { + } + else + { this->setFlag(QGraphicsItem::ItemIsSelectable, false); VToolPoint::ChangedActivDraw(newName); } } -void VToolSinglePoint::SetFactor(qreal factor){ +void VToolSinglePoint::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } diff --git a/tools/drawTools/vtoolsinglepoint.h b/tools/drawTools/vtoolsinglepoint.h index 65b9365cc..4265f8f83 100644 --- a/tools/drawTools/vtoolsinglepoint.h +++ b/tools/drawTools/vtoolsinglepoint.h @@ -25,7 +25,8 @@ #include "dialogs/dialogsinglepoint.h" #include "vtoolpoint.h" -class VToolSinglePoint : public VToolPoint{ +class VToolSinglePoint : public VToolPoint +{ Q_OBJECT public: VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, diff --git a/tools/drawTools/vtoolspline.cpp b/tools/drawTools/vtoolspline.cpp index 60ed17a35..0c058806b 100644 --- a/tools/drawTools/vtoolspline.cpp +++ b/tools/drawTools/vtoolspline.cpp @@ -25,10 +25,11 @@ const QString VToolSpline::TagName = QStringLiteral("spline"); const QString VToolSpline::ToolType = QStringLiteral("simple"); -VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id, - Tool::Sources typeCreation, - QGraphicsItem *parent):VDrawTool(doc, data, id), QGraphicsPathItem(parent), - dialogSpline(QSharedPointer()), controlPoints(QVector()){ +VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + QGraphicsItem *parent) + :VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogSpline(QSharedPointer()), + controlPoints(QVector()) +{ ignoreFullUpdate = true; VSpline spl = data->GetSpline(id); @@ -56,27 +57,28 @@ VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id, connect(this, &VToolSpline::setEnabledPoint, controlPoint2, &VControlPointSpline::setEnabledPoint); controlPoints.append(controlPoint2); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolSpline::setDialog(){ - Q_ASSERT(!dialogSpline.isNull()); - if(!dialogSpline.isNull()){ - VSpline spl = VAbstractTool::data.GetSpline(id); - dialogSpline->setP1(spl.GetP1()); - dialogSpline->setP4(spl.GetP4()); - dialogSpline->setAngle1(spl.GetAngle1()); - dialogSpline->setAngle2(spl.GetAngle2()); - dialogSpline->setKAsm1(spl.GetKasm1()); - dialogSpline->setKAsm2(spl.GetKasm2()); - dialogSpline->setKCurve(spl.GetKcurve()); - } +void VToolSpline::setDialog() +{ + Q_ASSERT(dialogSpline.isNull() == false); + VSpline spl = VAbstractTool::data.GetSpline(id); + dialogSpline->setP1(spl.GetP1()); + dialogSpline->setP4(spl.GetP4()); + dialogSpline->setAngle1(spl.GetAngle1()); + dialogSpline->setAngle2(spl.GetAngle2()); + dialogSpline->setKAsm1(spl.GetKasm1()); + dialogSpline->setKAsm2(spl.GetKasm2()); + dialogSpline->setKCurve(spl.GetKcurve()); } void VToolSpline::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data){ + VContainer *data) +{ qint64 p1 = dialog->getP1(); qint64 p4 = dialog->getP4(); qreal kAsm1 = dialog->getKAsm1(); @@ -90,22 +92,28 @@ void VToolSpline::Create(QSharedPointer &dialog, VMainGraphicsScen void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, - VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, + const Document::Documents &parse, Tool::Sources typeCreation) +{ VSpline spline = VSpline(data->DataPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddSpline(spline); data->AddLengthSpline(data->GetNameSpline(p1, p4), toMM(spline.GetLength())); - } else { + } + else + { data->UpdateSpline(id, spline); data->AddLengthSpline(data->GetNameSpline(p1, p4), toMM(spline.GetLength())); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::SplineTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolSpline *spl = new VToolSpline(doc, data, id, typeCreation); scene->addItem(spl); connect(spl, &VToolSpline::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); @@ -117,12 +125,15 @@ void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, c } } -void VToolSpline::FullUpdateFromFile(){ +void VToolSpline::FullUpdateFromFile() +{ RefreshGeometry(); } -void VToolSpline::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolSpline::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { VSpline spl = VSpline (VAbstractTool::data.DataPoints(), dialogSpline->getP1(), dialogSpline->getP4(), dialogSpline->getAngle1(), dialogSpline->getAngle2(), dialogSpline->getKAsm1(), dialogSpline->getKAsm2(), dialogSpline->getKCurve()); @@ -141,7 +152,8 @@ void VToolSpline::FullUpdateFromGui(int result){ spl = VSpline (VAbstractTool::data.DataPoints(), dialogSpline->getP1(), controlPoints[0]->pos(), controlPoints[1]->pos(), dialogSpline->getP4(), dialogSpline->getKCurve()); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrPoint1, QString().setNum(spl.GetP1())); domElement.setAttribute(AttrPoint4, QString().setNum(spl.GetP4())); domElement.setAttribute(AttrAngle1, QString().setNum(spl.GetAngle1())); @@ -156,16 +168,21 @@ void VToolSpline::FullUpdateFromGui(int result){ } void VToolSpline::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos){ + const QPointF pos) +{ Q_UNUSED(indexSpline); VSpline spl = VAbstractTool::data.GetSpline(id); - if(position == SplinePoint::FirstPoint){ + if (position == SplinePoint::FirstPoint) + { spl.ModifiSpl (spl.GetP1(), pos, spl.GetP3(), spl.GetP4(), spl.GetKcurve()); - } else { + } + else + { spl.ModifiSpl (spl.GetP1(), spl.GetP2(), pos, spl.GetP4(), spl.GetKcurve()); } QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrAngle1, QString().setNum(spl.GetAngle1())); domElement.setAttribute(AttrAngle2, QString().setNum(spl.GetAngle2())); domElement.setAttribute(AttrKAsm1, QString().setNum(spl.GetKasm1())); @@ -175,11 +192,13 @@ void VToolSpline::ControlPointChangePosition(const qint32 &indexSpline, SplinePo } } -void VToolSpline::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolSpline::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogSpline, this, event); } -void VToolSpline::AddToFile(){ +void VToolSpline::AddToFile() +{ VSpline spl = VAbstractTool::data.GetSpline(id); QDomElement domElement = doc->createElement(TagName); @@ -196,30 +215,36 @@ void VToolSpline::AddToFile(){ AddToCalculation(domElement); } -void VToolSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VToolSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Spline); } QGraphicsItem::mouseReleaseEvent(event); } -void VToolSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VToolSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine/factor)); } -void VToolSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VToolSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine/factor)); } -void VToolSpline::RemoveReferens(){ +void VToolSpline::RemoveReferens() +{ VSpline spl = VAbstractTool::data.GetSpline(id); doc->DecrementReferens(spl.GetP1()); doc->DecrementReferens(spl.GetP4()); } -void VToolSpline::RefreshGeometry(){ +void VToolSpline::RefreshGeometry() +{ this->setPen(QPen(currentColor, widthHairLine/factor)); VSpline spl = VAbstractTool::data.GetSpline(id); QPainterPath path; @@ -246,12 +271,16 @@ void VToolSpline::RefreshGeometry(){ } -void VToolSpline::ChangedActivDraw(const QString newName){ +void VToolSpline::ChangedActivDraw(const QString newName) +{ bool selectable = false; - if(nameActivDraw == newName){ + if (nameActivDraw == newName) + { selectable = true; currentColor = Qt::black; - } else { + } + else + { selectable = false; currentColor = Qt::gray; } @@ -262,11 +291,13 @@ void VToolSpline::ChangedActivDraw(const QString newName){ VDrawTool::ChangedActivDraw(newName); } -void VToolSpline::ShowTool(qint64 id, Qt::GlobalColor color, bool enable){ +void VToolSpline::ShowTool(qint64 id, Qt::GlobalColor color, bool enable) +{ ShowItem(this, id, color, enable); } -void VToolSpline::SetFactor(qreal factor){ +void VToolSpline::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } diff --git a/tools/drawTools/vtoolspline.h b/tools/drawTools/vtoolspline.h index a298b7ae4..bc5ccb9fa 100644 --- a/tools/drawTools/vtoolspline.h +++ b/tools/drawTools/vtoolspline.h @@ -28,7 +28,8 @@ #include "widgets/vcontrolpointspline.h" #include "geometry/vsplinepath.h" -class VToolSpline:public VDrawTool, public QGraphicsPathItem{ +class VToolSpline:public VDrawTool, public QGraphicsPathItem +{ Q_OBJECT public: VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, diff --git a/tools/drawTools/vtoolsplinepath.cpp b/tools/drawTools/vtoolsplinepath.cpp index 3e8cb0bee..fe793e24c 100644 --- a/tools/drawTools/vtoolsplinepath.cpp +++ b/tools/drawTools/vtoolsplinepath.cpp @@ -24,11 +24,11 @@ const QString VToolSplinePath::TagName = QStringLiteral("spline"); const QString VToolSplinePath::ToolType = QStringLiteral("path"); -VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, - Tool::Sources typeCreation, - QGraphicsItem *parent):VDrawTool(doc, data, id), - QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer()), - controlPoints(QVector()){ +VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + QGraphicsItem *parent) + :VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer()), + controlPoints(QVector()) +{ ignoreFullUpdate = true; VSplinePath splPath = data->GetSplinePath(id); QPainterPath path; @@ -39,7 +39,8 @@ VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - for(qint32 i = 1; i<=splPath.Count(); ++i){ + for (qint32 i = 1; i<=splPath.Count(); ++i) + { VSpline spl = splPath.GetSpline(i); VControlPointSpline *controlPoint = new VControlPointSpline(i, SplinePoint::FirstPoint, spl.GetP2(), spl.GetPointP1().toQPointF(), this); @@ -57,23 +58,25 @@ VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, connect(this, &VToolSplinePath::setEnabledPoint, controlPoint, &VControlPointSpline::setEnabledPoint); controlPoints.append(controlPoint); } - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolSplinePath::setDialog(){ - Q_ASSERT(!dialogSplinePath.isNull()); - if(!dialogSplinePath.isNull()){ - VSplinePath splPath = VAbstractTool::data.GetSplinePath(id); - dialogSplinePath->SetPath(splPath); - } +void VToolSplinePath::setDialog() +{ + Q_ASSERT(dialogSplinePath.isNull() == false); + VSplinePath splPath = VAbstractTool::data.GetSplinePath(id); + dialogSplinePath->SetPath(splPath); } void VToolSplinePath::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ VSplinePath path = dialog->GetPath(); - for(qint32 i = 0; i < path.CountPoint(); ++i){ + for (qint32 i = 0; i < path.CountPoint(); ++i) + { doc->IncrementReferens(path[i].P()); } Create(0, path, scene, doc, data, Document::FullParse, Tool::FromGui); @@ -81,20 +84,26 @@ void VToolSplinePath::Create(QSharedPointer &dialog, VMainGrap void VToolSplinePath::Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddSplinePath(path); data->AddLengthSpline(data->GetNameSplinePath(path), toMM(path.GetLength())); - } else { + } + else + { data->UpdateSplinePath(id, path); data->AddLengthSpline(data->GetNameSplinePath(path), toMM(path.GetLength())); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::SplinePathTool, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolSplinePath *spl = new VToolSplinePath(doc, data, id, typeCreation); scene->addItem(spl); connect(spl, &VToolSplinePath::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); @@ -104,14 +113,18 @@ void VToolSplinePath::Create(const qint64 _id, const VSplinePath &path, VMainGra } } -void VToolSplinePath::FullUpdateFromFile(){ +void VToolSplinePath::FullUpdateFromFile() +{ RefreshGeometry(); } -void VToolSplinePath::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolSplinePath::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { VSplinePath splPath = dialogSplinePath->GetPath(); - for(qint32 i = 1; i<=splPath.Count(); ++i){ + for (qint32 i = 1; i<=splPath.Count(); ++i) + { VSpline spl = splPath.GetSpline(i); qint32 j = i*2; disconnect(controlPoints[j-2], &VControlPointSpline::ControlPointChangePosition, this, @@ -131,7 +144,8 @@ void VToolSplinePath::FullUpdateFromGui(int result){ CorectControlPoints(spl, splPath, i); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrKCurve, QString().setNum(splPath.getKCurve())); UpdatePathPoint(domElement, splPath); emit FullUpdateTree(); @@ -143,26 +157,31 @@ void VToolSplinePath::FullUpdateFromGui(int result){ } void VToolSplinePath::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos){ + const QPointF pos) +{ VSplinePath splPath = VAbstractTool::data.GetSplinePath(id); VSpline spl = splPath.GetSpline(indexSpline); - if(position == SplinePoint::FirstPoint){ + if (position == SplinePoint::FirstPoint) + { spl.ModifiSpl (spl.GetP1(), pos, spl.GetP3(), spl.GetP4(), spl.GetKcurve()); - } else { + } + else + { spl.ModifiSpl (spl.GetP1(), spl.GetP2(), pos, spl.GetP4(), spl.GetKcurve()); } CorectControlPoints(spl, splPath, indexSpline); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrKCurve, QString().setNum(splPath.getKCurve())); UpdatePathPoint(domElement, splPath); emit FullUpdateTree(); } } -void VToolSplinePath::CorectControlPoints(const VSpline &spl, VSplinePath &splPath, - const qint32 &indexSpline){ +void VToolSplinePath::CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline) +{ VSplinePoint p = splPath.GetSplinePoint(indexSpline, SplinePoint::FirstPoint); p.SetAngle(spl.GetAngle1()); p.SetKAsm2(spl.GetKasm1()); @@ -174,12 +193,15 @@ void VToolSplinePath::CorectControlPoints(const VSpline &spl, VSplinePath &splPa splPath.UpdatePoint(indexSpline, SplinePoint::LastPoint, p); } -void VToolSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path){ +void VToolSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path) +{ QDomNodeList nodeList = node.childNodes(); qint32 num = nodeList.size(); - for(qint32 i = 0; i < num; ++i){ + for (qint32 i = 0; i < num; ++i) + { QDomElement domElement = nodeList.at(i).toElement(); - if(!domElement.isNull()){ + if (domElement.isNull() == false) + { VSplinePoint p = path[i]; domElement.setAttribute(AttrPSpline, QString().setNum(p.P())); domElement.setAttribute(AttrKAsm1, QString().setNum(p.KAsm1())); @@ -189,12 +211,16 @@ void VToolSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path){ } } -void VToolSplinePath::ChangedActivDraw(const QString newName){ +void VToolSplinePath::ChangedActivDraw(const QString newName) +{ bool selectable = false; - if(nameActivDraw == newName){ + if (nameActivDraw == newName) + { selectable = true; currentColor = Qt::black; - } else { + } + else + { selectable = false; currentColor = Qt::gray; } @@ -205,20 +231,24 @@ void VToolSplinePath::ChangedActivDraw(const QString newName){ VDrawTool::ChangedActivDraw(newName); } -void VToolSplinePath::ShowTool(qint64 id, Qt::GlobalColor color, bool enable){ +void VToolSplinePath::ShowTool(qint64 id, Qt::GlobalColor color, bool enable) +{ ShowItem(this, id, color, enable); } -void VToolSplinePath::SetFactor(qreal factor){ +void VToolSplinePath::SetFactor(qreal factor) +{ VDrawTool::SetFactor(factor); RefreshGeometry(); } -void VToolSplinePath::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolSplinePath::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogSplinePath, this, event); } -void VToolSplinePath::AddToFile(){ +void VToolSplinePath::AddToFile() +{ VSplinePath splPath = VAbstractTool::data.GetSplinePath(id); QDomElement domElement = doc->createElement(TagName); @@ -226,14 +256,16 @@ void VToolSplinePath::AddToFile(){ AddAttribute(domElement, AttrType, ToolType); AddAttribute(domElement, AttrKCurve, splPath.getKCurve()); - for(qint32 i = 0; i < splPath.CountPoint(); ++i){ + for (qint32 i = 0; i < splPath.CountPoint(); ++i) + { AddPathPoint(domElement, splPath[i]); } AddToCalculation(domElement); } -void VToolSplinePath::AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint){ +void VToolSplinePath::AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint) +{ QDomElement pathPoint = doc->createElement(AttrPathPoint); AddAttribute(pathPoint, AttrPSpline, splPoint.P()); @@ -244,38 +276,46 @@ void VToolSplinePath::AddPathPoint(QDomElement &domElement, const VSplinePoint & domElement.appendChild(pathPoint); } -void VToolSplinePath::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VToolSplinePath::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::SplinePath); } QGraphicsItem::mouseReleaseEvent(event); } -void VToolSplinePath::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VToolSplinePath::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine/factor)); } -void VToolSplinePath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VToolSplinePath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine/factor)); } -void VToolSplinePath::RemoveReferens(){ +void VToolSplinePath::RemoveReferens() +{ VSplinePath splPath = VAbstractTool::data.GetSplinePath(id); - for(qint32 i = 0; i < splPath.Count(); ++i){ + for (qint32 i = 0; i < splPath.Count(); ++i) + { doc->DecrementReferens(splPath[i].P()); } } -void VToolSplinePath::RefreshGeometry(){ +void VToolSplinePath::RefreshGeometry() +{ this->setPen(QPen(currentColor, widthHairLine/factor)); VSplinePath splPath = VAbstractTool::data.GetSplinePath(id); QPainterPath path; path.addPath(splPath.GetPath()); path.setFillRule( Qt::WindingFill ); this->setPath(path); - for(qint32 i = 1; i<=splPath.Count(); ++i){ + for (qint32 i = 1; i<=splPath.Count(); ++i) + { VSpline spl = splPath.GetSpline(i); QPointF splinePoint = spl.GetPointP1().toQPointF(); QPointF controlPoint = spl.GetP2(); @@ -296,5 +336,4 @@ void VToolSplinePath::RefreshGeometry(){ connect(controlPoints[j-1], &VControlPointSpline::ControlPointChangePosition, this, &VToolSplinePath::ControlPointChangePosition); } - } diff --git a/tools/drawTools/vtoolsplinepath.h b/tools/drawTools/vtoolsplinepath.h index 3bc9974e5..a1c3c51be 100644 --- a/tools/drawTools/vtoolsplinepath.h +++ b/tools/drawTools/vtoolsplinepath.h @@ -27,7 +27,8 @@ #include "dialogs/dialogsplinepath.h" #include "widgets/vcontrolpointspline.h" -class VToolSplinePath:public VDrawTool, public QGraphicsPathItem{ +class VToolSplinePath:public VDrawTool, public QGraphicsPathItem +{ Q_OBJECT public: VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, diff --git a/tools/drawTools/vtooltriangle.cpp b/tools/drawTools/vtooltriangle.cpp index 6c9c74b3b..57ea24d23 100644 --- a/tools/drawTools/vtooltriangle.cpp +++ b/tools/drawTools/vtooltriangle.cpp @@ -6,15 +6,18 @@ VToolTriangle::VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 & const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId), - secondPointId(secondPointId), dialogTriangle(QSharedPointer()) { + secondPointId(secondPointId), dialogTriangle(QSharedPointer()) +{ ignoreFullUpdate = true; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolTriangle::setDialog(){ - Q_ASSERT(!dialogTriangle.isNull()); +void VToolTriangle::setDialog() +{ + Q_ASSERT(dialogTriangle.isNull() == false); VPointF p = VAbstractTool::data.GetPoint(id); dialogTriangle->setAxisP1Id(axisP1Id, id); dialogTriangle->setAxisP2Id(axisP2Id, id); @@ -24,7 +27,8 @@ void VToolTriangle::setDialog(){ } void VToolTriangle::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ qint64 axisP1Id = dialog->getAxisP1Id(); qint64 axisP2Id = dialog->getAxisP2Id(); qint64 firstPointId = dialog->getFirstPointId(); @@ -37,7 +41,8 @@ void VToolTriangle::Create(QSharedPointer &dialog, VMainGraphics void VToolTriangle::Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){ + VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) +{ VPointF axisP1 = data->GetPoint(axisP1Id); VPointF axisP2 = data->GetPoint(axisP2Id); VPointF firstPoint = data->GetPoint(firstPointId); @@ -46,16 +51,21 @@ void VToolTriangle::Create(const qint64 _id, const QString &pointName, const qin QPointF point = FindPoint(axisP1.toQPointF(), axisP2.toQPointF(), firstPoint.toQPointF(), secondPoint.toQPointF()); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(point.x(), point.y(), pointName, mx, my)); - } else { + } + else + { data->UpdatePoint(id, VPointF(point.x(), point.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } VDrawTool::AddRecord(id, Tool::Triangle, doc); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolTriangle *point = new VToolTriangle(doc, data, id, axisP1Id, axisP2Id, firstPointId, secondPointId, typeCreation); scene->addItem(point); @@ -71,41 +81,50 @@ void VToolTriangle::Create(const qint64 _id, const QString &pointName, const qin } QPointF VToolTriangle::FindPoint(const QPointF axisP1, const QPointF axisP2, const QPointF firstPoint, - const QPointF secondPoint){ + const QPointF secondPoint) +{ qreal c = QLineF(firstPoint, secondPoint).length(); qreal a = QLineF(axisP2, firstPoint).length(); qreal b = QLineF(axisP2, secondPoint).length(); - if(c*c == a*a + b*b){ + if (c*c == a*a + b*b) + { QLineF l1(axisP2, firstPoint); QLineF l2(axisP2, secondPoint); - if(l1.angleTo(l2) == 90 || l2.angleTo(l1) == 90){ + if (l1.angleTo(l2) == 90 || l2.angleTo(l1) == 90) + { return axisP2; } } QLineF line = QLineF(axisP1, axisP2); qreal step = 0.01; - while(1){ + while (1) + { line.setLength(line.length()+step); a = QLineF(line.p2(), firstPoint).length(); b = QLineF(line.p2(), secondPoint).length(); - if(static_cast(c*c) == static_cast(a*a + b*b)){ + if (static_cast(c*c) == static_cast(a*a + b*b)) + { QLineF l1(axisP2, firstPoint); QLineF l2(axisP2, secondPoint); - if(l1.angleTo(l2) == 90 || l2.angleTo(l1) == 90){ + if (l1.angleTo(l2) == 90 || l2.angleTo(l1) == 90) + { return line.p2(); } } - if(c*c < a*a + b*b){ + if (c*c < a*a + b*b) + { qWarning()<elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { axisP1Id = domElement.attribute(AttrAxisP1, "").toLongLong(); axisP2Id = domElement.attribute(AttrAxisP2, "").toLongLong(); firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -114,10 +133,13 @@ void VToolTriangle::FullUpdateFromFile(){ VToolPoint::RefreshPointGeometry(VDrawTool::data.GetPoint(id)); } -void VToolTriangle::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolTriangle::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogTriangle->getPointName()); domElement.setAttribute(AttrAxisP1, QString().setNum(dialogTriangle->getAxisP1Id())); domElement.setAttribute(AttrAxisP2, QString().setNum(dialogTriangle->getAxisP2Id())); @@ -130,18 +152,21 @@ void VToolTriangle::FullUpdateFromGui(int result){ dialogTriangle.clear(); } -void VToolTriangle::RemoveReferens(){ +void VToolTriangle::RemoveReferens() +{ doc->DecrementReferens(axisP1Id); doc->DecrementReferens(axisP2Id); doc->DecrementReferens(firstPointId); doc->DecrementReferens(secondPointId); } -void VToolTriangle::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolTriangle::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogTriangle, this, event); } -void VToolTriangle::AddToFile(){ +void VToolTriangle::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); diff --git a/tools/drawTools/vtooltriangle.h b/tools/drawTools/vtooltriangle.h index 63b07c06a..349ced7fd 100644 --- a/tools/drawTools/vtooltriangle.h +++ b/tools/drawTools/vtooltriangle.h @@ -25,7 +25,8 @@ #include "vtoolpoint.h" #include "dialogs/dialogtriangle.h" -class VToolTriangle : public VToolPoint{ +class VToolTriangle : public VToolPoint +{ Q_OBJECT public: VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, diff --git a/tools/modelingTools/vmodelingalongline.cpp b/tools/modelingTools/vmodelingalongline.cpp index 30da7536d..eda3d393d 100644 --- a/tools/modelingTools/vmodelingalongline.cpp +++ b/tools/modelingTools/vmodelingalongline.cpp @@ -27,18 +27,21 @@ const QString VModelingAlongLine::ToolType = QStringLiteral("alongLine"); VModelingAlongLine::VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, - Tool::Sources typeCreation, QGraphicsItem *parent): - VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), - secondPointId(secondPointId), dialogAlongLine(QSharedPointer()){ - - if(typeCreation == Tool::FromGui){ + Tool::Sources typeCreation, QGraphicsItem *parent) + :VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId), + dialogAlongLine(QSharedPointer()) +{ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingAlongLine::FullUpdateFromFile(){ +void VModelingAlongLine::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); basePointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -47,10 +50,13 @@ void VModelingAlongLine::FullUpdateFromFile(){ RefreshGeometry(); } -void VModelingAlongLine::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingAlongLine::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogAlongLine->getPointName()); domElement.setAttribute(AttrTypeLine, dialogAlongLine->getTypeLine()); domElement.setAttribute(AttrLength, dialogAlongLine->getFormula()); @@ -63,11 +69,13 @@ void VModelingAlongLine::FullUpdateFromGui(int result){ dialogAlongLine.clear(); } -void VModelingAlongLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingAlongLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogAlongLine, this, event); } -void VModelingAlongLine::AddToFile(){ +void VModelingAlongLine::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -85,25 +93,26 @@ void VModelingAlongLine::AddToFile(){ AddToModeling(domElement); } -void VModelingAlongLine::RemoveReferens(){ +void VModelingAlongLine::RemoveReferens() +{ doc->DecrementReferens(secondPointId); VModelingLinePoint::RemoveReferens(); } -void VModelingAlongLine::setDialog(){ - Q_ASSERT(!dialogAlongLine.isNull()); - if(!dialogAlongLine.isNull()){ - VPointF p = VAbstractTool::data.GetModelingPoint(id); - dialogAlongLine->setTypeLine(typeLine); - dialogAlongLine->setFormula(formula); - dialogAlongLine->setFirstPointId(basePointId, id); - dialogAlongLine->setSecondPointId(secondPointId, id); - dialogAlongLine->setPointName(p.name()); - } +void VModelingAlongLine::setDialog() +{ + Q_ASSERT(dialogAlongLine.isNull() == false); + VPointF p = VAbstractTool::data.GetModelingPoint(id); + dialogAlongLine->setTypeLine(typeLine); + dialogAlongLine->setFormula(formula); + dialogAlongLine->setFirstPointId(basePointId, id); + dialogAlongLine->setSecondPointId(secondPointId, id); + dialogAlongLine->setPointName(p.name()); } -VModelingAlongLine *VModelingAlongLine::Create(QSharedPointer &dialog, - VDomDocument *doc, VContainer *data){ +VModelingAlongLine *VModelingAlongLine::Create(QSharedPointer &dialog, VDomDocument *doc, + VContainer *data) +{ QString formula = dialog->getFormula(); qint64 firstPointId = dialog->getFirstPointId(); qint64 secondPointId = dialog->getSecondPointId(); @@ -113,12 +122,12 @@ VModelingAlongLine *VModelingAlongLine::Create(QSharedPointer & Document::FullParse, Tool::FromGui); } -VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString &pointName, - const QString &typeLine, const QString &formula, - const qint64 &firstPointId, const qint64 &secondPointId, - const qreal &mx, const qreal &my, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ +VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine, + const QString &formula, const qint64 &firstPointId, + const qint64 &secondPointId, const qreal &mx, const qreal &my, + VDomDocument *doc, VContainer *data, const Document::Documents &parse, + Tool::Sources typeCreation) +{ VModelingAlongLine *point = 0; VPointF firstPoint = data->GetModelingPoint(firstPointId); VPointF secondPoint = data->GetModelingPoint(secondPointId); @@ -126,21 +135,27 @@ VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString & Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { line.setLength(toPixel(result)); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingPoint(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); - } else { + } + else + { data->UpdateModelingPoint(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } data->AddLine(firstPointId, id); data->AddLine(id, secondPointId); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { point = new VModelingAlongLine(doc, data, id, formula, firstPointId, secondPointId, typeLine, typeCreation); doc->AddTool(id, point); diff --git a/tools/modelingTools/vmodelingalongline.h b/tools/modelingTools/vmodelingalongline.h index eceb805b3..10806c529 100644 --- a/tools/modelingTools/vmodelingalongline.h +++ b/tools/modelingTools/vmodelingalongline.h @@ -25,7 +25,8 @@ #include "vmodelinglinepoint.h" #include "dialogs/dialogalongline.h" -class VModelingAlongLine : public VModelingLinePoint{ +class VModelingAlongLine : public VModelingLinePoint +{ Q_OBJECT public: VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, diff --git a/tools/modelingTools/vmodelingarc.cpp b/tools/modelingTools/vmodelingarc.cpp index 6181db5c7..79cd93d05 100644 --- a/tools/modelingTools/vmodelingarc.cpp +++ b/tools/modelingTools/vmodelingarc.cpp @@ -26,30 +26,32 @@ const QString VModelingArc::TagName = QStringLiteral("arc"); const QString VModelingArc::ToolType = QStringLiteral("simple"); VModelingArc::VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, - QGraphicsItem *parent):VModelingTool(doc, data, id), QGraphicsPathItem(parent), - dialogArc(QSharedPointer()){ + QGraphicsItem *parent) + :VModelingTool(doc, data, id), QGraphicsPathItem(parent), dialogArc(QSharedPointer()) +{ this->setPen(QPen(baseColor, widthHairLine)); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); RefreshGeometry(); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingArc::setDialog(){ - Q_ASSERT(!dialogArc.isNull()); - if(!dialogArc.isNull()){ - VArc arc = VAbstractTool::data.GetModelingArc(id); - dialogArc->SetCenter(arc.GetCenter()); - dialogArc->SetRadius(arc.GetFormulaRadius()); - dialogArc->SetF1(arc.GetFormulaF1()); - dialogArc->SetF2(arc.GetFormulaF2()); - } +void VModelingArc::setDialog() +{ + Q_ASSERT(dialogArc.isNull() == false); + VArc arc = VAbstractTool::data.GetModelingArc(id); + dialogArc->SetCenter(arc.GetCenter()); + dialogArc->SetRadius(arc.GetFormulaRadius()); + dialogArc->SetF1(arc.GetFormulaF1()); + dialogArc->SetF2(arc.GetFormulaF2()); } -VModelingArc* VModelingArc::Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data){ +VModelingArc* VModelingArc::Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data) +{ qint64 center = dialog->GetCenter(); QString radius = dialog->GetRadius(); QString f1 = dialog->GetF1(); @@ -59,41 +61,50 @@ VModelingArc* VModelingArc::Create(QSharedPointer &dialog, VDomDocume VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){ + VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) +{ VModelingArc *toolArc = 0; qreal calcRadius = 0, calcF1 = 0, calcF2 = 0; Calculator cal(data); QString errorMsg; qreal result = cal.eval(radius, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { calcRadius = toPixel(result); } errorMsg.clear(); result = cal.eval(f1, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { calcF1 = result; } errorMsg.clear(); result = cal.eval(f2, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { calcF2 = result; } VArc arc = VArc(data->DataModelingPoints(), center, calcRadius, radius, calcF1, f1, calcF2, f2 ); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingArc(arc); - } else { + } + else + { data->UpdateModelingArc(id, arc); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } - data->AddLengthArc(data->GetNameArc(center,id, Draw::Modeling), toMM(arc.GetLength())); - if(parse == Document::FullParse){ + data->AddLengthArc(data->GetNameArc(center, id, Draw::Modeling), toMM(arc.GetLength())); + if (parse == Document::FullParse) + { toolArc = new VModelingArc(doc, data, id, typeCreation); doc->AddTool(id, toolArc); doc->IncrementReferens(center); @@ -101,14 +112,18 @@ VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const return toolArc; } -void VModelingArc::FullUpdateFromFile(){ +void VModelingArc::FullUpdateFromFile() +{ RefreshGeometry(); } -void VModelingArc::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingArc::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrCenter, QString().setNum(dialogArc->GetCenter())); domElement.setAttribute(AttrRadius, dialogArc->GetRadius()); domElement.setAttribute(AttrAngle1, dialogArc->GetF1()); @@ -119,11 +134,13 @@ void VModelingArc::FullUpdateFromGui(int result){ dialogArc.clear(); } -void VModelingArc::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingArc::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogArc, this, event); } -void VModelingArc::AddToFile(){ +void VModelingArc::AddToFile() +{ VArc arc = VAbstractTool::data.GetModelingArc(id); QDomElement domElement = doc->createElement(TagName); @@ -137,29 +154,35 @@ void VModelingArc::AddToFile(){ AddToModeling(domElement); } -void VModelingArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VModelingArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Arc); } QGraphicsItem::mouseReleaseEvent(event); } -void VModelingArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VModelingArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VModelingArc::RemoveReferens(){ +void VModelingArc::RemoveReferens() +{ VArc arc = VAbstractTool::data.GetModelingArc(id); doc->DecrementReferens(arc.GetCenter()); } -void VModelingArc::RefreshGeometry(){ +void VModelingArc::RefreshGeometry() +{ VArc arc = VAbstractTool::data.GetModelingArc(id); QPainterPath path; path.addPath(arc.GetPath()); diff --git a/tools/modelingTools/vmodelingarc.h b/tools/modelingTools/vmodelingarc.h index 18c20f897..5604adf1b 100644 --- a/tools/modelingTools/vmodelingarc.h +++ b/tools/modelingTools/vmodelingarc.h @@ -27,7 +27,8 @@ #include "dialogs/dialogarc.h" #include "widgets/vcontrolpointspline.h" -class VModelingArc :public VModelingTool, public QGraphicsPathItem{ +class VModelingArc :public VModelingTool, public QGraphicsPathItem +{ Q_OBJECT public: VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, diff --git a/tools/modelingTools/vmodelingbisector.cpp b/tools/modelingTools/vmodelingbisector.cpp index fa84f937b..34870255b 100644 --- a/tools/modelingTools/vmodelingbisector.cpp +++ b/tools/modelingTools/vmodelingbisector.cpp @@ -28,32 +28,34 @@ const QString VModelingBisector::ToolType = QStringLiteral("bisector"); VModelingBisector::VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation, - QGraphicsItem *parent): - VModelingLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), - thirdPointId(0), dialogBisector(QSharedPointer()){ + QGraphicsItem *parent) + :VModelingLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), + thirdPointId(0), dialogBisector(QSharedPointer()) +{ this->firstPointId = firstPointId; this->thirdPointId = thirdPointId; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingBisector::setDialog(){ - Q_ASSERT(!dialogBisector.isNull()); - if(!dialogBisector.isNull()){ - VPointF p = VAbstractTool::data.GetModelingPoint(id); - dialogBisector->setTypeLine(typeLine); - dialogBisector->setFormula(formula); - dialogBisector->setFirstPointId(firstPointId, id); - dialogBisector->setSecondPointId(basePointId, id); - dialogBisector->setThirdPointId(thirdPointId, id); - dialogBisector->setPointName(p.name()); - } +void VModelingBisector::setDialog() +{ + Q_ASSERT(dialogBisector.isNull() == false); + VPointF p = VAbstractTool::data.GetModelingPoint(id); + dialogBisector->setTypeLine(typeLine); + dialogBisector->setFormula(formula); + dialogBisector->setFirstPointId(firstPointId, id); + dialogBisector->setSecondPointId(basePointId, id); + dialogBisector->setThirdPointId(thirdPointId, id); + dialogBisector->setPointName(p.name()); } VModelingBisector *VModelingBisector::Create(QSharedPointer &dialog, VDomDocument *doc, - VContainer *data){ + VContainer *data) +{ QString formula = dialog->getFormula(); qint64 firstPointId = dialog->getFirstPointId(); qint64 secondPointId = dialog->getSecondPointId(); @@ -69,7 +71,8 @@ VModelingBisector *VModelingBisector::Create(const qint64 _id, const QString &fo const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ VModelingBisector *point = 0; VPointF firstPoint = data->GetModelingPoint(firstPointId); VPointF secondPoint = data->GetModelingPoint(secondPointId); @@ -78,20 +81,26 @@ VModelingBisector *VModelingBisector::Create(const qint64 _id, const QString &fo Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { QPointF fPoint = VToolBisector::FindPoint(firstPoint.toQPointF(), secondPoint.toQPointF(), thirdPoint.toQPointF(), toPixel(result)); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - } else { + } + else + { data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } data->AddLine(firstPointId, id, Draw::Modeling); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { point = new VModelingBisector(doc, data, id, typeLine, formula, firstPointId, secondPointId, thirdPointId, typeCreation); doc->AddTool(id, point); @@ -103,9 +112,11 @@ VModelingBisector *VModelingBisector::Create(const qint64 _id, const QString &fo return point; } -void VModelingBisector::FullUpdateFromFile(){ +void VModelingBisector::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -115,10 +126,13 @@ void VModelingBisector::FullUpdateFromFile(){ RefreshGeometry(); } -void VModelingBisector::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingBisector::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogBisector->getPointName()); domElement.setAttribute(AttrTypeLine, dialogBisector->getTypeLine()); domElement.setAttribute(AttrLength, dialogBisector->getFormula()); @@ -131,11 +145,13 @@ void VModelingBisector::FullUpdateFromGui(int result){ dialogBisector.clear(); } -void VModelingBisector::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingBisector::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogBisector, this, event); } -void VModelingBisector::AddToFile(){ +void VModelingBisector::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -154,7 +170,8 @@ void VModelingBisector::AddToFile(){ AddToModeling(domElement); } -void VModelingBisector::RemoveReferens(){ +void VModelingBisector::RemoveReferens() +{ doc->DecrementReferens(firstPointId); doc->DecrementReferens(thirdPointId); VModelingLinePoint::RemoveReferens(); diff --git a/tools/modelingTools/vmodelingbisector.h b/tools/modelingTools/vmodelingbisector.h index 2a84ac1fc..a80bfdb20 100644 --- a/tools/modelingTools/vmodelingbisector.h +++ b/tools/modelingTools/vmodelingbisector.h @@ -25,7 +25,8 @@ #include "vmodelinglinepoint.h" #include "dialogs/dialogbisector.h" -class VModelingBisector : public VModelingLinePoint{ +class VModelingBisector : public VModelingLinePoint +{ Q_OBJECT public: VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id, diff --git a/tools/modelingTools/vmodelingendline.cpp b/tools/modelingTools/vmodelingendline.cpp index fa4b51f5f..d5d2349d8 100644 --- a/tools/modelingTools/vmodelingendline.cpp +++ b/tools/modelingTools/vmodelingendline.cpp @@ -26,18 +26,19 @@ const QString VModelingEndLine::ToolType = QStringLiteral("endLine"); VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, - const qint64 &basePointId, Tool::Sources typeCreation, - QGraphicsItem *parent): - VModelingLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent), - dialogEndLine(QSharedPointer()){ - - if(typeCreation == Tool::FromGui){ + const qint64 &basePointId, Tool::Sources typeCreation, QGraphicsItem *parent) + :VModelingLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent), + dialogEndLine(QSharedPointer()) +{ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingEndLine::setDialog(){ - Q_ASSERT(!dialogEndLine.isNull()); +void VModelingEndLine::setDialog() +{ + Q_ASSERT(dialogEndLine.isNull() == false); VPointF p = VAbstractTool::data.GetModelingPoint(id); dialogEndLine->setTypeLine(typeLine); dialogEndLine->setFormula(formula); @@ -46,8 +47,8 @@ void VModelingEndLine::setDialog(){ dialogEndLine->setPointName(p.name()); } -VModelingEndLine *VModelingEndLine::Create(QSharedPointer &dialog, VDomDocument *doc, - VContainer *data){ +VModelingEndLine *VModelingEndLine::Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data) +{ QString pointName = dialog->getPointName(); QString typeLine = dialog->getTypeLine(); QString formula = dialog->getFormula(); @@ -61,27 +62,34 @@ VModelingEndLine *VModelingEndLine::Create(const qint64 _id, const QString &poin const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation){ + const Document::Documents &parse, Tool::Sources typeCreation) +{ VModelingEndLine *point = 0; VPointF basePoint = data->GetModelingPoint(basePointId); QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y())); Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { line.setLength(toPixel(result)); line.setAngle(angle); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingPoint(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); - } else { + } + else + { data->UpdateModelingPoint(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } data->AddLine(basePointId, id, Draw::Modeling); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { point = new VModelingEndLine(doc, data, id, typeLine, formula, angle, basePointId, typeCreation); doc->AddTool(id, point); doc->IncrementReferens(basePointId); @@ -90,9 +98,11 @@ VModelingEndLine *VModelingEndLine::Create(const qint64 _id, const QString &poin return point; } -void VModelingEndLine::FullUpdateFromFile(){ +void VModelingEndLine::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); basePointId = domElement.attribute(AttrBasePoint, "").toLongLong(); @@ -101,14 +111,18 @@ void VModelingEndLine::FullUpdateFromFile(){ RefreshGeometry(); } -void VModelingEndLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingEndLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogEndLine, this, event); } -void VModelingEndLine::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingEndLine::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogEndLine->getPointName()); domElement.setAttribute(AttrTypeLine, dialogEndLine->getTypeLine()); domElement.setAttribute(AttrLength, dialogEndLine->getFormula()); @@ -120,7 +134,8 @@ void VModelingEndLine::FullUpdateFromGui(int result){ dialogEndLine.clear(); } -void VModelingEndLine::AddToFile(){ +void VModelingEndLine::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); diff --git a/tools/modelingTools/vmodelingendline.h b/tools/modelingTools/vmodelingendline.h index edf57b266..7142d2b6c 100644 --- a/tools/modelingTools/vmodelingendline.h +++ b/tools/modelingTools/vmodelingendline.h @@ -25,7 +25,8 @@ #include "vmodelinglinepoint.h" #include "dialogs/dialogendline.h" -class VModelingEndLine : public VModelingLinePoint{ +class VModelingEndLine : public VModelingLinePoint +{ Q_OBJECT public: VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, diff --git a/tools/modelingTools/vmodelingheight.cpp b/tools/modelingTools/vmodelingheight.cpp index b71a69276..50024d09e 100644 --- a/tools/modelingTools/vmodelingheight.cpp +++ b/tools/modelingTools/vmodelingheight.cpp @@ -29,15 +29,18 @@ VModelingHeight::VModelingHeight(VDomDocument *doc, VContainer *data, const qint const qint64 &p2LineId, Tool::Sources typeCreation, QGraphicsItem * parent) :VModelingLinePoint(doc, data, id, typeLine, QString(), basePointId, 0, parent), - dialogHeight(QSharedPointer()), p1LineId(p1LineId), p2LineId(p2LineId){ + dialogHeight(QSharedPointer()), p1LineId(p1LineId), p2LineId(p2LineId) +{ ignoreFullUpdate = true; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingHeight::setDialog(){ - Q_ASSERT(!dialogHeight.isNull()); +void VModelingHeight::setDialog() +{ + Q_ASSERT(dialogHeight.isNull() == false); VPointF p = VAbstractTool::data.GetModelingPoint(id); dialogHeight->setTypeLine(typeLine); dialogHeight->setBasePointId(basePointId, id); @@ -46,8 +49,8 @@ void VModelingHeight::setDialog(){ dialogHeight->setPointName(p.name()); } -VModelingHeight *VModelingHeight::Create(QSharedPointer &dialog, VDomDocument *doc, - VContainer *data){ +VModelingHeight *VModelingHeight::Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data) +{ disconnect(doc, &VDomDocument::FullUpdateFromFile, dialog.data(), &DialogHeight::UpdateList); QString pointName = dialog->getPointName(); QString typeLine = dialog->getTypeLine(); @@ -62,7 +65,8 @@ VModelingHeight *VModelingHeight::Create(const qint64 _id, const QString &pointN const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation){ + const Document::Documents &parse, Tool::Sources typeCreation) +{ VModelingHeight *point = 0; VPointF basePoint = data->GetModelingPoint(basePointId); VPointF p1Line = data->GetModelingPoint(p1LineId); @@ -72,16 +76,21 @@ VModelingHeight *VModelingHeight::Create(const qint64 _id, const QString &pointN basePoint.toQPointF()); QLineF line = QLineF(basePoint.toQPointF(), pHeight); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingPoint(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); - } else { + } + else + { data->UpdateModelingPoint(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } data->AddLine(basePointId, id, Draw::Modeling); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { point = new VModelingHeight(doc, data, id, typeLine, basePointId, p1LineId, p2LineId, typeCreation); doc->AddTool(id, point); doc->IncrementReferens(basePointId); @@ -91,9 +100,11 @@ VModelingHeight *VModelingHeight::Create(const qint64 _id, const QString &pointN return point; } -void VModelingHeight::FullUpdateFromFile(){ +void VModelingHeight::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); basePointId = domElement.attribute(AttrBasePoint, "").toLongLong(); p1LineId = domElement.attribute(AttrP1Line, "").toLongLong(); @@ -102,10 +113,13 @@ void VModelingHeight::FullUpdateFromFile(){ RefreshGeometry(); } -void VModelingHeight::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingHeight::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogHeight->getPointName()); domElement.setAttribute(AttrTypeLine, dialogHeight->getTypeLine()); domElement.setAttribute(AttrBasePoint, QString().setNum(dialogHeight->getBasePointId())); @@ -117,11 +131,13 @@ void VModelingHeight::FullUpdateFromGui(int result){ dialogHeight.clear(); } -void VModelingHeight::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingHeight::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogHeight, this, event); } -void VModelingHeight::AddToFile(){ +void VModelingHeight::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); diff --git a/tools/modelingTools/vmodelingheight.h b/tools/modelingTools/vmodelingheight.h index 7ad09f6e3..073b7bfae 100644 --- a/tools/modelingTools/vmodelingheight.h +++ b/tools/modelingTools/vmodelingheight.h @@ -25,7 +25,8 @@ #include "vmodelinglinepoint.h" #include "dialogs/dialogheight.h" -class VModelingHeight : public VModelingLinePoint{ +class VModelingHeight : public VModelingLinePoint +{ Q_OBJECT public: VModelingHeight(VDomDocument *doc, VContainer *data, const qint64 &id, diff --git a/tools/modelingTools/vmodelingline.cpp b/tools/modelingTools/vmodelingline.cpp index 6acd7cdd7..7f077bca1 100644 --- a/tools/modelingTools/vmodelingline.cpp +++ b/tools/modelingTools/vmodelingline.cpp @@ -26,7 +26,8 @@ const QString VModelingLine::TagName = QStringLiteral("line"); VModelingLine::VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint, Tool::Sources typeCreation, QGraphicsItem *parent): VModelingTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint), - secondPoint(secondPoint), dialogLine(QSharedPointer()){ + secondPoint(secondPoint), dialogLine(QSharedPointer()) +{ ignoreFullUpdate = true; //Лінія VPointF first = data->GetModelingPoint(firstPoint); @@ -36,18 +37,20 @@ VModelingLine::VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qin this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingLine::setDialog(){ +void VModelingLine::setDialog() +{ dialogLine->setFirstPoint(firstPoint); dialogLine->setSecondPoint(secondPoint); } -VModelingLine *VModelingLine::Create(QSharedPointer &dialog, VDomDocument *doc, - VContainer *data){ +VModelingLine *VModelingLine::Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data) +{ qint64 firstPoint = dialog->getFirstPoint(); qint64 secondPoint = dialog->getSecondPoint(); return Create(0, firstPoint, secondPoint, doc, data, Document::FullParse, Tool::FromGui); @@ -55,21 +58,27 @@ VModelingLine *VModelingLine::Create(QSharedPointer &dialog, VDomDoc VModelingLine *VModelingLine::Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ VModelingLine *line = 0; Q_ASSERT(doc != 0); Q_ASSERT(data != 0); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->getNextId(); - } else { - if(parse != Document::FullParse){ + } + else + { + if (parse != Document::FullParse) + { data->UpdateId(id); doc->UpdateToolData(id, data); } } data->AddLine(firstPoint, secondPoint, Draw::Modeling); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { line = new VModelingLine(doc, data, id, firstPoint, secondPoint, typeCreation); doc->AddTool(id, line); doc->IncrementReferens(firstPoint); @@ -78,9 +87,11 @@ VModelingLine *VModelingLine::Create(const qint64 &_id, const qint64 &firstPoint return line; } -void VModelingLine::FullUpdateFromFile(){ +void VModelingLine::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { firstPoint = domElement.attribute(AttrFirstPoint, "").toLongLong(); secondPoint = domElement.attribute(AttrSecondPoint, "").toLongLong(); } @@ -89,10 +100,13 @@ void VModelingLine::FullUpdateFromFile(){ this->setLine(QLineF(first.toQPointF(), second.toQPointF())); } -void VModelingLine::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingLine::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogLine->getFirstPoint())); domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogLine->getSecondPoint())); emit FullUpdateTree(); @@ -101,11 +115,13 @@ void VModelingLine::FullUpdateFromGui(int result){ dialogLine.clear(); } -void VModelingLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogLine, this, event); } -void VModelingLine::AddToFile(){ +void VModelingLine::AddToFile() +{ QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); AddAttribute(domElement, AttrFirstPoint, firstPoint); @@ -114,17 +130,20 @@ void VModelingLine::AddToFile(){ AddToModeling(domElement); } -void VModelingLine::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingLine::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VModelingLine::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingLine::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VModelingLine::RemoveReferens(){ +void VModelingLine::RemoveReferens() +{ doc->DecrementReferens(firstPoint); doc->DecrementReferens(secondPoint); } diff --git a/tools/modelingTools/vmodelingline.h b/tools/modelingTools/vmodelingline.h index 8bee26207..f91380eaa 100644 --- a/tools/modelingTools/vmodelingline.h +++ b/tools/modelingTools/vmodelingline.h @@ -26,7 +26,8 @@ #include "QGraphicsLineItem" #include "dialogs/dialogline.h" -class VModelingLine: public VModelingTool, public QGraphicsLineItem{ +class VModelingLine: public VModelingTool, public QGraphicsLineItem +{ Q_OBJECT public: VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, diff --git a/tools/modelingTools/vmodelinglineintersect.cpp b/tools/modelingTools/vmodelinglineintersect.cpp index af78014b6..f73afb5be 100644 --- a/tools/modelingTools/vmodelinglineintersect.cpp +++ b/tools/modelingTools/vmodelinglineintersect.cpp @@ -25,29 +25,31 @@ const QString VModelingLineIntersect::ToolType = QStringLiteral("lineIntersect") VModelingLineIntersect::VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, - const qint64 &p2Line2, Tool::Sources typeCreation, QGraphicsItem *parent): - VModelingPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2), - p2Line2(p2Line2), dialogLineIntersect(QSharedPointer()){ + const qint64 &p2Line2, Tool::Sources typeCreation, QGraphicsItem *parent) + :VModelingPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2), + p2Line2(p2Line2), dialogLineIntersect(QSharedPointer()) +{ ignoreFullUpdate = true; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingLineIntersect::setDialog(){ - Q_ASSERT(!dialogLineIntersect.isNull()); - if(!dialogLineIntersect.isNull()){ - VPointF p = VAbstractTool::data.GetModelingPoint(id); - dialogLineIntersect->setP1Line1(p1Line1); - dialogLineIntersect->setP2Line1(p2Line1); - dialogLineIntersect->setP1Line2(p1Line2); - dialogLineIntersect->setP2Line2(p2Line2); - dialogLineIntersect->setPointName(p.name()); - } +void VModelingLineIntersect::setDialog() +{ + Q_ASSERT(dialogLineIntersect.isNull() == false); + VPointF p = VAbstractTool::data.GetModelingPoint(id); + dialogLineIntersect->setP1Line1(p1Line1); + dialogLineIntersect->setP2Line1(p2Line1); + dialogLineIntersect->setP1Line2(p1Line2); + dialogLineIntersect->setP2Line2(p2Line2); + dialogLineIntersect->setPointName(p.name()); } VModelingLineIntersect *VModelingLineIntersect::Create(QSharedPointer &dialog, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ qint64 p1Line1Id = dialog->getP1Line1(); qint64 p2Line1Id = dialog->getP2Line1(); qint64 p1Line2Id = dialog->getP1Line2(); @@ -62,7 +64,8 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ VModelingLineIntersect *point = 0; VPointF p1Line1 = data->GetModelingPoint(p1Line1Id); VPointF p2Line1 = data->GetModelingPoint(p2Line1Id); @@ -73,13 +76,18 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q QLineF line2(p1Line2.toQPointF(), p2Line2.toQPointF()); QPointF fPoint; QLineF::IntersectType intersect = line1.intersect(line2, &fPoint); - if(intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection){ + if (intersect == QLineF::UnboundedIntersection || intersect == QLineF::BoundedIntersection) + { qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - } else { + } + else + { data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } @@ -87,7 +95,8 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q data->AddLine(id, p2Line1Id, Draw::Modeling); data->AddLine(p1Line2Id, id, Draw::Modeling); data->AddLine(id, p2Line2Id, Draw::Modeling); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { point = new VModelingLineIntersect(doc, data, id, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, typeCreation); doc->AddTool(id, point); @@ -100,9 +109,11 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q return point; } -void VModelingLineIntersect::FullUpdateFromFile(){ +void VModelingLineIntersect::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { p1Line1 = domElement.attribute(AttrP1Line1, "").toLongLong(); p2Line1 = domElement.attribute(AttrP2Line1, "").toLongLong(); p1Line2 = domElement.attribute(AttrP1Line2, "").toLongLong(); @@ -111,10 +122,13 @@ void VModelingLineIntersect::FullUpdateFromFile(){ RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); } -void VModelingLineIntersect::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingLineIntersect::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogLineIntersect->getPointName()); domElement.setAttribute(AttrP1Line1, QString().setNum(dialogLineIntersect->getP1Line1())); domElement.setAttribute(AttrP2Line1, QString().setNum(dialogLineIntersect->getP2Line1())); @@ -126,11 +140,13 @@ void VModelingLineIntersect::FullUpdateFromGui(int result){ dialogLineIntersect.clear(); } -void VModelingLineIntersect::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingLineIntersect::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogLineIntersect, this, event); } -void VModelingLineIntersect::AddToFile(){ +void VModelingLineIntersect::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -148,7 +164,8 @@ void VModelingLineIntersect::AddToFile(){ AddToModeling(domElement); } -void VModelingLineIntersect::RemoveReferens(){ +void VModelingLineIntersect::RemoveReferens() +{ doc->DecrementReferens(p1Line1); doc->DecrementReferens(p2Line1); doc->DecrementReferens(p1Line2); diff --git a/tools/modelingTools/vmodelinglineintersect.h b/tools/modelingTools/vmodelinglineintersect.h index 7051104d1..f6b1cc3e0 100644 --- a/tools/modelingTools/vmodelinglineintersect.h +++ b/tools/modelingTools/vmodelinglineintersect.h @@ -25,7 +25,8 @@ #include "vmodelingpoint.h" #include "dialogs/dialoglineintersect.h" -class VModelingLineIntersect:public VModelingPoint{ +class VModelingLineIntersect:public VModelingPoint +{ Q_OBJECT public: VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, diff --git a/tools/modelingTools/vmodelinglinepoint.cpp b/tools/modelingTools/vmodelinglinepoint.cpp index e8c05adb2..55802477a 100644 --- a/tools/modelingTools/vmodelinglinepoint.cpp +++ b/tools/modelingTools/vmodelinglinepoint.cpp @@ -23,30 +23,38 @@ VModelingLinePoint::VModelingLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &basePointId, - const qreal &angle, QGraphicsItem *parent): - VModelingPoint(doc, data, id, parent), typeLine(typeLine), formula(formula), angle(angle), - basePointId(basePointId), mainLine(0){ + const qreal &angle, QGraphicsItem *parent) + :VModelingPoint(doc, data, id, parent), typeLine(typeLine), formula(formula), angle(angle), + basePointId(basePointId), mainLine(0) +{ //Лінія, що з'єднує дві точки QPointF point1 = data->GetModelingPoint(basePointId).toQPointF(); QPointF point2 = data->GetModelingPoint(id).toQPointF(); mainLine = new QGraphicsLineItem(QLineF(point1 - point2, QPointF()), this); mainLine->setPen(QPen(Qt::black, widthHairLine)); mainLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true); - if(typeLine == TypeLineNone){ + if (typeLine == TypeLineNone) + { mainLine->setVisible(false); - } else { + } + else + { mainLine->setVisible(true); } } -void VModelingLinePoint::RefreshGeometry(){ +void VModelingLinePoint::RefreshGeometry() +{ VModelingPoint::RefreshPointGeometry(VModelingTool::data.GetModelingPoint(id)); QPointF point = VModelingTool::data.GetModelingPoint(id).toQPointF(); QPointF basePoint = VModelingTool::data.GetModelingPoint(basePointId).toQPointF(); mainLine->setLine(QLineF(basePoint - point, QPointF())); - if(typeLine == TypeLineNone){ + if (typeLine == TypeLineNone) + { mainLine->setVisible(false); - } else { + } + else + { mainLine->setVisible(true); } } diff --git a/tools/modelingTools/vmodelinglinepoint.h b/tools/modelingTools/vmodelinglinepoint.h index 2fc252b99..be3afec2e 100644 --- a/tools/modelingTools/vmodelinglinepoint.h +++ b/tools/modelingTools/vmodelinglinepoint.h @@ -24,7 +24,8 @@ #include "vmodelingpoint.h" -class VModelingLinePoint : public VModelingPoint{ +class VModelingLinePoint : public VModelingPoint +{ Q_OBJECT public: VModelingLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, diff --git a/tools/modelingTools/vmodelingnormal.cpp b/tools/modelingTools/vmodelingnormal.cpp index c9a9c2cad..57e0da070 100644 --- a/tools/modelingTools/vmodelingnormal.cpp +++ b/tools/modelingTools/vmodelingnormal.cpp @@ -25,33 +25,32 @@ const QString VModelingNormal::ToolType = QStringLiteral("normal"); -VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, - const QString &typeLine, +VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, - const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent): - VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent), - secondPointId(secondPointId), dialogNormal(QSharedPointer()){ - - if(typeCreation == Tool::FromGui){ + const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) + :VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent), + secondPointId(secondPointId), dialogNormal(QSharedPointer()) +{ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingNormal::setDialog(){ - Q_ASSERT(!dialogNormal.isNull()); - if(!dialogNormal.isNull()){ - VPointF p = VAbstractTool::data.GetModelingPoint(id); - dialogNormal->setTypeLine(typeLine); - dialogNormal->setFormula(formula); - dialogNormal->setAngle(angle); - dialogNormal->setFirstPointId(basePointId, id); - dialogNormal->setSecondPointId(secondPointId, id); - dialogNormal->setPointName(p.name()); - } +void VModelingNormal::setDialog() +{ + Q_ASSERT(dialogNormal.isNull() == false); + VPointF p = VAbstractTool::data.GetModelingPoint(id); + dialogNormal->setTypeLine(typeLine); + dialogNormal->setFormula(formula); + dialogNormal->setAngle(angle); + dialogNormal->setFirstPointId(basePointId, id); + dialogNormal->setSecondPointId(secondPointId, id); + dialogNormal->setPointName(p.name()); } -VModelingNormal* VModelingNormal::Create(QSharedPointer &dialog, VDomDocument *doc, - VContainer *data){ +VModelingNormal* VModelingNormal::Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data) +{ QString formula = dialog->getFormula(); qint64 firstPointId = dialog->getFirstPointId(); qint64 secondPointId = dialog->getSecondPointId(); @@ -62,32 +61,37 @@ VModelingNormal* VModelingNormal::Create(QSharedPointer &dialog, V Document::FullParse, Tool::FromGui); } -VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formula, - const qint64 &firstPointId, const qint64 &secondPointId, - const QString typeLine, const QString pointName, - const qreal angle, const qreal &mx, const qreal &my, - VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ +VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, + const qint64 &secondPointId, const QString typeLine, const QString pointName, + const qreal angle, const qreal &mx, const qreal &my, VDomDocument *doc, + VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) +{ VModelingNormal *point = 0; VPointF firstPoint = data->GetModelingPoint(firstPointId); VPointF secondPoint = data->GetModelingPoint(secondPointId); Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { QPointF fPoint = VToolNormal::FindPoint(firstPoint.toQPointF(), secondPoint.toQPointF(), toPixel(result), angle); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - } else { + } + else + { data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } data->AddLine(firstPointId, id, Draw::Modeling); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { point = new VModelingNormal(doc, data, id, typeLine, formula, angle, firstPointId, secondPointId, typeCreation); doc->AddTool(id, point); @@ -98,9 +102,11 @@ VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formul return point; } -void VModelingNormal::FullUpdateFromFile(){ +void VModelingNormal::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); basePointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -110,10 +116,13 @@ void VModelingNormal::FullUpdateFromFile(){ RefreshGeometry(); } -void VModelingNormal::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingNormal::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogNormal->getPointName()); domElement.setAttribute(AttrTypeLine, dialogNormal->getTypeLine()); domElement.setAttribute(AttrLength, dialogNormal->getFormula()); @@ -126,11 +135,13 @@ void VModelingNormal::FullUpdateFromGui(int result){ dialogNormal.clear(); } -void VModelingNormal::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingNormal::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogNormal, this, event); } -void VModelingNormal::AddToFile(){ +void VModelingNormal::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -149,7 +160,8 @@ void VModelingNormal::AddToFile(){ AddToModeling(domElement); } -void VModelingNormal::RemoveReferens(){ +void VModelingNormal::RemoveReferens() +{ doc->DecrementReferens(secondPointId); VModelingLinePoint::RemoveReferens(); } diff --git a/tools/modelingTools/vmodelingnormal.h b/tools/modelingTools/vmodelingnormal.h index c1ef9c146..91dcaef62 100644 --- a/tools/modelingTools/vmodelingnormal.h +++ b/tools/modelingTools/vmodelingnormal.h @@ -25,7 +25,8 @@ #include "vmodelinglinepoint.h" #include "dialogs/dialognormal.h" -class VModelingNormal : public VModelingLinePoint{ +class VModelingNormal : public VModelingLinePoint +{ Q_OBJECT public: VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, diff --git a/tools/modelingTools/vmodelingpoint.cpp b/tools/modelingTools/vmodelingpoint.cpp index 4bb1741fa..50bb89a03 100644 --- a/tools/modelingTools/vmodelingpoint.cpp +++ b/tools/modelingTools/vmodelingpoint.cpp @@ -24,9 +24,9 @@ const QString VModelingPoint::TagName = QStringLiteral("point"); -VModelingPoint::VModelingPoint(VDomDocument *doc, VContainer *data, qint64 id, - QGraphicsItem *parent):VModelingTool(doc, data, id), - QGraphicsEllipseItem(parent), radius(toPixel(1.5)), namePoint(0), lineName(0){ +VModelingPoint::VModelingPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem *parent) + :VModelingTool(doc, data, id), QGraphicsEllipseItem(parent), radius(toPixel(1.5)), namePoint(0), lineName(0) +{ namePoint = new VGraphicsSimpleTextItem(this); lineName = new QGraphicsLineItem(this); connect(namePoint, &VGraphicsSimpleTextItem::NameChangePosition, this, @@ -38,7 +38,8 @@ VModelingPoint::VModelingPoint(VDomDocument *doc, VContainer *data, qint64 id, RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); } -void VModelingPoint::NameChangePosition(const QPointF pos){ +void VModelingPoint::NameChangePosition(const QPointF pos) +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QPointF p = pos - this->pos(); point.setMx(p.x()); @@ -48,33 +49,40 @@ void VModelingPoint::NameChangePosition(const QPointF pos){ VAbstractTool::data.UpdatePoint(id, point); } -void VModelingPoint::UpdateNamePosition(qreal mx, qreal my){ +void VModelingPoint::UpdateNamePosition(qreal mx, qreal my) +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrMx, QString().setNum(toMM(mx))); domElement.setAttribute(AttrMy, QString().setNum(toMM(my))); emit toolhaveChange(); } } -void VModelingPoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VModelingPoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Point); } QGraphicsItem::mouseReleaseEvent(event); } -void VModelingPoint::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingPoint::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VModelingPoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingPoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VModelingPoint::RefreshPointGeometry(const VPointF &point){ +void VModelingPoint::RefreshPointGeometry(const VPointF &point) +{ QRectF rec = QRectF(0, 0, radius*2, radius*2); rec.translate(-rec.center().x(), -rec.center().y()); this->setRect(rec); @@ -88,15 +96,19 @@ void VModelingPoint::RefreshPointGeometry(const VPointF &point){ RefreshLine(); } -void VModelingPoint::RefreshLine(){ +void VModelingPoint::RefreshLine() +{ QRectF nameRec = namePoint->sceneBoundingRect(); QPointF p1, p2; LineIntersectCircle(QPointF(), radius, QLineF(QPointF(), nameRec.center()- scenePos()), p1, p2); QPointF pRec = LineIntersectRect(nameRec, QLineF(scenePos(), nameRec.center())); lineName->setLine(QLineF(p1, pRec - scenePos())); - if(QLineF(p1, pRec - scenePos()).length() <= toPixel(4)){ + if (QLineF(p1, pRec - scenePos()).length() <= toPixel(4)) + { lineName->setVisible(false); - } else { + } + else + { lineName->setVisible(true); } } diff --git a/tools/modelingTools/vmodelingpoint.h b/tools/modelingTools/vmodelingpoint.h index 03a8abe6c..ff5558185 100644 --- a/tools/modelingTools/vmodelingpoint.h +++ b/tools/modelingTools/vmodelingpoint.h @@ -25,7 +25,8 @@ #include "vmodelingtool.h" #include "widgets/vgraphicssimpletextitem.h" -class VModelingPoint: public VModelingTool, public QGraphicsEllipseItem{ +class VModelingPoint: public VModelingTool, public QGraphicsEllipseItem +{ Q_OBJECT public: VModelingPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0); diff --git a/tools/modelingTools/vmodelingpointofcontact.cpp b/tools/modelingTools/vmodelingpointofcontact.cpp index 11e9bd5ac..f87a094ad 100644 --- a/tools/modelingTools/vmodelingpointofcontact.cpp +++ b/tools/modelingTools/vmodelingpointofcontact.cpp @@ -26,31 +26,32 @@ const QString VModelingPointOfContact::ToolType = QStringLiteral("pointOfContact"); VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, - const QString &radius, const qint64 ¢er, - const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem *parent) + const QString &radius, const qint64 ¢er, + const qint64 &firstPointId, const qint64 &secondPointId, + Tool::Sources typeCreation, QGraphicsItem *parent) : VModelingPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId), - secondPointId(secondPointId), dialogPointOfContact(QSharedPointer()){ - - if(typeCreation == Tool::FromGui){ + secondPointId(secondPointId), dialogPointOfContact(QSharedPointer()) +{ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingPointOfContact::setDialog(){ - Q_ASSERT(!dialogPointOfContact.isNull()); - if(!dialogPointOfContact.isNull()){ - VPointF p = VAbstractTool::data.GetModelingPoint(id); - dialogPointOfContact->setRadius(radius); - dialogPointOfContact->setCenter(center, id); - dialogPointOfContact->setFirstPoint(firstPointId, id); - dialogPointOfContact->setSecondPoint(secondPointId, id); - dialogPointOfContact->setPointName(p.name()); - } +void VModelingPointOfContact::setDialog() +{ + Q_ASSERT(dialogPointOfContact.isNull() == false); + VPointF p = VAbstractTool::data.GetModelingPoint(id); + dialogPointOfContact->setRadius(radius); + dialogPointOfContact->setCenter(center, id); + dialogPointOfContact->setFirstPoint(firstPointId, id); + dialogPointOfContact->setSecondPoint(secondPointId, id); + dialogPointOfContact->setPointName(p.name()); } VModelingPointOfContact *VModelingPointOfContact::Create(QSharedPointer &dialog, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ QString radius = dialog->getRadius(); qint64 center = dialog->getCenter(); qint64 firstPointId = dialog->getFirstPoint(); @@ -66,7 +67,8 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ VModelingPointOfContact *point = 0; VPointF centerP = data->GetModelingPoint(center); VPointF firstP = data->GetModelingPoint(firstPointId); @@ -75,19 +77,25 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const Calculator cal(data); QString errorMsg; qreal result = cal.eval(radius, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { QPointF fPoint = VToolPointOfContact::FindPoint(toPixel(result), centerP.toQPointF(), firstP.toQPointF(), secondP.toQPointF()); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - } else { + } + else + { data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { point = new VModelingPointOfContact(doc, data, id, radius, center, firstPointId, secondPointId, typeCreation); doc->AddTool(id, point); @@ -99,9 +107,11 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const return point; } -void VModelingPointOfContact::FullUpdateFromFile(){ +void VModelingPointOfContact::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { radius = domElement.attribute(AttrRadius, ""); center = domElement.attribute(AttrCenter, "").toLongLong(); firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -110,10 +120,13 @@ void VModelingPointOfContact::FullUpdateFromFile(){ RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); } -void VModelingPointOfContact::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingPointOfContact::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogPointOfContact->getPointName()); domElement.setAttribute(AttrRadius, dialogPointOfContact->getRadius()); domElement.setAttribute(AttrCenter, QString().setNum(dialogPointOfContact->getCenter())); @@ -125,11 +138,13 @@ void VModelingPointOfContact::FullUpdateFromGui(int result){ dialogPointOfContact.clear(); } -void VModelingPointOfContact::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingPointOfContact::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogPointOfContact, this, event); } -void VModelingPointOfContact::AddToFile(){ +void VModelingPointOfContact::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -147,7 +162,8 @@ void VModelingPointOfContact::AddToFile(){ AddToModeling(domElement); } -void VModelingPointOfContact::RemoveReferens(){ +void VModelingPointOfContact::RemoveReferens() +{ doc->DecrementReferens(center); doc->DecrementReferens(firstPointId); doc->DecrementReferens(secondPointId); diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/tools/modelingTools/vmodelingpointofcontact.h index 6eebac9ec..64418b636 100644 --- a/tools/modelingTools/vmodelingpointofcontact.h +++ b/tools/modelingTools/vmodelingpointofcontact.h @@ -25,7 +25,8 @@ #include "vmodelingpoint.h" #include "dialogs/dialogpointofcontact.h" -class VModelingPointOfContact : public VModelingPoint{ +class VModelingPointOfContact : public VModelingPoint +{ Q_OBJECT public: VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, diff --git a/tools/modelingTools/vmodelingpointofintersection.cpp b/tools/modelingTools/vmodelingpointofintersection.cpp index e22e97c7b..15fb326fa 100644 --- a/tools/modelingTools/vmodelingpointofintersection.cpp +++ b/tools/modelingTools/vmodelingpointofintersection.cpp @@ -6,15 +6,18 @@ VModelingPointOfIntersection::VModelingPointOfIntersection(VDomDocument *doc, VC const qint64 &firstPointId, const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) :VModelingPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId), - dialogPointOfIntersection(QSharedPointer()) { + dialogPointOfIntersection(QSharedPointer()) +{ ignoreFullUpdate = true; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingPointOfIntersection::setDialog(){ - Q_ASSERT(!dialogPointOfIntersection.isNull()); +void VModelingPointOfIntersection::setDialog() +{ + Q_ASSERT(dialogPointOfIntersection.isNull() == false); VPointF p = VAbstractTool::data.GetPoint(id); dialogPointOfIntersection->setFirstPointId(firstPointId, id); dialogPointOfIntersection->setSecondPointId(secondPointId, id); @@ -22,7 +25,8 @@ void VModelingPointOfIntersection::setDialog(){ } VModelingPointOfIntersection *VModelingPointOfIntersection::Create(QSharedPointer &dialog, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ qint64 firstPointId = dialog->getFirstPointId(); qint64 secondPointId = dialog->getSecondPointId(); QString pointName = dialog->getPointName(); @@ -33,24 +37,29 @@ VModelingPointOfIntersection *VModelingPointOfIntersection::Create(const qint64 const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, - VContainer *data, - const Document::Documents &parse, - Tool::Sources typeCreation){ + VContainer *data, const Document::Documents &parse, + Tool::Sources typeCreation) +{ VModelingPointOfIntersection *tool = 0; VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); QPointF point(firstPoint.x(), secondPoint.y()); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(point.x(), point.y(), pointName, mx, my)); - } else { + } + else + { data->UpdatePoint(id, VPointF(point.x(), point.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { tool = new VModelingPointOfIntersection(doc, data, id, firstPointId, secondPointId, typeCreation); doc->AddTool(id, tool); doc->IncrementReferens(firstPointId); @@ -59,19 +68,24 @@ VModelingPointOfIntersection *VModelingPointOfIntersection::Create(const qint64 return tool; } -void VModelingPointOfIntersection::FullUpdateFromFile(){ +void VModelingPointOfIntersection::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); secondPointId = domElement.attribute(AttrSecondPoint, "").toLongLong(); } VModelingPoint::RefreshPointGeometry(VModelingTool::data.GetPoint(id)); } -void VModelingPointOfIntersection::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingPointOfIntersection::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogPointOfIntersection->getPointName()); domElement.setAttribute(AttrFirstPoint, QString().setNum(dialogPointOfIntersection->getFirstPointId())); domElement.setAttribute(AttrSecondPoint, QString().setNum(dialogPointOfIntersection->getSecondPointId())); @@ -81,16 +95,19 @@ void VModelingPointOfIntersection::FullUpdateFromGui(int result){ dialogPointOfIntersection.clear(); } -void VModelingPointOfIntersection::RemoveReferens(){ +void VModelingPointOfIntersection::RemoveReferens() +{ doc->DecrementReferens(firstPointId); doc->DecrementReferens(secondPointId); } -void VModelingPointOfIntersection::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingPointOfIntersection::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogPointOfIntersection, this, event); } -void VModelingPointOfIntersection::AddToFile(){ +void VModelingPointOfIntersection::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/tools/modelingTools/vmodelingpointofintersection.h index b2c00f4f2..1f11f0b6a 100644 --- a/tools/modelingTools/vmodelingpointofintersection.h +++ b/tools/modelingTools/vmodelingpointofintersection.h @@ -4,7 +4,8 @@ #include "vmodelingpoint.h" #include "dialogs/dialogpointofintersection.h" -class VModelingPointOfIntersection : public VModelingPoint{ +class VModelingPointOfIntersection : public VModelingPoint +{ Q_OBJECT public: VModelingPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, diff --git a/tools/modelingTools/vmodelingshoulderpoint.cpp b/tools/modelingTools/vmodelingshoulderpoint.cpp index d0f32ebfb..ac27b5392 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.cpp +++ b/tools/modelingTools/vmodelingshoulderpoint.cpp @@ -28,30 +28,31 @@ const QString VModelingShoulderPoint::ToolType = QStringLiteral("shoulder"); VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation, - QGraphicsItem * parent): - VModelingLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), - pShoulder(pShoulder), dialogShoulderPoint(QSharedPointer()){ - - if(typeCreation == Tool::FromGui){ + QGraphicsItem * parent) + :VModelingLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), + pShoulder(pShoulder), dialogShoulderPoint(QSharedPointer()) +{ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingShoulderPoint::setDialog(){ - Q_ASSERT(!dialogShoulderPoint.isNull()); - if(!dialogShoulderPoint.isNull()){ - VPointF p = VAbstractTool::data.GetModelingPoint(id); - dialogShoulderPoint->setTypeLine(typeLine); - dialogShoulderPoint->setFormula(formula); - dialogShoulderPoint->setP1Line(basePointId, id); - dialogShoulderPoint->setP2Line(p2Line, id); - dialogShoulderPoint->setPShoulder(pShoulder, id); - dialogShoulderPoint->setPointName(p.name()); - } +void VModelingShoulderPoint::setDialog() +{ + Q_ASSERT(dialogShoulderPoint.isNull() == false); + VPointF p = VAbstractTool::data.GetModelingPoint(id); + dialogShoulderPoint->setTypeLine(typeLine); + dialogShoulderPoint->setFormula(formula); + dialogShoulderPoint->setP1Line(basePointId, id); + dialogShoulderPoint->setP2Line(p2Line, id); + dialogShoulderPoint->setPShoulder(pShoulder, id); + dialogShoulderPoint->setPointName(p.name()); } VModelingShoulderPoint *VModelingShoulderPoint::Create(QSharedPointer &dialog, - VDomDocument *doc, VContainer *data){ + VDomDocument *doc, VContainer *data) +{ QString formula = dialog->getFormula(); qint64 p1Line = dialog->getP1Line(); qint64 p2Line = dialog->getP2Line(); @@ -68,7 +69,8 @@ VModelingShoulderPoint *VModelingShoulderPoint::Create(const qint64 _id, const Q const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - const Tool::Sources &typeCreation){ + const Tool::Sources &typeCreation) +{ VModelingShoulderPoint *point = 0; VPointF firstPoint = data->GetModelingPoint(p1Line); VPointF secondPoint = data->GetModelingPoint(p2Line); @@ -77,21 +79,27 @@ VModelingShoulderPoint *VModelingShoulderPoint::Create(const qint64 _id, const Q Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); - if(errorMsg.isEmpty()){ + if (errorMsg.isEmpty()) + { QPointF fPoint = VToolShoulderPoint::FindPoint(firstPoint.toQPointF(), secondPoint.toQPointF(), shoulderPoint.toQPointF(), toPixel(result)); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - } else { - data->UpdateModelingPoint(id,VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + } + else + { + data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } data->AddLine(p1Line, id, Draw::Modeling); data->AddLine(p2Line, id, Draw::Modeling); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { point = new VModelingShoulderPoint(doc, data, id, typeLine, formula, p1Line, p2Line, pShoulder, typeCreation); doc->AddTool(id, point); @@ -103,9 +111,11 @@ VModelingShoulderPoint *VModelingShoulderPoint::Create(const qint64 _id, const Q return point; } -void VModelingShoulderPoint::FullUpdateFromFile(){ +void VModelingShoulderPoint::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { typeLine = domElement.attribute(AttrTypeLine, ""); formula = domElement.attribute(AttrLength, ""); basePointId = domElement.attribute(AttrP1Line, "").toLongLong(); @@ -115,10 +125,13 @@ void VModelingShoulderPoint::FullUpdateFromFile(){ RefreshGeometry(); } -void VModelingShoulderPoint::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingShoulderPoint::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogShoulderPoint->getPointName()); domElement.setAttribute(AttrTypeLine, dialogShoulderPoint->getTypeLine()); domElement.setAttribute(AttrLength, dialogShoulderPoint->getFormula()); @@ -131,11 +144,13 @@ void VModelingShoulderPoint::FullUpdateFromGui(int result){ dialogShoulderPoint.clear(); } -void VModelingShoulderPoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingShoulderPoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogShoulderPoint, this, event); } -void VModelingShoulderPoint::AddToFile(){ +void VModelingShoulderPoint::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); @@ -154,7 +169,8 @@ void VModelingShoulderPoint::AddToFile(){ AddToModeling(domElement); } -void VModelingShoulderPoint::RemoveReferens(){ +void VModelingShoulderPoint::RemoveReferens() +{ doc->DecrementReferens(p2Line); doc->DecrementReferens(pShoulder); VModelingLinePoint::RemoveReferens(); diff --git a/tools/modelingTools/vmodelingshoulderpoint.h b/tools/modelingTools/vmodelingshoulderpoint.h index a9cee71cd..e1d86995e 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.h +++ b/tools/modelingTools/vmodelingshoulderpoint.h @@ -25,7 +25,8 @@ #include "vmodelinglinepoint.h" #include "dialogs/dialogshoulderpoint.h" -class VModelingShoulderPoint : public VModelingLinePoint{ +class VModelingShoulderPoint : public VModelingLinePoint +{ Q_OBJECT public: VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index 4cd48e3c8..7d3a39e69 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -26,8 +26,10 @@ const QString VModelingSpline::TagName = QStringLiteral("spline"); const QString VModelingSpline::ToolType = QStringLiteral("simple"); VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, - QGraphicsItem *parent):VModelingTool(doc, data, id), QGraphicsPathItem(parent), - dialogSpline(QSharedPointer()), controlPoints(QVector()){ + QGraphicsItem *parent) + :VModelingTool(doc, data, id), QGraphicsPathItem(parent), + dialogSpline(QSharedPointer()), controlPoints(QVector()) +{ ignoreFullUpdate = true; VSpline spl = data->GetModelingSpline(id); QPainterPath path; @@ -54,27 +56,27 @@ VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id, connect(this, &VModelingSpline::setEnabledPoint, controlPoint2, &VControlPointSpline::setEnabledPoint); controlPoints.append(controlPoint2); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingSpline::setDialog(){ - Q_ASSERT(!dialogSpline.isNull()); - if(!dialogSpline.isNull()){ - VSpline spl = VAbstractTool::data.GetModelingSpline(id); - dialogSpline->setP1(spl.GetP1()); - dialogSpline->setP4(spl.GetP4()); - dialogSpline->setAngle1(spl.GetAngle1()); - dialogSpline->setAngle2(spl.GetAngle2()); - dialogSpline->setKAsm1(spl.GetKasm1()); - dialogSpline->setKAsm2(spl.GetKasm2()); - dialogSpline->setKCurve(spl.GetKcurve()); - } +void VModelingSpline::setDialog() +{ + Q_ASSERT(dialogSpline.isNull() == false); + VSpline spl = VAbstractTool::data.GetModelingSpline(id); + dialogSpline->setP1(spl.GetP1()); + dialogSpline->setP4(spl.GetP4()); + dialogSpline->setAngle1(spl.GetAngle1()); + dialogSpline->setAngle2(spl.GetAngle2()); + dialogSpline->setKAsm1(spl.GetKasm1()); + dialogSpline->setKAsm2(spl.GetKasm2()); + dialogSpline->setKCurve(spl.GetKcurve()); } -VModelingSpline *VModelingSpline::Create(QSharedPointer &dialog, VDomDocument *doc, - VContainer *data){ +VModelingSpline *VModelingSpline::Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data) +{ qint64 p1 = dialog->getP1(); qint64 p4 = dialog->getP4(); qreal kAsm1 = dialog->getKAsm1(); @@ -89,20 +91,26 @@ VModelingSpline *VModelingSpline::Create(QSharedPointer &dialog, V VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){ + VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) +{ VModelingSpline *spl = 0; VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingSpline(spline); - } else { + } + else + { data->UpdateModelingSpline(id, spline); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } data->AddLengthSpline(data->GetNameSpline(p1, p4, Draw::Modeling), toMM(spline.GetLength())); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { spl = new VModelingSpline(doc, data, id, typeCreation); doc->AddTool(id, spl); doc->IncrementReferens(p1); @@ -111,12 +119,15 @@ VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, con return spl; } -void VModelingSpline::FullUpdateFromFile(){ +void VModelingSpline::FullUpdateFromFile() +{ RefreshGeometry(); } -void VModelingSpline::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingSpline::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { VSpline spl = VSpline (VAbstractTool::data.DataModelingPoints(), dialogSpline->getP1(), dialogSpline->getP4(), dialogSpline->getAngle1(), dialogSpline->getAngle2(), dialogSpline->getKAsm1(), dialogSpline->getKAsm2(), dialogSpline->getKCurve()); @@ -136,7 +147,8 @@ void VModelingSpline::FullUpdateFromGui(int result){ controlPoints[0]->pos(), controlPoints[1]->pos(), dialogSpline->getP4(), dialogSpline->getKCurve()); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrPoint1, QString().setNum(spl.GetP1())); domElement.setAttribute(AttrPoint4, QString().setNum(spl.GetP4())); domElement.setAttribute(AttrAngle1, QString().setNum(spl.GetAngle1())); @@ -151,16 +163,21 @@ void VModelingSpline::FullUpdateFromGui(int result){ } void VModelingSpline::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos){ + const QPointF pos) +{ Q_UNUSED(indexSpline); VSpline spl = VAbstractTool::data.GetModelingSpline(id); - if(position == SplinePoint::FirstPoint){ + if (position == SplinePoint::FirstPoint) + { spl.ModifiSpl (spl.GetP1(), pos, spl.GetP3(), spl.GetP4(), spl.GetKcurve()); - } else { + } + else + { spl.ModifiSpl (spl.GetP1(), spl.GetP2(), pos, spl.GetP4(), spl.GetKcurve()); } QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrAngle1, QString().setNum(spl.GetAngle1())); domElement.setAttribute(AttrAngle2, QString().setNum(spl.GetAngle2())); domElement.setAttribute(AttrKAsm1, QString().setNum(spl.GetKasm1())); @@ -170,11 +187,13 @@ void VModelingSpline::ControlPointChangePosition(const qint32 &indexSpline, Spli } } -void VModelingSpline::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingSpline::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogSpline, this, event); } -void VModelingSpline::AddToFile(){ +void VModelingSpline::AddToFile() +{ VSpline spl = VAbstractTool::data.GetModelingSpline(id); QDomElement domElement = doc->createElement(TagName); @@ -191,30 +210,36 @@ void VModelingSpline::AddToFile(){ AddToModeling(domElement); } -void VModelingSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VModelingSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Spline); } QGraphicsItem::mouseReleaseEvent(event); } -void VModelingSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VModelingSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VModelingSpline::RemoveReferens(){ +void VModelingSpline::RemoveReferens() +{ VSpline spl = VAbstractTool::data.GetModelingSpline(id); doc->DecrementReferens(spl.GetP1()); doc->DecrementReferens(spl.GetP4()); } -void VModelingSpline::RefreshGeometry(){ +void VModelingSpline::RefreshGeometry() +{ VSpline spl = VAbstractTool::data.GetModelingSpline(id); QPainterPath path; path.addPath(spl.GetPath()); diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index b4417fb66..66d1bbd1c 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -28,7 +28,8 @@ #include "widgets/vcontrolpointspline.h" #include "geometry/vsplinepath.h" -class VModelingSpline:public VModelingTool, public QGraphicsPathItem{ +class VModelingSpline:public VModelingTool, public QGraphicsPathItem +{ Q_OBJECT public: VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/tools/modelingTools/vmodelingsplinepath.cpp index 04e1d5c01..3022c060c 100644 --- a/tools/modelingTools/vmodelingsplinepath.cpp +++ b/tools/modelingTools/vmodelingsplinepath.cpp @@ -24,11 +24,11 @@ const QString VModelingSplinePath::TagName = QStringLiteral("spline"); const QString VModelingSplinePath::ToolType = QStringLiteral("path"); -VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, - Tool::Sources typeCreation, - QGraphicsItem *parent):VModelingTool(doc, data, id), - QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer()), - controlPoints(QVector()){ +VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + QGraphicsItem *parent) + :VModelingTool(doc, data, id), QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer()), + controlPoints(QVector()) +{ ignoreFullUpdate = true; VSplinePath splPath = data->GetModelingSplinePath(id); QPainterPath path; @@ -39,7 +39,8 @@ VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qi this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - for(qint32 i = 1; i<=splPath.Count(); ++i){ + for (qint32 i = 1; i<=splPath.Count(); ++i) + { VSpline spl = splPath.GetSpline(i); VControlPointSpline *controlPoint = new VControlPointSpline(i, SplinePoint::FirstPoint, spl.GetP2(), spl.GetPointP1().toQPointF(), this); @@ -57,57 +58,69 @@ VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qi connect(this, &VModelingSplinePath::setEnabledPoint, controlPoint, &VControlPointSpline::setEnabledPoint); controlPoints.append(controlPoint); } - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingSplinePath::setDialog(){ - Q_ASSERT(!dialogSplinePath.isNull()); - if(!dialogSplinePath.isNull()){ - VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); - dialogSplinePath->SetPath(splPath); - } +void VModelingSplinePath::setDialog() +{ + Q_ASSERT(dialogSplinePath.isNull() == false); + VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); + dialogSplinePath->SetPath(splPath); } -VModelingSplinePath *VModelingSplinePath::Create(QSharedPointer &dialog, - VDomDocument *doc, VContainer *data){ +VModelingSplinePath *VModelingSplinePath::Create(QSharedPointer &dialog, VDomDocument *doc, + VContainer *data) +{ VSplinePath path = dialog->GetPath(); - for(qint32 i = 0; i < path.CountPoint(); ++i){ + for (qint32 i = 0; i < path.CountPoint(); ++i) + { doc->IncrementReferens(path[i].P()); } return Create(0, path, doc, data, Document::FullParse, Tool::FromGui); } -VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplinePath &path, - VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ +VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc, + VContainer *data, const Document::Documents &parse, + Tool::Sources typeCreation) +{ VModelingSplinePath *spl = 0; qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddModelingSplinePath(path); - } else { + } + else + { data->UpdateModelingSplinePath(id, path); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } data->AddLengthSpline(data->GetNameSplinePath(path), toMM(path.GetLength())); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { spl = new VModelingSplinePath(doc, data, id, typeCreation); doc->AddTool(id, spl); } return spl; } -void VModelingSplinePath::FullUpdateFromFile(){ +void VModelingSplinePath::FullUpdateFromFile() +{ RefreshGeometry(); } -void VModelingSplinePath::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingSplinePath::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { VSplinePath splPath = dialogSplinePath->GetPath(); - for(qint32 i = 1; i<=splPath.Count(); ++i){ + for (qint32 i = 1; i<=splPath.Count(); ++i) + { VSpline spl = splPath.GetSpline(i); qint32 j = i*2; disconnect(controlPoints[j-2], &VControlPointSpline::ControlPointChangePosition, this, @@ -127,7 +140,8 @@ void VModelingSplinePath::FullUpdateFromGui(int result){ CorectControlPoints(spl, splPath, i); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrKCurve, QString().setNum(splPath.getKCurve())); UpdatePathPoint(domElement, splPath); emit FullUpdateTree(); @@ -139,26 +153,31 @@ void VModelingSplinePath::FullUpdateFromGui(int result){ } void VModelingSplinePath::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos){ + const QPointF pos) +{ VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); VSpline spl = splPath.GetSpline(indexSpline); - if(position == SplinePoint::FirstPoint){ + if (position == SplinePoint::FirstPoint) + { spl.ModifiSpl (spl.GetP1(), pos, spl.GetP3(), spl.GetP4(), spl.GetKcurve()); - } else { + } + else + { spl.ModifiSpl (spl.GetP1(), spl.GetP2(), pos, spl.GetP4(), spl.GetKcurve()); } CorectControlPoints(spl, splPath, indexSpline); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrKCurve, QString().setNum(splPath.getKCurve())); UpdatePathPoint(domElement, splPath); emit FullUpdateTree(); } } -void VModelingSplinePath::CorectControlPoints(const VSpline &spl, VSplinePath &splPath, - const qint32 &indexSpline){ +void VModelingSplinePath::CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline) +{ VSplinePoint p = splPath.GetSplinePoint(indexSpline, SplinePoint::FirstPoint); p.SetAngle(spl.GetAngle1()); p.SetKAsm2(spl.GetKasm1()); @@ -170,12 +189,15 @@ void VModelingSplinePath::CorectControlPoints(const VSpline &spl, VSplinePath &s splPath.UpdatePoint(indexSpline, SplinePoint::LastPoint, p); } -void VModelingSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path){ +void VModelingSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path) +{ QDomNodeList nodeList = node.childNodes(); qint32 num = nodeList.size(); - for(qint32 i = 0; i < num; ++i){ + for (qint32 i = 0; i < num; ++i) + { QDomElement domElement = nodeList.at(i).toElement(); - if(!domElement.isNull()){ + if (domElement.isNull() == false) + { VSplinePoint p = path[i]; domElement.setAttribute(AttrPSpline, QString().setNum(p.P())); domElement.setAttribute(AttrKAsm1, QString().setNum(p.KAsm1())); @@ -185,11 +207,13 @@ void VModelingSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path){ } } -void VModelingSplinePath::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingSplinePath::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogSplinePath, this, event); } -void VModelingSplinePath::AddToFile(){ +void VModelingSplinePath::AddToFile() +{ VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); QDomElement domElement = doc->createElement(TagName); @@ -197,14 +221,16 @@ void VModelingSplinePath::AddToFile(){ AddAttribute(domElement, AttrType, ToolType); AddAttribute(domElement, AttrKCurve, splPath.getKCurve()); - for(qint32 i = 0; i < splPath.CountPoint(); ++i){ + for (qint32 i = 0; i < splPath.CountPoint(); ++i) + { AddPathPoint(domElement, splPath[i]); } AddToModeling(domElement); } -void VModelingSplinePath::AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint){ +void VModelingSplinePath::AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint) +{ QDomElement pathPoint = doc->createElement(AttrPathPoint); AddAttribute(pathPoint, AttrPSpline, splPoint.P()); @@ -215,37 +241,45 @@ void VModelingSplinePath::AddPathPoint(QDomElement &domElement, const VSplinePoi domElement.appendChild(pathPoint); } -void VModelingSplinePath::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VModelingSplinePath::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::SplinePath); } QGraphicsItem::mouseReleaseEvent(event); } -void VModelingSplinePath::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingSplinePath::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VModelingSplinePath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VModelingSplinePath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VModelingSplinePath::RemoveReferens(){ +void VModelingSplinePath::RemoveReferens() +{ VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); - for(qint32 i = 0; i < splPath.Count(); ++i){ + for (qint32 i = 0; i < splPath.Count(); ++i) + { doc->DecrementReferens(splPath[i].P()); } } -void VModelingSplinePath::RefreshGeometry(){ +void VModelingSplinePath::RefreshGeometry() +{ VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); QPainterPath path; path.addPath(splPath.GetPath()); path.setFillRule( Qt::WindingFill ); this->setPath(path); - for(qint32 i = 1; i<=splPath.Count(); ++i){ + for (qint32 i = 1; i<=splPath.Count(); ++i) + { VSpline spl = splPath.GetSpline(i); QPointF splinePoint = spl.GetPointP1().toQPointF(); QPointF controlPoint = spl.GetP2(); @@ -266,5 +300,4 @@ void VModelingSplinePath::RefreshGeometry(){ connect(controlPoints[j-1], &VControlPointSpline::ControlPointChangePosition, this, &VModelingSplinePath::ControlPointChangePosition); } - } diff --git a/tools/modelingTools/vmodelingsplinepath.h b/tools/modelingTools/vmodelingsplinepath.h index 19f44235f..4071c1c70 100644 --- a/tools/modelingTools/vmodelingsplinepath.h +++ b/tools/modelingTools/vmodelingsplinepath.h @@ -27,7 +27,8 @@ #include "dialogs/dialogsplinepath.h" #include "widgets/vcontrolpointspline.h" -class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem{ +class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem +{ Q_OBJECT public: VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, diff --git a/tools/modelingTools/vmodelingtool.cpp b/tools/modelingTools/vmodelingtool.cpp index fd38f2088..cc0d58cb9 100644 --- a/tools/modelingTools/vmodelingtool.cpp +++ b/tools/modelingTools/vmodelingtool.cpp @@ -22,32 +22,42 @@ #include "vmodelingtool.h" #include -VModelingTool::VModelingTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent): -VAbstractTool(doc, data, id, parent), ignoreContextMenuEvent(false), ignoreFullUpdate(false) { +VModelingTool::VModelingTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent) + :VAbstractTool(doc, data, id, parent), ignoreContextMenuEvent(false), ignoreFullUpdate(false) +{ _referens = 0; } -void VModelingTool::AddToModeling(const QDomElement &domElement){ +void VModelingTool::AddToModeling(const QDomElement &domElement) +{ QDomElement modelingElement; bool ok = doc->GetActivModelingElement(modelingElement); - if(ok){ + if (ok) + { modelingElement.appendChild(domElement); - } else { + } + else + { qCritical()<<"Can't find tag Modeling"<< Q_FUNC_INFO; } emit toolhaveChange(); } -void VModelingTool::decrementReferens(){ - if(_referens > 0){ +void VModelingTool::decrementReferens() +{ + if (_referens > 0) + { --_referens; } - if(_referens <= 0){ + if (_referens <= 0) + { RemoveReferens(); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { QDomNode element = domElement.parentNode(); - if(!element.isNull()){ + if (element.isNull() == false) + { element.removeChild(domElement); } } diff --git a/tools/modelingTools/vmodelingtool.h b/tools/modelingTools/vmodelingtool.h index 014ff996d..e40edaacd 100644 --- a/tools/modelingTools/vmodelingtool.h +++ b/tools/modelingTools/vmodelingtool.h @@ -25,7 +25,8 @@ #include "../vabstracttool.h" #include -class VModelingTool: public VAbstractTool{ +class VModelingTool: public VAbstractTool +{ Q_OBJECT public: VModelingTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); @@ -41,27 +42,35 @@ protected: virtual void decrementReferens(); template void ContextMenu(QSharedPointer &dialog, Tool *tool, QGraphicsSceneContextMenuEvent *event, - bool showRemove = true){ - if(!ignoreContextMenuEvent){ + bool showRemove = true) + { + if (ignoreContextMenuEvent == false) + { QMenu menu; QAction *actionOption = menu.addAction(tr("Option")); QAction *actionRemove = 0; - if(showRemove){ + if (showRemove) + { actionRemove = menu.addAction(tr("Delete")); - if(_referens > 1){ + if (_referens > 1) + { actionRemove->setEnabled(false); - } else { + } + else + { actionRemove->setEnabled(true); } } QAction *selectedAction = menu.exec(event->screenPos()); - if(selectedAction == actionOption){ + if (selectedAction == actionOption) + { dialog = QSharedPointer(new Dialog(getData())); connect(qobject_cast< VMainGraphicsScene * >(tool->scene()), &VMainGraphicsScene::ChoosedObject, dialog.data(), &Dialog::ChoosedObject); connect(dialog.data(), &Dialog::DialogClosed, tool, &Tool::FullUpdateFromGui); - if(!ignoreFullUpdate){ + if (ignoreFullUpdate == false) + { connect(doc, &VDomDocument::FullUpdateFromFile, dialog.data(), &Dialog::UpdateList); } @@ -69,16 +78,20 @@ protected: dialog->show(); } - if(showRemove){ - if(selectedAction == actionRemove){ + if (showRemove) + { + if (selectedAction == actionRemove) + { //deincrement referens RemoveReferens(); //remove form xml file QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { QDomElement element; bool ok = doc->GetActivCalculationElement(element); - if(ok){ + if (ok) + { element.removeChild(domElement); //update xml file emit FullUpdateTree(); diff --git a/tools/modelingTools/vmodelingtriangle.cpp b/tools/modelingTools/vmodelingtriangle.cpp index 2e068ab85..d22de1f75 100644 --- a/tools/modelingTools/vmodelingtriangle.cpp +++ b/tools/modelingTools/vmodelingtriangle.cpp @@ -28,14 +28,17 @@ VModelingTriangle::VModelingTriangle(VDomDocument *doc, VContainer *data, const const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) :VModelingPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId), - secondPointId(secondPointId), dialogTriangle(QSharedPointer()) { - if(typeCreation == Tool::FromGui){ + secondPointId(secondPointId), dialogTriangle(QSharedPointer()) +{ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VModelingTriangle::setDialog(){ - Q_ASSERT(!dialogTriangle.isNull()); +void VModelingTriangle::setDialog() +{ + Q_ASSERT(dialogTriangle.isNull() == false); VPointF p = VAbstractTool::data.GetPoint(id); dialogTriangle->setAxisP1Id(axisP1Id, id); dialogTriangle->setAxisP2Id(axisP2Id, id); @@ -45,7 +48,8 @@ void VModelingTriangle::setDialog(){ } VModelingTriangle *VModelingTriangle::Create(QSharedPointer &dialog, VDomDocument *doc, - VContainer *data){ + VContainer *data) +{ qint64 axisP1Id = dialog->getAxisP1Id(); qint64 axisP2Id = dialog->getAxisP2Id(); qint64 firstPointId = dialog->getFirstPointId(); @@ -59,7 +63,8 @@ VModelingTriangle *VModelingTriangle::Create(const qint64 _id, const QString &po const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ VModelingTriangle *tool = 0; VPointF axisP1 = data->GetPoint(axisP1Id); VPointF axisP2 = data->GetPoint(axisP2Id); @@ -69,15 +74,20 @@ VModelingTriangle *VModelingTriangle::Create(const qint64 _id, const QString &po QPointF point = VToolTriangle::FindPoint(axisP1.toQPointF(), axisP2.toQPointF(), firstPoint.toQPointF(), secondPoint.toQPointF()); qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddPoint(VPointF(point.x(), point.y(), pointName, mx, my)); - } else { + } + else + { data->UpdatePoint(id, VPointF(point.x(), point.y(), pointName, mx, my)); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { tool = new VModelingTriangle(doc, data, id, axisP1Id, axisP2Id, firstPointId, secondPointId, typeCreation); doc->AddTool(id, tool); doc->IncrementReferens(axisP1Id); @@ -88,9 +98,11 @@ VModelingTriangle *VModelingTriangle::Create(const qint64 _id, const QString &po return tool; } -void VModelingTriangle::FullUpdateFromFile(){ +void VModelingTriangle::FullUpdateFromFile() +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { axisP1Id = domElement.attribute(AttrAxisP1, "").toLongLong(); axisP2Id = domElement.attribute(AttrAxisP2, "").toLongLong(); firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); @@ -99,10 +111,13 @@ void VModelingTriangle::FullUpdateFromFile(){ VModelingPoint::RefreshPointGeometry(VModelingTool::data.GetPoint(id)); } -void VModelingTriangle::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VModelingTriangle::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrName, dialogTriangle->getPointName()); domElement.setAttribute(AttrAxisP1, QString().setNum(dialogTriangle->getAxisP1Id())); domElement.setAttribute(AttrAxisP2, QString().setNum(dialogTriangle->getAxisP2Id())); @@ -115,18 +130,21 @@ void VModelingTriangle::FullUpdateFromGui(int result){ dialogTriangle.clear(); } -void VModelingTriangle::RemoveReferens(){ +void VModelingTriangle::RemoveReferens() +{ doc->DecrementReferens(axisP1Id); doc->DecrementReferens(axisP2Id); doc->DecrementReferens(firstPointId); doc->DecrementReferens(secondPointId); } -void VModelingTriangle::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VModelingTriangle::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ ContextMenu(dialogTriangle, this, event); } -void VModelingTriangle::AddToFile(){ +void VModelingTriangle::AddToFile() +{ VPointF point = VAbstractTool::data.GetPoint(id); QDomElement domElement = doc->createElement(TagName); diff --git a/tools/modelingTools/vmodelingtriangle.h b/tools/modelingTools/vmodelingtriangle.h index 069544bd7..cc1007291 100644 --- a/tools/modelingTools/vmodelingtriangle.h +++ b/tools/modelingTools/vmodelingtriangle.h @@ -26,7 +26,8 @@ #include "../drawTools/vtooltriangle.h" #include "dialogs/dialogtriangle.h" -class VModelingTriangle : public VModelingPoint{ +class VModelingTriangle : public VModelingPoint +{ Q_OBJECT public: VModelingTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, diff --git a/tools/nodeDetails/vabstractnode.cpp b/tools/nodeDetails/vabstractnode.cpp index 2e671ea9d..ab9c6473f 100644 --- a/tools/nodeDetails/vabstractnode.cpp +++ b/tools/nodeDetails/vabstractnode.cpp @@ -28,32 +28,42 @@ const QString VAbstractNode::TypeObjectCalculation = QStringLiteral("Calculation const QString VAbstractNode::TypeObjectModeling = QStringLiteral("Modeling"); VAbstractNode::VAbstractNode(VDomDocument *doc, VContainer *data, qint64 id, qint64 idNode, Draw::Draws typeobject, - QObject *parent) : VAbstractTool(doc, data, id, parent), idNode(idNode), - typeobject(typeobject){ + QObject *parent) + : VAbstractTool(doc, data, id, parent), idNode(idNode), typeobject(typeobject) +{ _referens = 0; } -void VAbstractNode::AddToModeling(const QDomElement &domElement){ +void VAbstractNode::AddToModeling(const QDomElement &domElement) +{ QDomElement modelingElement; bool ok = doc->GetActivModelingElement(modelingElement); - if(ok){ + if (ok) + { modelingElement.appendChild(domElement); - } else { + } + else + { qCritical()< 0){ +void VAbstractNode::decrementReferens() +{ + if (_referens > 0) + { --_referens; } - if(_referens <= 0){ + if (_referens <= 0) + { doc->DecrementReferens(idNode); QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { QDomNode element = domElement.parentNode(); - if(!element.isNull()){ + if (element.isNull() == false) + { element.removeChild(domElement); } } diff --git a/tools/nodeDetails/vabstractnode.h b/tools/nodeDetails/vabstractnode.h index 5a931f103..a7553b878 100644 --- a/tools/nodeDetails/vabstractnode.h +++ b/tools/nodeDetails/vabstractnode.h @@ -24,7 +24,8 @@ #include "../vabstracttool.h" -class VAbstractNode : public VAbstractTool{ +class VAbstractNode : public VAbstractTool +{ Q_OBJECT public: VAbstractNode(VDomDocument *doc, VContainer *data, qint64 id, qint64 idNode, diff --git a/tools/nodeDetails/vnodearc.cpp b/tools/nodeDetails/vnodearc.cpp index 1e4d3c5c1..7f8a1cdef 100644 --- a/tools/nodeDetails/vnodearc.cpp +++ b/tools/nodeDetails/vnodearc.cpp @@ -25,67 +25,83 @@ const QString VNodeArc::TagName = QStringLiteral("arc"); const QString VNodeArc::ToolType = QStringLiteral("modeling"); VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, - Tool::Sources typeCreation, QGraphicsItem * parent) : - VAbstractNode(doc, data, id, idArc, typeobject), QGraphicsPathItem(parent){ + Tool::Sources typeCreation, QGraphicsItem * parent) + :VAbstractNode(doc, data, id, idArc, typeobject), QGraphicsPathItem(parent) +{ RefreshGeometry(); this->setPen(QPen(baseColor, widthHairLine)); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VNodeArc::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, - Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation){ - if(parse == Document::FullParse){ +void VNodeArc::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, + const Document::Documents &parse, Tool::Sources typeCreation) +{ + if (parse == Document::FullParse) + { VNodeArc *arc = new VNodeArc(doc, data, id, idArc, typeobject, typeCreation); Q_ASSERT(arc != 0); doc->AddTool(id, arc); doc->IncrementReferens(idArc); - } else { + } + else + { doc->UpdateToolData(id, data); } } -void VNodeArc::FullUpdateFromFile(){ +void VNodeArc::FullUpdateFromFile() +{ RefreshGeometry(); } -void VNodeArc::AddToFile(){ +void VNodeArc::AddToFile() +{ QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); AddAttribute(domElement, AttrType, ToolType); AddAttribute(domElement, AttrIdObject, idNode); - if(typeobject == Draw::Calculation){ + if (typeobject == Draw::Calculation) + { AddAttribute(domElement, AttrTypeObject, TypeObjectCalculation); - } else { + } + else + { AddAttribute(domElement, AttrTypeObject, ToolType ); } AddToModeling(domElement); } -void VNodeArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VNodeArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Arc); } QGraphicsItem::mouseReleaseEvent(event); } -void VNodeArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VNodeArc::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VNodeArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VNodeArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VNodeArc::RefreshGeometry(){ +void VNodeArc::RefreshGeometry() +{ VArc arc = VAbstractTool::data.GetModelingArc(id); QPainterPath path; path.addPath(arc.GetPath()); diff --git a/tools/nodeDetails/vnodearc.h b/tools/nodeDetails/vnodearc.h index e206e2c6a..9b07ffba9 100644 --- a/tools/nodeDetails/vnodearc.h +++ b/tools/nodeDetails/vnodearc.h @@ -25,7 +25,8 @@ #include "vabstractnode.h" #include -class VNodeArc :public VAbstractNode, public QGraphicsPathItem{ +class VNodeArc :public VAbstractNode, public QGraphicsPathItem +{ Q_OBJECT public: VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, diff --git a/tools/nodeDetails/vnodepoint.cpp b/tools/nodeDetails/vnodepoint.cpp index c5b1056f8..a42370749 100644 --- a/tools/nodeDetails/vnodepoint.cpp +++ b/tools/nodeDetails/vnodepoint.cpp @@ -24,10 +24,11 @@ const QString VNodePoint::TagName = QStringLiteral("point"); const QString VNodePoint::ToolType = QStringLiteral("modeling"); -VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, - Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem *parent) - :VAbstractNode(doc, data, id, idPoint, typeobject), QGraphicsEllipseItem(parent), - radius(toPixel(1.5)), namePoint(0), lineName(0){ +VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, + Tool::Sources typeCreation, QGraphicsItem *parent) + :VAbstractNode(doc, data, id, idPoint, typeobject), QGraphicsEllipseItem(parent), radius(toPixel(1.5)), + namePoint(0), lineName(0) +{ namePoint = new VGraphicsSimpleTextItem(this); lineName = new QGraphicsLineItem(this); connect(namePoint, &VGraphicsSimpleTextItem::NameChangePosition, this, @@ -37,37 +38,47 @@ VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 id this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, - Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation){ - if(parse == Document::FullParse){ +void VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, + const Document::Documents &parse, Tool::Sources typeCreation) +{ + if (parse == Document::FullParse) + { VNodePoint *point = new VNodePoint(doc, data, id, idPoint, typeobject, typeCreation); Q_ASSERT(point != 0); doc->AddTool(id, point); doc->IncrementReferens(idPoint); - } else { + } + else + { doc->UpdateToolData(id, data); } } -void VNodePoint::FullUpdateFromFile(){ +void VNodePoint::FullUpdateFromFile() +{ RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); } -void VNodePoint::AddToFile(){ +void VNodePoint::AddToFile() +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); AddAttribute(domElement, AttrType, ToolType); AddAttribute(domElement, AttrIdObject, idNode); - if(typeobject == Draw::Calculation){ + if (typeobject == Draw::Calculation) + { AddAttribute(domElement, AttrTypeObject, TypeObjectCalculation); - } else { + } + else + { AddAttribute(domElement, AttrTypeObject, TypeObjectModeling); } AddAttribute(domElement, AttrMx, toMM(point.mx())); @@ -76,25 +87,30 @@ void VNodePoint::AddToFile(){ AddToModeling(domElement); } -void VNodePoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VNodePoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Point); } QGraphicsItem::mouseReleaseEvent(event); } -void VNodePoint::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VNodePoint::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VNodePoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VNodePoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VNodePoint::NameChangePosition(const QPointF pos){ +void VNodePoint::NameChangePosition(const QPointF pos) +{ VPointF point = VAbstractTool::data.GetModelingPoint(id); QPointF p = pos - this->pos(); point.setMx(p.x()); @@ -104,16 +120,19 @@ void VNodePoint::NameChangePosition(const QPointF pos){ VAbstractTool::data.UpdatePoint(id, point); } -void VNodePoint::UpdateNamePosition(qreal mx, qreal my){ +void VNodePoint::UpdateNamePosition(qreal mx, qreal my) +{ QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrMx, QString().setNum(toMM(mx))); domElement.setAttribute(AttrMy, QString().setNum(toMM(my))); emit toolhaveChange(); } } -void VNodePoint::RefreshPointGeometry(const VPointF &point){ +void VNodePoint::RefreshPointGeometry(const VPointF &point) +{ QRectF rec = QRectF(0, 0, radius*2, radius*2); rec.translate(-rec.center().x(), -rec.center().y()); this->setRect(rec); @@ -128,15 +147,19 @@ void VNodePoint::RefreshPointGeometry(const VPointF &point){ RefreshLine(); } -void VNodePoint::RefreshLine(){ +void VNodePoint::RefreshLine() +{ QRectF nameRec = namePoint->sceneBoundingRect(); QPointF p1, p2; LineIntersectCircle(QPointF(), radius, QLineF(QPointF(), nameRec.center()- scenePos()), p1, p2); QPointF pRec = LineIntersectRect(nameRec, QLineF(scenePos(), nameRec.center())); lineName->setLine(QLineF(p1, pRec - scenePos())); - if(QLineF(p1, pRec - scenePos()).length() <= toPixel(4)){ + if (QLineF(p1, pRec - scenePos()).length() <= toPixel(4)) + { lineName->setVisible(false); - } else { + } + else + { lineName->setVisible(true); } } diff --git a/tools/nodeDetails/vnodepoint.h b/tools/nodeDetails/vnodepoint.h index e1a6d75e0..e90393e7d 100644 --- a/tools/nodeDetails/vnodepoint.h +++ b/tools/nodeDetails/vnodepoint.h @@ -25,7 +25,8 @@ #include "vabstractnode.h" #include "widgets/vgraphicssimpletextitem.h" -class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem{ +class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem +{ Q_OBJECT public: VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, diff --git a/tools/nodeDetails/vnodespline.cpp b/tools/nodeDetails/vnodespline.cpp index cf6092c73..b315878ae 100644 --- a/tools/nodeDetails/vnodespline.cpp +++ b/tools/nodeDetails/vnodespline.cpp @@ -24,70 +24,86 @@ const QString VNodeSpline::TagName = QStringLiteral("spline"); const QString VNodeSpline::ToolType = QStringLiteral("modelingSpline"); -VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem * parent) : - VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){ +VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, + Tool::Sources typeCreation, QGraphicsItem * parent) + :VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent) +{ RefreshGeometry(); this->setPen(QPen(baseColor, widthHairLine)); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } VNodeSpline *VNodeSpline::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, const Document::Documents &parse, - Tool::Sources typeCreation){ + Tool::Sources typeCreation) +{ VNodeSpline *spl = 0; - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { spl = new VNodeSpline(doc, data, id, idSpline, typeobject, typeCreation); doc->AddTool(id, spl); doc->IncrementReferens(idSpline); - } else { + } + else + { doc->UpdateToolData(id, data); } return spl; } -void VNodeSpline::FullUpdateFromFile(){ +void VNodeSpline::FullUpdateFromFile() +{ RefreshGeometry(); } -void VNodeSpline::AddToFile(){ +void VNodeSpline::AddToFile() +{ QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); AddAttribute(domElement, AttrType, ToolType); AddAttribute(domElement, AttrIdObject, idNode); - if(typeobject == Draw::Calculation){ + if (typeobject == Draw::Calculation) + { AddAttribute(domElement, AttrTypeObject, TypeObjectCalculation); - } else { + } + else + { AddAttribute(domElement, AttrTypeObject, TypeObjectModeling); } AddToModeling(domElement); } -void VNodeSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VNodeSpline::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Spline); } QGraphicsItem::mouseReleaseEvent(event); } -void VNodeSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VNodeSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VNodeSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VNodeSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VNodeSpline::RefreshGeometry(){ +void VNodeSpline::RefreshGeometry() +{ VSpline spl = VAbstractTool::data.GetModelingSpline(id); QPainterPath path; path.addPath(spl.GetPath()); diff --git a/tools/nodeDetails/vnodespline.h b/tools/nodeDetails/vnodespline.h index 3e1d381bc..6af937ab7 100644 --- a/tools/nodeDetails/vnodespline.h +++ b/tools/nodeDetails/vnodespline.h @@ -25,7 +25,8 @@ #include "vabstractnode.h" #include -class VNodeSpline:public VAbstractNode, public QGraphicsPathItem{ +class VNodeSpline:public VAbstractNode, public QGraphicsPathItem +{ Q_OBJECT public: VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, diff --git a/tools/nodeDetails/vnodesplinepath.cpp b/tools/nodeDetails/vnodesplinepath.cpp index 07ac92b53..2f226afb3 100644 --- a/tools/nodeDetails/vnodesplinepath.cpp +++ b/tools/nodeDetails/vnodesplinepath.cpp @@ -25,73 +25,88 @@ const QString VNodeSplinePath::TagName = QStringLiteral("spline"); const QString VNodeSplinePath::ToolType = QStringLiteral("modelingPath"); VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, Tool::Sources typeCreation, - QGraphicsItem * parent) : - VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent){ + Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem * parent) + :VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent) +{ RefreshGeometry(); this->setPen(QPen(baseColor, widthHairLine)); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } void VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, const Document::Documents &parse, - Tool::Sources typeCreation){ - if(parse == Document::FullParse){ + Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation) +{ + if (parse == Document::FullParse) + { VNodeSplinePath *splPath = new VNodeSplinePath(doc, data, id, idSpline, typeobject, typeCreation); Q_ASSERT(splPath != 0); doc->AddTool(id, splPath); VSplinePath path = data->GetModelingSplinePath(id); const QVector *points = path.GetPoint(); - for(qint32 i = 0; isize(); ++i){ + for (qint32 i = 0; isize(); ++i) + { doc->IncrementReferens(points->at(i).P()); } - } else { + } + else + { doc->UpdateToolData(id, data); } } -void VNodeSplinePath::FullUpdateFromFile(){ +void VNodeSplinePath::FullUpdateFromFile() +{ RefreshGeometry(); } -void VNodeSplinePath::AddToFile(){ +void VNodeSplinePath::AddToFile() +{ QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); AddAttribute(domElement, AttrType, ToolType); AddAttribute(domElement, AttrIdObject, idNode); - if(typeobject == Draw::Calculation){ + if (typeobject == Draw::Calculation) + { AddAttribute(domElement, AttrTypeObject, TypeObjectCalculation); - } else { + } + else + { AddAttribute(domElement, AttrTypeObject, TypeObjectModeling); } AddToModeling(domElement); } -void VNodeSplinePath::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VNodeSplinePath::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::SplinePath); } QGraphicsItem::mouseReleaseEvent(event); } -void VNodeSplinePath::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VNodeSplinePath::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthMainLine)); } -void VNodeSplinePath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VNodeSplinePath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(currentColor, widthHairLine)); } -void VNodeSplinePath::RefreshGeometry(){ +void VNodeSplinePath::RefreshGeometry() +{ VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); QPainterPath path; path.addPath(splPath.GetPath()); diff --git a/tools/nodeDetails/vnodesplinepath.h b/tools/nodeDetails/vnodesplinepath.h index 5e623b65c..6ee6ee980 100644 --- a/tools/nodeDetails/vnodesplinepath.h +++ b/tools/nodeDetails/vnodesplinepath.h @@ -25,7 +25,8 @@ #include "vabstractnode.h" #include -class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem{ +class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem +{ Q_OBJECT public: VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, diff --git a/tools/vabstracttool.cpp b/tools/vabstracttool.cpp index 634a3a73f..df6bcb14e 100644 --- a/tools/vabstracttool.cpp +++ b/tools/vabstracttool.cpp @@ -58,40 +58,45 @@ const QString VAbstractTool::AttrAxisP2 = QStringLiteral("axisP2"); const QString VAbstractTool::TypeLineNone = QStringLiteral("none"); const QString VAbstractTool::TypeLineLine = QStringLiteral("hair"); -VAbstractTool::VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent): - VDataTool(data, parent), doc(doc), id(id), baseColor(Qt::black), currentColor(Qt::black){ - +VAbstractTool::VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent) + :VDataTool(data, parent), doc(doc), id(id), baseColor(Qt::black), currentColor(Qt::black) +{ connect(this, &VAbstractTool::toolhaveChange, this->doc, &VDomDocument::haveLiteChange); connect(this->doc, &VDomDocument::FullUpdateFromFile, this, &VAbstractTool::FullUpdateFromFile); connect(this, &VAbstractTool::FullUpdateTree, this->doc, &VDomDocument::FullUpdateTree); } -QPointF VAbstractTool::LineIntersectRect(QRectF rec, QLineF line){ +QPointF VAbstractTool::LineIntersectRect(QRectF rec, QLineF line) +{ qreal x1, y1, x2, y2; rec.getCoords(&x1, &y1, &x2, &y2); QPointF point; - QLineF::IntersectType type = line.intersect(QLineF(QPointF(x1,y1), QPointF(x1,y2)),&point); - if ( type == QLineF::BoundedIntersection ){ + QLineF::IntersectType type = line.intersect(QLineF(QPointF(x1, y1), QPointF(x1, y2)), &point); + if ( type == QLineF::BoundedIntersection ) + { return point; } - type = line.intersect(QLineF(QPointF(x1,y1), QPointF(x2,y1)),&point); - if ( type == QLineF::BoundedIntersection ){ + type = line.intersect(QLineF(QPointF(x1, y1), QPointF(x2, y1)), &point); + if ( type == QLineF::BoundedIntersection ) + { return point; } - type = line.intersect(QLineF(QPointF(x1,y2), QPointF(x2,y2)),&point); - if ( type == QLineF::BoundedIntersection ){ + type = line.intersect(QLineF(QPointF(x1, y2), QPointF(x2, y2)), &point); + if ( type == QLineF::BoundedIntersection ) + { return point; } - type = line.intersect(QLineF(QPointF(x2,y1), QPointF(x2,y2)),&point); - if ( type == QLineF::BoundedIntersection ){ + type = line.intersect(QLineF(QPointF(x2, y1), QPointF(x2, y2)), &point); + if ( type == QLineF::BoundedIntersection ) + { return point; } Q_ASSERT_X(type != QLineF::BoundedIntersection, Q_FUNC_INFO, "There is no point of intersection."); return point; } -qint32 VAbstractTool::LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, - QPointF &p2){ +qint32 VAbstractTool::LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, QPointF &p2) +{ const qreal eps = 1e-8; //коефіцієнти для рівняння відрізку qreal a = 0, b = 0, c = 0; @@ -101,12 +106,18 @@ qint32 VAbstractTool::LineIntersectCircle(QPointF center, qreal radius, QLineF l // сколько всего решений? qint32 flag = 0; qreal d = QLineF (center, p).length(); - if (qAbs (d - radius) <= eps){ + if (qAbs (d - radius) <= eps) + { flag = 1; - } else { - if (radius > d){ + } + else + { + if (radius > d) + { flag = 2; - } else { + } + else + { return 0; } } @@ -119,17 +130,22 @@ qint32 VAbstractTool::LineIntersectCircle(QPointF center, qreal radius, QLineF l return flag; } -QPointF VAbstractTool::ClosestPoint(QLineF line, QPointF p){ +QPointF VAbstractTool::ClosestPoint(QLineF line, QPointF p) +{ QLineF lineP2pointFrom = QLineF(line.p2(), p); qreal angle = 180-line.angleTo(lineP2pointFrom)-90; QLineF pointFromlineP2 = QLineF(p, line.p2()); pointFromlineP2.setAngle(pointFromlineP2.angle()+angle); QPointF point; - QLineF::IntersectType type = pointFromlineP2.intersect(line,&point); - if ( type == QLineF::BoundedIntersection ){ + QLineF::IntersectType type = pointFromlineP2.intersect(line, &point); + if ( type == QLineF::BoundedIntersection ) + { return point; - } else{ - if ( type == QLineF::NoIntersection || type == QLineF::UnboundedIntersection ){ + } + else + { + if ( type == QLineF::NoIntersection || type == QLineF::UnboundedIntersection ) + { Q_ASSERT_X(type != QLineF::BoundedIntersection, Q_FUNC_INFO, "Немає точки перетину."); return point; } @@ -137,19 +153,24 @@ QPointF VAbstractTool::ClosestPoint(QLineF line, QPointF p){ return point; } -QPointF VAbstractTool::addVector(QPointF p, QPointF p1, QPointF p2, qreal k){ +QPointF VAbstractTool::addVector(QPointF p, QPointF p1, QPointF p2, qreal k) +{ return QPointF (p.x() + (p2.x() - p1.x()) * k, p.y() + (p2.y() - p1.y()) * k); } -void VAbstractTool::RemoveAllChild(QDomElement &domElement){ - if ( domElement.hasChildNodes() ){ - while ( domElement.childNodes().length() >= 1 ){ +void VAbstractTool::RemoveAllChild(QDomElement &domElement) +{ + if ( domElement.hasChildNodes() ) + { + while ( domElement.childNodes().length() >= 1 ) + { domElement.removeChild( domElement.firstChild() ); } } } -void VAbstractTool::LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c){ +void VAbstractTool::LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c) +{ //коефіцієнти для рівняння відрізку *a = line.p2().y() - line.p1().y(); *b = line.p1().x() - line.p2().x(); diff --git a/tools/vabstracttool.h b/tools/vabstracttool.h index 511e43f31..a5a398d56 100644 --- a/tools/vabstracttool.h +++ b/tools/vabstracttool.h @@ -25,7 +25,8 @@ #include "vdatatool.h" #include -class VAbstractTool: public VDataTool{ +class VAbstractTool: public VDataTool +{ Q_OBJECT public: VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); @@ -89,7 +90,8 @@ protected: virtual void RemoveReferens(){} void RemoveAllChild(QDomElement &domElement); template - void AddAttribute(QDomElement &domElement, const QString &name, const T &value){ + void AddAttribute(QDomElement &domElement, const QString &name, const T &value) + { QDomAttr domAttr = doc->createAttribute(name); domAttr.setValue(QString().setNum(value)); domElement.setAttributeNode(domAttr); @@ -99,7 +101,8 @@ private: }; template <> -inline void VAbstractTool::AddAttribute(QDomElement &domElement, const QString &name, const QString &value){ +inline void VAbstractTool::AddAttribute(QDomElement &domElement, const QString &name, const QString &value) +{ QDomAttr domAttr = doc->createAttribute(name); domAttr.setValue(value); domElement.setAttributeNode(domAttr); diff --git a/tools/vdatatool.cpp b/tools/vdatatool.cpp index 60dba8c40..d5f3ebefd 100644 --- a/tools/vdatatool.cpp +++ b/tools/vdatatool.cpp @@ -21,14 +21,17 @@ #include "vdatatool.h" -VDataTool &VDataTool::operator =(const VDataTool &tool){ +VDataTool &VDataTool::operator =(const VDataTool &tool) +{ data = tool.getData(); _referens = tool.referens(); return *this; } -void VDataTool::decrementReferens(){ - if(_referens > 0){ +void VDataTool::decrementReferens() +{ + if (_referens > 0) + { --_referens; } } diff --git a/tools/vdatatool.h b/tools/vdatatool.h index f0519762f..9b8dda925 100644 --- a/tools/vdatatool.h +++ b/tools/vdatatool.h @@ -25,10 +25,11 @@ #include //We need QObject class because we use qobject_cast. -class VDataTool : public QObject{ +class VDataTool : public QObject +{ Q_OBJECT public: - explicit VDataTool(VContainer *data, QObject *parent = 0): QObject(parent), data(*data), _referens(1){} + VDataTool(VContainer *data, QObject *parent = 0): QObject(parent), data(*data), _referens(1){} virtual ~VDataTool(){} VDataTool &operator= (const VDataTool &tool); inline VContainer getData() const { return data; } diff --git a/tools/vtooldetail.cpp b/tools/vtooldetail.cpp index de0d48269..d51e0fc57 100644 --- a/tools/vtooldetail.cpp +++ b/tools/vtooldetail.cpp @@ -35,68 +35,72 @@ const QString VToolDetail::NodeTypeContour = QStringLiteral("Contour"); const QString VToolDetail::NodeTypeModeling = QStringLiteral("Modeling"); VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, Tool::Sources typeCreation, - VMainGraphicsScene *scene, QGraphicsItem *parent) :VAbstractTool(doc, data, id), - QGraphicsPathItem(parent), dialogDetail(QSharedPointer()), sceneDetails(scene){ + VMainGraphicsScene *scene, QGraphicsItem *parent) + :VAbstractTool(doc, data, id), QGraphicsPathItem(parent), dialogDetail(QSharedPointer()), + sceneDetails(scene) +{ VDetail detail = data->GetDetail(id); - for(qint32 i = 0; i< detail.CountNode(); ++i){ - switch(detail[i].getTypeTool()){ - case(Tool::NodePoint): - InitTool(scene, detail[i]); - break; - case(Tool::NodeArc): - InitTool(scene, detail[i]); - break; - case(Tool::NodeSpline): - InitTool(scene, detail[i]); - break; - case(Tool::NodeSplinePath): - InitTool(scene, detail[i]); - break; - case(Tool::AlongLineTool): - InitTool(scene, detail[i]); - break; - case(Tool::ArcTool): - InitTool(scene, detail[i]); - break; - case(Tool::BisectorTool): - InitTool(scene, detail[i]); - break; - case(Tool::EndLineTool): - InitTool(scene, detail[i]); - break; - case(Tool::LineIntersectTool): - InitTool(scene, detail[i]); - break; - case(Tool::LineTool): - InitTool(scene, detail[i]); - break; - case(Tool::NormalTool): - InitTool(scene, detail[i]); - break; - case(Tool::PointOfContact): - InitTool(scene, detail[i]); - break; - case(Tool::ShoulderPointTool): - InitTool(scene, detail[i]); - break; - case(Tool::SplinePathTool): - InitTool(scene, detail[i]); - break; - case(Tool::SplineTool): - InitTool(scene, detail[i]); - break; - case(Tool::Height): - InitTool(scene, detail[i]); - break; - case(Tool::Triangle): - InitTool(scene, detail[i]); - break; - case(Tool::PointOfIntersection): - InitTool(scene, detail[i]); - break; - default: - qWarning()<<"Get wrong tool type. Ignore."; - break; + for (qint32 i = 0; i< detail.CountNode(); ++i) + { + switch (detail[i].getTypeTool()) + { + case (Tool::NodePoint): + InitTool(scene, detail[i]); + break; + case (Tool::NodeArc): + InitTool(scene, detail[i]); + break; + case (Tool::NodeSpline): + InitTool(scene, detail[i]); + break; + case (Tool::NodeSplinePath): + InitTool(scene, detail[i]); + break; + case (Tool::AlongLineTool): + InitTool(scene, detail[i]); + break; + case (Tool::ArcTool): + InitTool(scene, detail[i]); + break; + case (Tool::BisectorTool): + InitTool(scene, detail[i]); + break; + case (Tool::EndLineTool): + InitTool(scene, detail[i]); + break; + case (Tool::LineIntersectTool): + InitTool(scene, detail[i]); + break; + case (Tool::LineTool): + InitTool(scene, detail[i]); + break; + case (Tool::NormalTool): + InitTool(scene, detail[i]); + break; + case (Tool::PointOfContact): + InitTool(scene, detail[i]); + break; + case (Tool::ShoulderPointTool): + InitTool(scene, detail[i]); + break; + case (Tool::SplinePathTool): + InitTool(scene, detail[i]); + break; + case (Tool::SplineTool): + InitTool(scene, detail[i]); + break; + case (Tool::Height): + InitTool(scene, detail[i]); + break; + case (Tool::Triangle): + InitTool(scene, detail[i]); + break; + case (Tool::PointOfIntersection): + InitTool(scene, detail[i]); + break; + default: + qWarning()<<"Get wrong tool type. Ignore."; + break; } doc->IncrementReferens(detail[i].getId()); } @@ -105,75 +109,96 @@ VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, RefreshGeometry(); this->setPos(detail.getMx(), detail.getMy()); this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { AddToFile(); } } -void VToolDetail::setDialog(){ - Q_ASSERT(!dialogDetail.isNull()); +void VToolDetail::setDialog() +{ + Q_ASSERT(dialogDetail.isNull() == false); VDetail detail = VAbstractTool::data.GetDetail(id); dialogDetail->setDetails(detail); } -void VToolDetail::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, - VDomDocument *doc, VContainer *data){ +void VToolDetail::Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, + VContainer *data) +{ VDetail detail = dialog->getDetails(); VDetail det; - for(qint32 i = 0; i< detail.CountNode(); ++i){ + for (qint32 i = 0; i< detail.CountNode(); ++i) + { qint64 id = 0; - switch(detail[i].getTypeTool()){ - case(Tool::NodePoint):{ - VPointF point; - if(detail[i].getMode() == Draw::Calculation){ - point = data->GetPoint(detail[i].getId()); - } else { - point = data->GetModelingPoint(detail[i].getId()); + switch (detail[i].getTypeTool()) + { + case (Tool::NodePoint): + { + VPointF point; + if (detail[i].getMode() == Draw::Calculation) + { + point = data->GetPoint(detail[i].getId()); + } + else + { + point = data->GetModelingPoint(detail[i].getId()); + } + id = data->AddModelingPoint(point); + VNodePoint::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), + Document::FullParse, Tool::FromGui); } - id = data->AddModelingPoint(point); - VNodePoint::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), - Document::FullParse, Tool::FromGui); - } break; - case(Tool::NodeArc):{ - VArc arc; - if(detail[i].getMode() == Draw::Calculation){ - arc = data->GetArc(detail[i].getId()); - } else { - arc = data->GetModelingArc(detail[i].getId()); + case (Tool::NodeArc): + { + VArc arc; + if (detail[i].getMode() == Draw::Calculation) + { + arc = data->GetArc(detail[i].getId()); + } + else + { + arc = data->GetModelingArc(detail[i].getId()); + } + id = data->AddModelingArc(arc); + VNodeArc::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), + Document::FullParse, Tool::FromGui); } - id = data->AddModelingArc(arc); - VNodeArc::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), - Document::FullParse, Tool::FromGui); - } break; - case(Tool::NodeSpline):{ - VSpline spline; - if(detail[i].getMode() == Draw::Calculation){ - spline = data->GetSpline(detail[i].getId()); - } else { - spline = data->GetModelingSpline(detail[i].getId()); - } - id = data->AddModelingSpline(spline); - VNodeSpline::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), - Document::FullParse, Tool::FromGui); - } - break; - case(Tool::NodeSplinePath):{ - VSplinePath splinePath; - if(detail[i].getMode() == Draw::Calculation){ - splinePath = data->GetSplinePath(detail[i].getId()); - } else { - splinePath = data->GetModelingSplinePath(detail[i].getId()); - } - id = data->AddModelingSplinePath(splinePath); - VNodeSplinePath::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), + case (Tool::NodeSpline): + { + VSpline spline; + if (detail[i].getMode() == Draw::Calculation) + { + spline = data->GetSpline(detail[i].getId()); + } + else + { + spline = data->GetModelingSpline(detail[i].getId()); + } + id = data->AddModelingSpline(spline); + VNodeSpline::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), Document::FullParse, Tool::FromGui); - } + } break; - default: - qWarning()<<"May be wrong tool type!!! Ignoring."<GetSplinePath(detail[i].getId()); + } + else + { + splinePath = data->GetModelingSplinePath(detail[i].getId()); + } + id = data->AddModelingSplinePath(splinePath); + VNodeSplinePath::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), + Document::FullParse, Tool::FromGui); + } break; + default: + qWarning()<<"May be wrong tool type!!! Ignoring."< &dialog, VMainGraphicsScen } void VToolDetail::Create(const qint64 _id, VDetail &newDetail, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation){ + VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) +{ qint64 id = _id; - if(typeCreation == Tool::FromGui){ + if (typeCreation == Tool::FromGui) + { id = data->AddDetail(newDetail); - } else { + } + else + { data->UpdateDetail(id, newDetail); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { doc->UpdateToolData(id, data); } } - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolDetail *detail = new VToolDetail(doc, data, id, typeCreation, scene); scene->addItem(detail); connect(detail, &VToolDetail::ChoosedTool, scene, &VMainGraphicsScene::ChoosedItem); @@ -203,21 +234,26 @@ void VToolDetail::Create(const qint64 _id, VDetail &newDetail, VMainGraphicsScen } } -void VToolDetail::FullUpdateFromFile(){ +void VToolDetail::FullUpdateFromFile() +{ RefreshGeometry(); } -void VToolDetail::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ +void VToolDetail::FullUpdateFromGui(int result) +{ + if (result == QDialog::Accepted) + { QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { VDetail det = dialogDetail->getDetails(); domElement.setAttribute(AttrName, det.getName()); domElement.setAttribute(AttrSupplement, QString().setNum(det.getSupplement())); domElement.setAttribute(AttrClosed, QString().setNum(det.getClosed())); domElement.setAttribute(AttrWidth, QString().setNum(det.getWidth())); RemoveAllChild(domElement); - for(qint32 i = 0; i < det.CountNode(); ++i){ + for (qint32 i = 0; i < det.CountNode(); ++i) + { AddNode(domElement, det[i]); } emit FullUpdateTree(); @@ -226,7 +262,8 @@ void VToolDetail::FullUpdateFromGui(int result){ dialogDetail.clear(); } -void VToolDetail::AddToFile(){ +void VToolDetail::AddToFile() +{ VDetail detail = VAbstractTool::data.GetDetail(id); QDomElement domElement = doc->createElement(TagName); @@ -238,24 +275,29 @@ void VToolDetail::AddToFile(){ AddAttribute(domElement, AttrClosed, detail.getClosed()); AddAttribute(domElement, AttrWidth, detail.getWidth()); - for(qint32 i = 0; i < detail.CountNode(); ++i){ + for (qint32 i = 0; i < detail.CountNode(); ++i) + { AddNode(domElement, detail[i]); } QDomElement element; bool ok = doc->GetActivDetailsElement(element); - if(ok){ + if (ok) + { element.appendChild(domElement); } } -QVariant VToolDetail::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value){ - if (change == ItemPositionHasChanged && scene()) { +QVariant VToolDetail::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) +{ + if (change == ItemPositionHasChanged && scene()) + { // value - это новое положение. QPointF newPos = value.toPointF(); //qDebug()<elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { domElement.setAttribute(AttrMx, QString().setNum(toMM(newPos.x()))); domElement.setAttribute(AttrMy, QString().setNum(toMM(newPos.y()))); //I don't now why but signal does not work. @@ -265,24 +307,31 @@ QVariant VToolDetail::itemChange(QGraphicsItem::GraphicsItemChange change, const return QGraphicsItem::itemChange(change, value); } -void VToolDetail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event){ - if(event->button() == Qt::LeftButton){ +void VToolDetail::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) +{ + if (event->button() == Qt::LeftButton) + { emit ChoosedTool(id, Scene::Detail); } QGraphicsItem::mouseReleaseEvent(event); } -void VToolDetail::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ +void VToolDetail::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) +{ QMenu menu; QAction *actionOption = menu.addAction(tr("Options")); QAction *actionRemove = menu.addAction(tr("Delete")); - if(_referens > 1){ + if (_referens > 1) + { actionRemove->setEnabled(false); - } else { + } + else + { actionRemove->setEnabled(true); } QAction *selectedAction = menu.exec(event->screenPos()); - if(selectedAction == actionOption){ + if (selectedAction == actionOption) + { dialogDetail = QSharedPointer(new DialogDetail(getData(), Draw::Modeling)); connect(qobject_cast< VMainGraphicsScene * >(this->scene()), &VMainGraphicsScene::ChoosedObject, dialogDetail.data(), &DialogDetail::ChoosedObject); @@ -290,12 +339,15 @@ void VToolDetail::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ setDialog(); dialogDetail->show(); } - if(selectedAction == actionRemove){ + if (selectedAction == actionRemove) + { //remove form xml file QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { QDomNode element = domElement.parentNode(); - if(!element.isNull()){ + if (element.isNull() == false) + { //deincrement referens RemoveReferens(); element.removeChild(domElement); @@ -303,102 +355,115 @@ void VToolDetail::contextMenuEvent(QGraphicsSceneContextMenuEvent *event){ emit FullUpdateTree(); //remove form scene emit RemoveTool(this); - } else { + } + else + { qWarning()<<"parentNode isNull"<setPath(path); } template -void VToolDetail::InitTool(VMainGraphicsScene *scene, const VNodeDetail &node){ +void VToolDetail::InitTool(VMainGraphicsScene *scene, const VNodeDetail &node) +{ QHash* tools = doc->getTools(); Q_ASSERT(tools != 0); Tool *tool = qobject_cast(tools->value(node.getId())); diff --git a/tools/vtooldetail.h b/tools/vtooldetail.h index 4a877e8e6..a5da79b37 100644 --- a/tools/vtooldetail.h +++ b/tools/vtooldetail.h @@ -26,7 +26,8 @@ #include #include "dialogs/dialogdetail.h" -class VToolDetail: public VAbstractTool, public QGraphicsPathItem{ +class VToolDetail: public VAbstractTool, public QGraphicsPathItem +{ Q_OBJECT public: VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, @@ -39,7 +40,8 @@ public: VDomDocument *doc, VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation); template - void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool){ + void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool) + { tool->setParentItem(this); connect(tool, &T::ChoosedTool, sceneDetails, &VMainGraphicsScene::ChoosedItem); VNodeDetail node(id, typeTool, Draw::Modeling, NodeDetail::Modeling); @@ -47,7 +49,8 @@ public: det.append(node); VAbstractTool::data.UpdateDetail(this->id, det); QDomElement domElement = doc->elementById(QString().setNum(this->id)); - if(domElement.isElement()){ + if (domElement.isElement()) + { AddNode(domElement, node); } } diff --git a/version.h b/version.h index f988bb497..5a80c3c59 100644 --- a/version.h +++ b/version.h @@ -8,5 +8,6 @@ extern const int MINOR_VERSION = 2; extern const int DEBUG_VERSION = 0; extern const QString APP_VERSION(QStringLiteral("%1.%2.%3").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION)); -extern const QString WARRANTY(QT_TR_NOOP("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.")); +extern const QString WARRANTY(QT_TR_NOOP("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE " + "WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.")); #endif // VERSION_H diff --git a/widgets/doubledelegate.cpp b/widgets/doubledelegate.cpp index 612f38b5a..480e68f0e 100644 --- a/widgets/doubledelegate.cpp +++ b/widgets/doubledelegate.cpp @@ -48,7 +48,8 @@ #include "doubledelegate.h" QWidget *DoubleSpinBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, - const QModelIndex &index ) const{ + const QModelIndex &index ) const +{ Q_UNUSED(option); Q_UNUSED(index); QDoubleSpinBox *editor = new QDoubleSpinBox(parent); @@ -57,14 +58,16 @@ QWidget *DoubleSpinBoxDelegate::createEditor(QWidget *parent, const QStyleOption return editor; } -void DoubleSpinBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const{ +void DoubleSpinBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const +{ qreal value = index.model()->data(index, Qt::EditRole).toDouble(); QDoubleSpinBox *spinBox = static_cast(editor); spinBox->setValue(value); } -void DoubleSpinBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const{ +void DoubleSpinBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const +{ QDoubleSpinBox *spinBox = static_cast(editor); spinBox->interpretText(); qreal value = spinBox->value(); @@ -73,7 +76,8 @@ void DoubleSpinBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *mo } void DoubleSpinBoxDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, - const QModelIndex &index) const{ + const QModelIndex &index) const +{ Q_UNUSED(index) editor->setGeometry(option.rect); - } +} diff --git a/widgets/doubledelegate.h b/widgets/doubledelegate.h index a4c7a536e..948b91851 100644 --- a/widgets/doubledelegate.h +++ b/widgets/doubledelegate.h @@ -43,7 +43,8 @@ #include -class DoubleSpinBoxDelegate : public QItemDelegate{ +class DoubleSpinBoxDelegate : public QItemDelegate +{ Q_OBJECT public: DoubleSpinBoxDelegate(QObject *parent = 0): QItemDelegate(parent){} diff --git a/widgets/vapplication.cpp b/widgets/vapplication.cpp index e53617b6f..efabe6acb 100644 --- a/widgets/vapplication.cpp +++ b/widgets/vapplication.cpp @@ -27,11 +27,14 @@ #include "exception/vexceptionwrongparameterid.h" // reimplemented from QApplication so we can throw exceptions in slots -bool VApplication::notify(QObject *receiver, QEvent *event){ - try { +bool VApplication::notify(QObject *receiver, QEvent *event) +{ + try + { return QApplication::notify(receiver, event); } - catch(const VExceptionObjectError &e){ + catch (const VExceptionObjectError &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error parsing file. Program will be terminated.")); @@ -43,7 +46,8 @@ bool VApplication::notify(QObject *receiver, QEvent *event){ msgBox.exec(); abort(); } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error bad id. Program will be terminated.")); @@ -54,7 +58,8 @@ bool VApplication::notify(QObject *receiver, QEvent *event){ msgBox.exec(); abort(); } - catch(const VExceptionConversionError &e){ + catch (const VExceptionConversionError &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error can't convert value. Program will be terminated.")); @@ -65,7 +70,8 @@ bool VApplication::notify(QObject *receiver, QEvent *event){ msgBox.exec(); abort(); } - catch(const VExceptionEmptyParameter &e){ + catch (const VExceptionEmptyParameter &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error empty parameter. Program will be terminated.")); @@ -77,7 +83,8 @@ bool VApplication::notify(QObject *receiver, QEvent *event){ msgBox.exec(); abort(); } - catch(const VExceptionWrongParameterId &e){ + catch (const VExceptionWrongParameterId &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Error wrong id. Program will be terminated.")); @@ -89,7 +96,8 @@ bool VApplication::notify(QObject *receiver, QEvent *event){ msgBox.exec(); abort(); } - catch(const VException &e){ + catch (const VException &e) + { QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); msgBox.setText(tr("Something wrong!!")); @@ -99,7 +107,8 @@ bool VApplication::notify(QObject *receiver, QEvent *event){ msgBox.setIcon(QMessageBox::Critical); msgBox.exec(); } - catch(std::exception& e) { + catch (std::exception& e) + { qCritical() << "Exception thrown:" << e.what(); } return false; diff --git a/widgets/vapplication.h b/widgets/vapplication.h index 3192cb658..145c5cac8 100644 --- a/widgets/vapplication.h +++ b/widgets/vapplication.h @@ -3,7 +3,8 @@ #include -class VApplication : public QApplication{ +class VApplication : public QApplication +{ Q_OBJECT public: VApplication(int &argc, char ** argv): QApplication(argc, argv){} diff --git a/widgets/vcontrolpointspline.cpp b/widgets/vcontrolpointspline.cpp index 4e3e378b9..5b25e4d86 100644 --- a/widgets/vcontrolpointspline.cpp +++ b/widgets/vcontrolpointspline.cpp @@ -23,8 +23,9 @@ VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint, - QGraphicsItem *parent):QGraphicsEllipseItem(parent), - radius(toPixel(1.5)), controlLine(0), indexSpline(indexSpline), position(position){ + QGraphicsItem *parent) + :QGraphicsEllipseItem(parent), radius(toPixel(1.5)), controlLine(0), indexSpline(indexSpline), position(position) +{ //create circle QRectF rec = QRectF(0, 0, radius*2, radius*2); rec.translate(-rec.center().x(), -rec.center().y()); @@ -45,18 +46,22 @@ VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint: controlLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true); } -void VControlPointSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VControlPointSpline::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(Qt::black, widthMainLine)); } -void VControlPointSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VControlPointSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setPen(QPen(Qt::black, widthHairLine)); } -QVariant VControlPointSpline::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value){ - if (change == ItemPositionChange && scene()) { +QVariant VControlPointSpline::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) +{ + if (change == ItemPositionChange && scene()) + { // value - new position. QPointF newPos = value.toPointF(); emit ControlPointChangePosition(indexSpline, position, newPos); @@ -65,7 +70,8 @@ QVariant VControlPointSpline::itemChange(QGraphicsItem::GraphicsItemChange chang } qint32 VControlPointSpline::LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, - QPointF &p2) const{ + QPointF &p2) const +{ const qreal eps = 1e-8; //коефіцієнти для рівняння відрізку qreal a = line.p2().y() - line.p1().y(); @@ -77,12 +83,18 @@ qint32 VControlPointSpline::LineIntersectCircle(QPointF center, qreal radius, QL // сколько всего решений? qint32 flag = 0; qreal d = QLineF (center, p).length(); - if (qAbs (d - radius) <= eps){ + if (qAbs (d - radius) <= eps) + { flag = 1; - } else { - if (radius > d){ + } + else + { + if (radius > d) + { flag = 2; - } else { + } + else + { return 0; } } @@ -95,17 +107,22 @@ qint32 VControlPointSpline::LineIntersectCircle(QPointF center, qreal radius, QL return flag; } -QPointF VControlPointSpline::ClosestPoint(QLineF line, QPointF p) const{ +QPointF VControlPointSpline::ClosestPoint(QLineF line, QPointF p) const +{ QLineF lineP2pointFrom = QLineF(line.p2(), p); qreal angle = 180-line.angleTo(lineP2pointFrom)-90; QLineF pointFromlineP2 = QLineF(p, line.p2()); pointFromlineP2.setAngle(pointFromlineP2.angle()+angle); QPointF point; - QLineF::IntersectType type = pointFromlineP2.intersect(line,&point); - if ( type == QLineF::BoundedIntersection ){ + QLineF::IntersectType type = pointFromlineP2.intersect(line, &point); + if ( type == QLineF::BoundedIntersection ) + { return point; - } else{ - if ( type == QLineF::NoIntersection || type == QLineF::UnboundedIntersection ){ + } + else + { + if ( type == QLineF::NoIntersection || type == QLineF::UnboundedIntersection ) + { Q_ASSERT_X(type != QLineF::BoundedIntersection, Q_FUNC_INFO, "Немає точки перетину."); return point; } @@ -113,26 +130,33 @@ QPointF VControlPointSpline::ClosestPoint(QLineF line, QPointF p) const{ return point; } -QPointF VControlPointSpline::addVector(QPointF p, QPointF p1, QPointF p2, qreal k) const{ +QPointF VControlPointSpline::addVector(QPointF p, QPointF p1, QPointF p2, qreal k) const +{ return QPointF (p.x() + (p2.x() - p1.x()) * k, p.y() + (p2.y() - p1.y()) * k); } void VControlPointSpline::RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos, - const QPointF &controlPoint, const QPointF &splinePoint){ - if(this->indexSpline == indexSpline && this->position == pos){ + const QPointF &controlPoint, const QPointF &splinePoint) +{ + if (this->indexSpline == indexSpline && this->position == pos) + { QPointF p1, p2; LineIntersectCircle(QPointF(), radius, QLineF( QPointF(), splinePoint-controlPoint), p1, p2); controlLine->setLine(QLineF(splinePoint-controlPoint, p1)); } } -void VControlPointSpline::setEnabledPoint(bool enable){ - if(enable == true){ +void VControlPointSpline::setEnabledPoint(bool enable) +{ + if (enable == true) + { this->setPen(QPen(Qt::black, widthHairLine)); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setFlag(QGraphicsItem::ItemIsMovable, true); this->setAcceptHoverEvents(true); - } else { + } + else + { this->setPen(QPen(Qt::gray, widthHairLine)); this->setFlag(QGraphicsItem::ItemIsSelectable, false); this->setFlag(QGraphicsItem::ItemIsMovable, false); diff --git a/widgets/vcontrolpointspline.h b/widgets/vcontrolpointspline.h index 9ed7e1cbb..56f51ef93 100644 --- a/widgets/vcontrolpointspline.h +++ b/widgets/vcontrolpointspline.h @@ -26,7 +26,8 @@ #include #include "geometry/vsplinepath.h" -class VControlPointSpline : public QObject, public QGraphicsEllipseItem{ +class VControlPointSpline : public QObject, public QGraphicsEllipseItem +{ Q_OBJECT public: VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, diff --git a/widgets/vgraphicssimpletextitem.cpp b/widgets/vgraphicssimpletextitem.cpp index 52a74973e..55fa10187 100644 --- a/widgets/vgraphicssimpletextitem.cpp +++ b/widgets/vgraphicssimpletextitem.cpp @@ -21,8 +21,9 @@ #include "vgraphicssimpletextitem.h" -VGraphicsSimpleTextItem::VGraphicsSimpleTextItem(QGraphicsItem * parent):QGraphicsSimpleTextItem(parent), - fontSize(0){ +VGraphicsSimpleTextItem::VGraphicsSimpleTextItem(QGraphicsItem * parent) + :QGraphicsSimpleTextItem(parent), fontSize(0) +{ this->setFlag(QGraphicsItem::ItemIsMovable, true); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); @@ -34,27 +35,32 @@ VGraphicsSimpleTextItem::VGraphicsSimpleTextItem(QGraphicsItem * parent):QGraphi } VGraphicsSimpleTextItem::VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent ) - :QGraphicsSimpleTextItem(text, parent), fontSize(0){ + :QGraphicsSimpleTextItem(text, parent), fontSize(0) +{ this->setFlag(QGraphicsItem::ItemIsMovable, true); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); this->setAcceptHoverEvents(true); } -QVariant VGraphicsSimpleTextItem::itemChange(GraphicsItemChange change, const QVariant &value){ - if (change == ItemPositionChange && scene()) { +QVariant VGraphicsSimpleTextItem::itemChange(GraphicsItemChange change, const QVariant &value) +{ + if (change == ItemPositionChange && scene()) + { QPointF newPos = value.toPointF() + this->parentItem()->pos(); emit NameChangePosition(newPos); } return QGraphicsItem::itemChange(change, value); } -void VGraphicsSimpleTextItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ +void VGraphicsSimpleTextItem::hoverMoveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setBrush(Qt::green); } -void VGraphicsSimpleTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ +void VGraphicsSimpleTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) +{ Q_UNUSED(event); this->setBrush(Qt::black); } diff --git a/widgets/vgraphicssimpletextitem.h b/widgets/vgraphicssimpletextitem.h index 61bcd9471..dacf920ce 100644 --- a/widgets/vgraphicssimpletextitem.h +++ b/widgets/vgraphicssimpletextitem.h @@ -24,7 +24,8 @@ #include -class VGraphicsSimpleTextItem : public QObject, public QGraphicsSimpleTextItem{ +class VGraphicsSimpleTextItem : public QObject, public QGraphicsSimpleTextItem +{ Q_OBJECT public: VGraphicsSimpleTextItem(QGraphicsItem * parent = 0); diff --git a/widgets/vitem.cpp b/widgets/vitem.cpp index d9b508003..963a693da 100644 --- a/widgets/vitem.cpp +++ b/widgets/vitem.cpp @@ -21,29 +21,37 @@ #include "vitem.h" -VItem::VItem (const QPainterPath & path, int numInList, QGraphicsItem * parent ): - QGraphicsPathItem ( path, parent ), numInOutList(numInList){ +VItem::VItem (const QPainterPath & path, int numInList, QGraphicsItem * parent ) + :QGraphicsPathItem ( path, parent ), numInOutList(numInList) +{ } -void VItem::checkItemChange(){ +void VItem::checkItemChange() +{ QRectF rect = parentItem()->sceneBoundingRect(); QRectF myrect = sceneBoundingRect(); - if( rect.contains( myrect )==true ){ + if ( rect.contains( myrect )==true ) + { qDebug()<<"Не виходить за рамки листа"; setPen(QPen(Qt::black, widthMainLine)); emit itemOut( numInOutList, false ); - } else { + } + else + { qDebug()<<"Виходить за рамки листа"; setPen(QPen(Qt::red, widthMainLine)); emit itemOut( numInOutList, true ); } QList list = QGraphicsItem::collidingItems (); - if( list.size() - 2 > 0 ){ + if ( list.size() - 2 > 0 ) + { list.append( this ); setPen(QPen(Qt::red, widthMainLine)); qDebug()<<"Деталь перетинається з іншими деталями "< itemList; itemList.append( this ); qDebug()<<"Деталь більше не перетинається з іншими деталями "<scenePos()); QGraphicsScene::mouseMoveEvent(event); } -void VMainGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event){ +void VMainGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event) +{ emit mousePress(event->scenePos()); QGraphicsScene::mousePressEvent(event); } -void VMainGraphicsScene::ChoosedItem(qint64 id, Scene::Scenes type){ +void VMainGraphicsScene::ChoosedItem(qint64 id, Scene::Scenes type) +{ emit ChoosedObject(id, type); } -void VMainGraphicsScene::SetFactor(qreal factor){ +void VMainGraphicsScene::SetFactor(qreal factor) +{ scaleFactor=scaleFactor*factor; emit NewFactor(scaleFactor); } diff --git a/widgets/vmaingraphicsscene.h b/widgets/vmaingraphicsscene.h index 63522396e..0f3cb116d 100644 --- a/widgets/vmaingraphicsscene.h +++ b/widgets/vmaingraphicsscene.h @@ -24,7 +24,8 @@ #include -class VMainGraphicsScene : public QGraphicsScene{ +class VMainGraphicsScene : public QGraphicsScene +{ Q_OBJECT public: VMainGraphicsScene(); diff --git a/widgets/vmaingraphicsview.cpp b/widgets/vmaingraphicsview.cpp index acfca1764..9aab81ce1 100644 --- a/widgets/vmaingraphicsview.cpp +++ b/widgets/vmaingraphicsview.cpp @@ -21,18 +21,21 @@ #include "vmaingraphicsview.h" -VMainGraphicsView::VMainGraphicsView(QWidget *parent) : - QGraphicsView(parent), _numScheduledScalings(0){ +VMainGraphicsView::VMainGraphicsView(QWidget *parent) + :QGraphicsView(parent), _numScheduledScalings(0) +{ this->setResizeAnchor(QGraphicsView::AnchorUnderMouse); this->setTransformationAnchor(QGraphicsView::AnchorUnderMouse); this->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform); } -void VMainGraphicsView::wheelEvent(QWheelEvent *event){ +void VMainGraphicsView::wheelEvent(QWheelEvent *event) +{ int numDegrees = event->delta() / 8; int numSteps = numDegrees / 15; // see QWheelEvent documentation _numScheduledScalings += numSteps; - if (_numScheduledScalings * numSteps < 0){ // if user moved the wheel in another direction, we reset + if (_numScheduledScalings * numSteps < 0) + { // if user moved the wheel in another direction, we reset _numScheduledScalings = numSteps; // previously scheduled scalings } @@ -44,49 +47,65 @@ void VMainGraphicsView::wheelEvent(QWheelEvent *event){ anim->start(); } -void VMainGraphicsView::scalingTime(qreal x){ +void VMainGraphicsView::scalingTime(qreal x) +{ Q_UNUSED(x); qreal factor = 1.0 + qreal(_numScheduledScalings) / 300.0; - if (QApplication::keyboardModifiers() == Qt::ControlModifier){// If you press CTRL this code will execute + if (QApplication::keyboardModifiers() == Qt::ControlModifier) + {// If you press CTRL this code will execute scale(factor, factor); emit NewFactor(factor); - } else { - if(_numScheduledScalings < 0){ + } + else + { + if (_numScheduledScalings < 0) + { verticalScrollBar()->setValue(qRound(verticalScrollBar()->value() + factor*3.5)); emit NewFactor(factor); - } else { - if(verticalScrollBar()->value() > 0){ + } + else + { + if (verticalScrollBar()->value() > 0) + { verticalScrollBar()->setValue(qRound(verticalScrollBar()->value() - factor*3.5)); emit NewFactor(factor); } } - } + } } -void VMainGraphicsView::animFinished(){ - if (_numScheduledScalings > 0){ +void VMainGraphicsView::animFinished() +{ + if (_numScheduledScalings > 0) + { _numScheduledScalings--; - } else { + } + else + { _numScheduledScalings++; } sender()->~QObject(); } -void VMainGraphicsView::mousePressEvent(QMouseEvent *mousePress){ - if(mousePress->button() & Qt::LeftButton){ - switch(QGuiApplication::keyboardModifiers()){ - case Qt::ControlModifier: - QGraphicsView::setDragMode(QGraphicsView::ScrollHandDrag); - QGraphicsView::mousePressEvent(mousePress); - break; - default: - QGraphicsView::mousePressEvent(mousePress); - break; +void VMainGraphicsView::mousePressEvent(QMouseEvent *mousePress) +{ + if (mousePress->button() & Qt::LeftButton) + { + switch (QGuiApplication::keyboardModifiers()) + { + case Qt::ControlModifier: + QGraphicsView::setDragMode(QGraphicsView::ScrollHandDrag); + QGraphicsView::mousePressEvent(mousePress); + break; + default: + QGraphicsView::mousePressEvent(mousePress); + break; } } } -void VMainGraphicsView::mouseReleaseEvent(QMouseEvent *event){ +void VMainGraphicsView::mouseReleaseEvent(QMouseEvent *event) +{ QGraphicsView::mouseReleaseEvent ( event ); QGraphicsView::setDragMode( QGraphicsView::RubberBandDrag ); } diff --git a/widgets/vmaingraphicsview.h b/widgets/vmaingraphicsview.h index d0035c7de..f4ad052ef 100644 --- a/widgets/vmaingraphicsview.h +++ b/widgets/vmaingraphicsview.h @@ -24,7 +24,8 @@ #include -class VMainGraphicsView : public QGraphicsView{ +class VMainGraphicsView : public QGraphicsView +{ Q_OBJECT public: explicit VMainGraphicsView(QWidget *parent = 0); diff --git a/widgets/vtablegraphicsview.cpp b/widgets/vtablegraphicsview.cpp index 609bb1ec3..c6716255e 100644 --- a/widgets/vtablegraphicsview.cpp +++ b/widgets/vtablegraphicsview.cpp @@ -21,27 +21,35 @@ #include "vtablegraphicsview.h" -VTableGraphicsView::VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent) : - QGraphicsView(pScene, parent){ +VTableGraphicsView::VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent) + :QGraphicsView(pScene, parent) +{ QGraphicsView::setResizeAnchor(QGraphicsView::AnchorUnderMouse); connect(pScene, &QGraphicsScene::selectionChanged, this, &VTableGraphicsView::selectionChanged); } -void VTableGraphicsView::selectionChanged(){ +void VTableGraphicsView::selectionChanged() +{ QList listSelectedItems = scene()->selectedItems(); - if( listSelectedItems.isEmpty() == true ){ + if ( listSelectedItems.isEmpty() == true ) + { qDebug() << tr("detail don't find"); emit itemChect(true); - } else { + } + else + { qDebug() << tr("detail find"); emit itemChect(false); } } -void VTableGraphicsView::MirrorItem(){ +void VTableGraphicsView::MirrorItem() +{ QList list = scene()->selectedItems(); - if(list.size()>0){ - for( qint32 i = 0; i < list.count(); ++i ){ + if (list.size()>0) + { + for ( qint32 i = 0; i < list.count(); ++i ) + { QRectF itemRectOld = list.at(i)->sceneBoundingRect(); //Get the current transform QTransform transform(list.at(i)->transform()); @@ -73,92 +81,112 @@ void VTableGraphicsView::MirrorItem(){ } } -void VTableGraphicsView::wheelEvent(QWheelEvent *event){ - if (QGuiApplication::keyboardModifiers() == Qt::ControlModifier){ +void VTableGraphicsView::wheelEvent(QWheelEvent *event) +{ + if (QGuiApplication::keyboardModifiers() == Qt::ControlModifier) + { // Если нажата клавиша CTRL этот код выполнится - if ((event->delta())>0){ + if ((event->delta())>0) + { ZoomIn(); - } else if ((event->delta())<0){ + } + else if ((event->delta())<0) + { ZoomOut(); } - } else { + } + else + { verticalScrollBar()->setValue(verticalScrollBar()->value()-event->delta()); } } -void VTableGraphicsView::mousePressEvent(QMouseEvent *mousePress){ - if(mousePress->button() & Qt::LeftButton){ - switch(QGuiApplication::keyboardModifiers()){ - case Qt::ControlModifier: - QGraphicsView::setDragMode(QGraphicsView::ScrollHandDrag); - QGraphicsView::mousePressEvent(mousePress); - break; - default: - QGraphicsView::mousePressEvent(mousePress); - break; +void VTableGraphicsView::mousePressEvent(QMouseEvent *mousePress) +{ + if (mousePress->button() & Qt::LeftButton) + { + switch (QGuiApplication::keyboardModifiers()) + { + case Qt::ControlModifier: + QGraphicsView::setDragMode(QGraphicsView::ScrollHandDrag); + QGraphicsView::mousePressEvent(mousePress); + break; + default: + QGraphicsView::mousePressEvent(mousePress); + break; } } } -void VTableGraphicsView::mouseReleaseEvent(QMouseEvent *event){ +void VTableGraphicsView::mouseReleaseEvent(QMouseEvent *event) +{ QGraphicsView::mouseReleaseEvent ( event ); QGraphicsView::setDragMode( QGraphicsView::RubberBandDrag ); } -void VTableGraphicsView::keyPressEvent(QKeyEvent *event){ - switch(event->key()){ - case Qt::Key_Space: - rotateIt(); - break; - case Qt::Key_Left: - MoveItem(VTableGraphicsView::Left); - break; - case Qt::Key_Right: - MoveItem(VTableGraphicsView::Right); - break; - case Qt::Key_Up: - MoveItem(VTableGraphicsView::Up); - break; - case Qt::Key_Down: - MoveItem(VTableGraphicsView::Down); - break; +void VTableGraphicsView::keyPressEvent(QKeyEvent *event) +{ + switch (event->key()) + { + case Qt::Key_Space: + rotateIt(); + break; + case Qt::Key_Left: + MoveItem(VTableGraphicsView::Left); + break; + case Qt::Key_Right: + MoveItem(VTableGraphicsView::Right); + break; + case Qt::Key_Up: + MoveItem(VTableGraphicsView::Up); + break; + case Qt::Key_Down: + MoveItem(VTableGraphicsView::Down); + break; } QGraphicsView::keyPressEvent ( event ); } -void VTableGraphicsView::rotateIt(){ +void VTableGraphicsView::rotateIt() +{ QList list = scene()->selectedItems(); - if(list.size()>0){ - for( qint32 i = 0; i < list.count(); ++i ){ + if (list.size()>0) + { + for ( qint32 i = 0; i < list.count(); ++i ) + { list.at(i)->setTransformOriginPoint(list.at(i)->boundingRect().center()); list.at(i)->setRotation(list.at(i)->rotation() + 180); } } } -void VTableGraphicsView::MoveItem(VTableGraphicsView::typeMove_e move){ +void VTableGraphicsView::MoveItem(VTableGraphicsView::typeMove_e move) +{ qreal dx = 0, dy = 0; - switch(move){ - case VTableGraphicsView::Left: - dx = -3; - dy = 0; - break; - case VTableGraphicsView::Right: - dx = 3; - dy = 0; - break; - case VTableGraphicsView::Up: - dx = 0; - dy = -3; - break; - case VTableGraphicsView::Down: - dx = 0; - dy = 3; - break; + switch (move) + { + case VTableGraphicsView::Left: + dx = -3; + dy = 0; + break; + case VTableGraphicsView::Right: + dx = 3; + dy = 0; + break; + case VTableGraphicsView::Up: + dx = 0; + dy = -3; + break; + case VTableGraphicsView::Down: + dx = 0; + dy = 3; + break; } QList listSelectedItems = scene()->selectedItems(); - if(listSelectedItems.size()>0){ - for( qint32 i = 0; i < listSelectedItems.count(); ++i ){ + if (listSelectedItems.size()>0) + { + for ( qint32 i = 0; i < listSelectedItems.count(); ++i ) + { listSelectedItems.at(i)->moveBy(dx, dy); } } diff --git a/widgets/vtablegraphicsview.h b/widgets/vtablegraphicsview.h index 8b52ac2a7..3f78d7f4f 100644 --- a/widgets/vtablegraphicsview.h +++ b/widgets/vtablegraphicsview.h @@ -24,7 +24,8 @@ #include -class VTableGraphicsView : public QGraphicsView{ +class VTableGraphicsView : public QGraphicsView +{ Q_OBJECT public: enum typeMove_e { Left, Right, Up, Down }; @@ -51,11 +52,11 @@ public slots: /** * @brief ZoomIn збільшує масштаб листа. */ - inline void ZoomIn() {scale(1.1,1.1);} + inline void ZoomIn() {scale(1.1, 1.1);} /** * @brief ZoomOut зменшує масштаб листа. */ - inline void ZoomOut() {scale(1/1.1,1/1.1);} + inline void ZoomOut() {scale(1/1.1, 1/1.1);} protected: /** * @brief wheelEvent обробник повороту колеса мишки. diff --git a/xml/vdomdocument.cpp b/xml/vdomdocument.cpp index 7dc3e5807..76c73c831 100644 --- a/xml/vdomdocument.cpp +++ b/xml/vdomdocument.cpp @@ -34,57 +34,64 @@ #include #include -VDomDocument::VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode) : QDomDocument(), - map(QHash()), nameActivDraw(QString()), data(data), +VDomDocument::VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode) + : QDomDocument(), map(QHash()), nameActivDraw(QString()), data(data), tools(QHash()), history(QVector()), cursor(0), - comboBoxDraws(comboBoxDraws), mode(mode){ -} + comboBoxDraws(comboBoxDraws), mode(mode){} VDomDocument::VDomDocument(const QString& name, VContainer *data, QComboBox *comboBoxDraws, - Draw::Draws *mode) : - QDomDocument(name), map(QHash()), nameActivDraw(QString()), data(data), + Draw::Draws *mode) + :QDomDocument(name), map(QHash()), nameActivDraw(QString()), data(data), tools(QHash()), history(QVector()), cursor(0), - comboBoxDraws(comboBoxDraws), mode(mode){ -} + comboBoxDraws(comboBoxDraws), mode(mode){} VDomDocument::VDomDocument(const QDomDocumentType& doctype, VContainer *data, QComboBox *comboBoxDraws, - Draw::Draws *mode) : - QDomDocument(doctype), map(QHash()), nameActivDraw(QString()), data(data), + Draw::Draws *mode) + :QDomDocument(doctype), map(QHash()), nameActivDraw(QString()), data(data), tools(QHash()), history(QVector()), cursor(0), - comboBoxDraws(comboBoxDraws), mode(mode){ -} + comboBoxDraws(comboBoxDraws), mode(mode){} -QDomElement VDomDocument::elementById(const QString& id){ - if (map.contains(id)) { +QDomElement VDomDocument::elementById(const QString& id) +{ + if (map.contains(id)) + { QDomElement e = map[id]; - if (e.parentNode().nodeType() != QDomNode::BaseNode) { + if (e.parentNode().nodeType() != QDomNode::BaseNode) + { return e; } map.remove(id); } bool res = this->find(this->documentElement(), id); - if (res) { + if (res) + { return map[id]; } return QDomElement(); } -bool VDomDocument::find(QDomElement node, const QString& id){ - if (node.hasAttribute("id")) { +bool VDomDocument::find(QDomElement node, const QString& id) +{ + if (node.hasAttribute("id")) + { QString value = node.attribute("id"); this->map[value] = node; - if (value == id) { + if (value == id) + { return true; } } - for (qint32 i=0; ifind(n.toElement(), id); - if (res) { + if (res) + { return true; } } @@ -93,7 +100,8 @@ bool VDomDocument::find(QDomElement node, const QString& id){ return false; } -void VDomDocument::CreateEmptyFile(){ +void VDomDocument::CreateEmptyFile() +{ QDomElement domElement = this->createElement("lekalo"); this->appendChild(domElement); QDomNode xmlNode = this->createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\""); @@ -102,17 +110,22 @@ void VDomDocument::CreateEmptyFile(){ domElement.appendChild(incrElement); } -bool VDomDocument::CheckNameDraw(const QString& name) const{ - Q_ASSERT_X(!name.isEmpty(), "CheckNameDraw", "name draw is empty"); +bool VDomDocument::CheckNameDraw(const QString& name) const +{ + Q_ASSERT_X(name.isEmpty() == false, "CheckNameDraw", "name draw is empty"); QDomNodeList elements = this->documentElement().elementsByTagName( "draw" ); - if(elements.size() == 0){ + if (elements.size() == 0) + { return false; } - for ( qint32 i = 0; i < elements.count(); i++ ){ + for ( qint32 i = 0; i < elements.count(); i++ ) + { QDomElement elem = elements.at( i ).toElement(); - if(!elem.isNull()){ + if (elem.isNull() == false) + { QString fieldName = elem.attribute( "name" ); - if ( fieldName == name ){ + if ( fieldName == name ) + { return true; } } @@ -120,12 +133,15 @@ bool VDomDocument::CheckNameDraw(const QString& name) const{ return false; } -bool VDomDocument::appendDraw(const QString& name){ - Q_ASSERT_X(!name.isEmpty(), "appendDraw", "name draw is empty"); - if(name.isEmpty()){ +bool VDomDocument::appendDraw(const QString& name) +{ + Q_ASSERT_X(name.isEmpty() == false, "appendDraw", "name draw is empty"); + if (name.isEmpty()) + { return false; } - if(CheckNameDraw(name)== false){ + if (CheckNameDraw(name)== false) + { QDomElement rootElement = this->documentElement(); QDomElement drawElement = this->createElement("draw"); @@ -142,60 +158,79 @@ bool VDomDocument::appendDraw(const QString& name){ rootElement.appendChild(drawElement); - if(nameActivDraw.isEmpty()){ + if (nameActivDraw.isEmpty()) + { SetActivDraw(name); - } else { + } + else + { ChangeActivDraw(name); } return true; - } else { + } + else + { return false; } return false; } -void VDomDocument::ChangeActivDraw(const QString& name, Document::Documents parse){ - Q_ASSERT_X(!name.isEmpty(), "ChangeActivDraw", "name draw is empty"); - if(CheckNameDraw(name) == true){ +void VDomDocument::ChangeActivDraw(const QString& name, Document::Documents parse) +{ + Q_ASSERT_X(name.isEmpty() == false, "ChangeActivDraw", "name draw is empty"); + if (CheckNameDraw(name) == true) + { this->nameActivDraw = name; - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { emit ChangedActivDraw(name); } } } -bool VDomDocument::SetNameDraw(const QString& name){ - Q_ASSERT_X(!name.isEmpty(), "SetNameDraw", "name draw is empty"); +bool VDomDocument::SetNameDraw(const QString& name) +{ + Q_ASSERT_X(name.isEmpty() == false, "SetNameDraw", "name draw is empty"); QString oldName = nameActivDraw; QDomElement element; - if(GetActivDrawElement(element)){ + if (GetActivDrawElement(element)) + { nameActivDraw = name; element.setAttribute("name", nameActivDraw); emit haveChange(); emit ChangedNameDraw(oldName, nameActivDraw); return true; - } else { + } + else + { qWarning()<<"Can't find activ draw"<nameActivDraw = name; } -bool VDomDocument::GetActivDrawElement(QDomElement &element){ - if(!nameActivDraw.isEmpty()){ +bool VDomDocument::GetActivDrawElement(QDomElement &element) +{ + if (nameActivDraw.isEmpty() == false) + { QDomNodeList elements = this->documentElement().elementsByTagName( "draw" ); - if(elements.size() == 0){ + if (elements.size() == 0) + { return false; } - for ( qint32 i = 0; i < elements.count(); i++ ){ + for ( qint32 i = 0; i < elements.count(); i++ ) + { element = elements.at( i ).toElement(); - if(!element.isNull()){ + if (element.isNull() == false) + { QString fieldName = element.attribute( "name" ); - if ( fieldName == nameActivDraw ){ + if ( fieldName == nameActivDraw ) + { return true; } } @@ -204,58 +239,79 @@ bool VDomDocument::GetActivDrawElement(QDomElement &element){ return false; } -bool VDomDocument::GetActivCalculationElement(QDomElement &element){ +bool VDomDocument::GetActivCalculationElement(QDomElement &element) +{ bool ok = GetActivNodeElement("calculation", element); - if(ok){ + if (ok) + { return true; - } else { + } + else + { return false; } } -bool VDomDocument::GetActivModelingElement(QDomElement &element){ +bool VDomDocument::GetActivModelingElement(QDomElement &element) +{ bool ok = GetActivNodeElement("modeling", element); - if(ok){ + if (ok) + { return true; - } else { + } + else + { return false; } } -bool VDomDocument::GetActivDetailsElement(QDomElement &element){ +bool VDomDocument::GetActivDetailsElement(QDomElement &element) +{ bool ok = GetActivNodeElement("details", element); - if(ok){ + if (ok) + { return true; - } else { + } + else + { return false; } } -bool VDomDocument::GetActivNodeElement(const QString& name, QDomElement &element){ - Q_ASSERT_X(!name.isEmpty(), "GetActivNodeElement", "name draw is empty"); +bool VDomDocument::GetActivNodeElement(const QString& name, QDomElement &element) +{ + Q_ASSERT_X(name.isEmpty() == false, "GetActivNodeElement", "name draw is empty"); QDomElement drawElement; bool drawOk = this->GetActivDrawElement(drawElement); - if(drawOk == true){ + if (drawOk == true) + { QDomNodeList listElement = drawElement.elementsByTagName(name); - if(listElement.size() == 0 || listElement.size() > 1){ + if (listElement.size() == 0 || listElement.size() > 1) + { return false; } element = listElement.at( 0 ).toElement(); - if(!element.isNull()){ + if (element.isNull() == false) + { return true; - } else { + } + else + { return false; } - } else { + } + else + { return false; } } -void VDomDocument::Parse(Document::Documents parse, VMainGraphicsScene *sceneDraw, - VMainGraphicsScene *sceneDetail){ +void VDomDocument::Parse(Document::Documents parse, VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail) +{ Q_ASSERT(sceneDraw != 0); Q_ASSERT(sceneDetail != 0); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { TestUniqueId(); data->Clear(); nameActivDraw.clear(); @@ -272,24 +328,35 @@ void VDomDocument::Parse(Document::Documents parse, VMainGraphicsScene *sceneDra history.clear(); QDomElement rootElement = this->documentElement(); QDomNode domNode = rootElement.firstChild(); - while(!domNode.isNull()){ - if(domNode.isElement()){ + while (domNode.isNull() == false) + { + if (domNode.isElement()) + { QDomElement domElement = domNode.toElement(); - if(!domElement.isNull()){ - if(domElement.tagName()=="draw"){ - if(parse == Document::FullParse){ - if(nameActivDraw.isEmpty()){ + if (domElement.isNull() == false) + { + if (domElement.tagName()=="draw") + { + if (parse == Document::FullParse) + { + if (nameActivDraw.isEmpty()) + { SetActivDraw(domElement.attribute("name")); - } else { + } + else + { ChangeActivDraw(domElement.attribute("name")); } comboBoxDraws->addItem(domElement.attribute("name")); - } else { + } + else + { ChangeActivDraw(domElement.attribute("name"), Document::LiteParse); } ParseDrawElement(sceneDraw, sceneDetail, domElement, parse); } - if(domElement.tagName()=="increments"){ + if (domElement.tagName()=="increments") + { ParseIncrementsElement(domElement); } } @@ -298,13 +365,18 @@ void VDomDocument::Parse(Document::Documents parse, VMainGraphicsScene *sceneDra } } -void VDomDocument::ParseIncrementsElement(const QDomNode &node){ +void VDomDocument::ParseIncrementsElement(const QDomNode &node) +{ QDomNode domNode = node.firstChild(); - while(!domNode.isNull()){ - if(domNode.isElement()){ + while (domNode.isNull() == false) + { + if (domNode.isElement()) + { QDomElement domElement = domNode.toElement(); - if(!domElement.isNull()){ - if(domElement.tagName() == "increment"){ + if (domElement.isNull() == false) + { + if (domElement.tagName() == "increment") + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal base = GetParametrDouble(domElement, "base"); @@ -321,86 +393,107 @@ void VDomDocument::ParseIncrementsElement(const QDomNode &node){ } } -qint64 VDomDocument::GetParametrId(const QDomElement &domElement) const{ - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); +qint64 VDomDocument::GetParametrId(const QDomElement &domElement) const +{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); qint64 id = GetParametrLongLong(domElement, "id"); - if(id <= 0){ + if (id <= 0) + { throw VExceptionWrongParameterId(tr("Got wrong parameter id. Need only id > 0."), domElement); } return id; } -qint64 VDomDocument::GetParametrLongLong(const QDomElement &domElement, const QString &name) const{ - Q_ASSERT_X(!name.isEmpty(), Q_FUNC_INFO, "name of parametr is empty"); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); +qint64 VDomDocument::GetParametrLongLong(const QDomElement &domElement, const QString &name) const +{ + Q_ASSERT_X(name.isEmpty() == false, Q_FUNC_INFO, "name of parametr is empty"); + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); bool ok = false; QString parametr = GetParametrString(domElement, name); qint64 id = parametr.toLongLong(&ok); - if(ok == false){ + if (ok == false) + { throw VExceptionConversionError(tr("Can't convert toLongLong parameter"), name); } return id; } -QString VDomDocument::GetParametrString(const QDomElement &domElement, const QString &name) const{ - Q_ASSERT_X(!name.isEmpty(), Q_FUNC_INFO, "name of parametr is empty"); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); +QString VDomDocument::GetParametrString(const QDomElement &domElement, const QString &name) const +{ + Q_ASSERT_X(name.isEmpty() == false, Q_FUNC_INFO, "name of parametr is empty"); + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); QString parameter = domElement.attribute(name, ""); - if(parameter.isEmpty()){ + if (parameter.isEmpty()) + { throw VExceptionEmptyParameter(tr("Got empty parameter"), name, domElement); } return parameter; } -qreal VDomDocument::GetParametrDouble(const QDomElement &domElement, const QString &name) const{ - Q_ASSERT_X(!name.isEmpty(), Q_FUNC_INFO, "name of parametr is empty"); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); +qreal VDomDocument::GetParametrDouble(const QDomElement &domElement, const QString &name) const +{ + Q_ASSERT_X(name.isEmpty() == false, Q_FUNC_INFO, "name of parametr is empty"); + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); bool ok = false; QString parametr = GetParametrString(domElement, name); qreal param = parametr.replace(",", ".").toDouble(&ok); - if(ok == false){ + if (ok == false) + { throw VExceptionConversionError(tr("Can't convert toDouble parameter"), name); } return param; } -void VDomDocument::TestUniqueId() const{ +void VDomDocument::TestUniqueId() const +{ QVector vector; CollectId(this->documentElement(), vector); } -void VDomDocument::CollectId(QDomElement node, QVector &vector) const{ - if (node.hasAttribute("id")) { +void VDomDocument::CollectId(QDomElement node, QVector &vector) const +{ + if (node.hasAttribute("id")) + { qint64 id = GetParametrId(node); - if(vector.contains(id)){ + if (vector.contains(id)) + { throw VExceptionUniqueId(tr("This id is not unique."), node); } vector.append(id); } - for (qint32 i=0; iClearObject(); ParseDrawMode(sceneDraw, sceneDetail, domElement, parse, Draw::Calculation); } - if(domElement.tagName() == "modeling"){ + if (domElement.tagName() == "modeling") + { ParseDrawMode(sceneDraw, sceneDetail, domElement, parse, Draw::Modeling); } - if(domElement.tagName() == "details"){ + if (domElement.tagName() == "details") + { ParseDetails(sceneDetail, domElement, parse); } } @@ -410,34 +503,43 @@ void VDomDocument::ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphics } void VDomDocument::ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, - const QDomNode& node, const Document::Documents &parse, - Draw::Draws mode){ + const QDomNode& node, const Document::Documents &parse, Draw::Draws mode) +{ Q_ASSERT(sceneDraw != 0); Q_ASSERT(sceneDetail != 0); VMainGraphicsScene *scene = 0; - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { scene = sceneDraw; - } else { + } + else + { scene = sceneDetail; } QDomNodeList nodeList = node.childNodes(); qint32 num = nodeList.size(); - for(qint32 i = 0; i < num; ++i){ + for (qint32 i = 0; i < num; ++i) + { QDomElement domElement = nodeList.at(i).toElement(); - if(!domElement.isNull()){ - if(domElement.tagName() == "point"){ + if (domElement.isNull() == false) + { + if (domElement.tagName() == "point") + { ParsePointElement(scene, domElement, parse, domElement.attribute("type", ""), mode); continue; } - if(domElement.tagName() == "line"){ + if (domElement.tagName() == "line") + { ParseLineElement(scene, domElement, parse, mode); continue; } - if(domElement.tagName() == "spline"){ + if (domElement.tagName() == "spline") + { ParseSplineElement(scene, domElement, parse, domElement.attribute("type", ""), mode); continue; } - if(domElement.tagName() == "arc"){ + if (domElement.tagName() == "arc") + { ParseArcElement(scene, domElement, parse, domElement.attribute("type", ""), mode); continue; } @@ -446,10 +548,12 @@ void VDomDocument::ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsSce } void VDomDocument::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, - const Document::Documents &parse){ + const Document::Documents &parse) +{ Q_ASSERT(sceneDetail != 0); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); - try{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); + try + { VDetail detail; VDetail oldDetail; qint64 id = GetParametrId(domElement); @@ -462,10 +566,13 @@ void VDomDocument::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDo QDomNodeList nodeList = domElement.childNodes(); qint32 num = nodeList.size(); - for(qint32 i = 0; i < num; ++i){ + for (qint32 i = 0; i < num; ++i) + { QDomElement element = nodeList.at(i).toElement(); - if(!element.isNull()){ - if(element.tagName() == "node"){ + if (element.isNull() == false) + { + if (element.tagName() == "node") + { qint64 id = GetParametrLongLong(element, "idObject"); qreal mx = toPixel(GetParametrDouble(element, "mx")); qreal my = toPixel(GetParametrDouble(element, "my")); @@ -473,53 +580,88 @@ void VDomDocument::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDo Draw::Draws mode; NodeDetail::NodeDetails nodeType = NodeDetail::Contour; QString t = GetParametrString(element, "type"); - if(t == "NodePoint"){ + if (t == "NodePoint") + { tool = Tool::NodePoint; VPointF point = data->GetModelingPoint(id); mode = point.getMode(); oldDetail.append(VNodeDetail(point.getIdObject(), tool, mode, NodeDetail::Contour)); - } else if(t == "NodeArc"){ + } + else if (t == "NodeArc") + { tool = Tool::NodeArc; VArc arc = data->GetModelingArc(id); mode = arc.getMode(); oldDetail.append(VNodeDetail(arc.getIdObject(), tool, mode, NodeDetail::Contour)); - } else if(t == "NodeSpline"){ + } + else if (t == "NodeSpline") + { tool = Tool::NodeSpline; VSpline spl = data->GetModelingSpline(id); mode = spl.getMode(); oldDetail.append(VNodeDetail(spl.getIdObject(), tool, mode, NodeDetail::Contour)); - } else if(t == "NodeSplinePath"){ + } + else if (t == "NodeSplinePath") + { tool = Tool::NodeSplinePath; VSplinePath splPath = data->GetModelingSplinePath(id); mode = splPath.getMode(); oldDetail.append(VNodeDetail(splPath.getIdObject(), tool, mode, NodeDetail::Contour)); - } else if(t == "AlongLineTool"){ + } + else if (t == "AlongLineTool") + { tool = Tool::AlongLineTool; - } else if(t == "ArcTool"){ + } + else if (t == "ArcTool") + { tool = Tool::ArcTool; - } else if(t == "BisectorTool"){ + } + else if (t == "BisectorTool") + { tool = Tool::BisectorTool; - } else if(t == "EndLineTool"){ + } + else if (t == "EndLineTool") + { tool = Tool::EndLineTool; - } else if(t == "LineIntersectTool"){ + } + else if (t == "LineIntersectTool") + { tool = Tool::LineIntersectTool; - } else if(t == "LineTool"){ + } + else if (t == "LineTool") + { tool = Tool::LineTool; - } else if(t == "NormalTool"){ + } + else if (t == "NormalTool") + { tool = Tool::NormalTool; - } else if(t == "PointOfContact"){ + } + else if (t == "PointOfContact") + { tool = Tool::PointOfContact; - } else if(t == "ShoulderPointTool"){ + } + else if (t == "ShoulderPointTool") + { tool = Tool::ShoulderPointTool; - } else if(t == "SplinePathTool"){ + } + else if (t == "SplinePathTool") + { tool = Tool::SplinePathTool; - } else if(t == "SplineTool"){ + } + else if (t == "SplineTool") + { tool = Tool::SplineTool; - } else if(t == "Height"){ + } + else if (t == "Height") + { tool = Tool::Height; - } else if(t == "Triangle"){ + } + else if (t == "Triangle") + { tool = Tool::Triangle; - } else if(t == "PointOfIntersection"){ + } + else if (t == "PointOfIntersection") + { tool = Tool::PointOfIntersection; } detail.append(VNodeDetail(id, tool, Draw::Modeling, nodeType, mx, my)); @@ -528,7 +670,8 @@ void VDomDocument::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDo } VToolDetail::Create(id, detail, sceneDetail, this, data, parse, Tool::FromFile); } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating detail"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; @@ -536,15 +679,20 @@ void VDomDocument::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDo } void VDomDocument::ParseDetails(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, - const Document::Documents &parse){ + const Document::Documents &parse) +{ Q_ASSERT(sceneDetail != 0); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); QDomNode domNode = domElement.firstChild(); - while(!domNode.isNull()){ - if(domNode.isElement()){ + while (domNode.isNull() == false) + { + if (domNode.isElement()) + { QDomElement domElement = domNode.toElement(); - if(!domElement.isNull()){ - if(domElement.tagName() == "detail"){ + if (domElement.isNull() == false) + { + if (domElement.tagName() == "detail") + { ParseDetailElement(sceneDetail, domElement, parse); } } @@ -554,13 +702,15 @@ void VDomDocument::ParseDetails(VMainGraphicsScene *sceneDetail, const QDomEleme } void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement, - const Document::Documents &parse, const QString& type, - Draw::Draws mode){ + const Document::Documents &parse, const QString& type, Draw::Draws mode) +{ Q_ASSERT(scene != 0); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); - Q_ASSERT_X(!type.isEmpty(), Q_FUNC_INFO, "type of point is empty"); - if(type == "single"){ - try{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); + Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of point is empty"); + if (type == "single") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal x = toPixel(GetParametrDouble(domElement, "x")); @@ -570,10 +720,12 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen data->UpdatePoint(id, VPointF(x, y, name, mx, my)); VDrawTool::AddRecord(id, Tool::SinglePointTool, this); - if(parse != Document::FullParse){ + if (parse != Document::FullParse) + { UpdateToolData(id, data); } - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { VToolSinglePoint *spoint = new VToolSinglePoint(this, data, id, Tool::FromFile); Q_ASSERT(spoint != 0); scene->addItem(spoint); @@ -583,14 +735,17 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating single point"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "endLine"){ - try{ + if (type == "endLine") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -599,23 +754,29 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen QString formula = GetParametrString(domElement, "length"); qint64 basePointId = GetParametrLongLong(domElement, "basePoint"); qreal angle = GetParametrDouble(domElement, "angle"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolEndLine::Create(id, name, typeLine, formula, angle, basePointId, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingEndLine::Create(id, name, typeLine, formula, angle, basePointId, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating point of end line"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "alongLine"){ - try{ + if (type == "alongLine") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -625,23 +786,29 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 firstPointId = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolAlongLine::Create(id, name, typeLine, formula, firstPointId, secondPointId, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingAlongLine::Create(id, name, typeLine, formula, firstPointId, secondPointId, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating point along line"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "shoulder"){ - try{ + if (type == "shoulder") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -652,23 +819,29 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 p2Line = GetParametrLongLong(domElement, "p2Line"); qint64 pShoulder = GetParametrLongLong(domElement, "pShoulder"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolShoulderPoint::Create(id, formula, p1Line, p2Line, pShoulder, typeLine, name, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingShoulderPoint::Create(id, formula, p1Line, p2Line, pShoulder, typeLine, name, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating point of shoulder"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "normal"){ - try{ + if (type == "normal") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -679,23 +852,29 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); qreal angle = GetParametrDouble(domElement, "angle"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolNormal::Create(id, formula, firstPointId, secondPointId, typeLine, name, angle, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingNormal::Create(id, formula, firstPointId, secondPointId, typeLine, name, angle, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating point of normal"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "bisector"){ - try{ + if (type == "bisector") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -706,23 +885,29 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); qint64 thirdPointId = GetParametrLongLong(domElement, "thirdPoint"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolBisector::Create(id, formula, firstPointId, secondPointId, thirdPointId, typeLine, name, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingBisector::Create(id, formula, firstPointId, secondPointId, thirdPointId, typeLine, name, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating point of bisector"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "lineIntersect"){ - try{ + if (type == "lineIntersect") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -732,23 +917,29 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 p1Line2Id = GetParametrLongLong(domElement, "p1Line2"); qint64 p2Line2Id = GetParametrLongLong(domElement, "p2Line2"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolLineIntersect::Create(id, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, name, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingLineIntersect::Create(id, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, name, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating point of lineintersection"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "pointOfContact"){ - try{ + if (type == "pointOfContact") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -758,32 +949,41 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 firstPointId = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolPointOfContact::Create(id, radius, center, firstPointId, secondPointId, name, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingPointOfContact::Create(id, radius, center, firstPointId, secondPointId, name, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating point of contact"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "modeling"){ - try{ + if (type == "modeling") + { + try + { qint64 id = GetParametrId(domElement); qint64 idObject = GetParametrLongLong(domElement, "idObject"); QString tObject = GetParametrString(domElement, "typeObject"); VPointF point; Draw::Draws typeObject; - if(tObject == "Calculation"){ + if (tObject == "Calculation") + { typeObject = Draw::Calculation; point = data->GetPoint(idObject ); - } else { + } + else + { typeObject = Draw::Modeling; point = data->GetModelingPoint(idObject); } @@ -794,14 +994,17 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen VNodePoint::Create(this, data, id, idObject, mode, parse, Tool::FromFile); return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating modeling point"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "height"){ - try{ + if (type == "height") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -810,23 +1013,29 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 basePointId = GetParametrLongLong(domElement, "basePoint"); qint64 p1LineId = GetParametrLongLong(domElement, "p1Line"); qint64 p2LineId = GetParametrLongLong(domElement, "p2Line"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolHeight::Create(id, name, typeLine, basePointId, p1LineId, p2LineId, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingHeight::Create(id, name, typeLine, basePointId, p1LineId, p2LineId, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating height"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "triangle"){ - try{ + if (type == "triangle") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -836,23 +1045,29 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 firstPointId = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolTriangle::Create(id, name, axisP1Id, axisP2Id, firstPointId, secondPointId, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingTriangle::Create(id, name, axisP1Id, axisP2Id, firstPointId, secondPointId, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating triangle"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "pointOfIntersection"){ - try{ + if (type == "pointOfIntersection") + { + try + { qint64 id = GetParametrId(domElement); QString name = GetParametrString(domElement, "name"); qreal mx = toPixel(GetParametrDouble(domElement, "mx")); @@ -860,16 +1075,20 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen qint64 firstPointId = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPointId = GetParametrLongLong(domElement, "secondPoint"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolPointOfIntersection::Create(id, name, firstPointId, secondPointId, mx, my, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingPointOfIntersection::Create(id, name, firstPointId, secondPointId, mx, my, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating point of intersection"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; @@ -878,22 +1097,28 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen } void VDomDocument::ParseLineElement(VMainGraphicsScene *scene, const QDomElement &domElement, - const Document::Documents &parse, Draw::Draws mode){ + const Document::Documents &parse, Draw::Draws mode) +{ Q_ASSERT(scene != 0); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); - try{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); + try + { qint64 id = GetParametrId(domElement); qint64 firstPoint = GetParametrLongLong(domElement, "firstPoint"); qint64 secondPoint = GetParametrLongLong(domElement, "secondPoint"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolLine::Create(id, firstPoint, secondPoint, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingLine::Create(id, firstPoint, secondPoint, this, data, parse, Tool::FromFile); } } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating line"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; @@ -901,13 +1126,15 @@ void VDomDocument::ParseLineElement(VMainGraphicsScene *scene, const QDomElement } void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &domElement, - const Document::Documents &parse, const QString &type, - Draw::Draws mode){ + const Document::Documents &parse, const QString &type, Draw::Draws mode) +{ Q_ASSERT(scene != 0); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); - Q_ASSERT_X(!type.isEmpty(), Q_FUNC_INFO, "type of spline is empty"); - if(type == "simple"){ - try{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); + Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of spline is empty"); + if (type == "simple") + { + try + { qint64 id = GetParametrId(domElement); qint64 point1 = GetParametrLongLong(domElement, "point1"); qint64 point4 = GetParametrLongLong(domElement, "point4"); @@ -917,70 +1144,89 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme qreal kAsm2 = GetParametrDouble(domElement, "kAsm2"); qreal kCurve = GetParametrDouble(domElement, "kCurve"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolSpline::Create(id, point1, point4, kAsm1, kAsm2, angle1, angle2, kCurve, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingSpline::Create(id, point1, point4, kAsm1, kAsm2, angle1, angle2, kCurve, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating simple curve"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "path"){ - try{ + if (type == "path") + { + try + { qint64 id = GetParametrId(domElement); qreal kCurve = GetParametrDouble(domElement, "kCurve"); VSplinePath path(data->DataPoints(), kCurve); QDomNodeList nodeList = domElement.childNodes(); qint32 num = nodeList.size(); - for(qint32 i = 0; i < num; ++i){ + for (qint32 i = 0; i < num; ++i) + { QDomElement element = nodeList.at(i).toElement(); - if(!element.isNull()){ - if(element.tagName() == "pathPoint"){ + if (element.isNull() == false) + { + if (element.tagName() == "pathPoint") + { qreal kAsm1 = GetParametrDouble(element, "kAsm1"); qreal angle = GetParametrDouble(element, "angle"); qreal kAsm2 = GetParametrDouble(element, "kAsm2"); qint64 pSpline = GetParametrLongLong(element, "pSpline"); VSplinePoint splPoint(pSpline, kAsm1, angle, kAsm2); path.append(splPoint); - if(parse == Document::FullParse){ + if (parse == Document::FullParse) + { IncrementReferens(pSpline); } } } } - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolSplinePath::Create(id, path, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingSplinePath::Create(id, path, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating curve path"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "modelingSpline"){ - try{ + if (type == "modelingSpline") + { + try + { qint64 id = GetParametrId(domElement); qint64 idObject = GetParametrLongLong(domElement, "idObject"); QString tObject = GetParametrString(domElement, "typeObject"); VSpline spl; Draw::Draws typeObject; - if(tObject == "Calculation"){ + if (tObject == "Calculation") + { typeObject = Draw::Calculation; spl = data->GetSpline(idObject); - } else { + } + else + { typeObject = Draw::Modeling; spl = data->GetModelingSpline(idObject); } @@ -990,23 +1236,29 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme VNodeSpline::Create(this, data, id, idObject, mode, parse, Tool::FromFile); return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating modeling simple curve"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "modelingPath"){ - try{ + if (type == "modelingPath") + { + try + { qint64 id = GetParametrId(domElement); qint64 idObject = GetParametrLongLong(domElement, "idObject"); QString tObject = GetParametrString(domElement, "typeObject"); VSplinePath path; Draw::Draws typeObject; - if(tObject == "Calculation"){ + if (tObject == "Calculation") + { typeObject = Draw::Calculation; path = data->GetSplinePath(idObject); - } else { + } + else + { typeObject = Draw::Modeling; path = data->GetModelingSplinePath(idObject); } @@ -1016,7 +1268,8 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme VNodeSplinePath::Create(this, data, id, idObject, mode, parse, Tool::FromFile); return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating modeling curve path"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; @@ -1025,43 +1278,55 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme } void VDomDocument::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &domElement, - const Document::Documents &parse, const QString &type, Draw::Draws mode){ + const Document::Documents &parse, const QString &type, Draw::Draws mode) +{ Q_ASSERT(scene != 0); - Q_ASSERT_X(!domElement.isNull(), Q_FUNC_INFO, "domElement is null"); - Q_ASSERT_X(!type.isEmpty(), Q_FUNC_INFO, "type of spline is empty"); - if(type == "simple"){ - try{ + Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); + Q_ASSERT_X(type.isEmpty() == false, Q_FUNC_INFO, "type of spline is empty"); + if (type == "simple") + { + try + { qint64 id = GetParametrId(domElement); qint64 center = GetParametrLongLong(domElement, "center"); QString radius = GetParametrString(domElement, "radius"); QString f1 = GetParametrString(domElement, "angle1"); QString f2 = GetParametrString(domElement, "angle2"); - if(mode == Draw::Calculation){ + if (mode == Draw::Calculation) + { VToolArc::Create(id, center, radius, f1, f2, scene, this, data, parse, Tool::FromFile); - } else { + } + else + { VModelingArc::Create(id, center, radius, f1, f2, this, data, parse, Tool::FromFile); } return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating simple arc"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; } } - if(type == "modeling"){ - try{ + if (type == "modeling") + { + try + { qint64 id = GetParametrId(domElement); qint64 idObject = GetParametrLongLong(domElement, "idObject"); QString tObject = GetParametrString(domElement, "typeObject"); VArc arc; Draw::Draws typeObject; - if(tObject == "Calculation"){ + if (tObject == "Calculation") + { typeObject = Draw::Calculation; arc = data->GetArc(idObject); - } else { + } + else + { typeObject = Draw::Modeling; arc = data->GetModelingArc(idObject); } @@ -1071,7 +1336,8 @@ void VDomDocument::ParseArcElement(VMainGraphicsScene *scene, const QDomElement VNodeArc::Create(this, data, id, idObject, mode, parse, Tool::FromFile); return; } - catch(const VExceptionBadId &e){ + catch (const VExceptionBadId &e) + { VExceptionObjectError excep(tr("Error creating or updating modeling arc"), domElement); excep.AddMoreInformation(e.ErrorMessage()); throw excep; @@ -1079,14 +1345,17 @@ void VDomDocument::ParseArcElement(VMainGraphicsScene *scene, const QDomElement } } -void VDomDocument::FullUpdateTree(){ +void VDomDocument::FullUpdateTree() +{ VMainGraphicsScene *scene = new VMainGraphicsScene(); Q_ASSERT(scene != 0); - try{ + try + { data->ClearObject(); Parse(Document::LiteParse, scene, scene); } - catch (const std::bad_alloc &) { + catch (const std::bad_alloc &) + { delete scene; QMessageBox msgBox; msgBox.setWindowTitle(tr("Error!")); @@ -1098,7 +1367,8 @@ void VDomDocument::FullUpdateTree(){ msgBox.exec(); return; } - catch(...){ + catch (...) + { delete scene; throw; } @@ -1109,42 +1379,54 @@ void VDomDocument::FullUpdateTree(){ emit haveChange(); } -void VDomDocument::haveLiteChange(){ +void VDomDocument::haveLiteChange() +{ emit haveChange(); } -void VDomDocument::ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable){ +void VDomDocument::ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable) +{ emit ShowTool(id, color, enable); } -void VDomDocument::setCursor(const qint64 &value){ +void VDomDocument::setCursor(const qint64 &value) +{ cursor = value; emit ChangedCursor(cursor); } -void VDomDocument::setCurrentData(){ - if(*mode == Draw::Calculation){ +void VDomDocument::setCurrentData() +{ + if (*mode == Draw::Calculation) + { QString nameDraw = comboBoxDraws->itemText(comboBoxDraws->currentIndex()); - if(nameActivDraw != nameDraw){ + if (nameActivDraw != nameDraw) + { nameActivDraw = nameDraw; qint64 id = 0; - if(history.size() == 0){ + if (history.size() == 0) + { return; } - for(qint32 i = 0; i < history.size(); ++i){ + for (qint32 i = 0; i < history.size(); ++i) + { VToolRecord tool = history.at(i); - if(tool.getNameDraw() == nameDraw){ + if (tool.getNameDraw() == nameDraw) + { id = tool.getId(); } } - if(id == 0){ + if (id == 0) + { VToolRecord tool = history.at(history.size()-1); id = tool.getId(); - if(id == 0){ + if (id == 0) + { return; } } - if(tools.size() > 0){ + if (tools.size() > 0) + { VDataTool *vTool = tools.value(id); data->setData(vTool->getData()); } @@ -1152,13 +1434,15 @@ void VDomDocument::setCurrentData(){ } } -void VDomDocument::AddTool(const qint64 &id, VDataTool *tool){ +void VDomDocument::AddTool(const qint64 &id, VDataTool *tool) +{ Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0"); Q_ASSERT(tool != 0); tools.insert(id, tool); } -void VDomDocument::UpdateToolData(const qint64 &id, VContainer *data){ +void VDomDocument::UpdateToolData(const qint64 &id, VContainer *data) +{ Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0"); Q_ASSERT(data != 0); VDataTool *tool = tools.value(id); @@ -1166,14 +1450,16 @@ void VDomDocument::UpdateToolData(const qint64 &id, VContainer *data){ tool->VDataTool::setData(data); } -void VDomDocument::IncrementReferens(qint64 id) const{ +void VDomDocument::IncrementReferens(qint64 id) const +{ Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0"); VDataTool *tool = tools.value(id); Q_ASSERT(tool != 0); tool->incrementReferens(); } -void VDomDocument::DecrementReferens(qint64 id) const{ +void VDomDocument::DecrementReferens(qint64 id) const +{ Q_ASSERT_X(id > 0, Q_FUNC_INFO, "id <= 0"); VDataTool *tool = tools.value(id); Q_ASSERT(tool != 0); diff --git a/xml/vdomdocument.h b/xml/vdomdocument.h index 8f9f5709d..fbd67550b 100644 --- a/xml/vdomdocument.h +++ b/xml/vdomdocument.h @@ -28,7 +28,8 @@ #include #include "vtoolrecord.h" -namespace Document { +namespace Document +{ enum Document { LiteParse, FullParse}; Q_DECLARE_FLAGS(Documents, Document) } @@ -36,12 +37,12 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Document::Documents) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Weffc++" -class VDomDocument : public QObject, public QDomDocument{ +class VDomDocument : public QObject, public QDomDocument +{ Q_OBJECT public: - VDomDocument(VContainer *data,QComboBox *comboBoxDraws, Draw::Draws *mode); - VDomDocument(const QString& name, VContainer *data, QComboBox *comboBoxDraws, - Draw::Draws *mode); + VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); + VDomDocument(const QString& name, VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); VDomDocument(const QDomDocumentType& doctype, VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); ~VDomDocument(){} diff --git a/xml/vtoolrecord.cpp b/xml/vtoolrecord.cpp index 881a484d9..1df97da1f 100644 --- a/xml/vtoolrecord.cpp +++ b/xml/vtoolrecord.cpp @@ -21,9 +21,8 @@ #include "vtoolrecord.h" -VToolRecord::VToolRecord():id(0), typeTool(Tool::ArrowTool), nameDraw(QString()){ -} +VToolRecord::VToolRecord() + :id(0), typeTool(Tool::ArrowTool), nameDraw(QString()){} -VToolRecord::VToolRecord(const qint64 &id, const Tool::Tools &typeTool, const QString &nameDraw):id(id), - typeTool(typeTool), nameDraw(nameDraw){ -} +VToolRecord::VToolRecord(const qint64 &id, const Tool::Tools &typeTool, const QString &nameDraw) + :id(id), typeTool(typeTool), nameDraw(nameDraw){} diff --git a/xml/vtoolrecord.h b/xml/vtoolrecord.h index ce598c1e0..3a4184e63 100644 --- a/xml/vtoolrecord.h +++ b/xml/vtoolrecord.h @@ -22,7 +22,8 @@ #ifndef VTOOLRECORD_H #define VTOOLRECORD_H -class VToolRecord{ +class VToolRecord +{ public: VToolRecord(); VToolRecord(const qint64 &id, const Tool::Tools &typeTool, const QString &nameDraw); From f9a0baa77c1e7b33f24a1118e4b957b2dbf1b9b6 Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 4 Nov 2013 22:38:54 +0200 Subject: [PATCH 03/56] Missed license in files. --HG-- branch : develop --- dialogs/dialogheight.cpp | 21 +++++++++++++++++++ dialogs/dialogpointofintersection.cpp | 21 +++++++++++++++++++ dialogs/dialogpointofintersection.h | 21 +++++++++++++++++++ dialogs/dialogtriangle.cpp | 21 +++++++++++++++++++ exception/vexceptionuniqueid.cpp | 21 +++++++++++++++++++ exception/vexceptionuniqueid.h | 21 +++++++++++++++++++ tools/drawTools/vtoolheight.cpp | 21 +++++++++++++++++++ tools/drawTools/vtoolpointofintersection.cpp | 21 +++++++++++++++++++ tools/drawTools/vtoolpointofintersection.h | 21 +++++++++++++++++++ tools/drawTools/vtooltriangle.cpp | 21 +++++++++++++++++++ .../vmodelingpointofintersection.cpp | 21 +++++++++++++++++++ .../vmodelingpointofintersection.h | 21 +++++++++++++++++++ version.h | 21 +++++++++++++++++++ widgets/vapplication.h | 21 +++++++++++++++++++ 14 files changed, 294 insertions(+) diff --git a/dialogs/dialogheight.cpp b/dialogs/dialogheight.cpp index 4fdaa9761..db2039bce 100644 --- a/dialogs/dialogheight.cpp +++ b/dialogs/dialogheight.cpp @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #include "dialogheight.h" #include "ui_dialogheight.h" diff --git a/dialogs/dialogpointofintersection.cpp b/dialogs/dialogpointofintersection.cpp index bf6fff658..299eaadee 100644 --- a/dialogs/dialogpointofintersection.cpp +++ b/dialogs/dialogpointofintersection.cpp @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #include "dialogpointofintersection.h" #include "ui_dialogpointofintersection.h" diff --git a/dialogs/dialogpointofintersection.h b/dialogs/dialogpointofintersection.h index 52a3ff7a2..556b9b3ea 100644 --- a/dialogs/dialogpointofintersection.h +++ b/dialogs/dialogpointofintersection.h @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #ifndef DIALOGPOINTOFINTERSECTION_H #define DIALOGPOINTOFINTERSECTION_H diff --git a/dialogs/dialogtriangle.cpp b/dialogs/dialogtriangle.cpp index 336ddd7cc..96b136c2c 100644 --- a/dialogs/dialogtriangle.cpp +++ b/dialogs/dialogtriangle.cpp @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #include "dialogtriangle.h" #include "ui_dialogtriangle.h" diff --git a/exception/vexceptionuniqueid.cpp b/exception/vexceptionuniqueid.cpp index 9f38b31a7..df7c506ae 100644 --- a/exception/vexceptionuniqueid.cpp +++ b/exception/vexceptionuniqueid.cpp @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #include "vexceptionuniqueid.h" VExceptionUniqueId::VExceptionUniqueId(const QString &what, const QDomElement &domElement) diff --git a/exception/vexceptionuniqueid.h b/exception/vexceptionuniqueid.h index bd5b833d1..d3d618598 100644 --- a/exception/vexceptionuniqueid.h +++ b/exception/vexceptionuniqueid.h @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #ifndef VEXCEPTIONUNIQUEID_H #define VEXCEPTIONUNIQUEID_H diff --git a/tools/drawTools/vtoolheight.cpp b/tools/drawTools/vtoolheight.cpp index e8b4d502f..0165e6481 100644 --- a/tools/drawTools/vtoolheight.cpp +++ b/tools/drawTools/vtoolheight.cpp @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #include "vtoolheight.h" const QString VToolHeight::ToolType = QStringLiteral("height"); diff --git a/tools/drawTools/vtoolpointofintersection.cpp b/tools/drawTools/vtoolpointofintersection.cpp index 8c23281aa..87984ca44 100644 --- a/tools/drawTools/vtoolpointofintersection.cpp +++ b/tools/drawTools/vtoolpointofintersection.cpp @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #include "vtoolpointofintersection.h" const QString VToolPointOfIntersection::ToolType = QStringLiteral("pointOfIntersection"); diff --git a/tools/drawTools/vtoolpointofintersection.h b/tools/drawTools/vtoolpointofintersection.h index d65f31ad6..45ea6ea70 100644 --- a/tools/drawTools/vtoolpointofintersection.h +++ b/tools/drawTools/vtoolpointofintersection.h @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #ifndef VTOOLPOINTOFINTERSECTION_H #define VTOOLPOINTOFINTERSECTION_H diff --git a/tools/drawTools/vtooltriangle.cpp b/tools/drawTools/vtooltriangle.cpp index 57ea24d23..bd36becc9 100644 --- a/tools/drawTools/vtooltriangle.cpp +++ b/tools/drawTools/vtooltriangle.cpp @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #include "vtooltriangle.h" const QString VToolTriangle::ToolType = QStringLiteral("triangle"); diff --git a/tools/modelingTools/vmodelingpointofintersection.cpp b/tools/modelingTools/vmodelingpointofintersection.cpp index 15fb326fa..a56e3b4d7 100644 --- a/tools/modelingTools/vmodelingpointofintersection.cpp +++ b/tools/modelingTools/vmodelingpointofintersection.cpp @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #include "vmodelingpointofintersection.h" const QString VModelingPointOfIntersection::ToolType = QStringLiteral("pointOfIntersection"); diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/tools/modelingTools/vmodelingpointofintersection.h index 1f11f0b6a..6890998d5 100644 --- a/tools/modelingTools/vmodelingpointofintersection.h +++ b/tools/modelingTools/vmodelingpointofintersection.h @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #ifndef VMODELINGPOINTOFINTERSECTION_H #define VMODELINGPOINTOFINTERSECTION_H diff --git a/version.h b/version.h index 5a80c3c59..a7ac52cdc 100644 --- a/version.h +++ b/version.h @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #ifndef VERSION_H #define VERSION_H diff --git a/widgets/vapplication.h b/widgets/vapplication.h index 145c5cac8..1e04c118b 100644 --- a/widgets/vapplication.h +++ b/widgets/vapplication.h @@ -1,3 +1,24 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + #ifndef VAPPLICATION_H #define VAPPLICATION_H From d7becda4eb4268c2fe6502876eaab91b7e014236 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 15:34:54 +0200 Subject: [PATCH 04/56] Change in structure of project file. --HG-- branch : develop --- Valentina.pro | 260 +++---------------- container/container.pri | 13 + dialogs/dialogs.pri | 62 +++++ exception/exception.pri | 17 ++ geometry/geometry.pri | 15 ++ tools/drawTools/drawTools.pri | 40 +++ tools/modelingTools/modelingTools.pri | 38 +++ tools/modelingTools/modelingtools.h | 1 - tools/modelingTools/vmodelingsinglepoint.cpp | 93 ------- tools/modelingTools/vmodelingsinglepoint.h | 29 --- tools/nodeDetails/nodeDetails.pri | 14 + tools/tools.pri | 14 + tools/vgraphicspoint.cpp | 39 --- tools/vgraphicspoint.h | 35 --- widgets/delegate.cpp | 90 ------- widgets/widgets.pri | 19 ++ xml/xml.pri | 7 + 17 files changed, 277 insertions(+), 509 deletions(-) create mode 100644 container/container.pri create mode 100644 dialogs/dialogs.pri create mode 100644 exception/exception.pri create mode 100644 geometry/geometry.pri create mode 100644 tools/drawTools/drawTools.pri create mode 100644 tools/modelingTools/modelingTools.pri delete mode 100644 tools/modelingTools/vmodelingsinglepoint.cpp delete mode 100644 tools/modelingTools/vmodelingsinglepoint.h create mode 100644 tools/nodeDetails/nodeDetails.pri create mode 100644 tools/tools.pri delete mode 100644 tools/vgraphicspoint.cpp delete mode 100644 tools/vgraphicspoint.h delete mode 100644 widgets/delegate.cpp create mode 100644 widgets/widgets.pri create mode 100644 xml/xml.pri diff --git a/Valentina.pro b/Valentina.pro index b523128a3..1de130512 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -8,231 +8,19 @@ QT += core gui widgets xml svg -TARGET = Valentina TEMPLATE = app + +DEBUG_TARGET = Valentinad +RELEASE_TARGET = Valentina + CONFIG -= debug_and_release debug_and_release_target CONFIG += c++11 precompile_header + QMAKE_CXX = ccache g++ +#DEFINES += ... -SOURCES += main.cpp\ - mainwindow.cpp \ - dialogs/dialogsinglepoint.cpp \ - widgets/vgraphicssimpletextitem.cpp \ - xml/vdomdocument.cpp \ - container/vpointf.cpp \ - container/vcontainer.cpp \ - tools/drawTools/vtoolpoint.cpp \ - container/calculator.cpp \ - dialogs/dialogincrements.cpp \ - container/vstandarttablecell.cpp \ - container/vincrementtablerow.cpp \ - widgets/doubledelegate.cpp \ - dialogs/dialogendline.cpp \ - tools/drawTools/vtoolendline.cpp \ - tools/drawTools/vtoolline.cpp \ - tools/vabstracttool.cpp \ - dialogs/dialogline.cpp \ - tools/drawTools/vtoolalongline.cpp \ - dialogs/dialogtool.cpp \ - dialogs/dialogalongline.cpp \ - tools/drawTools/vtoolshoulderpoint.cpp \ - dialogs/dialogshoulderpoint.cpp \ - tools/drawTools/vtoolnormal.cpp \ - dialogs/dialognormal.cpp \ - tools/drawTools/vtoolbisector.cpp \ - dialogs/dialogbisector.cpp \ - tools/drawTools/vtoollinepoint.cpp \ - tools/drawTools/vtoollineintersect.cpp \ - dialogs/dialoglineintersect.cpp \ - geometry/vspline.cpp \ - tools/drawTools/vtoolsinglepoint.cpp \ - geometry/varc.cpp \ - widgets/vcontrolpointspline.cpp \ - tools/drawTools/vtoolspline.cpp \ - dialogs/dialogspline.cpp \ - tools/drawTools/vtoolarc.cpp \ - dialogs/dialogarc.cpp \ - geometry/vsplinepoint.cpp \ - geometry/vsplinepath.cpp \ - tools/drawTools/vtoolsplinepath.cpp \ - dialogs/dialogsplinepath.cpp \ - widgets/vmaingraphicsscene.cpp \ - widgets/vmaingraphicsview.cpp \ - tools/vdatatool.cpp \ - xml/vtoolrecord.cpp \ - dialogs/dialoghistory.cpp \ - tools/drawTools/vtoolpointofcontact.cpp \ - dialogs/dialogpointofcontact.cpp \ - geometry/vnodedetail.cpp \ - geometry/vdetail.cpp \ - dialogs/dialogdetail.cpp \ - tools/vtooldetail.cpp \ - widgets/vtablegraphicsview.cpp \ - widgets/vitem.cpp \ - tablewindow.cpp \ - tools/nodeDetails/vnodearc.cpp \ - tools/nodeDetails/vnodepoint.cpp \ - tools/nodeDetails/vnodespline.cpp \ - tools/nodeDetails/vnodesplinepath.cpp \ - tools/drawTools/vdrawtool.cpp \ - tools/nodeDetails/vabstractnode.cpp \ - tools/modelingTools/vmodelingtool.cpp \ - tools/modelingTools/vmodelingalongline.cpp \ - tools/modelingTools/vmodelingarc.cpp \ - tools/modelingTools/vmodelingbisector.cpp \ - tools/modelingTools/vmodelingendline.cpp \ - tools/modelingTools/vmodelingline.cpp \ - tools/modelingTools/vmodelinglineintersect.cpp \ - tools/modelingTools/vmodelinglinepoint.cpp \ - tools/modelingTools/vmodelingnormal.cpp \ - tools/modelingTools/vmodelingpoint.cpp \ - tools/modelingTools/vmodelingpointofcontact.cpp \ - tools/modelingTools/vmodelingshoulderpoint.cpp \ - tools/modelingTools/vmodelingspline.cpp \ - tools/modelingTools/vmodelingsplinepath.cpp \ - exception/vexception.cpp \ - exception/vexceptionbadid.cpp \ - exception/vexceptionwrongparameterid.cpp \ - exception/vexceptionconversionerror.cpp \ - exception/vexceptionemptyparameter.cpp \ - exception/vexceptionobjecterror.cpp \ - widgets/vapplication.cpp \ - exception/vexceptionuniqueid.cpp \ - tools/drawTools/vtoolheight.cpp \ - tools/modelingTools/vmodelingheight.cpp \ - dialogs/dialogheight.cpp \ - tools/drawTools/vtooltriangle.cpp \ - tools/modelingTools/vmodelingtriangle.cpp \ - dialogs/dialogtriangle.cpp \ - dialogs/dialogpointofintersection.cpp \ - tools/drawTools/vtoolpointofintersection.cpp \ - tools/modelingTools/vmodelingpointofintersection.cpp - -HEADERS += mainwindow.h \ - widgets/vmaingraphicsscene.h \ - dialogs/dialogsinglepoint.h \ - options.h \ - widgets/vgraphicssimpletextitem.h \ - xml/vdomdocument.h \ - container/vpointf.h \ - container/vcontainer.h \ - tools/drawTools/vtoolpoint.h \ - container/calculator.h \ - dialogs/dialogincrements.h \ - container/vstandarttablecell.h \ - container/vincrementtablerow.h \ - widgets/doubledelegate.h \ - dialogs/dialogendline.h \ - tools/drawTools/vtoolendline.h \ - tools/drawTools/vtoolline.h \ - tools/vabstracttool.h \ - dialogs/dialogline.h \ - tools/drawTools/vtoolalongline.h \ - dialogs/dialogtool.h \ - dialogs/dialogalongline.h \ - tools/drawTools/vtoolshoulderpoint.h \ - dialogs/dialogshoulderpoint.h \ - tools/drawTools/vtoolnormal.h \ - dialogs/dialognormal.h \ - tools/drawTools/vtoolbisector.h \ - dialogs/dialogbisector.h \ - tools/drawTools/vtoollinepoint.h \ - tools/drawTools/vtoollineintersect.h \ - dialogs/dialoglineintersect.h \ - geometry/vspline.h \ - tools/drawTools/vtoolsinglepoint.h \ - geometry/varc.h \ - widgets/vcontrolpointspline.h \ - tools/drawTools/vtoolspline.h \ - dialogs/dialogspline.h \ - tools/drawTools/vtoolarc.h \ - dialogs/dialogarc.h \ - geometry/vsplinepoint.h \ - geometry/vsplinepath.h \ - tools/drawTools/vtoolsplinepath.h \ - dialogs/dialogsplinepath.h \ - widgets/vmaingraphicsview.h \ - tools/vdatatool.h \ - xml/vtoolrecord.h \ - dialogs/dialoghistory.h \ - tools/drawTools/vtoolpointofcontact.h \ - dialogs/dialogpointofcontact.h \ - geometry/vnodedetail.h \ - geometry/vdetail.h \ - dialogs/dialogdetail.h \ - tools/vtooldetail.h \ - widgets/vtablegraphicsview.h \ - widgets/vitem.h \ - tablewindow.h \ - tools/tools.h \ - tools/drawTools/drawtools.h \ - tools/nodeDetails/nodedetails.h \ - tools/nodeDetails/vnodearc.h \ - tools/nodeDetails/vnodepoint.h \ - tools/nodeDetails/vnodespline.h \ - tools/nodeDetails/vnodesplinepath.h \ - stable.h \ - tools/drawTools/vdrawtool.h \ - tools/nodeDetails/vabstractnode.h \ - dialogs/dialogs.h \ - tools/modelingTools/modelingtools.h \ - tools/modelingTools/vmodelingtool.h \ - tools/modelingTools/vmodelingalongline.h \ - tools/modelingTools/vmodelingarc.h \ - tools/modelingTools/vmodelingbisector.h \ - tools/modelingTools/vmodelingendline.h \ - tools/modelingTools/vmodelingline.h \ - tools/modelingTools/vmodelinglineintersect.h \ - tools/modelingTools/vmodelinglinepoint.h \ - tools/modelingTools/vmodelingnormal.h \ - tools/modelingTools/vmodelingpoint.h \ - tools/modelingTools/vmodelingpointofcontact.h \ - tools/modelingTools/vmodelingshoulderpoint.h \ - tools/modelingTools/vmodelingspline.h \ - tools/modelingTools/vmodelingsplinepath.h \ - exception/vexception.h \ - exception/vexceptionbadid.h \ - exception/vexceptionwrongparameterid.h \ - exception/vexceptionconversionerror.h \ - exception/vexceptionemptyparameter.h \ - exception/vexceptionobjecterror.h \ - widgets/vapplication.h \ - exception/vexceptionuniqueid.h \ - tools/drawTools/vtoolheight.h \ - tools/modelingTools/vmodelingheight.h \ - dialogs/dialogheight.h \ - tools/drawTools/vtooltriangle.h \ - tools/modelingTools/vmodelingtriangle.h \ - dialogs/dialogtriangle.h \ - dialogs/dialogpointofintersection.h \ - tools/drawTools/vtoolpointofintersection.h \ - tools/modelingTools/vmodelingpointofintersection.h \ - version.h - -FORMS += mainwindow.ui \ - dialogs/dialogsinglepoint.ui \ - dialogs/dialogincrements.ui \ - dialogs/dialogendline.ui \ - dialogs/dialogline.ui \ - dialogs/dialogalongline.ui \ - dialogs/dialogshoulderpoint.ui \ - dialogs/dialognormal.ui \ - dialogs/dialogbisector.ui \ - dialogs/dialoglineintersect.ui \ - dialogs/dialogspline.ui \ - dialogs/dialogarc.ui \ - dialogs/dialogsplinepath.ui \ - dialogs/dialoghistory.ui \ - dialogs/dialogpointofcontact.ui \ - dialogs/dialogdetail.ui \ - tablewindow.ui \ - dialogs/dialogheight.ui \ - dialogs/dialogtriangle.ui \ - dialogs/dialogpointofintersection.ui - -RESOURCES += \ - icon.qrc \ - cursor.qrc +# Precompiled headers (PCH) +PRECOMPILED_HEADER = stable.h # directory for executable file DESTDIR = bin @@ -249,14 +37,38 @@ RCC_DIR = rcc # files created uic UI_DIR = uic -# Use Precompiled headers (PCH) -PRECOMPILED_HEADER = stable.h +include(container/container.pri) +include(dialogs/dialogs.pri) +include(exception/exception.pri) +include(geometry/geometry.pri) +include(tools/tools.pri) +include(widgets/widgets.pri) +include(xml/xml.pri) + +SOURCES += main.cpp\ + mainwindow.cpp \ + tablewindow.cpp \ + +HEADERS += mainwindow.h \ + options.h \ + tablewindow.h \ + stable.h \ + version.h + +FORMS += mainwindow.ui \ + tablewindow.ui + +RESOURCES += \ + icon.qrc \ + cursor.qrc TRANSLATIONS += translations/valentina_ru.ts \ translations/valentina_uk.ts CONFIG(debug, debug|release){ # Debug + TARGET = $$DEBUG_TARGET + QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \ -isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \ -isystem "/usr/include/qt5/QtCore" -isystem "$$OUT_PWD/uic" -isystem "$$OUT_PWD/moc/" \ @@ -265,8 +77,12 @@ CONFIG(debug, debug|release){ -Wunreachable-code }else{ # Release + TARGET = $$RELEASE_TARGET + QMAKE_CXXFLAGS += -O1 + DEFINES += QT_NO_DEBUG_OUTPUT + QMAKE_EXTRA_COMPILERS += lrelease lrelease.input = TRANSLATIONS lrelease.output = ${QMAKE_FILE_BASE}.qm diff --git a/container/container.pri b/container/container.pri new file mode 100644 index 000000000..a6461484b --- /dev/null +++ b/container/container.pri @@ -0,0 +1,13 @@ +SOURCES += \ + container/vpointf.cpp \ + container/vincrementtablerow.cpp \ + container/vcontainer.cpp \ + container/calculator.cpp \ + container/vstandarttablecell.cpp + +HEADERS += \ + container/vstandarttablecell.h \ + container/vpointf.h \ + container/vincrementtablerow.h \ + container/vcontainer.h \ + container/calculator.h diff --git a/dialogs/dialogs.pri b/dialogs/dialogs.pri new file mode 100644 index 000000000..86876c1d2 --- /dev/null +++ b/dialogs/dialogs.pri @@ -0,0 +1,62 @@ +HEADERS += \ + dialogs/dialogtriangle.h \ + dialogs/dialogtool.h \ + dialogs/dialogsplinepath.h \ + dialogs/dialogspline.h \ + dialogs/dialogsinglepoint.h \ + dialogs/dialogshoulderpoint.h \ + dialogs/dialogs.h \ + dialogs/dialogpointofintersection.h \ + dialogs/dialogpointofcontact.h \ + dialogs/dialognormal.h \ + dialogs/dialoglineintersect.h \ + dialogs/dialogline.h \ + dialogs/dialogincrements.h \ + dialogs/dialoghistory.h \ + dialogs/dialogheight.h \ + dialogs/dialogendline.h \ + dialogs/dialogdetail.h \ + dialogs/dialogbisector.h \ + dialogs/dialogarc.h \ + dialogs/dialogalongline.h + +SOURCES += \ + dialogs/dialogtriangle.cpp \ + dialogs/dialogtool.cpp \ + dialogs/dialogsplinepath.cpp \ + dialogs/dialogspline.cpp \ + dialogs/dialogsinglepoint.cpp \ + dialogs/dialogshoulderpoint.cpp \ + dialogs/dialogpointofintersection.cpp \ + dialogs/dialogpointofcontact.cpp \ + dialogs/dialognormal.cpp \ + dialogs/dialoglineintersect.cpp \ + dialogs/dialogline.cpp \ + dialogs/dialogincrements.cpp \ + dialogs/dialoghistory.cpp \ + dialogs/dialogheight.cpp \ + dialogs/dialogendline.cpp \ + dialogs/dialogdetail.cpp \ + dialogs/dialogbisector.cpp \ + dialogs/dialogarc.cpp \ + dialogs/dialogalongline.cpp + +FORMS += \ + dialogs/dialogtriangle.ui \ + dialogs/dialogsplinepath.ui \ + dialogs/dialogspline.ui \ + dialogs/dialogsinglepoint.ui \ + dialogs/dialogshoulderpoint.ui \ + dialogs/dialogpointofintersection.ui \ + dialogs/dialogpointofcontact.ui \ + dialogs/dialognormal.ui \ + dialogs/dialoglineintersect.ui \ + dialogs/dialogline.ui \ + dialogs/dialogincrements.ui \ + dialogs/dialoghistory.ui \ + dialogs/dialogheight.ui \ + dialogs/dialogendline.ui \ + dialogs/dialogdetail.ui \ + dialogs/dialogbisector.ui \ + dialogs/dialogarc.ui \ + dialogs/dialogalongline.ui diff --git a/exception/exception.pri b/exception/exception.pri new file mode 100644 index 000000000..4293f086b --- /dev/null +++ b/exception/exception.pri @@ -0,0 +1,17 @@ +HEADERS += \ + exception/vexceptionwrongparameterid.h \ + exception/vexceptionuniqueid.h \ + exception/vexceptionobjecterror.h \ + exception/vexceptionemptyparameter.h \ + exception/vexceptionconversionerror.h \ + exception/vexceptionbadid.h \ + exception/vexception.h + +SOURCES += \ + exception/vexceptionwrongparameterid.cpp \ + exception/vexceptionuniqueid.cpp \ + exception/vexceptionobjecterror.cpp \ + exception/vexceptionemptyparameter.cpp \ + exception/vexceptionconversionerror.cpp \ + exception/vexceptionbadid.cpp \ + exception/vexception.cpp diff --git a/geometry/geometry.pri b/geometry/geometry.pri new file mode 100644 index 000000000..37d5100cc --- /dev/null +++ b/geometry/geometry.pri @@ -0,0 +1,15 @@ +HEADERS += \ + geometry/vsplinepoint.h \ + geometry/vsplinepath.h \ + geometry/vspline.h \ + geometry/vnodedetail.h \ + geometry/vdetail.h \ + geometry/varc.h + +SOURCES += \ + geometry/vsplinepoint.cpp \ + geometry/vsplinepath.cpp \ + geometry/vspline.cpp \ + geometry/vnodedetail.cpp \ + geometry/vdetail.cpp \ + geometry/varc.cpp diff --git a/tools/drawTools/drawTools.pri b/tools/drawTools/drawTools.pri new file mode 100644 index 000000000..54cf0341c --- /dev/null +++ b/tools/drawTools/drawTools.pri @@ -0,0 +1,40 @@ +HEADERS += \ + tools/drawTools/vtooltriangle.h \ + tools/drawTools/vtoolsplinepath.h \ + tools/drawTools/vtoolspline.h \ + tools/drawTools/vtoolshoulderpoint.h \ + tools/drawTools/vtoolpointofintersection.h \ + tools/drawTools/vtoolpointofcontact.h \ + tools/drawTools/vtoolpoint.h \ + tools/drawTools/vtoolnormal.h \ + tools/drawTools/vtoollinepoint.h \ + tools/drawTools/vtoollineintersect.h \ + tools/drawTools/vtoolline.h \ + tools/drawTools/vtoolheight.h \ + tools/drawTools/vtoolendline.h \ + tools/drawTools/vtoolbisector.h \ + tools/drawTools/vtoolarc.h \ + tools/drawTools/vtoolalongline.h \ + tools/drawTools/vdrawtool.h \ + tools/drawTools/drawtools.h \ + tools/drawTools/vtoolsinglepoint.h + +SOURCES += \ + tools/drawTools/vtooltriangle.cpp \ + tools/drawTools/vtoolsplinepath.cpp \ + tools/drawTools/vtoolspline.cpp \ + tools/drawTools/vtoolshoulderpoint.cpp \ + tools/drawTools/vtoolpointofintersection.cpp \ + tools/drawTools/vtoolpointofcontact.cpp \ + tools/drawTools/vtoolpoint.cpp \ + tools/drawTools/vtoolnormal.cpp \ + tools/drawTools/vtoollinepoint.cpp \ + tools/drawTools/vtoollineintersect.cpp \ + tools/drawTools/vtoolline.cpp \ + tools/drawTools/vtoolheight.cpp \ + tools/drawTools/vtoolendline.cpp \ + tools/drawTools/vtoolbisector.cpp \ + tools/drawTools/vtoolarc.cpp \ + tools/drawTools/vtoolalongline.cpp \ + tools/drawTools/vdrawtool.cpp \ + tools/drawTools/vtoolsinglepoint.cpp diff --git a/tools/modelingTools/modelingTools.pri b/tools/modelingTools/modelingTools.pri new file mode 100644 index 000000000..165b67fe5 --- /dev/null +++ b/tools/modelingTools/modelingTools.pri @@ -0,0 +1,38 @@ +HEADERS += \ + tools/modelingTools/vmodelingtriangle.h \ + tools/modelingTools/vmodelingtool.h \ + tools/modelingTools/vmodelingsplinepath.h \ + tools/modelingTools/vmodelingspline.h \ + tools/modelingTools/vmodelingshoulderpoint.h \ + tools/modelingTools/vmodelingpointofintersection.h \ + tools/modelingTools/vmodelingpointofcontact.h \ + tools/modelingTools/vmodelingpoint.h \ + tools/modelingTools/vmodelingnormal.h \ + tools/modelingTools/vmodelinglinepoint.h \ + tools/modelingTools/vmodelinglineintersect.h \ + tools/modelingTools/vmodelingline.h \ + tools/modelingTools/vmodelingheight.h \ + tools/modelingTools/vmodelingendline.h \ + tools/modelingTools/vmodelingbisector.h \ + tools/modelingTools/vmodelingarc.h \ + tools/modelingTools/vmodelingalongline.h \ + tools/modelingTools/modelingtools.h + +SOURCES += \ + tools/modelingTools/vmodelingtriangle.cpp \ + tools/modelingTools/vmodelingtool.cpp \ + tools/modelingTools/vmodelingsplinepath.cpp \ + tools/modelingTools/vmodelingspline.cpp \ + tools/modelingTools/vmodelingshoulderpoint.cpp \ + tools/modelingTools/vmodelingpointofintersection.cpp \ + tools/modelingTools/vmodelingpointofcontact.cpp \ + tools/modelingTools/vmodelingpoint.cpp \ + tools/modelingTools/vmodelingnormal.cpp \ + tools/modelingTools/vmodelinglinepoint.cpp \ + tools/modelingTools/vmodelinglineintersect.cpp \ + tools/modelingTools/vmodelingline.cpp \ + tools/modelingTools/vmodelingheight.cpp \ + tools/modelingTools/vmodelingendline.cpp \ + tools/modelingTools/vmodelingbisector.cpp \ + tools/modelingTools/vmodelingarc.cpp \ + tools/modelingTools/vmodelingalongline.cpp diff --git a/tools/modelingTools/modelingtools.h b/tools/modelingTools/modelingtools.h index b7c755edc..7a336be62 100644 --- a/tools/modelingTools/modelingtools.h +++ b/tools/modelingTools/modelingtools.h @@ -31,7 +31,6 @@ #include "vmodelingnormal.h" #include "vmodelingpointofcontact.h" #include "vmodelingshoulderpoint.h" -#include "vmodelingsinglepoint.h" #include "vmodelingspline.h" #include "vmodelingsplinepath.h" #include "vmodelingheight.h" diff --git a/tools/modelingTools/vmodelingsinglepoint.cpp b/tools/modelingTools/vmodelingsinglepoint.cpp deleted file mode 100644 index df9b1f0f5..000000000 --- a/tools/modelingTools/vmodelingsinglepoint.cpp +++ /dev/null @@ -1,93 +0,0 @@ -#include "vmodelingsinglepoint.h" -#include -#include -#include -#include -#include -#include -#include -#include "options.h" -#include "container/vpointf.h" - -VModelingSinglePoint::VModelingSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, - QGraphicsItem * parent ):VModelingPoint(doc, data, id, parent), - dialogSinglePoint(QSharedPointer()){ - this->setFlag(QGraphicsItem::ItemIsMovable, true); - this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); - if(typeCreation == Tool::FromGui){ - AddToFile(); - } -} - -void VModelingSinglePoint::setDialog(){ - Q_ASSERT(!dialogSinglePoint.isNull()); - if(!dialogSinglePoint.isNull()){ - VPointF p = VAbstractTool::data.GetPoint(id); - dialogSinglePoint->setData(p.name(), p.toQPointF()); - } -} - -void VModelingSinglePoint::AddToFile(){ - VPointF point = VAbstractTool::data.GetPoint(id); - QDomElement domElement = doc->createElement("point"); - - AddAttribute(domElement, "id", id); - AddAttribute(domElement, "type", "single"); - AddAttribute(domElement, "name", point.name()); - AddAttribute(domElement, "x", toMM(point.x())); - AddAttribute(domElement, "y", toMM(point.y())); - AddAttribute(domElement, "mx", toMM(point.mx())); - AddAttribute(domElement, "my", toMM(point.my())); - - AddToModeling(domElement); -} - -QVariant VModelingSinglePoint::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value){ - if (change == ItemPositionChange && scene()) { - // value - это новое положение. - QPointF newPos = value.toPointF(); - QRectF rect = scene()->sceneRect(); - if (!rect.contains(newPos)) { - // Сохраняем элемент внутри прямоугольника сцены. - newPos.setX(qMin(rect.right(), qMax(newPos.x(), rect.left()))); - newPos.setY(qMin(rect.bottom(), qMax(newPos.y(), rect.top()))); - return newPos; - } - } - if (change == ItemPositionHasChanged && scene()) { - // value - это новое положение. - QPointF newPos = value.toPointF(); - QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ - domElement.setAttribute("x", QString().setNum(toMM(newPos.x()))); - domElement.setAttribute("y", QString().setNum(toMM(newPos.y()))); - //I don't now why but signal does not work. - doc->FullUpdateTree(); - } - } - return QGraphicsItem::itemChange(change, value); -} - -void VModelingSinglePoint::contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ){ - ContextMenu(dialogSinglePoint, this, event, false); -} - -void VModelingSinglePoint::FullUpdateFromFile(){ - RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); -} - -void VModelingSinglePoint::FullUpdateFromGui(int result){ - if(result == QDialog::Accepted){ - QPointF p = dialogSinglePoint->getPoint(); - QString name = dialogSinglePoint->getName(); - QDomElement domElement = doc->elementById(QString().setNum(id)); - if(domElement.isElement()){ - domElement.setAttribute("name", name); - domElement.setAttribute("x", QString().setNum(toMM(p.x()))); - domElement.setAttribute("y", QString().setNum(toMM(p.y()))); - //I don't now why but signal does not work. - doc->FullUpdateTree(); - } - } - dialogSinglePoint.clear(); -} diff --git a/tools/modelingTools/vmodelingsinglepoint.h b/tools/modelingTools/vmodelingsinglepoint.h deleted file mode 100644 index 0695becb3..000000000 --- a/tools/modelingTools/vmodelingsinglepoint.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef VMODELINGSINGLEPOINT_H -#define VMODELINGSINGLEPOINT_H - -#include "container/vcontainer.h" -#include "xml/vdomdocument.h" -#include "dialogs/dialogsinglepoint.h" -#include "vmodelingpoint.h" - -class VModelingSinglePoint : public VModelingPoint -{ - Q_OBJECT -public: - VModelingSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, - Tool::Sources typeCreation, QGraphicsItem * parent = 0 ); - virtual void setDialog(); -public slots: - virtual void FullUpdateFromFile(); - virtual void FullUpdateFromGui(int result); -signals: - void FullUpdateTree(); -protected: - virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); - virtual void AddToFile(); - QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); -private: - QSharedPointer dialogSinglePoint; -}; - -#endif // VMODELINGSINGLEPOINT_H diff --git a/tools/nodeDetails/nodeDetails.pri b/tools/nodeDetails/nodeDetails.pri new file mode 100644 index 000000000..c79444f12 --- /dev/null +++ b/tools/nodeDetails/nodeDetails.pri @@ -0,0 +1,14 @@ +HEADERS += \ + tools/nodeDetails/vnodesplinepath.h \ + tools/nodeDetails/vnodespline.h \ + tools/nodeDetails/vnodepoint.h \ + tools/nodeDetails/vnodearc.h \ + tools/nodeDetails/vabstractnode.h \ + tools/nodeDetails/nodedetails.h + +SOURCES += \ + tools/nodeDetails/vnodesplinepath.cpp \ + tools/nodeDetails/vnodespline.cpp \ + tools/nodeDetails/vnodepoint.cpp \ + tools/nodeDetails/vnodearc.cpp \ + tools/nodeDetails/vabstractnode.cpp diff --git a/tools/tools.pri b/tools/tools.pri new file mode 100644 index 000000000..a53c97ba6 --- /dev/null +++ b/tools/tools.pri @@ -0,0 +1,14 @@ +HEADERS += \ + tools/vtooldetail.h \ + tools/vdatatool.h \ + tools/vabstracttool.h \ + tools/tools.h + +SOURCES += \ + tools/vtooldetail.cpp \ + tools/vdatatool.cpp \ + tools/vabstracttool.cpp + +include(drawTools/drawTools.pri) +include(modelingTools/modelingTools.pri) +include(nodeDetails/nodeDetails.pri) diff --git a/tools/vgraphicspoint.cpp b/tools/vgraphicspoint.cpp deleted file mode 100644 index df82f6f1e..000000000 --- a/tools/vgraphicspoint.cpp +++ /dev/null @@ -1,39 +0,0 @@ -#include "vgraphicspoint.h" -#include "options.h" - -VGraphicsPoint::VGraphicsPoint(QGraphicsItem *parent): QGraphicsEllipseItem(parent), - radius(toPixel(1.5)), namePoint(0), lineName(0){ - //namePoint = new VGraphicsSimpleTextItem(this); - lineName = new QGraphicsLineItem(this); - this->setPen(QPen(Qt::black, widthHairLine)); - this->setBrush(QBrush(Qt::NoBrush)); - this->setFlag(QGraphicsItem::ItemIsSelectable, true); - this->setAcceptHoverEvents(true); -} - -VGraphicsPoint::~VGraphicsPoint(){ -} - - -void VGraphicsPoint::RefreshLine(){ - QRectF nameRec = namePoint->sceneBoundingRect(); - QPointF p1, p2; - LineIntersectCircle(QPointF(), radius, QLineF(QPointF(), nameRec.center()- scenePos()), p1, p2); - QPointF pRec = LineIntersectRect(nameRec, QLineF(scenePos(), nameRec.center())); - lineName->setLine(QLineF(p1, pRec - scenePos())); - if(QLineF(p1, pRec - scenePos()).length() <= toPixel(4)){ - lineName->setVisible(false); - } else { - lineName->setVisible(true); - } -} - -void VGraphicsPoint::hoverMoveEvent(QGraphicsSceneHoverEvent *event){ - Q_UNUSED(event); - this->setPen(QPen(Qt::black, widthMainLine)); -} - -void VGraphicsPoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event){ - Q_UNUSED(event); - this->setPen(QPen(Qt::black, widthHairLine)); -} diff --git a/tools/vgraphicspoint.h b/tools/vgraphicspoint.h deleted file mode 100644 index 4bd108524..000000000 --- a/tools/vgraphicspoint.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef VGRAPHICSPOINT_H -#define VGRAPHICSPOINT_H - -#include -#include -#include "widgets/vgraphicssimpletextitem.h" -#include "../container/vpointf.h" - -class VGraphicsPoint: public QGraphicsEllipseItem -{ -public: - VGraphicsPoint(QGraphicsItem *parent); - virtual ~VGraphicsPoint(); -public slots: - virtual void NameChangePosition(const QPointF pos)=0; -protected: - qreal radius; - VGraphicsSimpleTextItem *namePoint; - QGraphicsLineItem *lineName; - virtual void UpdateNamePosition(qreal mx, qreal my)=0; - void RefreshLine(); - virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); - virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); - virtual void RefreshPointGeometry(const VPointF &point)=0; -private: - VGraphicsPoint(const VGraphicsPoint &point); - const VGraphicsPoint &operator=(const VGraphicsPoint &point); - QPointF LineIntersectRect(QRectF rec, QLineF line) const; - qint32 LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, - QPointF &p2) const; - QPointF ClosestPoint(QLineF line, QPointF p) const; - QPointF addVector (QPointF p, QPointF p1, QPointF p2, qreal k) const; -}; - -#endif // VGRAPHICSPOINT_H diff --git a/widgets/delegate.cpp b/widgets/delegate.cpp deleted file mode 100644 index f3b2d0de5..000000000 --- a/widgets/delegate.cpp +++ /dev/null @@ -1,90 +0,0 @@ - /**************************************************************************** - ** - ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). - ** Contact: http://www.qt-project.org/legal - ** - ** This file is part of the examples of the Qt Toolkit. - ** - ** $QT_BEGIN_LICENSE:BSD$ - ** You may use this file under the terms of the BSD license as follows: - ** - ** "Redistribution and use in source and binary forms, with or without - ** modification, are permitted provided that the following conditions are - ** met: - ** * Redistributions of source code must retain the above copyright - ** notice, this list of conditions and the following disclaimer. - ** * Redistributions in binary form must reproduce the above copyright - ** notice, this list of conditions and the following disclaimer in - ** the documentation and/or other materials provided with the - ** distribution. - ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names - ** of its contributors may be used to endorse or promote products derived - ** from this software without specific prior written permission. - ** - ** - ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." - ** - ** $QT_END_LICENSE$ - ** - ****************************************************************************/ - - /* - delegate.cpp - - A delegate that allows the user to change integer values from the model - using a spin box widget. - */ - -#include -#include "delegate.h" - - SpinBoxDelegate::SpinBoxDelegate(QObject *parent) - : QItemDelegate(parent) - { - } - - QWidget *SpinBoxDelegate::createEditor(QWidget *parent, - const QStyleOptionViewItem &/* option */, - const QModelIndex &/* index */) const - { - QSpinBox *editor = new QSpinBox(parent); - editor->setMinimum(0); - editor->setMaximum(1000); - - return editor; - } - - void SpinBoxDelegate::setEditorData(QWidget *editor, - const QModelIndex &index) const - { - int value = index.model()->data(index, Qt::EditRole).toInt(); - - QSpinBox *spinBox = static_cast(editor); - spinBox->setValue(value); - } - - void SpinBoxDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const - { - QSpinBox *spinBox = static_cast(editor); - spinBox->interpretText(); - int value = spinBox->value(); - - model->setData(index, value, Qt::EditRole); - } - - void SpinBoxDelegate::updateEditorGeometry(QWidget *editor, - const QStyleOptionViewItem &option, const QModelIndex &/* index */) const - { - editor->setGeometry(option.rect); - } diff --git a/widgets/widgets.pri b/widgets/widgets.pri new file mode 100644 index 000000000..4b908b906 --- /dev/null +++ b/widgets/widgets.pri @@ -0,0 +1,19 @@ +HEADERS += \ + widgets/vtablegraphicsview.h \ + widgets/vmaingraphicsview.h \ + widgets/vmaingraphicsscene.h \ + widgets/vitem.h \ + widgets/vgraphicssimpletextitem.h \ + widgets/vcontrolpointspline.h \ + widgets/vapplication.h \ + widgets/doubledelegate.h + +SOURCES += \ + widgets/vtablegraphicsview.cpp \ + widgets/vmaingraphicsview.cpp \ + widgets/vmaingraphicsscene.cpp \ + widgets/vitem.cpp \ + widgets/vgraphicssimpletextitem.cpp \ + widgets/vcontrolpointspline.cpp \ + widgets/vapplication.cpp \ + widgets/doubledelegate.cpp diff --git a/xml/xml.pri b/xml/xml.pri new file mode 100644 index 000000000..71489d606 --- /dev/null +++ b/xml/xml.pri @@ -0,0 +1,7 @@ +HEADERS += \ + xml/vtoolrecord.h \ + xml/vdomdocument.h + +SOURCES += \ + xml/vtoolrecord.cpp \ + xml/vdomdocument.cpp From 497e4633ff39614f03fd0e5e0e0bd61b9d053ac1 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 17:35:57 +0200 Subject: [PATCH 05/56] Change in structure of project file. --HG-- branch : develop --- tools/tools.pri | 91 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 85 insertions(+), 6 deletions(-) diff --git a/tools/tools.pri b/tools/tools.pri index a53c97ba6..818066245 100644 --- a/tools/tools.pri +++ b/tools/tools.pri @@ -2,13 +2,92 @@ HEADERS += \ tools/vtooldetail.h \ tools/vdatatool.h \ tools/vabstracttool.h \ - tools/tools.h + tools/tools.h \ + tools/drawTools/vtooltriangle.h \ + tools/drawTools/vtoolsplinepath.h \ + tools/drawTools/vtoolspline.h \ + tools/drawTools/vtoolsinglepoint.h \ + tools/drawTools/vtoolshoulderpoint.h \ + tools/drawTools/vtoolpointofintersection.h \ + tools/drawTools/vtoolpointofcontact.h \ + tools/drawTools/vtoolpoint.h \ + tools/drawTools/vtoolnormal.h \ + tools/drawTools/vtoollinepoint.h \ + tools/drawTools/vtoollineintersect.h \ + tools/drawTools/vtoolline.h \ + tools/drawTools/vtoolheight.h \ + tools/drawTools/vtoolendline.h \ + tools/drawTools/vtoolbisector.h \ + tools/drawTools/vtoolarc.h \ + tools/drawTools/vtoolalongline.h \ + tools/drawTools/vdrawtool.h \ + tools/drawTools/drawtools.h \ + tools/modelingTools/vmodelingtriangle.h \ + tools/modelingTools/vmodelingtool.h \ + tools/modelingTools/vmodelingsplinepath.h \ + tools/modelingTools/vmodelingspline.h \ + tools/modelingTools/vmodelingshoulderpoint.h \ + tools/modelingTools/vmodelingpointofintersection.h \ + tools/modelingTools/vmodelingpointofcontact.h \ + tools/modelingTools/vmodelingpoint.h \ + tools/modelingTools/vmodelingnormal.h \ + tools/modelingTools/vmodelinglinepoint.h \ + tools/modelingTools/vmodelinglineintersect.h \ + tools/modelingTools/vmodelingline.h \ + tools/modelingTools/vmodelingheight.h \ + tools/modelingTools/vmodelingendline.h \ + tools/modelingTools/vmodelingbisector.h \ + tools/modelingTools/vmodelingarc.h \ + tools/modelingTools/vmodelingalongline.h \ + tools/modelingTools/modelingtools.h \ + tools/nodeDetails/vnodesplinepath.h \ + tools/nodeDetails/vnodespline.h \ + tools/nodeDetails/vnodepoint.h \ + tools/nodeDetails/vnodearc.h \ + tools/nodeDetails/vabstractnode.h \ + tools/nodeDetails/nodedetails.h SOURCES += \ tools/vtooldetail.cpp \ tools/vdatatool.cpp \ - tools/vabstracttool.cpp - -include(drawTools/drawTools.pri) -include(modelingTools/modelingTools.pri) -include(nodeDetails/nodeDetails.pri) + tools/vabstracttool.cpp \ + tools/drawTools/vtooltriangle.cpp \ + tools/drawTools/vtoolsplinepath.cpp \ + tools/drawTools/vtoolspline.cpp \ + tools/drawTools/vtoolsinglepoint.cpp \ + tools/drawTools/vtoolshoulderpoint.cpp \ + tools/drawTools/vtoolpointofintersection.cpp \ + tools/drawTools/vtoolpointofcontact.cpp \ + tools/drawTools/vtoolpoint.cpp \ + tools/drawTools/vtoolnormal.cpp \ + tools/drawTools/vtoollinepoint.cpp \ + tools/drawTools/vtoollineintersect.cpp \ + tools/drawTools/vtoolline.cpp \ + tools/drawTools/vtoolheight.cpp \ + tools/drawTools/vtoolendline.cpp \ + tools/drawTools/vtoolbisector.cpp \ + tools/drawTools/vtoolarc.cpp \ + tools/drawTools/vtoolalongline.cpp \ + tools/drawTools/vdrawtool.cpp \ + tools/modelingTools/vmodelingtriangle.cpp \ + tools/modelingTools/vmodelingtool.cpp \ + tools/modelingTools/vmodelingsplinepath.cpp \ + tools/modelingTools/vmodelingspline.cpp \ + tools/modelingTools/vmodelingshoulderpoint.cpp \ + tools/modelingTools/vmodelingpointofintersection.cpp \ + tools/modelingTools/vmodelingpointofcontact.cpp \ + tools/modelingTools/vmodelingpoint.cpp \ + tools/modelingTools/vmodelingnormal.cpp \ + tools/modelingTools/vmodelinglinepoint.cpp \ + tools/modelingTools/vmodelinglineintersect.cpp \ + tools/modelingTools/vmodelingline.cpp \ + tools/modelingTools/vmodelingheight.cpp \ + tools/modelingTools/vmodelingendline.cpp \ + tools/modelingTools/vmodelingbisector.cpp \ + tools/modelingTools/vmodelingarc.cpp \ + tools/modelingTools/vmodelingalongline.cpp \ + tools/nodeDetails/vnodesplinepath.cpp \ + tools/nodeDetails/vnodespline.cpp \ + tools/nodeDetails/vnodepoint.cpp \ + tools/nodeDetails/vnodearc.cpp \ + tools/nodeDetails/vabstractnode.cpp From bc3bc3f99477c3e7d2bbce1f47445ea13b3925ac Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 17:49:07 +0200 Subject: [PATCH 06/56] Refactoring include for Visual Studio. --HG-- branch : develop --- container/vcontainer.cpp | 2 +- dialogs/dialogincrements.cpp | 4 +- dialogs/dialogtool.cpp | 2 +- dialogs/dialogtool.h | 2 +- geometry/varc.cpp | 2 +- geometry/vspline.h | 2 +- geometry/vsplinepath.cpp | 2 +- geometry/vsplinepath.h | 2 +- tools/drawTools/drawTools.pri | 40 ------------------- tools/drawTools/vtoolbisector.cpp | 2 +- tools/drawTools/vtoolendline.cpp | 2 +- tools/drawTools/vtoolnormal.cpp | 2 +- tools/drawTools/vtoolpointofcontact.cpp | 2 +- tools/drawTools/vtoolshoulderpoint.cpp | 2 +- tools/modelingTools/modelingTools.pri | 38 ------------------ tools/modelingTools/vmodelingbisector.cpp | 2 +- tools/modelingTools/vmodelingendline.cpp | 2 +- tools/modelingTools/vmodelingnormal.cpp | 2 +- .../modelingTools/vmodelingpointofcontact.cpp | 2 +- .../modelingTools/vmodelingshoulderpoint.cpp | 2 +- tools/nodeDetails/nodeDetails.pri | 14 ------- tools/vabstracttool.h | 2 +- tools/vdatatool.h | 2 +- xml/vdomdocument.cpp | 26 ++++++------ xml/vdomdocument.h | 6 +-- 25 files changed, 37 insertions(+), 129 deletions(-) delete mode 100644 tools/drawTools/drawTools.pri delete mode 100644 tools/modelingTools/modelingTools.pri delete mode 100644 tools/nodeDetails/nodeDetails.pri diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 2a6daca3d..b99b862b8 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vcontainer.h" -#include +#include "../exception/vexceptionbadid.h" qint64 VContainer::_id = 0; diff --git a/dialogs/dialogincrements.cpp b/dialogs/dialogincrements.cpp index 0dd5e7298..3a499d8f3 100644 --- a/dialogs/dialogincrements.cpp +++ b/dialogs/dialogincrements.cpp @@ -21,8 +21,8 @@ #include "dialogincrements.h" #include "ui_dialogincrements.h" -#include -#include +#include "../widgets/doubledelegate.h" +#include "../exception/vexception.h" DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent) :DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), row(0), column(0) diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index 3f3e0133a..beaa36183 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "dialogtool.h" -#include +#include "../container/calculator.h" DialogTool::DialogTool(const VContainer *data, Draw::Draws mode, QWidget *parent) :QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), timerFormula(0), bOk(0), diff --git a/dialogs/dialogtool.h b/dialogs/dialogtool.h index 02eea1fad..119eba2e9 100644 --- a/dialogs/dialogtool.h +++ b/dialogs/dialogtool.h @@ -23,7 +23,7 @@ #define DIALOGTOOL_H #include -#include +#include "../container/vcontainer.h" class DialogTool : public QDialog { diff --git a/geometry/varc.cpp b/geometry/varc.cpp index 14528dd22..d7f5ef860 100644 --- a/geometry/varc.cpp +++ b/geometry/varc.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "varc.h" -#include +#include "../exception/vexception.h" VArc::VArc () : f1(0), formulaF1(QString()), f2(0), formulaF2(QString()), radius(0), formulaRadius(QString()), diff --git a/geometry/vspline.h b/geometry/vspline.h index cc85542c0..abbc90121 100644 --- a/geometry/vspline.h +++ b/geometry/vspline.h @@ -22,7 +22,7 @@ #ifndef VSPLINE_H #define VSPLINE_H -#include +#include "../container/vpointf.h" #define M_2PI 6.28318530717958647692528676655900576 diff --git a/geometry/vsplinepath.cpp b/geometry/vsplinepath.cpp index efbeacd20..23c5d45b0 100644 --- a/geometry/vsplinepath.cpp +++ b/geometry/vsplinepath.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vsplinepath.h" -#include +#include "../exception/vexception.h" VSplinePath::VSplinePath() : path(QVector()), kCurve(1), mode(Draw::Calculation), points(QHash()), idObject(0){} diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index 6ac235ec7..94279c109 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -23,7 +23,7 @@ #define VSPLINEPATH_H #include "vsplinepoint.h" -#include +#include "../container/vpointf.h" #include "vspline.h" #include diff --git a/tools/drawTools/drawTools.pri b/tools/drawTools/drawTools.pri deleted file mode 100644 index 54cf0341c..000000000 --- a/tools/drawTools/drawTools.pri +++ /dev/null @@ -1,40 +0,0 @@ -HEADERS += \ - tools/drawTools/vtooltriangle.h \ - tools/drawTools/vtoolsplinepath.h \ - tools/drawTools/vtoolspline.h \ - tools/drawTools/vtoolshoulderpoint.h \ - tools/drawTools/vtoolpointofintersection.h \ - tools/drawTools/vtoolpointofcontact.h \ - tools/drawTools/vtoolpoint.h \ - tools/drawTools/vtoolnormal.h \ - tools/drawTools/vtoollinepoint.h \ - tools/drawTools/vtoollineintersect.h \ - tools/drawTools/vtoolline.h \ - tools/drawTools/vtoolheight.h \ - tools/drawTools/vtoolendline.h \ - tools/drawTools/vtoolbisector.h \ - tools/drawTools/vtoolarc.h \ - tools/drawTools/vtoolalongline.h \ - tools/drawTools/vdrawtool.h \ - tools/drawTools/drawtools.h \ - tools/drawTools/vtoolsinglepoint.h - -SOURCES += \ - tools/drawTools/vtooltriangle.cpp \ - tools/drawTools/vtoolsplinepath.cpp \ - tools/drawTools/vtoolspline.cpp \ - tools/drawTools/vtoolshoulderpoint.cpp \ - tools/drawTools/vtoolpointofintersection.cpp \ - tools/drawTools/vtoolpointofcontact.cpp \ - tools/drawTools/vtoolpoint.cpp \ - tools/drawTools/vtoolnormal.cpp \ - tools/drawTools/vtoollinepoint.cpp \ - tools/drawTools/vtoollineintersect.cpp \ - tools/drawTools/vtoolline.cpp \ - tools/drawTools/vtoolheight.cpp \ - tools/drawTools/vtoolendline.cpp \ - tools/drawTools/vtoolbisector.cpp \ - tools/drawTools/vtoolarc.cpp \ - tools/drawTools/vtoolalongline.cpp \ - tools/drawTools/vdrawtool.cpp \ - tools/drawTools/vtoolsinglepoint.cpp diff --git a/tools/drawTools/vtoolbisector.cpp b/tools/drawTools/vtoolbisector.cpp index 26af32886..7c7795591 100644 --- a/tools/drawTools/vtoolbisector.cpp +++ b/tools/drawTools/vtoolbisector.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vtoolbisector.h" -#include +#include "../../container/calculator.h" const QString VToolBisector::ToolType = QStringLiteral("bisector"); diff --git a/tools/drawTools/vtoolendline.cpp b/tools/drawTools/vtoolendline.cpp index cbd18add4..38e5f0057 100644 --- a/tools/drawTools/vtoolendline.cpp +++ b/tools/drawTools/vtoolendline.cpp @@ -21,7 +21,7 @@ #include "vtoolendline.h" #include "widgets/vmaingraphicsscene.h" -#include +#include "../../container/calculator.h" const QString VToolEndLine::ToolType = QStringLiteral("endLine"); diff --git a/tools/drawTools/vtoolnormal.cpp b/tools/drawTools/vtoolnormal.cpp index 967d7c2c6..69fd7d764 100644 --- a/tools/drawTools/vtoolnormal.cpp +++ b/tools/drawTools/vtoolnormal.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vtoolnormal.h" -#include +#include "../../container/calculator.h" const QString VToolNormal::ToolType = QStringLiteral("normal"); diff --git a/tools/drawTools/vtoolpointofcontact.cpp b/tools/drawTools/vtoolpointofcontact.cpp index 35ee84e7c..885f82775 100644 --- a/tools/drawTools/vtoolpointofcontact.cpp +++ b/tools/drawTools/vtoolpointofcontact.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vtoolpointofcontact.h" -#include +#include "../../container/calculator.h" const QString VToolPointOfContact::ToolType = QStringLiteral("pointOfContact"); diff --git a/tools/drawTools/vtoolshoulderpoint.cpp b/tools/drawTools/vtoolshoulderpoint.cpp index 894a448f1..efc4ff838 100644 --- a/tools/drawTools/vtoolshoulderpoint.cpp +++ b/tools/drawTools/vtoolshoulderpoint.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vtoolshoulderpoint.h" -#include +#include "../../container/calculator.h" const QString VToolShoulderPoint::ToolType = QStringLiteral("shoulder"); diff --git a/tools/modelingTools/modelingTools.pri b/tools/modelingTools/modelingTools.pri deleted file mode 100644 index 165b67fe5..000000000 --- a/tools/modelingTools/modelingTools.pri +++ /dev/null @@ -1,38 +0,0 @@ -HEADERS += \ - tools/modelingTools/vmodelingtriangle.h \ - tools/modelingTools/vmodelingtool.h \ - tools/modelingTools/vmodelingsplinepath.h \ - tools/modelingTools/vmodelingspline.h \ - tools/modelingTools/vmodelingshoulderpoint.h \ - tools/modelingTools/vmodelingpointofintersection.h \ - tools/modelingTools/vmodelingpointofcontact.h \ - tools/modelingTools/vmodelingpoint.h \ - tools/modelingTools/vmodelingnormal.h \ - tools/modelingTools/vmodelinglinepoint.h \ - tools/modelingTools/vmodelinglineintersect.h \ - tools/modelingTools/vmodelingline.h \ - tools/modelingTools/vmodelingheight.h \ - tools/modelingTools/vmodelingendline.h \ - tools/modelingTools/vmodelingbisector.h \ - tools/modelingTools/vmodelingarc.h \ - tools/modelingTools/vmodelingalongline.h \ - tools/modelingTools/modelingtools.h - -SOURCES += \ - tools/modelingTools/vmodelingtriangle.cpp \ - tools/modelingTools/vmodelingtool.cpp \ - tools/modelingTools/vmodelingsplinepath.cpp \ - tools/modelingTools/vmodelingspline.cpp \ - tools/modelingTools/vmodelingshoulderpoint.cpp \ - tools/modelingTools/vmodelingpointofintersection.cpp \ - tools/modelingTools/vmodelingpointofcontact.cpp \ - tools/modelingTools/vmodelingpoint.cpp \ - tools/modelingTools/vmodelingnormal.cpp \ - tools/modelingTools/vmodelinglinepoint.cpp \ - tools/modelingTools/vmodelinglineintersect.cpp \ - tools/modelingTools/vmodelingline.cpp \ - tools/modelingTools/vmodelingheight.cpp \ - tools/modelingTools/vmodelingendline.cpp \ - tools/modelingTools/vmodelingbisector.cpp \ - tools/modelingTools/vmodelingarc.cpp \ - tools/modelingTools/vmodelingalongline.cpp diff --git a/tools/modelingTools/vmodelingbisector.cpp b/tools/modelingTools/vmodelingbisector.cpp index 34870255b..1524260e8 100644 --- a/tools/modelingTools/vmodelingbisector.cpp +++ b/tools/modelingTools/vmodelingbisector.cpp @@ -21,7 +21,7 @@ #include "vmodelingbisector.h" #include "../drawTools/vtoolbisector.h" -#include +#include "../../container/calculator.h" const QString VModelingBisector::ToolType = QStringLiteral("bisector"); diff --git a/tools/modelingTools/vmodelingendline.cpp b/tools/modelingTools/vmodelingendline.cpp index d5d2349d8..db778dbc4 100644 --- a/tools/modelingTools/vmodelingendline.cpp +++ b/tools/modelingTools/vmodelingendline.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vmodelingendline.h" -#include +#include "../../container/calculator.h" const QString VModelingEndLine::ToolType = QStringLiteral("endLine"); diff --git a/tools/modelingTools/vmodelingnormal.cpp b/tools/modelingTools/vmodelingnormal.cpp index 57e0da070..bafd2f52f 100644 --- a/tools/modelingTools/vmodelingnormal.cpp +++ b/tools/modelingTools/vmodelingnormal.cpp @@ -21,7 +21,7 @@ #include "vmodelingnormal.h" #include "../drawTools/vtoolnormal.h" -#include +#include "../../container/calculator.h" const QString VModelingNormal::ToolType = QStringLiteral("normal"); diff --git a/tools/modelingTools/vmodelingpointofcontact.cpp b/tools/modelingTools/vmodelingpointofcontact.cpp index f87a094ad..035aa437d 100644 --- a/tools/modelingTools/vmodelingpointofcontact.cpp +++ b/tools/modelingTools/vmodelingpointofcontact.cpp @@ -21,7 +21,7 @@ #include "vmodelingpointofcontact.h" #include "../drawTools/vtoolpointofcontact.h" -#include +#include "../../container/calculator.h" const QString VModelingPointOfContact::ToolType = QStringLiteral("pointOfContact"); diff --git a/tools/modelingTools/vmodelingshoulderpoint.cpp b/tools/modelingTools/vmodelingshoulderpoint.cpp index ac27b5392..ee5cdd3ec 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.cpp +++ b/tools/modelingTools/vmodelingshoulderpoint.cpp @@ -21,7 +21,7 @@ #include "vmodelingshoulderpoint.h" #include "../drawTools/vtoolshoulderpoint.h" -#include +#include "../../container/calculator.h" const QString VModelingShoulderPoint::ToolType = QStringLiteral("shoulder"); diff --git a/tools/nodeDetails/nodeDetails.pri b/tools/nodeDetails/nodeDetails.pri deleted file mode 100644 index c79444f12..000000000 --- a/tools/nodeDetails/nodeDetails.pri +++ /dev/null @@ -1,14 +0,0 @@ -HEADERS += \ - tools/nodeDetails/vnodesplinepath.h \ - tools/nodeDetails/vnodespline.h \ - tools/nodeDetails/vnodepoint.h \ - tools/nodeDetails/vnodearc.h \ - tools/nodeDetails/vabstractnode.h \ - tools/nodeDetails/nodedetails.h - -SOURCES += \ - tools/nodeDetails/vnodesplinepath.cpp \ - tools/nodeDetails/vnodespline.cpp \ - tools/nodeDetails/vnodepoint.cpp \ - tools/nodeDetails/vnodearc.cpp \ - tools/nodeDetails/vabstractnode.cpp diff --git a/tools/vabstracttool.h b/tools/vabstracttool.h index a5a398d56..e917552b1 100644 --- a/tools/vabstracttool.h +++ b/tools/vabstracttool.h @@ -23,7 +23,7 @@ #define VABSTRACTTOOL_H #include "vdatatool.h" -#include +#include "../xml/vdomdocument.h" class VAbstractTool: public VDataTool { diff --git a/tools/vdatatool.h b/tools/vdatatool.h index 9b8dda925..4c9aa6285 100644 --- a/tools/vdatatool.h +++ b/tools/vdatatool.h @@ -22,7 +22,7 @@ #ifndef VDATATOOL_H #define VDATATOOL_H -#include +#include "../container/vcontainer.h" //We need QObject class because we use qobject_cast. class VDataTool : public QObject diff --git a/xml/vdomdocument.cpp b/xml/vdomdocument.cpp index 76c73c831..5fb79c282 100644 --- a/xml/vdomdocument.cpp +++ b/xml/vdomdocument.cpp @@ -20,19 +20,19 @@ ****************************************************************************/ #include "vdomdocument.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "../exception/vexceptionwrongparameterid.h" +#include "../exception/vexceptionconversionerror.h" +#include "../exception/vexceptionemptyparameter.h" +#include "../exception/vexceptionuniqueid.h" +#include "../tools/vtooldetail.h" +#include "../exception/vexceptionobjecterror.h" +#include "../exception/vexceptionbadid.h" +#include "../tools/drawTools/drawtools.h" +#include "../tools/modelingTools/modelingtools.h" +#include "../tools/nodeDetails/vnodepoint.h" +#include "../tools/nodeDetails/vnodespline.h" +#include "../tools/nodeDetails/vnodesplinepath.h" +#include "../tools/nodeDetails/vnodearc.h" VDomDocument::VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode) : QDomDocument(), map(QHash()), nameActivDraw(QString()), data(data), diff --git a/xml/vdomdocument.h b/xml/vdomdocument.h index fbd67550b..6000638b9 100644 --- a/xml/vdomdocument.h +++ b/xml/vdomdocument.h @@ -23,9 +23,9 @@ #define VDOMDOCUMENT_H #include -#include -#include -#include +#include "../container/vcontainer.h" +#include "../widgets/vmaingraphicsscene.h" +#include "../tools/vdatatool.h" #include "vtoolrecord.h" namespace Document From b9a99cd0cfafd09707f3d6818d4a284060cdce6a Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 18:37:51 +0200 Subject: [PATCH 07/56] Q_DECL_NOEXCEPT_EXPR(true) instead noexcept(true). --HG-- branch : develop --- exception/vexception.h | 4 ++-- exception/vexceptionbadid.h | 2 +- exception/vexceptionconversionerror.h | 2 +- exception/vexceptionemptyparameter.h | 2 +- exception/vexceptionobjecterror.h | 2 +- exception/vexceptionuniqueid.h | 2 +- exception/vexceptionwrongparameterid.h | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/exception/vexception.h b/exception/vexception.h index 87b34cfc0..94b064d21 100644 --- a/exception/vexception.h +++ b/exception/vexception.h @@ -29,8 +29,8 @@ class VException : public QException { public: VException(const QString &what); - VException(const VException &e):what(e.What()){} - virtual ~VException() noexcept(true){} + VException(const VException &e):what(e.What()){} + virtual ~VException() Q_DECL_NOEXCEPT_EXPR(true){} inline void raise() const { throw *this; } inline VException *clone() const { return new VException(*this); } virtual QString ErrorMessage() const; diff --git a/exception/vexceptionbadid.h b/exception/vexceptionbadid.h index 6ddf034c5..dbf1b17a1 100644 --- a/exception/vexceptionbadid.h +++ b/exception/vexceptionbadid.h @@ -33,7 +33,7 @@ public: :VException(what), id(0), key(key){} VExceptionBadId(const VExceptionBadId &e) :VException(e), id(e.BadId()), key(e.BadKey()){} - virtual ~VExceptionBadId() noexcept(true){} + virtual ~VExceptionBadId() Q_DECL_NOEXCEPT_EXPR(true){} virtual QString ErrorMessage() const; inline qint64 BadId() const {return id; } inline QString BadKey() const {return key; } diff --git a/exception/vexceptionconversionerror.h b/exception/vexceptionconversionerror.h index bd8313b3d..0e88427ab 100644 --- a/exception/vexceptionconversionerror.h +++ b/exception/vexceptionconversionerror.h @@ -30,7 +30,7 @@ public: VExceptionConversionError(const QString &what, const QString &str); VExceptionConversionError(const VExceptionConversionError &e) :VException(e), str(e.String()){} - virtual ~VExceptionConversionError() noexcept(true) {} + virtual ~VExceptionConversionError() Q_DECL_NOEXCEPT_EXPR(true) {} virtual QString ErrorMessage() const; inline QString String() const {return str;} protected: diff --git a/exception/vexceptionemptyparameter.h b/exception/vexceptionemptyparameter.h index c7fbae985..7dfbaa2ea 100644 --- a/exception/vexceptionemptyparameter.h +++ b/exception/vexceptionemptyparameter.h @@ -31,7 +31,7 @@ public: VExceptionEmptyParameter(const VExceptionEmptyParameter &e) :VException(e), name(e.Name()), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} - virtual ~VExceptionEmptyParameter() noexcept(true) {} + virtual ~VExceptionEmptyParameter() Q_DECL_NOEXCEPT_EXPR(true) {} virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; inline QString Name() const {return name;} diff --git a/exception/vexceptionobjecterror.h b/exception/vexceptionobjecterror.h index f564347b8..76cdebbec 100644 --- a/exception/vexceptionobjecterror.h +++ b/exception/vexceptionobjecterror.h @@ -31,7 +31,7 @@ public: VExceptionObjectError(const VExceptionObjectError &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()), moreInfo(e.MoreInformation()){} - virtual ~VExceptionObjectError() noexcept(true) {} + virtual ~VExceptionObjectError() Q_DECL_NOEXCEPT_EXPR(true) {} virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; inline QString TagText() const {return tagText;} diff --git a/exception/vexceptionuniqueid.h b/exception/vexceptionuniqueid.h index d3d618598..f34f2e56e 100644 --- a/exception/vexceptionuniqueid.h +++ b/exception/vexceptionuniqueid.h @@ -30,7 +30,7 @@ public: VExceptionUniqueId(const QString &what, const QDomElement &domElement); VExceptionUniqueId(const VExceptionUniqueId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} - virtual ~VExceptionUniqueId() noexcept(true){} + virtual ~VExceptionUniqueId() Q_DECL_NOEXCEPT_EXPR(true){} virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; inline QString TagText() const {return tagText;} diff --git a/exception/vexceptionwrongparameterid.h b/exception/vexceptionwrongparameterid.h index 905f32f11..69de87b8c 100644 --- a/exception/vexceptionwrongparameterid.h +++ b/exception/vexceptionwrongparameterid.h @@ -30,7 +30,7 @@ public: VExceptionWrongParameterId(const QString &what, const QDomElement &domElement); VExceptionWrongParameterId(const VExceptionWrongParameterId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} - virtual ~VExceptionWrongParameterId() noexcept(true){} + virtual ~VExceptionWrongParameterId() Q_DECL_NOEXCEPT_EXPR(true){} virtual QString ErrorMessage() const; virtual QString DetailedInformation() const; inline QString TagText() const {return tagText;} From 95b4a34e6c2684917dda9e2ac3a8cdbb45b2025a Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 19:06:00 +0200 Subject: [PATCH 08/56] Refactoring include for Visual Studio. --HG-- branch : develop --- container/vcontainer.h | 8 ++++---- dialogs/dialoghistory.cpp | 6 +++--- dialogs/dialoghistory.h | 2 +- dialogs/dialogincrements.h | 2 +- dialogs/dialogsplinepath.cpp | 2 +- dialogs/dialogsplinepath.h | 2 +- geometry/vnodedetail.h | 2 +- tools/drawTools/vtoolalongline.cpp | 2 +- tools/drawTools/vtoolalongline.h | 2 +- tools/drawTools/vtoolarc.cpp | 2 +- tools/drawTools/vtoolarc.h | 4 ++-- tools/drawTools/vtoolbisector.h | 2 +- tools/drawTools/vtoolendline.cpp | 2 +- tools/drawTools/vtoolendline.h | 2 +- tools/drawTools/vtoolheight.h | 2 +- tools/drawTools/vtoolline.h | 4 ++-- tools/drawTools/vtoollineintersect.h | 2 +- tools/drawTools/vtoolnormal.h | 2 +- tools/drawTools/vtoolpoint.h | 2 +- tools/drawTools/vtoolpointofcontact.h | 2 +- tools/drawTools/vtoolpointofintersection.h | 2 +- tools/drawTools/vtoolshoulderpoint.h | 2 +- tools/drawTools/vtoolsinglepoint.h | 2 +- tools/drawTools/vtoolspline.cpp | 2 +- tools/drawTools/vtoolspline.h | 6 +++--- tools/drawTools/vtoolsplinepath.h | 4 ++-- tools/drawTools/vtooltriangle.h | 2 +- tools/modelingTools/vmodelingalongline.cpp | 2 +- tools/modelingTools/vmodelingalongline.h | 2 +- tools/modelingTools/vmodelingarc.cpp | 2 +- tools/modelingTools/vmodelingarc.h | 4 ++-- tools/modelingTools/vmodelingbisector.h | 2 +- tools/modelingTools/vmodelingendline.h | 2 +- tools/modelingTools/vmodelingheight.h | 2 +- tools/modelingTools/vmodelingline.h | 4 ++-- tools/modelingTools/vmodelinglineintersect.h | 2 +- tools/modelingTools/vmodelingnormal.h | 2 +- tools/modelingTools/vmodelingpoint.cpp | 2 +- tools/modelingTools/vmodelingpoint.h | 2 +- tools/modelingTools/vmodelingpointofcontact.h | 2 +- tools/modelingTools/vmodelingpointofintersection.h | 2 +- tools/modelingTools/vmodelingshoulderpoint.h | 2 +- tools/modelingTools/vmodelingspline.cpp | 2 +- tools/modelingTools/vmodelingspline.h | 6 +++--- tools/modelingTools/vmodelingsplinepath.h | 4 ++-- tools/modelingTools/vmodelingtriangle.h | 2 +- tools/nodeDetails/vnodepoint.h | 2 +- tools/vtooldetail.h | 2 +- widgets/vapplication.cpp | 10 +++++----- widgets/vcontrolpointspline.h | 2 +- 50 files changed, 69 insertions(+), 69 deletions(-) diff --git a/container/vcontainer.h b/container/vcontainer.h index 5937bb03e..1e33e2f0e 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -24,10 +24,10 @@ #include "vstandarttablecell.h" #include "vincrementtablerow.h" -#include "geometry/varc.h" -#include "geometry/vsplinepath.h" -#include "geometry/vdetail.h" -#include "widgets/vitem.h" +#include "../geometry/varc.h" +#include "../geometry/vsplinepath.h" +#include "../geometry/vdetail.h" +#include "../widgets/vitem.h" /** * @brief The VContainer class diff --git a/dialogs/dialoghistory.cpp b/dialogs/dialoghistory.cpp index 8b175b3f5..92849163e 100644 --- a/dialogs/dialoghistory.cpp +++ b/dialogs/dialoghistory.cpp @@ -21,9 +21,9 @@ #include "dialoghistory.h" #include "ui_dialoghistory.h" -#include "geometry/varc.h" -#include "geometry/vspline.h" -#include "geometry/vsplinepath.h" +#include "../geometry/varc.h" +#include "../geometry/vspline.h" +#include "../geometry/vsplinepath.h" #include DialogHistory::DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent) diff --git a/dialogs/dialoghistory.h b/dialogs/dialoghistory.h index c3b51156c..21c7c4bab 100644 --- a/dialogs/dialoghistory.h +++ b/dialogs/dialoghistory.h @@ -23,7 +23,7 @@ #define DIALOGHISTORY_H #include "dialogtool.h" -#include "xml/vdomdocument.h" +#include "../xml/vdomdocument.h" namespace Ui { diff --git a/dialogs/dialogincrements.h b/dialogs/dialogincrements.h index bc4260052..bb476393b 100644 --- a/dialogs/dialogincrements.h +++ b/dialogs/dialogincrements.h @@ -23,7 +23,7 @@ #define DIALOGINCREMENTS_H #include "dialogtool.h" -#include "xml/vdomdocument.h" +#include "../xml/vdomdocument.h" namespace Ui { diff --git a/dialogs/dialogsplinepath.cpp b/dialogs/dialogsplinepath.cpp index d671ef182..7321f2989 100644 --- a/dialogs/dialogsplinepath.cpp +++ b/dialogs/dialogsplinepath.cpp @@ -21,7 +21,7 @@ #include "dialogsplinepath.h" #include "ui_dialogsplinepath.h" -#include "geometry/vsplinepoint.h" +#include "../geometry/vsplinepoint.h" DialogSplinePath::DialogSplinePath(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogSplinePath), path(VSplinePath()) diff --git a/dialogs/dialogsplinepath.h b/dialogs/dialogsplinepath.h index 394e79356..d3ebff753 100644 --- a/dialogs/dialogsplinepath.h +++ b/dialogs/dialogsplinepath.h @@ -23,7 +23,7 @@ #define DIALOGSPLINEPATH_H #include "dialogtool.h" -#include "geometry/vsplinepath.h" +#include "../geometry/vsplinepath.h" namespace Ui { diff --git a/geometry/vnodedetail.h b/geometry/vnodedetail.h index 9735445d4..38a3caced 100644 --- a/geometry/vnodedetail.h +++ b/geometry/vnodedetail.h @@ -23,7 +23,7 @@ #define VNODEDETAIL_H #include -#include "options.h" +#include "../options.h" namespace NodeDetail { diff --git a/tools/drawTools/vtoolalongline.cpp b/tools/drawTools/vtoolalongline.cpp index e95cd586e..c47034ae6 100644 --- a/tools/drawTools/vtoolalongline.cpp +++ b/tools/drawTools/vtoolalongline.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vtoolalongline.h" -#include "container/calculator.h" +#include "../../container/calculator.h" const QString VToolAlongLine::ToolType = QStringLiteral("alongLine"); diff --git a/tools/drawTools/vtoolalongline.h b/tools/drawTools/vtoolalongline.h index 22b0e7996..974e7d29e 100644 --- a/tools/drawTools/vtoolalongline.h +++ b/tools/drawTools/vtoolalongline.h @@ -23,7 +23,7 @@ #define VTOOLALONGLINE_H #include "vtoollinepoint.h" -#include "dialogs/dialogalongline.h" +#include "../../dialogs/dialogalongline.h" class VToolAlongLine : public VToolLinePoint { diff --git a/tools/drawTools/vtoolarc.cpp b/tools/drawTools/vtoolarc.cpp index bda386b36..8c7c146d6 100644 --- a/tools/drawTools/vtoolarc.cpp +++ b/tools/drawTools/vtoolarc.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vtoolarc.h" -#include "container/calculator.h" +#include "../../container/calculator.h" const QString VToolArc::TagName = QStringLiteral("arc"); const QString VToolArc::ToolType = QStringLiteral("simple"); diff --git a/tools/drawTools/vtoolarc.h b/tools/drawTools/vtoolarc.h index 75ea37bfa..a199ad10a 100644 --- a/tools/drawTools/vtoolarc.h +++ b/tools/drawTools/vtoolarc.h @@ -24,8 +24,8 @@ #include "vdrawtool.h" #include -#include "dialogs/dialogarc.h" -#include "widgets/vcontrolpointspline.h" +#include "../../dialogs/dialogarc.h" +#include "../../widgets/vcontrolpointspline.h" class VToolArc :public VDrawTool, public QGraphicsPathItem { diff --git a/tools/drawTools/vtoolbisector.h b/tools/drawTools/vtoolbisector.h index 9f7434538..b072bf052 100644 --- a/tools/drawTools/vtoolbisector.h +++ b/tools/drawTools/vtoolbisector.h @@ -23,7 +23,7 @@ #define VTOOLBISECTOR_H #include "vtoollinepoint.h" -#include "dialogs/dialogbisector.h" +#include "../../dialogs/dialogbisector.h" class VToolBisector : public VToolLinePoint { diff --git a/tools/drawTools/vtoolendline.cpp b/tools/drawTools/vtoolendline.cpp index 38e5f0057..98fc7d4d9 100644 --- a/tools/drawTools/vtoolendline.cpp +++ b/tools/drawTools/vtoolendline.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vtoolendline.h" -#include "widgets/vmaingraphicsscene.h" +#include "../../widgets/vmaingraphicsscene.h" #include "../../container/calculator.h" const QString VToolEndLine::ToolType = QStringLiteral("endLine"); diff --git a/tools/drawTools/vtoolendline.h b/tools/drawTools/vtoolendline.h index 9e7171a7f..d9819a378 100644 --- a/tools/drawTools/vtoolendline.h +++ b/tools/drawTools/vtoolendline.h @@ -23,7 +23,7 @@ #define VTOOLENDLINE_H #include "vtoollinepoint.h" -#include "dialogs/dialogendline.h" +#include "../../dialogs/dialogendline.h" class VToolEndLine : public VToolLinePoint { diff --git a/tools/drawTools/vtoolheight.h b/tools/drawTools/vtoolheight.h index 2dd0145e7..3777d85b0 100644 --- a/tools/drawTools/vtoolheight.h +++ b/tools/drawTools/vtoolheight.h @@ -23,7 +23,7 @@ #define VTOOLHEIGHT_H #include "vtoollinepoint.h" -#include "dialogs/dialogheight.h" +#include "../../dialogs/dialogheight.h" class VToolHeight: public VToolLinePoint { diff --git a/tools/drawTools/vtoolline.h b/tools/drawTools/vtoolline.h index 43469b535..9e9700eed 100644 --- a/tools/drawTools/vtoolline.h +++ b/tools/drawTools/vtoolline.h @@ -23,8 +23,8 @@ #define VTOOLLINE_H #include "vdrawtool.h" -#include "QGraphicsLineItem" -#include "dialogs/dialogline.h" +#include +#include "../../dialogs/dialogline.h" class VToolLine: public VDrawTool, public QGraphicsLineItem { diff --git a/tools/drawTools/vtoollineintersect.h b/tools/drawTools/vtoollineintersect.h index 5d9058dbd..141f123d0 100644 --- a/tools/drawTools/vtoollineintersect.h +++ b/tools/drawTools/vtoollineintersect.h @@ -23,7 +23,7 @@ #define VTOOLLINEINTERSECT_H #include "vtoolpoint.h" -#include "dialogs/dialoglineintersect.h" +#include "../../dialogs/dialoglineintersect.h" class VToolLineIntersect:public VToolPoint { diff --git a/tools/drawTools/vtoolnormal.h b/tools/drawTools/vtoolnormal.h index 2ce571cd7..bf6d0292e 100644 --- a/tools/drawTools/vtoolnormal.h +++ b/tools/drawTools/vtoolnormal.h @@ -23,7 +23,7 @@ #define VTOOLNORMAL_H #include "vtoollinepoint.h" -#include "dialogs/dialognormal.h" +#include "../../dialogs/dialognormal.h" class VToolNormal : public VToolLinePoint { diff --git a/tools/drawTools/vtoolpoint.h b/tools/drawTools/vtoolpoint.h index ae04e6fb7..fedd8dad6 100644 --- a/tools/drawTools/vtoolpoint.h +++ b/tools/drawTools/vtoolpoint.h @@ -23,7 +23,7 @@ #define VTOOLPOINT_H #include "vdrawtool.h" -#include "widgets/vgraphicssimpletextitem.h" +#include "../../widgets/vgraphicssimpletextitem.h" class VToolPoint: public VDrawTool, public QGraphicsEllipseItem { diff --git a/tools/drawTools/vtoolpointofcontact.h b/tools/drawTools/vtoolpointofcontact.h index a5f76f046..ad3854c3a 100644 --- a/tools/drawTools/vtoolpointofcontact.h +++ b/tools/drawTools/vtoolpointofcontact.h @@ -23,7 +23,7 @@ #define VTOOLPOINTOFCONTACT_H #include "vtoolpoint.h" -#include "dialogs/dialogpointofcontact.h" +#include "../../dialogs/dialogpointofcontact.h" class VToolPointOfContact : public VToolPoint { diff --git a/tools/drawTools/vtoolpointofintersection.h b/tools/drawTools/vtoolpointofintersection.h index 45ea6ea70..d7701c979 100644 --- a/tools/drawTools/vtoolpointofintersection.h +++ b/tools/drawTools/vtoolpointofintersection.h @@ -23,7 +23,7 @@ #define VTOOLPOINTOFINTERSECTION_H #include "vtoolpoint.h" -#include "dialogs/dialogpointofintersection.h" +#include "../../dialogs/dialogpointofintersection.h" class VToolPointOfIntersection : public VToolPoint { diff --git a/tools/drawTools/vtoolshoulderpoint.h b/tools/drawTools/vtoolshoulderpoint.h index e557fdbb2..bfb8d3b9f 100644 --- a/tools/drawTools/vtoolshoulderpoint.h +++ b/tools/drawTools/vtoolshoulderpoint.h @@ -23,7 +23,7 @@ #define VTOOLSHOULDERPOINT_H #include "vtoollinepoint.h" -#include "dialogs/dialogshoulderpoint.h" +#include "../../dialogs/dialogshoulderpoint.h" class VToolShoulderPoint : public VToolLinePoint { diff --git a/tools/drawTools/vtoolsinglepoint.h b/tools/drawTools/vtoolsinglepoint.h index 4265f8f83..466d76eef 100644 --- a/tools/drawTools/vtoolsinglepoint.h +++ b/tools/drawTools/vtoolsinglepoint.h @@ -22,8 +22,8 @@ #ifndef VTOOLSINGLEPOINT_H #define VTOOLSINGLEPOINT_H -#include "dialogs/dialogsinglepoint.h" #include "vtoolpoint.h" +#include "../../dialogs/dialogsinglepoint.h" class VToolSinglePoint : public VToolPoint { diff --git a/tools/drawTools/vtoolspline.cpp b/tools/drawTools/vtoolspline.cpp index 0c058806b..df7b0e81c 100644 --- a/tools/drawTools/vtoolspline.cpp +++ b/tools/drawTools/vtoolspline.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vtoolspline.h" -#include "geometry/vspline.h" +#include "../../geometry/vspline.h" const QString VToolSpline::TagName = QStringLiteral("spline"); const QString VToolSpline::ToolType = QStringLiteral("simple"); diff --git a/tools/drawTools/vtoolspline.h b/tools/drawTools/vtoolspline.h index bc5ccb9fa..0b2d5488e 100644 --- a/tools/drawTools/vtoolspline.h +++ b/tools/drawTools/vtoolspline.h @@ -24,9 +24,9 @@ #include "vdrawtool.h" #include -#include "dialogs/dialogspline.h" -#include "widgets/vcontrolpointspline.h" -#include "geometry/vsplinepath.h" +#include "../../dialogs/dialogspline.h" +#include "../../widgets/vcontrolpointspline.h" +#include "../../geometry/vsplinepath.h" class VToolSpline:public VDrawTool, public QGraphicsPathItem { diff --git a/tools/drawTools/vtoolsplinepath.h b/tools/drawTools/vtoolsplinepath.h index a1c3c51be..d495a7240 100644 --- a/tools/drawTools/vtoolsplinepath.h +++ b/tools/drawTools/vtoolsplinepath.h @@ -24,8 +24,8 @@ #include "vdrawtool.h" #include -#include "dialogs/dialogsplinepath.h" -#include "widgets/vcontrolpointspline.h" +#include "../../dialogs/dialogsplinepath.h" +#include "../../widgets/vcontrolpointspline.h" class VToolSplinePath:public VDrawTool, public QGraphicsPathItem { diff --git a/tools/drawTools/vtooltriangle.h b/tools/drawTools/vtooltriangle.h index 349ced7fd..d83aa184c 100644 --- a/tools/drawTools/vtooltriangle.h +++ b/tools/drawTools/vtooltriangle.h @@ -23,7 +23,7 @@ #define VTOOLTRIANGLE_H #include "vtoolpoint.h" -#include "dialogs/dialogtriangle.h" +#include "../../dialogs/dialogtriangle.h" class VToolTriangle : public VToolPoint { diff --git a/tools/modelingTools/vmodelingalongline.cpp b/tools/modelingTools/vmodelingalongline.cpp index eda3d393d..535598a7b 100644 --- a/tools/modelingTools/vmodelingalongline.cpp +++ b/tools/modelingTools/vmodelingalongline.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vmodelingalongline.h" -#include "container/calculator.h" +#include "../../container/calculator.h" const QString VModelingAlongLine::ToolType = QStringLiteral("alongLine"); diff --git a/tools/modelingTools/vmodelingalongline.h b/tools/modelingTools/vmodelingalongline.h index 10806c529..943836b67 100644 --- a/tools/modelingTools/vmodelingalongline.h +++ b/tools/modelingTools/vmodelingalongline.h @@ -23,7 +23,7 @@ #define VMODELINGALONGLINE_H #include "vmodelinglinepoint.h" -#include "dialogs/dialogalongline.h" +#include "../../dialogs/dialogalongline.h" class VModelingAlongLine : public VModelingLinePoint { diff --git a/tools/modelingTools/vmodelingarc.cpp b/tools/modelingTools/vmodelingarc.cpp index 79cd93d05..fe6c8f309 100644 --- a/tools/modelingTools/vmodelingarc.cpp +++ b/tools/modelingTools/vmodelingarc.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vmodelingarc.h" -#include "container/calculator.h" +#include "../../container/calculator.h" const QString VModelingArc::TagName = QStringLiteral("arc"); const QString VModelingArc::ToolType = QStringLiteral("simple"); diff --git a/tools/modelingTools/vmodelingarc.h b/tools/modelingTools/vmodelingarc.h index 5604adf1b..9aba52347 100644 --- a/tools/modelingTools/vmodelingarc.h +++ b/tools/modelingTools/vmodelingarc.h @@ -24,8 +24,8 @@ #include "vmodelingtool.h" #include -#include "dialogs/dialogarc.h" -#include "widgets/vcontrolpointspline.h" +#include "../../dialogs/dialogarc.h" +#include "../../widgets/vcontrolpointspline.h" class VModelingArc :public VModelingTool, public QGraphicsPathItem { diff --git a/tools/modelingTools/vmodelingbisector.h b/tools/modelingTools/vmodelingbisector.h index a80bfdb20..20a422f47 100644 --- a/tools/modelingTools/vmodelingbisector.h +++ b/tools/modelingTools/vmodelingbisector.h @@ -23,7 +23,7 @@ #define VMODELINGBISECTOR_H #include "vmodelinglinepoint.h" -#include "dialogs/dialogbisector.h" +#include "../../dialogs/dialogbisector.h" class VModelingBisector : public VModelingLinePoint { diff --git a/tools/modelingTools/vmodelingendline.h b/tools/modelingTools/vmodelingendline.h index 7142d2b6c..8561048ff 100644 --- a/tools/modelingTools/vmodelingendline.h +++ b/tools/modelingTools/vmodelingendline.h @@ -23,7 +23,7 @@ #define VMODELINGENDLINE_H #include "vmodelinglinepoint.h" -#include "dialogs/dialogendline.h" +#include "../../dialogs/dialogendline.h" class VModelingEndLine : public VModelingLinePoint { diff --git a/tools/modelingTools/vmodelingheight.h b/tools/modelingTools/vmodelingheight.h index 073b7bfae..5dfd82e96 100644 --- a/tools/modelingTools/vmodelingheight.h +++ b/tools/modelingTools/vmodelingheight.h @@ -23,7 +23,7 @@ #define VMODELINGHEIGHT_H #include "vmodelinglinepoint.h" -#include "dialogs/dialogheight.h" +#include "../../dialogs/dialogheight.h" class VModelingHeight : public VModelingLinePoint { diff --git a/tools/modelingTools/vmodelingline.h b/tools/modelingTools/vmodelingline.h index f91380eaa..0149f9be5 100644 --- a/tools/modelingTools/vmodelingline.h +++ b/tools/modelingTools/vmodelingline.h @@ -23,8 +23,8 @@ #define VMODELINGLINE_H #include "vmodelingtool.h" -#include "QGraphicsLineItem" -#include "dialogs/dialogline.h" +#include +#include "../../dialogs/dialogline.h" class VModelingLine: public VModelingTool, public QGraphicsLineItem { diff --git a/tools/modelingTools/vmodelinglineintersect.h b/tools/modelingTools/vmodelinglineintersect.h index f6b1cc3e0..93f2f75c7 100644 --- a/tools/modelingTools/vmodelinglineintersect.h +++ b/tools/modelingTools/vmodelinglineintersect.h @@ -23,7 +23,7 @@ #define VMODELINGLINEINTERSECT_H #include "vmodelingpoint.h" -#include "dialogs/dialoglineintersect.h" +#include "../../dialogs/dialoglineintersect.h" class VModelingLineIntersect:public VModelingPoint { diff --git a/tools/modelingTools/vmodelingnormal.h b/tools/modelingTools/vmodelingnormal.h index 91dcaef62..56a0167ec 100644 --- a/tools/modelingTools/vmodelingnormal.h +++ b/tools/modelingTools/vmodelingnormal.h @@ -23,7 +23,7 @@ #define VMODELINGNORMAL_H #include "vmodelinglinepoint.h" -#include "dialogs/dialognormal.h" +#include "../../dialogs/dialognormal.h" class VModelingNormal : public VModelingLinePoint { diff --git a/tools/modelingTools/vmodelingpoint.cpp b/tools/modelingTools/vmodelingpoint.cpp index 50bb89a03..9c0e225da 100644 --- a/tools/modelingTools/vmodelingpoint.cpp +++ b/tools/modelingTools/vmodelingpoint.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vmodelingpoint.h" -#include "container/vpointf.h" +#include "../../container/vpointf.h" const QString VModelingPoint::TagName = QStringLiteral("point"); diff --git a/tools/modelingTools/vmodelingpoint.h b/tools/modelingTools/vmodelingpoint.h index ff5558185..360db6153 100644 --- a/tools/modelingTools/vmodelingpoint.h +++ b/tools/modelingTools/vmodelingpoint.h @@ -23,7 +23,7 @@ #define VMODELINGPOINT_H #include "vmodelingtool.h" -#include "widgets/vgraphicssimpletextitem.h" +#include "../../widgets/vgraphicssimpletextitem.h" class VModelingPoint: public VModelingTool, public QGraphicsEllipseItem { diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/tools/modelingTools/vmodelingpointofcontact.h index 64418b636..3e23b9c3b 100644 --- a/tools/modelingTools/vmodelingpointofcontact.h +++ b/tools/modelingTools/vmodelingpointofcontact.h @@ -23,7 +23,7 @@ #define VMODELINGPOINTOFCONTACT_H #include "vmodelingpoint.h" -#include "dialogs/dialogpointofcontact.h" +#include "../../dialogs/dialogpointofcontact.h" class VModelingPointOfContact : public VModelingPoint { diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/tools/modelingTools/vmodelingpointofintersection.h index 6890998d5..00740a439 100644 --- a/tools/modelingTools/vmodelingpointofintersection.h +++ b/tools/modelingTools/vmodelingpointofintersection.h @@ -23,7 +23,7 @@ #define VMODELINGPOINTOFINTERSECTION_H #include "vmodelingpoint.h" -#include "dialogs/dialogpointofintersection.h" +#include "../../dialogs/dialogpointofintersection.h" class VModelingPointOfIntersection : public VModelingPoint { diff --git a/tools/modelingTools/vmodelingshoulderpoint.h b/tools/modelingTools/vmodelingshoulderpoint.h index e1d86995e..7795a387b 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.h +++ b/tools/modelingTools/vmodelingshoulderpoint.h @@ -23,7 +23,7 @@ #define VMODELINGSHOULDERPOINT_H #include "vmodelinglinepoint.h" -#include "dialogs/dialogshoulderpoint.h" +#include "../../dialogs/dialogshoulderpoint.h" class VModelingShoulderPoint : public VModelingLinePoint { diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index 7d3a39e69..cd7fd4823 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -20,7 +20,7 @@ ****************************************************************************/ #include "vmodelingspline.h" -#include "geometry/vspline.h" +#include "../../geometry/vspline.h" const QString VModelingSpline::TagName = QStringLiteral("spline"); const QString VModelingSpline::ToolType = QStringLiteral("simple"); diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index 66d1bbd1c..5661f1557 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -24,9 +24,9 @@ #include "vmodelingtool.h" #include -#include "dialogs/dialogspline.h" -#include "widgets/vcontrolpointspline.h" -#include "geometry/vsplinepath.h" +#include "../../dialogs/dialogspline.h" +#include "../../widgets/vcontrolpointspline.h" +#include "../../geometry/vsplinepath.h" class VModelingSpline:public VModelingTool, public QGraphicsPathItem { diff --git a/tools/modelingTools/vmodelingsplinepath.h b/tools/modelingTools/vmodelingsplinepath.h index 4071c1c70..3b7551c62 100644 --- a/tools/modelingTools/vmodelingsplinepath.h +++ b/tools/modelingTools/vmodelingsplinepath.h @@ -24,8 +24,8 @@ #include "vmodelingtool.h" #include -#include "dialogs/dialogsplinepath.h" -#include "widgets/vcontrolpointspline.h" +#include "../../dialogs/dialogsplinepath.h" +#include "../../widgets/vcontrolpointspline.h" class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem { diff --git a/tools/modelingTools/vmodelingtriangle.h b/tools/modelingTools/vmodelingtriangle.h index cc1007291..f4573ff74 100644 --- a/tools/modelingTools/vmodelingtriangle.h +++ b/tools/modelingTools/vmodelingtriangle.h @@ -24,7 +24,7 @@ #include "vmodelingpoint.h" #include "../drawTools/vtooltriangle.h" -#include "dialogs/dialogtriangle.h" +#include "../../dialogs/dialogtriangle.h" class VModelingTriangle : public VModelingPoint { diff --git a/tools/nodeDetails/vnodepoint.h b/tools/nodeDetails/vnodepoint.h index e90393e7d..5b2613b19 100644 --- a/tools/nodeDetails/vnodepoint.h +++ b/tools/nodeDetails/vnodepoint.h @@ -23,7 +23,7 @@ #define VNODEPOINT_H #include "vabstractnode.h" -#include "widgets/vgraphicssimpletextitem.h" +#include "../../widgets/vgraphicssimpletextitem.h" class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem { diff --git a/tools/vtooldetail.h b/tools/vtooldetail.h index a5da79b37..f20186b25 100644 --- a/tools/vtooldetail.h +++ b/tools/vtooldetail.h @@ -24,7 +24,7 @@ #include "vabstracttool.h" #include -#include "dialogs/dialogdetail.h" +#include "../dialogs/dialogdetail.h" class VToolDetail: public VAbstractTool, public QGraphicsPathItem { diff --git a/widgets/vapplication.cpp b/widgets/vapplication.cpp index efabe6acb..3b05da39b 100644 --- a/widgets/vapplication.cpp +++ b/widgets/vapplication.cpp @@ -20,11 +20,11 @@ ****************************************************************************/ #include "vapplication.h" -#include "exception/vexceptionobjecterror.h" -#include "exception/vexceptionbadid.h" -#include "exception/vexceptionconversionerror.h" -#include "exception/vexceptionemptyparameter.h" -#include "exception/vexceptionwrongparameterid.h" +#include "../exception/vexceptionobjecterror.h" +#include "../exception/vexceptionbadid.h" +#include "../exception/vexceptionconversionerror.h" +#include "../exception/vexceptionemptyparameter.h" +#include "../exception/vexceptionwrongparameterid.h" // reimplemented from QApplication so we can throw exceptions in slots bool VApplication::notify(QObject *receiver, QEvent *event) diff --git a/widgets/vcontrolpointspline.h b/widgets/vcontrolpointspline.h index 56f51ef93..3d8bf86cb 100644 --- a/widgets/vcontrolpointspline.h +++ b/widgets/vcontrolpointspline.h @@ -24,7 +24,7 @@ #include #include -#include "geometry/vsplinepath.h" +#include "../geometry/vsplinepath.h" class VControlPointSpline : public QObject, public QGraphicsEllipseItem { From f3fbb1cd9c896e37010d8b1c78c8ce35f31d8476 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 19:59:20 +0200 Subject: [PATCH 09/56] Added macros Q_CC_GNU. --HG-- branch : develop --- xml/vdomdocument.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xml/vdomdocument.h b/xml/vdomdocument.h index 6000638b9..495f801d6 100644 --- a/xml/vdomdocument.h +++ b/xml/vdomdocument.h @@ -35,8 +35,10 @@ namespace Document } Q_DECLARE_OPERATORS_FOR_FLAGS(Document::Documents) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Weffc++" +#ifdef Q_CC_GNU + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Weffc++" +#endif class VDomDocument : public QObject, public QDomDocument { Q_OBJECT @@ -116,6 +118,8 @@ private: void CollectId(QDomElement node, QVector &vector)const; }; -#pragma GCC diagnostic pop +#ifdef Q_CC_GNU + #pragma GCC diagnostic pop +#endif #endif // VDOMDOCUMENT_H From 8293f697610404160c8f0d21fea00a2f624d5e0a Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 20:05:28 +0200 Subject: [PATCH 10/56] Change in precompiled headers. --HG-- branch : develop --- Valentina.pro | 4 ++++ stable.cpp | 23 +++++++++++++++++++++++ stable.h | 10 ++++++++++ 3 files changed, 37 insertions(+) create mode 100644 stable.cpp diff --git a/Valentina.pro b/Valentina.pro index 1de130512..5b88224a5 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -21,6 +21,9 @@ QMAKE_CXX = ccache g++ # Precompiled headers (PCH) PRECOMPILED_HEADER = stable.h +win32-msvc* { + PRECOMPILED_SOURCE = stable.cpp +} # directory for executable file DESTDIR = bin @@ -48,6 +51,7 @@ include(xml/xml.pri) SOURCES += main.cpp\ mainwindow.cpp \ tablewindow.cpp \ + stable.cpp HEADERS += mainwindow.h \ options.h \ diff --git a/stable.cpp b/stable.cpp new file mode 100644 index 000000000..7de5f227a --- /dev/null +++ b/stable.cpp @@ -0,0 +1,23 @@ +/**************************************************************************** + ** + ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** + ** This file is part of Valentina. + ** + ** Tox is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + ****************************************************************************/ + +// Build the precompiled headers. +#include "stable.h" diff --git a/stable.h b/stable.h index 32c6762e7..dffda05ae 100644 --- a/stable.h +++ b/stable.h @@ -19,6 +19,14 @@ ** ****************************************************************************/ +#ifndef STABLE_H +#define STABLE_H + +/* I like to include this pragma too, +so the build log indicates if pre-compiled headers +were in use. */ +#pragma message("Compiling precompiled headers.\n") + /* Add C includes here */ #if defined __cplusplus @@ -31,3 +39,5 @@ #include #include "options.h" #endif + +#endif // STABLE_H From 93db4385b72e9d14aa53408c818635b4bc98a081 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 21:27:43 +0200 Subject: [PATCH 11/56] Use memsize-type. --HG-- branch : develop --- geometry/vdetail.cpp | 2 +- geometry/vdetail.h | 2 +- geometry/vsplinepath.cpp | 2 +- geometry/vsplinepath.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/geometry/vdetail.cpp b/geometry/vdetail.cpp index 6bfdf3add..105c90cba 100644 --- a/geometry/vdetail.cpp +++ b/geometry/vdetail.cpp @@ -70,7 +70,7 @@ bool VDetail::Containes(const qint64 &id) const return false; } -VNodeDetail &VDetail::operator [](int indx) +VNodeDetail &VDetail::operator [](ptrdiff_t indx) { return nodes[indx]; } diff --git a/geometry/vdetail.h b/geometry/vdetail.h index c715ea8da..c85b411a0 100644 --- a/geometry/vdetail.h +++ b/geometry/vdetail.h @@ -46,7 +46,7 @@ public: void Clear(); inline qint32 CountNode() const {return nodes.size();} bool Containes(const qint64 &id)const; - VNodeDetail & operator[](int indx); + VNodeDetail & operator[](ptrdiff_t indx); inline QString getName() const {return name;} inline void setName(const QString &value) {name = value;} inline qreal getMx() const {return mx;} diff --git a/geometry/vsplinepath.cpp b/geometry/vsplinepath.cpp index 23c5d45b0..01eb67bc4 100644 --- a/geometry/vsplinepath.cpp +++ b/geometry/vsplinepath.cpp @@ -146,7 +146,7 @@ VSplinePath &VSplinePath::operator =(const VSplinePath &path) return *this; } -VSplinePoint & VSplinePath::operator[](int indx) +VSplinePoint & VSplinePath::operator[](ptrdiff_t indx) { return path[indx]; } diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index 94279c109..77d7c956d 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -74,7 +74,7 @@ public: inline void setKCurve(const qreal &value) {kCurve = value;} inline const QVector *GetPoint() const {return &path;} VSplinePath &operator=(const VSplinePath &path); - VSplinePoint &operator[](int indx); + VSplinePoint &operator[](ptrdiff_t indx); inline Draw::Draws getMode() const {return mode;} inline void setMode(const Draw::Draws &value) {mode = value;} From 6ae5a001466ba77c1e877dbb01d54b1dbae6100c Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 21:46:07 +0200 Subject: [PATCH 12/56] Little optimization. --HG-- branch : develop --- dialogs/dialogalongline.cpp | 2 +- dialogs/dialogalongline.h | 2 +- dialogs/dialogarc.cpp | 2 +- dialogs/dialogarc.h | 2 +- dialogs/dialogbisector.cpp | 2 +- dialogs/dialogbisector.h | 2 +- dialogs/dialogdetail.cpp | 2 +- dialogs/dialogdetail.h | 2 +- dialogs/dialogendline.cpp | 2 +- dialogs/dialogendline.h | 2 +- dialogs/dialogheight.cpp | 2 +- dialogs/dialogheight.h | 2 +- dialogs/dialogline.cpp | 2 +- dialogs/dialogline.h | 2 +- dialogs/dialoglineintersect.cpp | 2 +- dialogs/dialoglineintersect.h | 2 +- dialogs/dialognormal.cpp | 2 +- dialogs/dialognormal.h | 2 +- dialogs/dialogpointofcontact.cpp | 2 +- dialogs/dialogpointofcontact.h | 2 +- dialogs/dialogpointofintersection.cpp | 2 +- dialogs/dialogpointofintersection.h | 2 +- dialogs/dialogshoulderpoint.cpp | 2 +- dialogs/dialogshoulderpoint.h | 2 +- dialogs/dialogspline.cpp | 2 +- dialogs/dialogspline.h | 2 +- dialogs/dialogsplinepath.cpp | 2 +- dialogs/dialogsplinepath.h | 2 +- dialogs/dialogtool.cpp | 2 +- dialogs/dialogtool.h | 2 +- dialogs/dialogtriangle.cpp | 2 +- dialogs/dialogtriangle.h | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/dialogs/dialogalongline.cpp b/dialogs/dialogalongline.cpp index 00846dfa9..866b4bbf0 100644 --- a/dialogs/dialogalongline.cpp +++ b/dialogs/dialogalongline.cpp @@ -72,7 +72,7 @@ DialogAlongLine::~DialogAlongLine() delete ui; } -void DialogAlongLine::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogAlongLine::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogalongline.h b/dialogs/dialogalongline.h index bda9b31f3..f4a425163 100644 --- a/dialogs/dialogalongline.h +++ b/dialogs/dialogalongline.h @@ -47,7 +47,7 @@ public: inline qint64 getSecondPointId() const {return secondPointId;} void setSecondPointId(const qint64 &value, const qint64 &id); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogAlongLine) diff --git a/dialogs/dialogarc.cpp b/dialogs/dialogarc.cpp index 16989d44e..47c43239e 100644 --- a/dialogs/dialogarc.cpp +++ b/dialogs/dialogarc.cpp @@ -107,7 +107,7 @@ void DialogArc::SetRadius(const QString &value) ui->lineEditRadius->setText(radius); } -void DialogArc::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogArc::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogarc.h b/dialogs/dialogarc.h index c701ba582..1267f6943 100644 --- a/dialogs/dialogarc.h +++ b/dialogs/dialogarc.h @@ -44,7 +44,7 @@ public: inline QString GetF2() const {return f2;} void SetF2(const QString &value); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); virtual void ValChenged(int row); void PutRadius(); diff --git a/dialogs/dialogbisector.cpp b/dialogs/dialogbisector.cpp index afd97c41c..a9869ca03 100644 --- a/dialogs/dialogbisector.cpp +++ b/dialogs/dialogbisector.cpp @@ -72,7 +72,7 @@ DialogBisector::~DialogBisector() delete ui; } -void DialogBisector::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogBisector::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogbisector.h b/dialogs/dialogbisector.h index c9b0260dc..4ea1f3fb3 100644 --- a/dialogs/dialogbisector.h +++ b/dialogs/dialogbisector.h @@ -49,7 +49,7 @@ public: inline qint64 getThirdPointId() const {return thirdPointId;} void setThirdPointId(const qint64 &value, const qint64 &id); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogBisector) diff --git a/dialogs/dialogdetail.cpp b/dialogs/dialogdetail.cpp index add670998..de397de89 100644 --- a/dialogs/dialogdetail.cpp +++ b/dialogs/dialogdetail.cpp @@ -43,7 +43,7 @@ DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *pa connect(ui.lineEditNameDetail, &QLineEdit::textChanged, this, &DialogDetail::NamePointChanged); } -void DialogDetail::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogDetail::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogdetail.h b/dialogs/dialogdetail.h index 8a6a12cdf..c49a57f6d 100644 --- a/dialogs/dialogdetail.h +++ b/dialogs/dialogdetail.h @@ -33,7 +33,7 @@ public: inline VDetail getDetails() const {return details;} void setDetails(const VDetail &value); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); void BiasXChanged(qreal d); void BiasYChanged(qreal d); diff --git a/dialogs/dialogendline.cpp b/dialogs/dialogendline.cpp index 9770166b0..db41ac062 100644 --- a/dialogs/dialogendline.cpp +++ b/dialogs/dialogendline.cpp @@ -82,7 +82,7 @@ DialogEndLine::DialogEndLine(const VContainer *data, Draw::Draws mode, QWidget * connect(ui->lineEditFormula, &QLineEdit::textChanged, this, &DialogEndLine::FormulaChanged); } -void DialogEndLine::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogEndLine::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogendline.h b/dialogs/dialogendline.h index 489d264c4..300b8d201 100644 --- a/dialogs/dialogendline.h +++ b/dialogs/dialogendline.h @@ -46,7 +46,7 @@ public: inline qint64 getBasePointId() const {return basePointId;} void setBasePointId(const qint64 &value, const qint64 &id); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogEndLine) diff --git a/dialogs/dialogheight.cpp b/dialogs/dialogheight.cpp index db2039bce..5f3411532 100644 --- a/dialogs/dialogheight.cpp +++ b/dialogs/dialogheight.cpp @@ -76,7 +76,7 @@ void DialogHeight::setP2LineId(const qint64 &value, const qint64 &id) setCurrentPointId(ui->comboBoxP2Line, p2LineId, value, id); } -void DialogHeight::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogHeight::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogheight.h b/dialogs/dialogheight.h index e737ad5a3..4b787ff3b 100644 --- a/dialogs/dialogheight.h +++ b/dialogs/dialogheight.h @@ -47,7 +47,7 @@ public: inline qint64 getP2LineId() const{return p2LineId;} void setP2LineId(const qint64 &value, const qint64 &id); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogHeight) diff --git a/dialogs/dialogline.cpp b/dialogs/dialogline.cpp index ecdf6cb9d..4d95c7522 100644 --- a/dialogs/dialogline.cpp +++ b/dialogs/dialogline.cpp @@ -72,7 +72,7 @@ void DialogLine::DialogAccepted() DialogClosed(QDialog::Accepted); } -void DialogLine::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogLine::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogline.h b/dialogs/dialogline.h index 9957eca16..2693d2734 100644 --- a/dialogs/dialogline.h +++ b/dialogs/dialogline.h @@ -40,7 +40,7 @@ public: inline qint64 getSecondPoint() const {return secondPoint;} void setSecondPoint(const qint64 &value); public slots: - void ChoosedObject(qint64 id, Scene::Scenes type); + void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogLine) diff --git a/dialogs/dialoglineintersect.cpp b/dialogs/dialoglineintersect.cpp index 4961e0db3..480476c08 100644 --- a/dialogs/dialoglineintersect.cpp +++ b/dialogs/dialoglineintersect.cpp @@ -47,7 +47,7 @@ DialogLineIntersect::~DialogLineIntersect() delete ui; } -void DialogLineIntersect::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogLineIntersect::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialoglineintersect.h b/dialogs/dialoglineintersect.h index 9c5195df5..574a83455 100644 --- a/dialogs/dialoglineintersect.h +++ b/dialogs/dialoglineintersect.h @@ -47,7 +47,7 @@ public: inline QString getPointName() const {return pointName;} void setPointName(const QString &value); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); void P1Line1Changed( int index); void P2Line1Changed( int index); diff --git a/dialogs/dialognormal.cpp b/dialogs/dialognormal.cpp index d13aeab95..c105e8445 100644 --- a/dialogs/dialognormal.cpp +++ b/dialogs/dialognormal.cpp @@ -88,7 +88,7 @@ DialogNormal::~DialogNormal() delete ui; } -void DialogNormal::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogNormal::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialognormal.h b/dialogs/dialognormal.h index 84a661522..782305582 100644 --- a/dialogs/dialognormal.h +++ b/dialogs/dialognormal.h @@ -48,7 +48,7 @@ public: inline qint64 getSecondPointId() const {return secondPointId;} void setSecondPointId(const qint64 &value, const qint64 &id); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogNormal) diff --git a/dialogs/dialogpointofcontact.cpp b/dialogs/dialogpointofcontact.cpp index 6b551df7e..e9caa7905 100644 --- a/dialogs/dialogpointofcontact.cpp +++ b/dialogs/dialogpointofcontact.cpp @@ -65,7 +65,7 @@ DialogPointOfContact::DialogPointOfContact(const VContainer *data, Draw::Draws m connect(ui.lineEditFormula, &QLineEdit::textChanged, this, &DialogPointOfContact::FormulaChanged); } -void DialogPointOfContact::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogPointOfContact::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogpointofcontact.h b/dialogs/dialogpointofcontact.h index 35af0835a..37171e72e 100644 --- a/dialogs/dialogpointofcontact.h +++ b/dialogs/dialogpointofcontact.h @@ -42,7 +42,7 @@ public: inline qint64 getSecondPoint() const {return secondPoint;} void setSecondPoint(const qint64 &value, const qint64 &id); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogPointOfContact) diff --git a/dialogs/dialogpointofintersection.cpp b/dialogs/dialogpointofintersection.cpp index 299eaadee..7adcd8b28 100644 --- a/dialogs/dialogpointofintersection.cpp +++ b/dialogs/dialogpointofintersection.cpp @@ -50,7 +50,7 @@ void DialogPointOfIntersection::setSecondPointId(const qint64 &value, const qint setCurrentPointId(ui->comboBoxSecondPoint, secondPointId, value, id); } -void DialogPointOfIntersection::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogPointOfIntersection::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogpointofintersection.h b/dialogs/dialogpointofintersection.h index 556b9b3ea..e6971853c 100644 --- a/dialogs/dialogpointofintersection.h +++ b/dialogs/dialogpointofintersection.h @@ -43,7 +43,7 @@ public: inline qint64 getSecondPointId() const {return secondPointId;} void setSecondPointId(const qint64 &value, const qint64 &id); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogPointOfIntersection) diff --git a/dialogs/dialogshoulderpoint.cpp b/dialogs/dialogshoulderpoint.cpp index 0224eb90b..809516519 100644 --- a/dialogs/dialogshoulderpoint.cpp +++ b/dialogs/dialogshoulderpoint.cpp @@ -73,7 +73,7 @@ DialogShoulderPoint::~DialogShoulderPoint() delete ui; } -void DialogShoulderPoint::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogShoulderPoint::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogshoulderpoint.h b/dialogs/dialogshoulderpoint.h index 8d06393e6..ba516c4dd 100644 --- a/dialogs/dialogshoulderpoint.h +++ b/dialogs/dialogshoulderpoint.h @@ -49,7 +49,7 @@ public: inline qint64 getPShoulder() const {return pShoulder;} void setPShoulder(const qint64 &value, const qint64 &id); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogShoulderPoint) diff --git a/dialogs/dialogspline.cpp b/dialogs/dialogspline.cpp index 16baab710..5f0d42123 100644 --- a/dialogs/dialogspline.cpp +++ b/dialogs/dialogspline.cpp @@ -44,7 +44,7 @@ DialogSpline::~DialogSpline() delete ui; } -void DialogSpline::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogSpline::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogspline.h b/dialogs/dialogspline.h index bcb69ce87..f155910b6 100644 --- a/dialogs/dialogspline.h +++ b/dialogs/dialogspline.h @@ -50,7 +50,7 @@ public: inline qreal getKCurve() const {return kCurve;} void setKCurve(const qreal &value); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogSpline) diff --git a/dialogs/dialogsplinepath.cpp b/dialogs/dialogsplinepath.cpp index 7321f2989..76efb8bd8 100644 --- a/dialogs/dialogsplinepath.cpp +++ b/dialogs/dialogsplinepath.cpp @@ -67,7 +67,7 @@ void DialogSplinePath::SetPath(const VSplinePath &value) } -void DialogSplinePath::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogSplinePath::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogsplinepath.h b/dialogs/dialogsplinepath.h index d3ebff753..b6eb49813 100644 --- a/dialogs/dialogsplinepath.h +++ b/dialogs/dialogsplinepath.h @@ -40,7 +40,7 @@ public: inline VSplinePath GetPath() const {return path;} void SetPath(const VSplinePath &value); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); void PointChenged(int row); void currentPointChanged( int index ); diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index beaa36183..a07413b69 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -254,7 +254,7 @@ void DialogTool::CheckState() bOk->setEnabled(flagFormula && flagName); } -void DialogTool::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogTool::ChoosedObject(qint64 id, const Scene::Scenes &type) { Q_UNUSED(id); Q_UNUSED(type); diff --git a/dialogs/dialogtool.h b/dialogs/dialogtool.h index 119eba2e9..79dfeb517 100644 --- a/dialogs/dialogtool.h +++ b/dialogs/dialogtool.h @@ -37,7 +37,7 @@ signals: void DialogClosed(int result); void ToolTip(const QString &toolTip); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); void NamePointChanged(); virtual void DialogAccepted(); virtual void DialogRejected(); diff --git a/dialogs/dialogtriangle.cpp b/dialogs/dialogtriangle.cpp index 96b136c2c..7e8a0015b 100644 --- a/dialogs/dialogtriangle.cpp +++ b/dialogs/dialogtriangle.cpp @@ -46,7 +46,7 @@ DialogTriangle::~DialogTriangle() delete ui; } -void DialogTriangle::ChoosedObject(qint64 id, Scene::Scenes type) +void DialogTriangle::ChoosedObject(qint64 id, const Scene::Scenes &type) { if (idDetail == 0 && mode == Draw::Modeling) { diff --git a/dialogs/dialogtriangle.h b/dialogs/dialogtriangle.h index 3c43fc89f..ec2c1da08 100644 --- a/dialogs/dialogtriangle.h +++ b/dialogs/dialogtriangle.h @@ -46,7 +46,7 @@ public: inline QString getPointName() const {return pointName;} void setPointName(const QString &value); public slots: - virtual void ChoosedObject(qint64 id, Scene::Scenes type); + virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogTriangle) From 40c58022e79945ddce6ac42f11f5f99668c2eb7f Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 6 Nov 2013 23:11:12 +0200 Subject: [PATCH 13/56] Little optimization. --HG-- branch : develop --- container/vcontainer.cpp | 12 +++++------ container/vcontainer.h | 13 ++++++------ dialogs/dialogdetail.cpp | 4 ++-- dialogs/dialogdetail.h | 4 ++-- dialogs/dialogsinglepoint.cpp | 4 ++-- dialogs/dialogsinglepoint.h | 4 ++-- mainwindow.cpp | 2 +- mainwindow.h | 2 +- tools/drawTools/vdrawtool.cpp | 6 +++--- tools/drawTools/vdrawtool.h | 6 +++--- tools/drawTools/vtoolalongline.cpp | 4 ++-- tools/drawTools/vtoolalongline.h | 4 ++-- tools/drawTools/vtoolarc.cpp | 6 +++--- tools/drawTools/vtoolarc.h | 6 +++--- tools/drawTools/vtoolbisector.cpp | 4 ++-- tools/drawTools/vtoolbisector.h | 4 ++-- tools/drawTools/vtoolendline.cpp | 4 ++-- tools/drawTools/vtoolendline.h | 4 ++-- tools/drawTools/vtoolheight.cpp | 4 ++-- tools/drawTools/vtoolheight.h | 4 ++-- tools/drawTools/vtoolline.cpp | 6 +++--- tools/drawTools/vtoolline.h | 6 +++--- tools/drawTools/vtoollineintersect.cpp | 4 ++-- tools/drawTools/vtoollineintersect.h | 4 ++-- tools/drawTools/vtoollinepoint.cpp | 2 +- tools/drawTools/vtoollinepoint.h | 2 +- tools/drawTools/vtoolnormal.cpp | 4 ++-- tools/drawTools/vtoolnormal.h | 4 ++-- tools/drawTools/vtoolpoint.cpp | 2 +- tools/drawTools/vtoolpoint.h | 2 +- tools/drawTools/vtoolpointofcontact.cpp | 4 ++-- tools/drawTools/vtoolpointofcontact.h | 4 ++-- tools/drawTools/vtoolpointofintersection.cpp | 4 ++-- tools/drawTools/vtoolpointofintersection.h | 4 ++-- tools/drawTools/vtoolshoulderpoint.cpp | 4 ++-- tools/drawTools/vtoolshoulderpoint.h | 4 ++-- tools/drawTools/vtoolsinglepoint.cpp | 4 ++-- tools/drawTools/vtoolsinglepoint.h | 4 ++-- tools/drawTools/vtoolspline.cpp | 6 +++--- tools/drawTools/vtoolspline.h | 6 +++--- tools/drawTools/vtoolsplinepath.cpp | 6 +++--- tools/drawTools/vtoolsplinepath.h | 6 +++--- tools/drawTools/vtooltriangle.cpp | 4 ++-- tools/drawTools/vtooltriangle.h | 4 ++-- tools/modelingTools/vmodelingalongline.cpp | 4 ++-- tools/modelingTools/vmodelingalongline.h | 4 ++-- tools/modelingTools/vmodelingarc.cpp | 4 ++-- tools/modelingTools/vmodelingarc.h | 4 ++-- tools/modelingTools/vmodelingbisector.cpp | 4 ++-- tools/modelingTools/vmodelingbisector.h | 4 ++-- tools/modelingTools/vmodelingendline.cpp | 4 ++-- tools/modelingTools/vmodelingendline.h | 4 ++-- tools/modelingTools/vmodelingheight.cpp | 4 ++-- tools/modelingTools/vmodelingheight.h | 4 ++-- tools/modelingTools/vmodelingline.cpp | 4 ++-- tools/modelingTools/vmodelingline.h | 4 ++-- .../modelingTools/vmodelinglineintersect.cpp | 4 ++-- tools/modelingTools/vmodelinglineintersect.h | 4 ++-- tools/modelingTools/vmodelingnormal.cpp | 7 ++++--- tools/modelingTools/vmodelingnormal.h | 7 ++++--- .../modelingTools/vmodelingpointofcontact.cpp | 4 ++-- tools/modelingTools/vmodelingpointofcontact.h | 4 ++-- .../vmodelingpointofintersection.cpp | 4 ++-- .../vmodelingpointofintersection.h | 4 ++-- .../modelingTools/vmodelingshoulderpoint.cpp | 2 +- tools/modelingTools/vmodelingshoulderpoint.h | 2 +- tools/modelingTools/vmodelingspline.cpp | 4 ++-- tools/modelingTools/vmodelingspline.h | 4 ++-- tools/modelingTools/vmodelingsplinepath.cpp | 4 ++-- tools/modelingTools/vmodelingsplinepath.h | 4 ++-- tools/modelingTools/vmodelingtriangle.cpp | 4 ++-- tools/modelingTools/vmodelingtriangle.h | 4 ++-- tools/nodeDetails/vnodearc.cpp | 4 ++-- tools/nodeDetails/vnodearc.h | 4 ++-- tools/nodeDetails/vnodepoint.cpp | 4 ++-- tools/nodeDetails/vnodepoint.h | 4 ++-- tools/nodeDetails/vnodespline.cpp | 4 ++-- tools/nodeDetails/vnodespline.h | 4 ++-- tools/nodeDetails/vnodesplinepath.cpp | 4 ++-- tools/nodeDetails/vnodesplinepath.h | 4 ++-- tools/vabstracttool.cpp | 16 +++++++------- tools/vabstracttool.h | 7 ++++--- tools/vtooldetail.cpp | 4 ++-- tools/vtooldetail.h | 4 ++-- widgets/vcontrolpointspline.cpp | 6 +++--- widgets/vcontrolpointspline.h | 7 ++++--- widgets/vmaingraphicsscene.cpp | 2 +- widgets/vmaingraphicsscene.h | 2 +- widgets/vmaingraphicsview.cpp | 2 +- xml/vdomdocument.cpp | 19 +++++++++-------- xml/vdomdocument.h | 21 ++++++++++--------- 91 files changed, 223 insertions(+), 214 deletions(-) diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index b99b862b8..3033bf1f1 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -613,7 +613,7 @@ qreal VContainer::FindVar(const QString &name, bool *ok)const return 0; } -void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId, Draw::Draws mode) +void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId, const Draw::Draws &mode) { QString nameLine = GetNameLine(firstPointId, secondPointId, mode); VPointF first; @@ -671,7 +671,7 @@ qint64 VContainer::AddObject(QHash &obj, const val& value) return id; } -QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const +QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode) const { VPointF first; VPointF second; @@ -688,7 +688,7 @@ QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPo return QString("Line_%1_%2").arg(first.name(), second.name()); } -QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const +QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode) const { VPointF first; VPointF second; @@ -705,7 +705,7 @@ QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &sec return QString("AngleLine_%1_%2").arg(first.name(), second.name()); } -QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, Draw::Draws mode) const +QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode) const { VPointF first; VPointF second; @@ -722,7 +722,7 @@ QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &second return QString("Spl_%1_%2").arg(first.name(), second.name()); } -QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Draws mode) const +QString VContainer::GetNameSplinePath(const VSplinePath &path, const Draw::Draws &mode) const { if (path.Count() == 0) { @@ -750,7 +750,7 @@ QString VContainer::GetNameSplinePath(const VSplinePath &path, Draw::Draws mode) return name; } -QString VContainer::GetNameArc(const qint64 ¢er, const qint64 &id, Draw::Draws mode) const +QString VContainer::GetNameArc(const qint64 ¢er, const qint64 &id, const Draw::Draws &mode) const { VPointF centerPoint; if (mode == Draw::Calculation) diff --git a/container/vcontainer.h b/container/vcontainer.h index 1e33e2f0e..1173fbc23 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -77,7 +77,7 @@ public: void AddLengthArc(const QString &name, const qreal &value); void AddLineAngle(const QString &name, const qreal &value); void AddLine(const qint64 &firstPointId, const qint64 &secondPointId, - Draw::Draws mode = Draw::Calculation); + const Draw::Draws &mode = Draw::Calculation); qint64 AddSpline(const VSpline& spl); qint64 AddModelingSpline(const VSpline& spl); qint64 AddSplinePath(const VSplinePath& splPath); @@ -85,14 +85,15 @@ public: qint64 AddArc(const VArc& arc); qint64 AddModelingArc(const VArc& arc); QString GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, - Draw::Draws mode = Draw::Calculation) const; + const Draw::Draws &mode = Draw::Calculation) const; QString GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, - Draw::Draws mode = Draw::Calculation) const; + const Draw::Draws &mode = Draw::Calculation) const; QString GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, - Draw::Draws mode = Draw::Calculation) const; + const Draw::Draws &mode = Draw::Calculation) const; QString GetNameSplinePath(const VSplinePath &path, - Draw::Draws mode = Draw::Calculation) const; - QString GetNameArc(const qint64 ¢er, const qint64 &id, Draw::Draws mode = Draw::Calculation) const; + const Draw::Draws &mode = Draw::Calculation) const; + QString GetNameArc(const qint64 ¢er, const qint64 &id, + const Draw::Draws &mode = Draw::Calculation) const; void UpdatePoint(qint64 id, const VPointF& point); void UpdateModelingPoint(qint64 id, const VPointF& point); void UpdateDetail(qint64 id, const VDetail& detail); diff --git a/dialogs/dialogdetail.cpp b/dialogs/dialogdetail.cpp index de397de89..2e64e986e 100644 --- a/dialogs/dialogdetail.cpp +++ b/dialogs/dialogdetail.cpp @@ -100,8 +100,8 @@ void DialogDetail::DialogAccepted() emit DialogClosed(QDialog::Accepted); } -void DialogDetail::NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, - qreal mx, qreal my) +void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::Draws &mode, + const NodeDetail::NodeDetails &typeNode, qreal mx, qreal my) { QString name; switch (typeTool) diff --git a/dialogs/dialogdetail.h b/dialogs/dialogdetail.h index c49a57f6d..b39a7036f 100644 --- a/dialogs/dialogdetail.h +++ b/dialogs/dialogdetail.h @@ -45,8 +45,8 @@ private: VDetail details; bool supplement; bool closed; - void NewItem(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, - qreal mx = 0, qreal my = 0); + void NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::Draws &mode, + const NodeDetail::NodeDetails &typeNode, qreal mx = 0, qreal my = 0); }; #endif // DIALOGDETAIL_H diff --git a/dialogs/dialogsinglepoint.cpp b/dialogs/dialogsinglepoint.cpp index ddf12c14e..5abcfb5ba 100644 --- a/dialogs/dialogsinglepoint.cpp +++ b/dialogs/dialogsinglepoint.cpp @@ -39,7 +39,7 @@ DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent) connect(ui->lineEditName, &QLineEdit::textChanged, this, &DialogSinglePoint::NamePointChanged); } -void DialogSinglePoint::mousePress(QPointF scenePos) +void DialogSinglePoint::mousePress(const QPointF &scenePos) { if (isInitialized == false) { @@ -61,7 +61,7 @@ void DialogSinglePoint::DialogAccepted() emit DialogClosed(QDialog::Accepted); } -void DialogSinglePoint::setData(const QString name, const QPointF point) +void DialogSinglePoint::setData(const QString &name, const QPointF &point) { this->name = name; this->point = point; diff --git a/dialogs/dialogsinglepoint.h b/dialogs/dialogsinglepoint.h index 48adcf8a9..3d3d71ef2 100644 --- a/dialogs/dialogsinglepoint.h +++ b/dialogs/dialogsinglepoint.h @@ -34,12 +34,12 @@ class DialogSinglePoint : public DialogTool Q_OBJECT public: DialogSinglePoint(const VContainer *data, QWidget *parent = 0); - void setData(const QString name, const QPointF point); + void setData(const QString &name, const QPointF &point); inline QString getName()const {return name;} inline QPointF getPoint()const {return point;} ~DialogSinglePoint(); public slots: - void mousePress(QPointF scenePos); + void mousePress(const QPointF &scenePos); virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogSinglePoint) diff --git a/mainwindow.cpp b/mainwindow.cpp index 167d19f71..21d895f9d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -639,7 +639,7 @@ void MainWindow::currentDrawChanged( int index ) } } -void MainWindow::mouseMove(QPointF scenePos) +void MainWindow::mouseMove(const QPointF &scenePos) { QString string = QString("%1, %2") .arg(static_cast(toMM(scenePos.x()))) diff --git a/mainwindow.h b/mainwindow.h index 5d8027420..933d69aa2 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -45,7 +45,7 @@ public: ~MainWindow(); void OpenPattern(const QString &fileName); public slots: - void mouseMove(QPointF scenePos); + void mouseMove(const QPointF &scenePos); void ActionAroowTool(); void ActionDraw(bool checked); void ActionDetails(bool checked); diff --git a/tools/drawTools/vdrawtool.cpp b/tools/drawTools/vdrawtool.cpp index 28e3a859b..13fdf65a7 100644 --- a/tools/drawTools/vdrawtool.cpp +++ b/tools/drawTools/vdrawtool.cpp @@ -32,7 +32,7 @@ VDrawTool::VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *pa connect(this->doc, &VDomDocument::ShowTool, this, &VDrawTool::ShowTool); } -void VDrawTool::AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *doc) +void VDrawTool::AddRecord(const qint64 id, const Tool::Tools &toolType, VDomDocument *doc) { qint64 cursor = doc->getCursor(); QVector *history = doc->getHistory(); @@ -63,7 +63,7 @@ void VDrawTool::ShowTool(qint64 id, Qt::GlobalColor color, bool enable) Q_UNUSED(enable); } -void VDrawTool::ChangedActivDraw(const QString newName) +void VDrawTool::ChangedActivDraw(const QString &newName) { if (nameActivDraw == newName) { @@ -75,7 +75,7 @@ void VDrawTool::ChangedActivDraw(const QString newName) } } -void VDrawTool::ChangedNameDraw(const QString oldName, const QString newName) +void VDrawTool::ChangedNameDraw(const QString &oldName, const QString &newName) { if (nameActivDraw == oldName) { diff --git a/tools/drawTools/vdrawtool.h b/tools/drawTools/vdrawtool.h index 215a48ba9..59d00de8c 100644 --- a/tools/drawTools/vdrawtool.h +++ b/tools/drawTools/vdrawtool.h @@ -31,12 +31,12 @@ public: VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VDrawTool() {} virtual void setDialog() {} - static void AddRecord(const qint64 id, Tool::Tools toolType, VDomDocument *doc); + static void AddRecord(const qint64 id, const Tool::Tools &toolType, VDomDocument *doc); void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;} public slots: virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); - virtual void ChangedActivDraw(const QString newName); - void ChangedNameDraw(const QString oldName, const QString newName); + virtual void ChangedActivDraw(const QString &newName); + void ChangedNameDraw(const QString &oldName, const QString &newName); virtual void FullUpdateFromGui(int result)=0; virtual void SetFactor(qreal factor); protected: diff --git a/tools/drawTools/vtoolalongline.cpp b/tools/drawTools/vtoolalongline.cpp index c47034ae6..947276c29 100644 --- a/tools/drawTools/vtoolalongline.cpp +++ b/tools/drawTools/vtoolalongline.cpp @@ -26,7 +26,7 @@ const QString VToolAlongLine::ToolType = QStringLiteral("alongLine"); VToolAlongLine::VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, - const QString &typeLine, Tool::Sources typeCreation, + const QString &typeLine, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId), dialogAlongLine(QSharedPointer()) @@ -131,7 +131,7 @@ void VToolAlongLine::Create(QSharedPointer &dialog, VMainGraphi void VToolAlongLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) { VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); diff --git a/tools/drawTools/vtoolalongline.h b/tools/drawTools/vtoolalongline.h index 974e7d29e..48ca90c24 100644 --- a/tools/drawTools/vtoolalongline.h +++ b/tools/drawTools/vtoolalongline.h @@ -31,14 +31,14 @@ class VToolAlongLine : public VToolLinePoint public: VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/drawTools/vtoolarc.cpp b/tools/drawTools/vtoolarc.cpp index 8c7c146d6..1e3940aa9 100644 --- a/tools/drawTools/vtoolarc.cpp +++ b/tools/drawTools/vtoolarc.cpp @@ -25,7 +25,7 @@ const QString VToolArc::TagName = QStringLiteral("arc"); const QString VToolArc::ToolType = QStringLiteral("simple"); -VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, +VToolArc::VToolArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogArc(QSharedPointer()) { @@ -66,7 +66,7 @@ void VToolArc::Create(QSharedPointer &dialog, VMainGraphicsScene *sce void VToolArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { qreal calcRadius = 0, calcF1 = 0, calcF2 = 0; @@ -142,7 +142,7 @@ void VToolArc::FullUpdateFromGui(int result) dialogArc.clear(); } -void VToolArc::ChangedActivDraw(const QString newName) +void VToolArc::ChangedActivDraw(const QString &newName) { bool selectable = false; if (nameActivDraw == newName) diff --git a/tools/drawTools/vtoolarc.h b/tools/drawTools/vtoolarc.h index a199ad10a..cbfba5490 100644 --- a/tools/drawTools/vtoolarc.h +++ b/tools/drawTools/vtoolarc.h @@ -31,20 +31,20 @@ class VToolArc :public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: - VToolArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + VToolArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: virtual void FullUpdateFromFile(); virtual void FullUpdateFromGui(int result); - virtual void ChangedActivDraw(const QString newName); + virtual void ChangedActivDraw(const QString &newName); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void SetFactor(qreal factor); protected: diff --git a/tools/drawTools/vtoolbisector.cpp b/tools/drawTools/vtoolbisector.cpp index 7c7795591..f9b6af717 100644 --- a/tools/drawTools/vtoolbisector.cpp +++ b/tools/drawTools/vtoolbisector.cpp @@ -26,7 +26,7 @@ const QString VToolBisector::ToolType = QStringLiteral("bisector"); VToolBisector::VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, - const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation, + const qint64 &secondPointId, const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VToolLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), thirdPointId(0), dialogBisector(QSharedPointer()) @@ -88,7 +88,7 @@ void VToolBisector::Create(const qint64 _id, const QString &formula, const qint6 const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); diff --git a/tools/drawTools/vtoolbisector.h b/tools/drawTools/vtoolbisector.h index b072bf052..396affed0 100644 --- a/tools/drawTools/vtoolbisector.h +++ b/tools/drawTools/vtoolbisector.h @@ -30,7 +30,7 @@ class VToolBisector : public VToolLinePoint public: VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, - const qint64 &thirdPointId, Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint, const qreal& length); virtual void setDialog(); @@ -40,7 +40,7 @@ public: const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation); + const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/drawTools/vtoolendline.cpp b/tools/drawTools/vtoolendline.cpp index 98fc7d4d9..5199dfbbf 100644 --- a/tools/drawTools/vtoolendline.cpp +++ b/tools/drawTools/vtoolendline.cpp @@ -27,7 +27,7 @@ const QString VToolEndLine::ToolType = QStringLiteral("endLine"); VToolEndLine::VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) :VToolLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent), dialogEndLine(QSharedPointer()) { @@ -64,7 +64,7 @@ void VToolEndLine::Create(QSharedPointer &dialog, VMainGraphicsSc void VToolEndLine::Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) { VPointF basePoint = data->GetPoint(basePointId); QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y())); diff --git a/tools/drawTools/vtoolendline.h b/tools/drawTools/vtoolendline.h index d9819a378..a6d755b88 100644 --- a/tools/drawTools/vtoolendline.h +++ b/tools/drawTools/vtoolendline.h @@ -31,14 +31,14 @@ class VToolEndLine : public VToolLinePoint public: VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/drawTools/vtoolheight.cpp b/tools/drawTools/vtoolheight.cpp index 0165e6481..ad4f41cee 100644 --- a/tools/drawTools/vtoolheight.cpp +++ b/tools/drawTools/vtoolheight.cpp @@ -25,7 +25,7 @@ const QString VToolHeight::ToolType = QStringLiteral("height"); VToolHeight::VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, - Tool::Sources typeCreation, QGraphicsItem * parent) + const Tool::Sources &typeCreation, QGraphicsItem * parent) :VToolLinePoint(doc, data, id, typeLine, QString(), basePointId, 0, parent), dialogHeight(QSharedPointer()), p1LineId(p1LineId), p2LineId(p2LineId) { @@ -63,7 +63,7 @@ void VToolHeight::Create(QSharedPointer &dialog, VMainGraphicsScen void VToolHeight::Create(const qint64 _id, const QString &pointName, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) { VPointF basePoint = data->GetPoint(basePointId); VPointF p1Line = data->GetPoint(p1LineId); diff --git a/tools/drawTools/vtoolheight.h b/tools/drawTools/vtoolheight.h index 3777d85b0..3a975b693 100644 --- a/tools/drawTools/vtoolheight.h +++ b/tools/drawTools/vtoolheight.h @@ -31,14 +31,14 @@ class VToolHeight: public VToolLinePoint public: VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation); + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); static QPointF FindPoint(const QLineF &line, const QPointF &point); static const QString ToolType; public slots: diff --git a/tools/drawTools/vtoolline.cpp b/tools/drawTools/vtoolline.cpp index 2dccf5b97..1cfc76e1a 100644 --- a/tools/drawTools/vtoolline.cpp +++ b/tools/drawTools/vtoolline.cpp @@ -24,7 +24,7 @@ const QString VToolLine::TagName = QStringLiteral("line"); VToolLine::VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) :VDrawTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint), dialogLine(QSharedPointer()) { @@ -60,7 +60,7 @@ void VToolLine::Create(QSharedPointer &dialog, VMainGraphicsScene *s void VToolLine::Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { Q_ASSERT(scene != 0); Q_ASSERT(doc != 0); @@ -126,7 +126,7 @@ void VToolLine::SetFactor(qreal factor) RefreshGeometry(); } -void VToolLine::ChangedActivDraw(const QString newName) +void VToolLine::ChangedActivDraw(const QString &newName) { bool selectable = false; if (nameActivDraw == newName) diff --git a/tools/drawTools/vtoolline.h b/tools/drawTools/vtoolline.h index 9e9700eed..2c0c87ab5 100644 --- a/tools/drawTools/vtoolline.h +++ b/tools/drawTools/vtoolline.h @@ -31,17 +31,17 @@ class VToolLine: public VDrawTool, public QGraphicsLineItem Q_OBJECT public: VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, - qint64 secondPoint, Tool::Sources typeCreation, QGraphicsItem * parent = 0); + qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; public slots: virtual void FullUpdateFromFile(); - virtual void ChangedActivDraw(const QString newName); + virtual void ChangedActivDraw(const QString &newName); virtual void FullUpdateFromGui(int result); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void SetFactor(qreal factor); diff --git a/tools/drawTools/vtoollineintersect.cpp b/tools/drawTools/vtoollineintersect.cpp index f02c897cf..e50ad42ee 100644 --- a/tools/drawTools/vtoollineintersect.cpp +++ b/tools/drawTools/vtoollineintersect.cpp @@ -25,7 +25,7 @@ const QString VToolLineIntersect::ToolType = QStringLiteral("lineIntersect"); VToolLineIntersect::VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, - const qint64 &p2Line2, Tool::Sources typeCreation, + const qint64 &p2Line2, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2), p2Line2(p2Line2), dialogLineIntersect(QSharedPointer()) @@ -64,7 +64,7 @@ void VToolLineIntersect::Create(const qint64 _id, const qint64 &p1Line1Id, const const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VPointF p1Line1 = data->GetPoint(p1Line1Id); VPointF p2Line1 = data->GetPoint(p2Line1Id); diff --git a/tools/drawTools/vtoollineintersect.h b/tools/drawTools/vtoollineintersect.h index 141f123d0..6d4dd0fdf 100644 --- a/tools/drawTools/vtoollineintersect.h +++ b/tools/drawTools/vtoollineintersect.h @@ -31,14 +31,14 @@ class VToolLineIntersect:public VToolPoint public: VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id, const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/drawTools/vtoollinepoint.cpp b/tools/drawTools/vtoollinepoint.cpp index 4ebfa443b..cb829f953 100644 --- a/tools/drawTools/vtoollinepoint.cpp +++ b/tools/drawTools/vtoollinepoint.cpp @@ -44,7 +44,7 @@ VToolLinePoint::VToolLinePoint(VDomDocument *doc, VContainer *data, const qint64 } } -void VToolLinePoint::ChangedActivDraw(const QString newName) +void VToolLinePoint::ChangedActivDraw(const QString &newName) { if (nameActivDraw == newName) { diff --git a/tools/drawTools/vtoollinepoint.h b/tools/drawTools/vtoollinepoint.h index 3a0e0e9f0..516ce890c 100644 --- a/tools/drawTools/vtoollinepoint.h +++ b/tools/drawTools/vtoollinepoint.h @@ -32,7 +32,7 @@ public: const QString &formula, const qint64 &basePointId, const qreal &angle, QGraphicsItem * parent = 0); public slots: - virtual void ChangedActivDraw(const QString newName); + virtual void ChangedActivDraw(const QString &newName); virtual void SetFactor(qreal factor); protected: QString typeLine; diff --git a/tools/drawTools/vtoolnormal.cpp b/tools/drawTools/vtoolnormal.cpp index 69fd7d764..138410b3e 100644 --- a/tools/drawTools/vtoolnormal.cpp +++ b/tools/drawTools/vtoolnormal.cpp @@ -26,7 +26,7 @@ const QString VToolNormal::ToolType = QStringLiteral("normal"); VToolNormal::VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, - const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) + const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VToolLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent), secondPointId(secondPointId), dialogNormal(QSharedPointer()) { @@ -67,7 +67,7 @@ void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64 const qint64 &secondPointId, const QString typeLine, const QString pointName, const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); diff --git a/tools/drawTools/vtoolnormal.h b/tools/drawTools/vtoolnormal.h index bf6d0292e..9ad7322c1 100644 --- a/tools/drawTools/vtoolnormal.h +++ b/tools/drawTools/vtoolnormal.h @@ -31,7 +31,7 @@ class VToolNormal : public VToolLinePoint public: VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, - const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); @@ -39,7 +39,7 @@ public: const qint64 &secondPointId, const QString typeLine, const QString pointName, const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation); + const Tool::Sources &typeCreation); static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const qreal &length, const qreal &angle = 0); static const QString ToolType; diff --git a/tools/drawTools/vtoolpoint.cpp b/tools/drawTools/vtoolpoint.cpp index cc12a21c6..e4b0368b6 100644 --- a/tools/drawTools/vtoolpoint.cpp +++ b/tools/drawTools/vtoolpoint.cpp @@ -58,7 +58,7 @@ void VToolPoint::UpdateNamePosition(qreal mx, qreal my) } } -void VToolPoint::ChangedActivDraw(const QString newName) +void VToolPoint::ChangedActivDraw(const QString &newName) { bool selectable = false; if (nameActivDraw == newName) diff --git a/tools/drawTools/vtoolpoint.h b/tools/drawTools/vtoolpoint.h index fedd8dad6..993744961 100644 --- a/tools/drawTools/vtoolpoint.h +++ b/tools/drawTools/vtoolpoint.h @@ -34,7 +34,7 @@ public: static const QString TagName; public slots: void NameChangePosition(const QPointF pos); - virtual void ChangedActivDraw(const QString newName); + virtual void ChangedActivDraw(const QString &newName); virtual void FullUpdateFromGui(int result) = 0; virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void SetFactor(qreal factor); diff --git a/tools/drawTools/vtoolpointofcontact.cpp b/tools/drawTools/vtoolpointofcontact.cpp index 885f82775..b14f31e69 100644 --- a/tools/drawTools/vtoolpointofcontact.cpp +++ b/tools/drawTools/vtoolpointofcontact.cpp @@ -27,7 +27,7 @@ const QString VToolPointOfContact::ToolType = QStringLiteral("pointOfContact"); VToolPointOfContact::VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) : VToolPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId), secondPointId(secondPointId), dialogPointOfContact(QSharedPointer()) { @@ -90,7 +90,7 @@ void VToolPointOfContact::Create(const qint64 _id, const QString &radius, const const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { VPointF centerP = data->GetPoint(center); VPointF firstP = data->GetPoint(firstPointId); diff --git a/tools/drawTools/vtoolpointofcontact.h b/tools/drawTools/vtoolpointofcontact.h index ad3854c3a..1fc40c264 100644 --- a/tools/drawTools/vtoolpointofcontact.h +++ b/tools/drawTools/vtoolpointofcontact.h @@ -31,7 +31,7 @@ public: VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static QPointF FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint, const QPointF &secondPoint); @@ -40,7 +40,7 @@ public: static void Create(const qint64 _id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation); + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/drawTools/vtoolpointofintersection.cpp b/tools/drawTools/vtoolpointofintersection.cpp index 87984ca44..e53811d0d 100644 --- a/tools/drawTools/vtoolpointofintersection.cpp +++ b/tools/drawTools/vtoolpointofintersection.cpp @@ -25,7 +25,7 @@ const QString VToolPointOfIntersection::ToolType = QStringLiteral("pointOfInters VToolPointOfIntersection::VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId), dialogPointOfIntersection(QSharedPointer()) { @@ -57,7 +57,7 @@ void VToolPointOfIntersection::Create(QSharedPointer void VToolPointOfIntersection::Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { VPointF firstPoint = data->GetPoint(firstPointId); VPointF secondPoint = data->GetPoint(secondPointId); diff --git a/tools/drawTools/vtoolpointofintersection.h b/tools/drawTools/vtoolpointofintersection.h index d7701c979..47029b577 100644 --- a/tools/drawTools/vtoolpointofintersection.h +++ b/tools/drawTools/vtoolpointofintersection.h @@ -31,14 +31,14 @@ class VToolPointOfIntersection : public VToolPoint public: VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation); + const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/drawTools/vtoolshoulderpoint.cpp b/tools/drawTools/vtoolshoulderpoint.cpp index efc4ff838..26e5d2762 100644 --- a/tools/drawTools/vtoolshoulderpoint.cpp +++ b/tools/drawTools/vtoolshoulderpoint.cpp @@ -26,7 +26,7 @@ const QString VToolShoulderPoint::ToolType = QStringLiteral("shoulder"); VToolShoulderPoint::VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, - const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation, + const qint64 &p2Line, const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent) :VToolLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder), dialogShoulderPoint(QSharedPointer()) @@ -92,7 +92,7 @@ void VToolShoulderPoint::Create(const qint64 _id, const QString &formula, const const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { VPointF firstPoint = data->GetPoint(p1Line); VPointF secondPoint = data->GetPoint(p2Line); diff --git a/tools/drawTools/vtoolshoulderpoint.h b/tools/drawTools/vtoolshoulderpoint.h index bfb8d3b9f..f67bcbf49 100644 --- a/tools/drawTools/vtoolshoulderpoint.h +++ b/tools/drawTools/vtoolshoulderpoint.h @@ -30,7 +30,7 @@ class VToolShoulderPoint : public VToolLinePoint public: VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, - const qint64 &pShoulder, Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder, const qreal &length); @@ -39,7 +39,7 @@ public: static void Create(const qint64 _id, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/drawTools/vtoolsinglepoint.cpp b/tools/drawTools/vtoolsinglepoint.cpp index 043c80a69..a9c85ea0d 100644 --- a/tools/drawTools/vtoolsinglepoint.cpp +++ b/tools/drawTools/vtoolsinglepoint.cpp @@ -23,7 +23,7 @@ const QString VToolSinglePoint::ToolType = QStringLiteral("single"); -VToolSinglePoint::VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, +VToolSinglePoint::VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent ) :VToolPoint(doc, data, id, parent), dialogSinglePoint(QSharedPointer()) { @@ -127,7 +127,7 @@ void VToolSinglePoint::FullUpdateFromGui(int result) dialogSinglePoint.clear(); } -void VToolSinglePoint::ChangedActivDraw(const QString newName) +void VToolSinglePoint::ChangedActivDraw(const QString &newName) { if (nameActivDraw == newName) { diff --git a/tools/drawTools/vtoolsinglepoint.h b/tools/drawTools/vtoolsinglepoint.h index 466d76eef..98e3f491c 100644 --- a/tools/drawTools/vtoolsinglepoint.h +++ b/tools/drawTools/vtoolsinglepoint.h @@ -29,14 +29,14 @@ class VToolSinglePoint : public VToolPoint { Q_OBJECT public: - VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); virtual void setDialog(); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); virtual void FullUpdateFromGui(int result); - virtual void ChangedActivDraw(const QString newName); + virtual void ChangedActivDraw(const QString &newName); virtual void SetFactor(qreal factor); signals: void FullUpdateTree(); diff --git a/tools/drawTools/vtoolspline.cpp b/tools/drawTools/vtoolspline.cpp index df7b0e81c..a03cf5f9a 100644 --- a/tools/drawTools/vtoolspline.cpp +++ b/tools/drawTools/vtoolspline.cpp @@ -25,7 +25,7 @@ const QString VToolSpline::TagName = QStringLiteral("spline"); const QString VToolSpline::ToolType = QStringLiteral("simple"); -VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, +VToolSpline::VToolSpline(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogSpline(QSharedPointer()), controlPoints(QVector()) @@ -93,7 +93,7 @@ void VToolSpline::Create(QSharedPointer &dialog, VMainGraphicsScen void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { VSpline spline = VSpline(data->DataPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve); qint64 id = _id; @@ -271,7 +271,7 @@ void VToolSpline::RefreshGeometry() } -void VToolSpline::ChangedActivDraw(const QString newName) +void VToolSpline::ChangedActivDraw(const QString &newName) { bool selectable = false; if (nameActivDraw == newName) diff --git a/tools/drawTools/vtoolspline.h b/tools/drawTools/vtoolspline.h index 0b2d5488e..9bcf09bc9 100644 --- a/tools/drawTools/vtoolspline.h +++ b/tools/drawTools/vtoolspline.h @@ -32,7 +32,7 @@ class VToolSpline:public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: - VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, @@ -40,7 +40,7 @@ public: static void Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; signals: @@ -52,7 +52,7 @@ public slots: virtual void FullUpdateFromGui ( int result ); void ControlPointChangePosition ( const qint32 &indexSpline, SplinePoint::Position position, const QPointF pos); - virtual void ChangedActivDraw ( const QString newName ); + virtual void ChangedActivDraw ( const QString &newName ); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void SetFactor(qreal factor); protected: diff --git a/tools/drawTools/vtoolsplinepath.cpp b/tools/drawTools/vtoolsplinepath.cpp index fe793e24c..c6162d01d 100644 --- a/tools/drawTools/vtoolsplinepath.cpp +++ b/tools/drawTools/vtoolsplinepath.cpp @@ -24,7 +24,7 @@ const QString VToolSplinePath::TagName = QStringLiteral("spline"); const QString VToolSplinePath::ToolType = QStringLiteral("path"); -VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, +VToolSplinePath::VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VDrawTool(doc, data, id), QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer()), controlPoints(QVector()) @@ -84,7 +84,7 @@ void VToolSplinePath::Create(QSharedPointer &dialog, VMainGrap void VToolSplinePath::Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { qint64 id = _id; if (typeCreation == Tool::FromGui) @@ -211,7 +211,7 @@ void VToolSplinePath::UpdatePathPoint(QDomNode& node, VSplinePath &path) } } -void VToolSplinePath::ChangedActivDraw(const QString newName) +void VToolSplinePath::ChangedActivDraw(const QString &newName) { bool selectable = false; if (nameActivDraw == newName) diff --git a/tools/drawTools/vtoolsplinepath.h b/tools/drawTools/vtoolsplinepath.h index d495a7240..734615815 100644 --- a/tools/drawTools/vtoolsplinepath.h +++ b/tools/drawTools/vtoolsplinepath.h @@ -31,14 +31,14 @@ class VToolSplinePath:public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: - VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation); + const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; signals: @@ -50,7 +50,7 @@ public slots: virtual void FullUpdateFromGui(int result); void ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, const QPointF pos); - virtual void ChangedActivDraw(const QString newName); + virtual void ChangedActivDraw(const QString &newName); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void SetFactor(qreal factor); protected: diff --git a/tools/drawTools/vtooltriangle.cpp b/tools/drawTools/vtooltriangle.cpp index bd36becc9..683cf9a5a 100644 --- a/tools/drawTools/vtooltriangle.cpp +++ b/tools/drawTools/vtooltriangle.cpp @@ -25,7 +25,7 @@ const QString VToolTriangle::ToolType = QStringLiteral("triangle"); VToolTriangle::VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, - const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) + const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VToolPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId), secondPointId(secondPointId), dialogTriangle(QSharedPointer()) { @@ -62,7 +62,7 @@ void VToolTriangle::Create(QSharedPointer &dialog, VMainGraphics void VToolTriangle::Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) { VPointF axisP1 = data->GetPoint(axisP1Id); VPointF axisP2 = data->GetPoint(axisP2Id); diff --git a/tools/drawTools/vtooltriangle.h b/tools/drawTools/vtooltriangle.h index d83aa184c..eed07c6a2 100644 --- a/tools/drawTools/vtooltriangle.h +++ b/tools/drawTools/vtooltriangle.h @@ -31,14 +31,14 @@ class VToolTriangle : public VToolPoint public: VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static QPointF FindPoint(const QPointF axisP1, const QPointF axisP2, const QPointF firstPoint, const QPointF secondPoint); static const QString ToolType; diff --git a/tools/modelingTools/vmodelingalongline.cpp b/tools/modelingTools/vmodelingalongline.cpp index 535598a7b..5a27bb510 100644 --- a/tools/modelingTools/vmodelingalongline.cpp +++ b/tools/modelingTools/vmodelingalongline.cpp @@ -27,7 +27,7 @@ const QString VModelingAlongLine::ToolType = QStringLiteral("alongLine"); VModelingAlongLine::VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, 0, parent), secondPointId(secondPointId), dialogAlongLine(QSharedPointer()) { @@ -126,7 +126,7 @@ VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString & const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VModelingAlongLine *point = 0; VPointF firstPoint = data->GetModelingPoint(firstPointId); diff --git a/tools/modelingTools/vmodelingalongline.h b/tools/modelingTools/vmodelingalongline.h index 943836b67..e5ecd0e69 100644 --- a/tools/modelingTools/vmodelingalongline.h +++ b/tools/modelingTools/vmodelingalongline.h @@ -32,13 +32,13 @@ public: VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingAlongLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingAlongLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingarc.cpp b/tools/modelingTools/vmodelingarc.cpp index fe6c8f309..7a8e9c8d5 100644 --- a/tools/modelingTools/vmodelingarc.cpp +++ b/tools/modelingTools/vmodelingarc.cpp @@ -25,7 +25,7 @@ const QString VModelingArc::TagName = QStringLiteral("arc"); const QString VModelingArc::ToolType = QStringLiteral("simple"); -VModelingArc::VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, +VModelingArc::VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingTool(doc, data, id), QGraphicsPathItem(parent), dialogArc(QSharedPointer()) { @@ -61,7 +61,7 @@ VModelingArc* VModelingArc::Create(QSharedPointer &dialog, VDomDocume VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) { VModelingArc *toolArc = 0; qreal calcRadius = 0, calcF1 = 0, calcF2 = 0; diff --git a/tools/modelingTools/vmodelingarc.h b/tools/modelingTools/vmodelingarc.h index 9aba52347..44a6439e0 100644 --- a/tools/modelingTools/vmodelingarc.h +++ b/tools/modelingTools/vmodelingarc.h @@ -31,13 +31,13 @@ class VModelingArc :public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: - VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingArc* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingArc* Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: diff --git a/tools/modelingTools/vmodelingbisector.cpp b/tools/modelingTools/vmodelingbisector.cpp index 1524260e8..6a1c57b52 100644 --- a/tools/modelingTools/vmodelingbisector.cpp +++ b/tools/modelingTools/vmodelingbisector.cpp @@ -27,7 +27,7 @@ const QString VModelingBisector::ToolType = QStringLiteral("bisector"); VModelingBisector::VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, - const qint64 &secondPointId, const qint64 &thirdPointId, Tool::Sources typeCreation, + const qint64 &secondPointId, const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingLinePoint(doc, data, id, typeLine, formula, secondPointId, 0, parent), firstPointId(0), thirdPointId(0), dialogBisector(QSharedPointer()) @@ -71,7 +71,7 @@ VModelingBisector *VModelingBisector::Create(const qint64 _id, const QString &fo const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VModelingBisector *point = 0; VPointF firstPoint = data->GetModelingPoint(firstPointId); diff --git a/tools/modelingTools/vmodelingbisector.h b/tools/modelingTools/vmodelingbisector.h index 20a422f47..d29840403 100644 --- a/tools/modelingTools/vmodelingbisector.h +++ b/tools/modelingTools/vmodelingbisector.h @@ -32,14 +32,14 @@ public: VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, - const qint64 &thirdPointId, Tool::Sources typeCreation, + const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingBisector* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingBisector* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation); + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingendline.cpp b/tools/modelingTools/vmodelingendline.cpp index db778dbc4..f929a48bd 100644 --- a/tools/modelingTools/vmodelingendline.cpp +++ b/tools/modelingTools/vmodelingendline.cpp @@ -26,7 +26,7 @@ const QString VModelingEndLine::ToolType = QStringLiteral("endLine"); VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, - const qint64 &basePointId, Tool::Sources typeCreation, QGraphicsItem *parent) + const qint64 &basePointId, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingLinePoint(doc, data, id, typeLine, formula, basePointId, angle, parent), dialogEndLine(QSharedPointer()) { @@ -62,7 +62,7 @@ VModelingEndLine *VModelingEndLine::Create(const qint64 _id, const QString &poin const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { VModelingEndLine *point = 0; VPointF basePoint = data->GetModelingPoint(basePointId); diff --git a/tools/modelingTools/vmodelingendline.h b/tools/modelingTools/vmodelingendline.h index 8561048ff..cf33c3058 100644 --- a/tools/modelingTools/vmodelingendline.h +++ b/tools/modelingTools/vmodelingendline.h @@ -31,14 +31,14 @@ class VModelingEndLine : public VModelingLinePoint public: VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, - const qint64 &basePointId, Tool::Sources typeCreation, + const qint64 &basePointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingEndLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingEndLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingheight.cpp b/tools/modelingTools/vmodelingheight.cpp index 50024d09e..68439713e 100644 --- a/tools/modelingTools/vmodelingheight.cpp +++ b/tools/modelingTools/vmodelingheight.cpp @@ -26,7 +26,7 @@ const QString VModelingHeight::ToolType = QStringLiteral("height"); VModelingHeight::VModelingHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, - const qint64 &p2LineId, Tool::Sources typeCreation, + const qint64 &p2LineId, const Tool::Sources &typeCreation, QGraphicsItem * parent) :VModelingLinePoint(doc, data, id, typeLine, QString(), basePointId, 0, parent), dialogHeight(QSharedPointer()), p1LineId(p1LineId), p2LineId(p2LineId) @@ -65,7 +65,7 @@ VModelingHeight *VModelingHeight::Create(const qint64 _id, const QString &pointN const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { VModelingHeight *point = 0; VPointF basePoint = data->GetModelingPoint(basePointId); diff --git a/tools/modelingTools/vmodelingheight.h b/tools/modelingTools/vmodelingheight.h index 5dfd82e96..681c1e034 100644 --- a/tools/modelingTools/vmodelingheight.h +++ b/tools/modelingTools/vmodelingheight.h @@ -31,14 +31,14 @@ class VModelingHeight : public VModelingLinePoint public: VModelingHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, - const qint64 &p2LineId, Tool::Sources typeCreation, + const qint64 &p2LineId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingHeight* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingHeight* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingline.cpp b/tools/modelingTools/vmodelingline.cpp index 7f077bca1..d019f4d68 100644 --- a/tools/modelingTools/vmodelingline.cpp +++ b/tools/modelingTools/vmodelingline.cpp @@ -24,7 +24,7 @@ const QString VModelingLine::TagName = QStringLiteral("line"); VModelingLine::VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, - qint64 secondPoint, Tool::Sources typeCreation, QGraphicsItem *parent): + qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem *parent): VModelingTool(doc, data, id), QGraphicsLineItem(parent), firstPoint(firstPoint), secondPoint(secondPoint), dialogLine(QSharedPointer()) { @@ -58,7 +58,7 @@ VModelingLine *VModelingLine::Create(QSharedPointer &dialog, VDomDoc VModelingLine *VModelingLine::Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VModelingLine *line = 0; Q_ASSERT(doc != 0); diff --git a/tools/modelingTools/vmodelingline.h b/tools/modelingTools/vmodelingline.h index 0149f9be5..272dcbe68 100644 --- a/tools/modelingTools/vmodelingline.h +++ b/tools/modelingTools/vmodelingline.h @@ -31,12 +31,12 @@ class VModelingLine: public VModelingTool, public QGraphicsLineItem Q_OBJECT public: VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, - qint64 secondPoint, Tool::Sources typeCreation, QGraphicsItem * parent = 0); + qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingLine* Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation); + const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: diff --git a/tools/modelingTools/vmodelinglineintersect.cpp b/tools/modelingTools/vmodelinglineintersect.cpp index f73afb5be..2665df105 100644 --- a/tools/modelingTools/vmodelinglineintersect.cpp +++ b/tools/modelingTools/vmodelinglineintersect.cpp @@ -25,7 +25,7 @@ const QString VModelingLineIntersect::ToolType = QStringLiteral("lineIntersect") VModelingLineIntersect::VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, - const qint64 &p2Line2, Tool::Sources typeCreation, QGraphicsItem *parent) + const qint64 &p2Line2, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingPoint(doc, data, id, parent), p1Line1(p1Line1), p2Line1(p2Line1), p1Line2(p1Line2), p2Line2(p2Line2), dialogLineIntersect(QSharedPointer()) { @@ -64,7 +64,7 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VModelingLineIntersect *point = 0; VPointF p1Line1 = data->GetModelingPoint(p1Line1Id); diff --git a/tools/modelingTools/vmodelinglineintersect.h b/tools/modelingTools/vmodelinglineintersect.h index 93f2f75c7..12b55cf83 100644 --- a/tools/modelingTools/vmodelinglineintersect.h +++ b/tools/modelingTools/vmodelinglineintersect.h @@ -32,14 +32,14 @@ public: VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingLineIntersect* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingLineIntersect* Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id, const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingnormal.cpp b/tools/modelingTools/vmodelingnormal.cpp index bafd2f52f..c4205734d 100644 --- a/tools/modelingTools/vmodelingnormal.cpp +++ b/tools/modelingTools/vmodelingnormal.cpp @@ -27,7 +27,7 @@ const QString VModelingNormal::ToolType = QStringLiteral("normal"); VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, - const qint64 &secondPointId, Tool::Sources typeCreation, QGraphicsItem *parent) + const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingLinePoint(doc, data, id, typeLine, formula, firstPointId, angle, parent), secondPointId(secondPointId), dialogNormal(QSharedPointer()) { @@ -62,9 +62,10 @@ VModelingNormal* VModelingNormal::Create(QSharedPointer &dialog, V } VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, - const qint64 &secondPointId, const QString typeLine, const QString pointName, + const qint64 &secondPointId, const QString &typeLine, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) + VContainer *data, const Document::Documents &parse, + const Tool::Sources &typeCreation) { VModelingNormal *point = 0; VPointF firstPoint = data->GetModelingPoint(firstPointId); diff --git a/tools/modelingTools/vmodelingnormal.h b/tools/modelingTools/vmodelingnormal.h index 56a0167ec..03a952983 100644 --- a/tools/modelingTools/vmodelingnormal.h +++ b/tools/modelingTools/vmodelingnormal.h @@ -32,13 +32,14 @@ public: VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingNormal* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingNormal* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, - const qint64 &secondPointId, const QString typeLine, const QString pointName, + const qint64 &secondPointId, const QString &typeLine, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation); + VContainer *data, const Document::Documents &parse, + const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingpointofcontact.cpp b/tools/modelingTools/vmodelingpointofcontact.cpp index 035aa437d..87de20af4 100644 --- a/tools/modelingTools/vmodelingpointofcontact.cpp +++ b/tools/modelingTools/vmodelingpointofcontact.cpp @@ -28,7 +28,7 @@ const QString VModelingPointOfContact::ToolType = QStringLiteral("pointOfContact VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) : VModelingPoint(doc, data, id, parent), radius(radius), center(center), firstPointId(firstPointId), secondPointId(secondPointId), dialogPointOfContact(QSharedPointer()) { @@ -67,7 +67,7 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VModelingPointOfContact *point = 0; VPointF centerP = data->GetModelingPoint(center); diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/tools/modelingTools/vmodelingpointofcontact.h index 3e23b9c3b..a6a965cde 100644 --- a/tools/modelingTools/vmodelingpointofcontact.h +++ b/tools/modelingTools/vmodelingpointofcontact.h @@ -32,7 +32,7 @@ public: VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingPointOfContact* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); @@ -40,7 +40,7 @@ public: const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingpointofintersection.cpp b/tools/modelingTools/vmodelingpointofintersection.cpp index a56e3b4d7..f66c5be85 100644 --- a/tools/modelingTools/vmodelingpointofintersection.cpp +++ b/tools/modelingTools/vmodelingpointofintersection.cpp @@ -25,7 +25,7 @@ const QString VModelingPointOfIntersection::ToolType = QStringLiteral("pointOfIn VModelingPointOfIntersection::VModelingPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingPoint(doc, data, id, parent), firstPointId(firstPointId), secondPointId(secondPointId), dialogPointOfIntersection(QSharedPointer()) { @@ -59,7 +59,7 @@ VModelingPointOfIntersection *VModelingPointOfIntersection::Create(const qint64 const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VModelingPointOfIntersection *tool = 0; VPointF firstPoint = data->GetPoint(firstPointId); diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/tools/modelingTools/vmodelingpointofintersection.h index 00740a439..7496940fb 100644 --- a/tools/modelingTools/vmodelingpointofintersection.h +++ b/tools/modelingTools/vmodelingpointofintersection.h @@ -31,7 +31,7 @@ class VModelingPointOfIntersection : public VModelingPoint public: VModelingPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingPointOfIntersection* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); @@ -39,7 +39,7 @@ public: const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation); + const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingshoulderpoint.cpp b/tools/modelingTools/vmodelingshoulderpoint.cpp index ee5cdd3ec..a13cc463f 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.cpp +++ b/tools/modelingTools/vmodelingshoulderpoint.cpp @@ -27,7 +27,7 @@ const QString VModelingShoulderPoint::ToolType = QStringLiteral("shoulder"); VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, - const qint64 &p2Line, const qint64 &pShoulder, Tool::Sources typeCreation, + const qint64 &p2Line, const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent) :VModelingLinePoint(doc, data, id, typeLine, formula, p1Line, 0, parent), p2Line(p2Line), pShoulder(pShoulder), dialogShoulderPoint(QSharedPointer()) diff --git a/tools/modelingTools/vmodelingshoulderpoint.h b/tools/modelingTools/vmodelingshoulderpoint.h index 7795a387b..496856f70 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.h +++ b/tools/modelingTools/vmodelingshoulderpoint.h @@ -31,7 +31,7 @@ class VModelingShoulderPoint : public VModelingLinePoint public: VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, - const qint64 &pShoulder, Tool::Sources typeCreation, + const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingShoulderPoint* Create(QSharedPointer &dialog, VDomDocument *doc, diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index cd7fd4823..40ebf04fc 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -25,7 +25,7 @@ const QString VModelingSpline::TagName = QStringLiteral("spline"); const QString VModelingSpline::ToolType = QStringLiteral("simple"); -VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, +VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingTool(doc, data, id), QGraphicsPathItem(parent), dialogSpline(QSharedPointer()), controlPoints(QVector()) @@ -91,7 +91,7 @@ VModelingSpline *VModelingSpline::Create(QSharedPointer &dialog, V VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) { VModelingSpline *spl = 0; VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve); diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index 5661f1557..e52bb13b0 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -32,14 +32,14 @@ class VModelingSpline:public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: - VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, + VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); virtual void setDialog(); static VModelingSpline* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingSpline* Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation); + const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; signals: diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/tools/modelingTools/vmodelingsplinepath.cpp index 3022c060c..0a79618f8 100644 --- a/tools/modelingTools/vmodelingsplinepath.cpp +++ b/tools/modelingTools/vmodelingsplinepath.cpp @@ -24,7 +24,7 @@ const QString VModelingSplinePath::TagName = QStringLiteral("spline"); const QString VModelingSplinePath::ToolType = QStringLiteral("path"); -VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, Tool::Sources typeCreation, +VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingTool(doc, data, id), QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer()), controlPoints(QVector()) @@ -84,7 +84,7 @@ VModelingSplinePath *VModelingSplinePath::Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingSplinePath* Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation); + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; signals: diff --git a/tools/modelingTools/vmodelingtriangle.cpp b/tools/modelingTools/vmodelingtriangle.cpp index d22de1f75..e1e50d3e9 100644 --- a/tools/modelingTools/vmodelingtriangle.cpp +++ b/tools/modelingTools/vmodelingtriangle.cpp @@ -26,7 +26,7 @@ const QString VModelingTriangle::ToolType = QStringLiteral("triangle"); VModelingTriangle::VModelingTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingPoint(doc, data, id, parent), axisP1Id(axisP1Id), axisP2Id(axisP2Id), firstPointId(firstPointId), secondPointId(secondPointId), dialogTriangle(QSharedPointer()) { @@ -63,7 +63,7 @@ VModelingTriangle *VModelingTriangle::Create(const qint64 _id, const QString &po const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VModelingTriangle *tool = 0; VPointF axisP1 = data->GetPoint(axisP1Id); diff --git a/tools/modelingTools/vmodelingtriangle.h b/tools/modelingTools/vmodelingtriangle.h index f4573ff74..edf9a4dfd 100644 --- a/tools/modelingTools/vmodelingtriangle.h +++ b/tools/modelingTools/vmodelingtriangle.h @@ -32,13 +32,13 @@ class VModelingTriangle : public VModelingPoint public: VModelingTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingTriangle* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingTriangle* Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/nodeDetails/vnodearc.cpp b/tools/nodeDetails/vnodearc.cpp index 7f8a1cdef..77b654b23 100644 --- a/tools/nodeDetails/vnodearc.cpp +++ b/tools/nodeDetails/vnodearc.cpp @@ -25,7 +25,7 @@ const QString VNodeArc::TagName = QStringLiteral("arc"); const QString VNodeArc::ToolType = QStringLiteral("modeling"); VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, - Tool::Sources typeCreation, QGraphicsItem * parent) + const Tool::Sources &typeCreation, QGraphicsItem * parent) :VAbstractNode(doc, data, id, idArc, typeobject), QGraphicsPathItem(parent) { RefreshGeometry(); @@ -40,7 +40,7 @@ VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, } void VNodeArc::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { if (parse == Document::FullParse) { diff --git a/tools/nodeDetails/vnodearc.h b/tools/nodeDetails/vnodearc.h index 9b07ffba9..eb419e858 100644 --- a/tools/nodeDetails/vnodearc.h +++ b/tools/nodeDetails/vnodearc.h @@ -30,9 +30,9 @@ class VNodeArc :public VAbstractNode, public QGraphicsPathItem Q_OBJECT public: VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, - Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation); + Draw::Draws typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: diff --git a/tools/nodeDetails/vnodepoint.cpp b/tools/nodeDetails/vnodepoint.cpp index a42370749..ddba6ebfd 100644 --- a/tools/nodeDetails/vnodepoint.cpp +++ b/tools/nodeDetails/vnodepoint.cpp @@ -25,7 +25,7 @@ const QString VNodePoint::TagName = QStringLiteral("point"); const QString VNodePoint::ToolType = QStringLiteral("modeling"); VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, - Tool::Sources typeCreation, QGraphicsItem *parent) + const Tool::Sources &typeCreation, QGraphicsItem *parent) :VAbstractNode(doc, data, id, idPoint, typeobject), QGraphicsEllipseItem(parent), radius(toPixel(1.5)), namePoint(0), lineName(0) { @@ -45,7 +45,7 @@ VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 id } void VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, - const Document::Documents &parse, Tool::Sources typeCreation) + const Document::Documents &parse, const Tool::Sources &typeCreation) { if (parse == Document::FullParse) { diff --git a/tools/nodeDetails/vnodepoint.h b/tools/nodeDetails/vnodepoint.h index 5b2613b19..eb4dbda0a 100644 --- a/tools/nodeDetails/vnodepoint.h +++ b/tools/nodeDetails/vnodepoint.h @@ -30,9 +30,9 @@ class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem Q_OBJECT public: VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, - Tool::Sources typeCreation, QGraphicsItem * parent = 0 ); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: diff --git a/tools/nodeDetails/vnodespline.cpp b/tools/nodeDetails/vnodespline.cpp index b315878ae..c78ebc5e6 100644 --- a/tools/nodeDetails/vnodespline.cpp +++ b/tools/nodeDetails/vnodespline.cpp @@ -25,7 +25,7 @@ const QString VNodeSpline::TagName = QStringLiteral("spline"); const QString VNodeSpline::ToolType = QStringLiteral("modelingSpline"); VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, - Tool::Sources typeCreation, QGraphicsItem * parent) + const Tool::Sources &typeCreation, QGraphicsItem * parent) :VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent) { RefreshGeometry(); @@ -41,7 +41,7 @@ VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 VNodeSpline *VNodeSpline::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, const Document::Documents &parse, - Tool::Sources typeCreation) + const Tool::Sources &typeCreation) { VNodeSpline *spl = 0; if (parse == Document::FullParse) diff --git a/tools/nodeDetails/vnodespline.h b/tools/nodeDetails/vnodespline.h index 6af937ab7..bf7be5854 100644 --- a/tools/nodeDetails/vnodespline.h +++ b/tools/nodeDetails/vnodespline.h @@ -30,9 +30,9 @@ class VNodeSpline:public VAbstractNode, public QGraphicsPathItem Q_OBJECT public: VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, - Tool::Sources typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); static VNodeSpline *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: diff --git a/tools/nodeDetails/vnodesplinepath.cpp b/tools/nodeDetails/vnodesplinepath.cpp index 2f226afb3..985209598 100644 --- a/tools/nodeDetails/vnodesplinepath.cpp +++ b/tools/nodeDetails/vnodesplinepath.cpp @@ -25,7 +25,7 @@ const QString VNodeSplinePath::TagName = QStringLiteral("spline"); const QString VNodeSplinePath::ToolType = QStringLiteral("modelingPath"); VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem * parent) + Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent) :VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent) { RefreshGeometry(); @@ -40,7 +40,7 @@ VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, } void VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, const Document::Documents &parse, Tool::Sources typeCreation) + Draw::Draws typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation) { if (parse == Document::FullParse) { diff --git a/tools/nodeDetails/vnodesplinepath.h b/tools/nodeDetails/vnodesplinepath.h index 6ee6ee980..e2fa1dbea 100644 --- a/tools/nodeDetails/vnodesplinepath.h +++ b/tools/nodeDetails/vnodesplinepath.h @@ -30,9 +30,9 @@ class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem Q_OBJECT public: VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, Tool::Sources typeCreation, QGraphicsItem * parent = 0); + Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, - const Document::Documents &parse, Tool::Sources typeCreation); + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: diff --git a/tools/vabstracttool.cpp b/tools/vabstracttool.cpp index df6bcb14e..1b94e56e7 100644 --- a/tools/vabstracttool.cpp +++ b/tools/vabstracttool.cpp @@ -95,7 +95,8 @@ QPointF VAbstractTool::LineIntersectRect(QRectF rec, QLineF line) return point; } -qint32 VAbstractTool::LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, QPointF &p2) +qint32 VAbstractTool::LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, + QPointF &p2) { const qreal eps = 1e-8; //коефіцієнти для рівняння відрізку @@ -130,7 +131,7 @@ qint32 VAbstractTool::LineIntersectCircle(QPointF center, qreal radius, QLineF l return flag; } -QPointF VAbstractTool::ClosestPoint(QLineF line, QPointF p) +QPointF VAbstractTool::ClosestPoint(const QLineF &line, const QPointF &p) { QLineF lineP2pointFrom = QLineF(line.p2(), p); qreal angle = 180-line.angleTo(lineP2pointFrom)-90; @@ -146,14 +147,14 @@ QPointF VAbstractTool::ClosestPoint(QLineF line, QPointF p) { if ( type == QLineF::NoIntersection || type == QLineF::UnboundedIntersection ) { - Q_ASSERT_X(type != QLineF::BoundedIntersection, Q_FUNC_INFO, "Немає точки перетину."); + Q_ASSERT_X(type != QLineF::BoundedIntersection, Q_FUNC_INFO, "Don't have point of intersection."); return point; } } return point; } -QPointF VAbstractTool::addVector(QPointF p, QPointF p1, QPointF p2, qreal k) +QPointF VAbstractTool::addVector(const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) { return QPointF (p.x() + (p2.x() - p1.x()) * k, p.y() + (p2.y() - p1.y()) * k); } @@ -172,7 +173,8 @@ void VAbstractTool::RemoveAllChild(QDomElement &domElement) void VAbstractTool::LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c) { //коефіцієнти для рівняння відрізку - *a = line.p2().y() - line.p1().y(); - *b = line.p1().x() - line.p2().x(); - *c = - *a * line.p1().x() - *b * line.p1().y(); + QPointF p1 = line.p1(); + *a = line.p2().y() - p1.y(); + *b = p1.x() - line.p2().x(); + *c = - *a * p1.x() - *b * p1.y(); } diff --git a/tools/vabstracttool.h b/tools/vabstracttool.h index e917552b1..44539711e 100644 --- a/tools/vabstracttool.h +++ b/tools/vabstracttool.h @@ -32,9 +32,10 @@ public: VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VAbstractTool() {} static QPointF LineIntersectRect(QRectF rec, QLineF line); - static qint32 LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, QPointF &p2); - static QPointF ClosestPoint(QLineF line, QPointF p); - static QPointF addVector (QPointF p, QPointF p1, QPointF p2, qreal k); + static qint32 LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, + QPointF &p2); + static QPointF ClosestPoint(const QLineF &line, const QPointF &p); + static QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k); inline qint64 getId() const {return id;} static void LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c); static const QString AttrId; diff --git a/tools/vtooldetail.cpp b/tools/vtooldetail.cpp index d51e0fc57..7d8983511 100644 --- a/tools/vtooldetail.cpp +++ b/tools/vtooldetail.cpp @@ -34,7 +34,7 @@ const QString VToolDetail::AttrNodeType = QStringLiteral("nodeType"); const QString VToolDetail::NodeTypeContour = QStringLiteral("Contour"); const QString VToolDetail::NodeTypeModeling = QStringLiteral("Modeling"); -VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, Tool::Sources typeCreation, +VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, const Tool::Sources &typeCreation, VMainGraphicsScene *scene, QGraphicsItem *parent) :VAbstractTool(doc, data, id), QGraphicsPathItem(parent), dialogDetail(QSharedPointer()), sceneDetails(scene) @@ -208,7 +208,7 @@ void VToolDetail::Create(QSharedPointer &dialog, VMainGraphicsScen } void VToolDetail::Create(const qint64 _id, VDetail &newDetail, VMainGraphicsScene *scene, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, Tool::Sources typeCreation) + VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) { qint64 id = _id; if (typeCreation == Tool::FromGui) diff --git a/tools/vtooldetail.h b/tools/vtooldetail.h index f20186b25..93b6c3fa0 100644 --- a/tools/vtooldetail.h +++ b/tools/vtooldetail.h @@ -31,14 +31,14 @@ class VToolDetail: public VAbstractTool, public QGraphicsPathItem Q_OBJECT public: VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, - Tool::Sources typeCreation, VMainGraphicsScene *scene, + const Tool::Sources &typeCreation, VMainGraphicsScene *scene, QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, VDetail &newDetail, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, - Tool::Sources typeCreation); + const Tool::Sources &typeCreation); template void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool) { diff --git a/widgets/vcontrolpointspline.cpp b/widgets/vcontrolpointspline.cpp index 5b25e4d86..626ad5e1d 100644 --- a/widgets/vcontrolpointspline.cpp +++ b/widgets/vcontrolpointspline.cpp @@ -69,7 +69,7 @@ QVariant VControlPointSpline::itemChange(QGraphicsItem::GraphicsItemChange chang return QGraphicsItem::itemChange(change, value); } -qint32 VControlPointSpline::LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, +qint32 VControlPointSpline::LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2) const { const qreal eps = 1e-8; @@ -107,7 +107,7 @@ qint32 VControlPointSpline::LineIntersectCircle(QPointF center, qreal radius, QL return flag; } -QPointF VControlPointSpline::ClosestPoint(QLineF line, QPointF p) const +QPointF VControlPointSpline::ClosestPoint(const QLineF &line, const QPointF &p) const { QLineF lineP2pointFrom = QLineF(line.p2(), p); qreal angle = 180-line.angleTo(lineP2pointFrom)-90; @@ -130,7 +130,7 @@ QPointF VControlPointSpline::ClosestPoint(QLineF line, QPointF p) const return point; } -QPointF VControlPointSpline::addVector(QPointF p, QPointF p1, QPointF p2, qreal k) const +QPointF VControlPointSpline::addVector(const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) const { return QPointF (p.x() + (p2.x() - p1.x()) * k, p.y() + (p2.y() - p1.y()) * k); } diff --git a/widgets/vcontrolpointspline.h b/widgets/vcontrolpointspline.h index 3d8bf86cb..c535f981a 100644 --- a/widgets/vcontrolpointspline.h +++ b/widgets/vcontrolpointspline.h @@ -50,9 +50,10 @@ private: Q_DISABLE_COPY(VControlPointSpline) qint32 indexSpline; SplinePoint::Position position; - qint32 LineIntersectCircle(QPointF center, qreal radius, QLineF line, QPointF &p1, QPointF &p2) const; - QPointF ClosestPoint(QLineF line, QPointF p) const; - QPointF addVector (QPointF p, QPointF p1, QPointF p2, qreal k) const; + qint32 LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, + QPointF &p2) const; + QPointF ClosestPoint(const QLineF &line, const QPointF &p) const; + QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) const; }; diff --git a/widgets/vmaingraphicsscene.cpp b/widgets/vmaingraphicsscene.cpp index 91fc1d32f..2a6839bb4 100644 --- a/widgets/vmaingraphicsscene.cpp +++ b/widgets/vmaingraphicsscene.cpp @@ -39,7 +39,7 @@ void VMainGraphicsScene::mousePressEvent(QGraphicsSceneMouseEvent *event) QGraphicsScene::mousePressEvent(event); } -void VMainGraphicsScene::ChoosedItem(qint64 id, Scene::Scenes type) +void VMainGraphicsScene::ChoosedItem(qint64 id, const Scene::Scenes &type) { emit ChoosedObject(id, type); } diff --git a/widgets/vmaingraphicsscene.h b/widgets/vmaingraphicsscene.h index 0f3cb116d..bf78f156b 100644 --- a/widgets/vmaingraphicsscene.h +++ b/widgets/vmaingraphicsscene.h @@ -35,7 +35,7 @@ public: inline qint32 getVerScrollBar() const {return verScrollBar;} inline void setVerScrollBar(const qint32 &value) {verScrollBar = value;} public slots: - void ChoosedItem(qint64 id, Scene::Scenes type); + void ChoosedItem(qint64 id, const Scene::Scenes &type); inline void RemoveTool(QGraphicsItem *tool) {this->removeItem(tool);} void SetFactor(qreal factor); protected: diff --git a/widgets/vmaingraphicsview.cpp b/widgets/vmaingraphicsview.cpp index 9aab81ce1..e2fd79c91 100644 --- a/widgets/vmaingraphicsview.cpp +++ b/widgets/vmaingraphicsview.cpp @@ -50,7 +50,7 @@ void VMainGraphicsView::wheelEvent(QWheelEvent *event) void VMainGraphicsView::scalingTime(qreal x) { Q_UNUSED(x); - qreal factor = 1.0 + qreal(_numScheduledScalings) / 300.0; + qreal factor = 1.0 + static_cast(_numScheduledScalings) / 300.0; if (QApplication::keyboardModifiers() == Qt::ControlModifier) {// If you press CTRL this code will execute scale(factor, factor); diff --git a/xml/vdomdocument.cpp b/xml/vdomdocument.cpp index 5fb79c282..be966b64b 100644 --- a/xml/vdomdocument.cpp +++ b/xml/vdomdocument.cpp @@ -72,7 +72,7 @@ QDomElement VDomDocument::elementById(const QString& id) return QDomElement(); } -bool VDomDocument::find(QDomElement node, const QString& id) +bool VDomDocument::find(const QDomElement &node, const QString& id) { if (node.hasAttribute("id")) { @@ -175,7 +175,7 @@ bool VDomDocument::appendDraw(const QString& name) return false; } -void VDomDocument::ChangeActivDraw(const QString& name, Document::Documents parse) +void VDomDocument::ChangeActivDraw(const QString& name, const Document::Documents &parse) { Q_ASSERT_X(name.isEmpty() == false, "ChangeActivDraw", "name draw is empty"); if (CheckNameDraw(name) == true) @@ -306,7 +306,8 @@ bool VDomDocument::GetActivNodeElement(const QString& name, QDomElement &element } } -void VDomDocument::Parse(Document::Documents parse, VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail) +void VDomDocument::Parse(const Document::Documents &parse, VMainGraphicsScene *sceneDraw, + VMainGraphicsScene *sceneDetail) { Q_ASSERT(sceneDraw != 0); Q_ASSERT(sceneDetail != 0); @@ -450,7 +451,7 @@ void VDomDocument::TestUniqueId() const CollectId(this->documentElement(), vector); } -void VDomDocument::CollectId(QDomElement node, QVector &vector) const +void VDomDocument::CollectId(const QDomElement &node, QVector &vector) const { if (node.hasAttribute("id")) { @@ -503,7 +504,7 @@ void VDomDocument::ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphics } void VDomDocument::ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, - const QDomNode& node, const Document::Documents &parse, Draw::Draws mode) + const QDomNode& node, const Document::Documents &parse, const Draw::Draws &mode) { Q_ASSERT(sceneDraw != 0); Q_ASSERT(sceneDetail != 0); @@ -702,7 +703,7 @@ void VDomDocument::ParseDetails(VMainGraphicsScene *sceneDetail, const QDomEleme } void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement, - const Document::Documents &parse, const QString& type, Draw::Draws mode) + const Document::Documents &parse, const QString& type, const Draw::Draws &mode) { Q_ASSERT(scene != 0); Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); @@ -1097,7 +1098,7 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen } void VDomDocument::ParseLineElement(VMainGraphicsScene *scene, const QDomElement &domElement, - const Document::Documents &parse, Draw::Draws mode) + const Document::Documents &parse, const Draw::Draws &mode) { Q_ASSERT(scene != 0); Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); @@ -1126,7 +1127,7 @@ void VDomDocument::ParseLineElement(VMainGraphicsScene *scene, const QDomElement } void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomElement &domElement, - const Document::Documents &parse, const QString &type, Draw::Draws mode) + const Document::Documents &parse, const QString &type, const Draw::Draws &mode) { Q_ASSERT(scene != 0); Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); @@ -1278,7 +1279,7 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme } void VDomDocument::ParseArcElement(VMainGraphicsScene *scene, const QDomElement &domElement, - const Document::Documents &parse, const QString &type, Draw::Draws mode) + const Document::Documents &parse, const QString &type, const Draw::Draws &mode) { Q_ASSERT(scene != 0); Q_ASSERT_X(domElement.isNull() == false, Q_FUNC_INFO, "domElement is null"); diff --git a/xml/vdomdocument.h b/xml/vdomdocument.h index 495f801d6..d49114ada 100644 --- a/xml/vdomdocument.h +++ b/xml/vdomdocument.h @@ -50,7 +50,7 @@ public: ~VDomDocument(){} QDomElement elementById(const QString& id); void CreateEmptyFile(); - void ChangeActivDraw(const QString& name, Document::Documents parse = Document::FullParse); + void ChangeActivDraw(const QString& name, const Document::Documents &parse = Document::FullParse); inline QString GetNameActivDraw() const {return nameActivDraw;} bool GetActivDrawElement(QDomElement &element); bool GetActivCalculationElement(QDomElement &element); @@ -58,7 +58,8 @@ public: bool GetActivDetailsElement(QDomElement &element); bool appendDraw(const QString& name); bool SetNameDraw(const QString& name); - void Parse(Document::Documents parse, VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail); + void Parse(const Document::Documents &parse, VMainGraphicsScene *sceneDraw, + VMainGraphicsScene *sceneDetail); inline QHash* getTools() {return &tools;} inline QVector *getHistory() {return &history;} inline qint64 getCursor() const {return cursor;} @@ -70,7 +71,7 @@ public: void DecrementReferens(qint64 id) const; void TestUniqueId() const; signals: - void ChangedActivDraw(const QString newName); + void ChangedActivDraw(const QString &newName); void ChangedNameDraw(const QString oldName, const QString newName); void FullUpdateFromFile(); void haveChange(); @@ -90,32 +91,32 @@ private: qint64 cursor; QComboBox *comboBoxDraws; Draw::Draws *mode; - bool find(QDomElement node, const QString& id); + bool find(const QDomElement &node, const QString& id); bool CheckNameDraw(const QString& name) const; void SetActivDraw(const QString& name); bool GetActivNodeElement(const QString& name, QDomElement& element); void ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, const QDomNode& node, const Document::Documents &parse); void ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, - const QDomNode& node, const Document::Documents &parse, Draw::Draws mode); + const QDomNode& node, const Document::Documents &parse, const Draw::Draws &mode); void ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, const Document::Documents &parse); void ParseDetails(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, const Document::Documents &parse); void ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement, - const Document::Documents &parse, const QString &type, Draw::Draws mode); + const Document::Documents &parse, const QString &type, const Draw::Draws &mode); void ParseLineElement(VMainGraphicsScene *scene, const QDomElement& domElement, - const Document::Documents &parse, Draw::Draws mode); + const Document::Documents &parse, const Draw::Draws &mode); void ParseSplineElement(VMainGraphicsScene *scene, const QDomElement& domElement, - const Document::Documents &parse, const QString& type, Draw::Draws mode); + const Document::Documents &parse, const QString& type, const Draw::Draws &mode); void ParseArcElement(VMainGraphicsScene *scene, const QDomElement& domElement, - const Document::Documents &parse, const QString& type, Draw::Draws mode); + const Document::Documents &parse, const QString& type, const Draw::Draws &mode); void ParseIncrementsElement(const QDomNode& node); qint64 GetParametrId(const QDomElement& domElement) const; qint64 GetParametrLongLong(const QDomElement& domElement, const QString &name) const; QString GetParametrString(const QDomElement& domElement, const QString &name) const; qreal GetParametrDouble(const QDomElement& domElement, const QString &name) const; - void CollectId(QDomElement node, QVector &vector)const; + void CollectId(const QDomElement &node, QVector &vector)const; }; #ifdef Q_CC_GNU From 3119c75981fb34915f795072720f2ff49efc6c2a Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 7 Nov 2013 16:40:39 +0200 Subject: [PATCH 14/56] Little optimization. --HG-- branch : develop --- container/vcontainer.cpp | 2 +- dialogs/dialogdetail.cpp | 2 +- dialogs/dialogtool.cpp | 2 +- geometry/vspline.cpp | 12 ++++++------ geometry/vspline.h | 11 ++++++----- geometry/vsplinepath.cpp | 4 ++-- geometry/vsplinepath.h | 4 ++-- tools/drawTools/vtoolnormal.cpp | 2 +- tools/drawTools/vtoolnormal.h | 5 +++-- tools/drawTools/vtoolpoint.cpp | 2 +- tools/drawTools/vtoolpoint.h | 2 +- tools/drawTools/vtoolspline.cpp | 4 ++-- tools/drawTools/vtoolspline.h | 4 ++-- tools/drawTools/vtoolsplinepath.cpp | 4 ++-- tools/drawTools/vtoolsplinepath.h | 4 ++-- tools/drawTools/vtooltriangle.cpp | 4 ++-- tools/drawTools/vtooltriangle.h | 4 ++-- tools/modelingTools/vmodelingpoint.cpp | 2 +- tools/modelingTools/vmodelingpoint.h | 2 +- tools/modelingTools/vmodelingspline.cpp | 2 +- tools/modelingTools/vmodelingspline.h | 2 +- tools/modelingTools/vmodelingsplinepath.cpp | 2 +- tools/modelingTools/vmodelingsplinepath.h | 2 +- tools/nodeDetails/vnodearc.cpp | 2 +- tools/nodeDetails/vnodearc.h | 4 ++-- tools/nodeDetails/vnodepoint.cpp | 4 ++-- tools/nodeDetails/vnodepoint.h | 4 ++-- tools/nodeDetails/vnodespline.cpp | 2 +- tools/nodeDetails/vnodespline.h | 5 +++-- tools/nodeDetails/vnodesplinepath.cpp | 5 +++-- tools/nodeDetails/vnodesplinepath.h | 2 +- tools/vtooldetail.cpp | 10 +++++----- widgets/vtablegraphicsview.cpp | 18 +++++++++++------- 33 files changed, 74 insertions(+), 66 deletions(-) diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 3033bf1f1..5a50e0d95 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -163,7 +163,7 @@ QPainterPath VContainer::ContourPath(qint64 idDetail) const VDetail detail = GetDetail(idDetail); QVector points; QVector pointsEkv; - for (qint32 i = 0; i< detail.CountNode(); ++i) + for (ptrdiff_t i = 0; i< detail.CountNode(); ++i) { switch (detail[i].getTypeTool()) { diff --git a/dialogs/dialogdetail.cpp b/dialogs/dialogdetail.cpp index 2e64e986e..91d339552 100644 --- a/dialogs/dialogdetail.cpp +++ b/dialogs/dialogdetail.cpp @@ -188,7 +188,7 @@ void DialogDetail::setDetails(const VDetail &value) { details = value; ui.listWidget->clear(); - for (qint32 i = 0; i < details.CountNode(); ++i) + for (ptrdiff_t i = 0; i < details.CountNode(); ++i) { NewItem(details[i].getId(), details[i].getTypeTool(), details[i].getMode(), details[i].getTypeNode(), details[i].getMx(), details[i].getMy()); diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index a07413b69..2e4ea80f5 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -79,7 +79,7 @@ void DialogTool::FillComboBoxPoints(QComboBox *box, const qint64 &id) const return; } VDetail det = data->GetDetail(idDetail); - for (qint32 i = 0; i< det.CountNode(); ++i) + for (ptrdiff_t i = 0; i< det.CountNode(); ++i) { if (det[i].getTypeTool() == Tool::NodePoint || det[i].getTypeTool() == Tool::AlongLineTool || diff --git a/geometry/vspline.cpp b/geometry/vspline.cpp index 67ab29023..25b56b8db 100644 --- a/geometry/vspline.cpp +++ b/geometry/vspline.cpp @@ -76,7 +76,7 @@ void VSpline::ModifiSpl ( qint64 p1, qint64 p4, qreal angle1, qreal angle2, this->p3 = p4p3.p2(); } -void VSpline::ModifiSpl (qint64 p1, QPointF p2, QPointF p3, qint64 p4, qreal kCurve) +void VSpline::ModifiSpl (const qint64 &p1, const QPointF &p2, const QPointF &p3, const qint64 &p4, const qreal &kCurve) { this->p1 = p1; this->p2 = p2; @@ -278,7 +278,7 @@ QVector VSpline::GetPoints () const // } } -QVector VSpline::GetPoints (QPointF p1, QPointF p2, QPointF p3, QPointF p4) +QVector VSpline::GetPoints (const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4) { QVector pvector; QVector x; @@ -298,7 +298,7 @@ QVector VSpline::GetPoints (QPointF p1, QPointF p2, QPointF p3, QPointF return pvector; } -qreal VSpline::LengthBezier ( QPointF p1, QPointF p2, QPointF p3, QPointF p4 ) const +qreal VSpline::LengthBezier ( const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4 ) const { QPainterPath splinePath; QVector points = GetPoints (p1, p2, p3, p4); @@ -351,8 +351,8 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, double dx = x4-x1; double dy = y4-y1; - double d2 = fabs(((x2 - x4) * dy - (y2 - y4) * dx)); - double d3 = fabs(((x3 - x4) * dy - (y3 - y4) * dx)); + double d2 = fabs((x2 - x4) * dy - (y2 - y4) * dx); + double d3 = fabs((x3 - x4) * dy - (y3 - y4) * dx); double da1, da2, k; switch ((static_cast(d2 > curve_collinearity_epsilon) << 1) + @@ -747,7 +747,7 @@ QPainterPath VSpline::GetPath() const // this->ModifiSpl(P1, P2, P3, P4); //} -QVector VSpline::SplinePoints(QPointF p1, QPointF p4, qreal angle1, qreal angle2, qreal kAsm1, +QVector VSpline::SplinePoints(const QPointF &p1, const QPointF &p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve) { QLineF p1pX(p1.x(), p1.y(), p1.x() + 100, p1.y()); diff --git a/geometry/vspline.h b/geometry/vspline.h index abbc90121..a8245de01 100644 --- a/geometry/vspline.h +++ b/geometry/vspline.h @@ -79,7 +79,8 @@ public: * @param p3 друга контролююча точка сплайну. * @param p4 кінцева точка сплайну. */ - void ModifiSpl (qint64 p1, QPointF p2, QPointF p3, qint64 p4, qreal kCurve); + void ModifiSpl (const qint64 &p1, const QPointF &p2, const QPointF &p3, const qint64 &p4, + const qreal &kCurve); /** * @brief RotationSpl поворот сплайна навколо точки на кут в градусах проти годиникової стрілки. * @param pRotate точка навколо якої повертаємо. @@ -178,8 +179,8 @@ public: // void Mirror(const QPointF Pmirror); inline Draw::Draws getMode() const {return mode;} inline void setMode(const Draw::Draws &value) {mode = value;} - static QVector SplinePoints(QPointF p1, QPointF p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, - qreal kCurve); + static QVector SplinePoints(const QPointF &p1, const QPointF &p4, qreal angle1, qreal angle2, qreal kAsm1, + qreal kAsm2, qreal kCurve); inline qint64 getIdObject() const {return idObject;} inline void setIdObject(const qint64 &value) {idObject = value;} VSpline &operator=(const VSpline &spl); @@ -192,7 +193,7 @@ protected: * @param p4 кінцева точка сплайну. * @return список точок. */ - static QVector GetPoints ( QPointF p1, QPointF p2, QPointF p3, QPointF p4 ); + static QVector GetPoints (const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4 ); private: /** * @brief p1 початкова точка сплайну @@ -232,7 +233,7 @@ private: * @param p4 кінцева точка сплайну. * @return дожина сплайну. */ - qreal LengthBezier ( QPointF p1, QPointF p2, QPointF p3, QPointF p4 ) const; + qreal LengthBezier (const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4 ) const; /** * @brief PointBezier_r знаходить точки сплайну по його чотирьом точках. * @param x1 х координата першої точки сплайну. diff --git a/geometry/vsplinepath.cpp b/geometry/vsplinepath.cpp index 01eb67bc4..df3baad54 100644 --- a/geometry/vsplinepath.cpp +++ b/geometry/vsplinepath.cpp @@ -32,7 +32,7 @@ VSplinePath::VSplinePath(const VSplinePath &splPath) : path(*splPath.GetPoint()), kCurve(splPath.getKCurve()), mode(splPath.getMode()), points(splPath.GetDataPoints()), idObject(splPath.getIdObject()){} -void VSplinePath::append(VSplinePoint point) +void VSplinePath::append(const VSplinePoint &point) { path.append(point); } @@ -104,7 +104,7 @@ qreal VSplinePath::GetLength() const return length; } -void VSplinePath::UpdatePoint(qint32 indexSpline, SplinePoint::Position pos, VSplinePoint point) +void VSplinePath::UpdatePoint(qint32 indexSpline, const SplinePoint::Position &pos, const VSplinePoint &point) { if (indexSpline < 1 || indexSpline > Count()) { diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index 77d7c956d..412afb317 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -55,7 +55,7 @@ public: * @brief append додає точку сплайну до шляху. * @param point точка. */ - void append(VSplinePoint point); + void append(const VSplinePoint &point); qint32 Count() const; inline qint32 CountPoint() const {return path.size();} VSpline GetSpline(qint32 index) const; @@ -64,7 +64,7 @@ public: inline QVector GetSplinePath() const {return path;} qreal GetLength() const; inline QHash GetDataPoints() const {return points;} - void UpdatePoint(qint32 indexSpline, SplinePoint::Position pos, VSplinePoint point); + void UpdatePoint(qint32 indexSpline, const SplinePoint::Position &pos, const VSplinePoint &point); VSplinePoint GetSplinePoint(qint32 indexSpline, SplinePoint::Position pos) const; /** * @brief Clear очищає шлях сплайнів. diff --git a/tools/drawTools/vtoolnormal.cpp b/tools/drawTools/vtoolnormal.cpp index 138410b3e..4334eef3a 100644 --- a/tools/drawTools/vtoolnormal.cpp +++ b/tools/drawTools/vtoolnormal.cpp @@ -64,7 +64,7 @@ void VToolNormal::Create(QSharedPointer &dialog, VMainGraphicsScen } void VToolNormal::Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, - const qint64 &secondPointId, const QString typeLine, const QString pointName, + const qint64 &secondPointId, const QString &typeLine, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) diff --git a/tools/drawTools/vtoolnormal.h b/tools/drawTools/vtoolnormal.h index 9ad7322c1..598496309 100644 --- a/tools/drawTools/vtoolnormal.h +++ b/tools/drawTools/vtoolnormal.h @@ -31,12 +31,13 @@ class VToolNormal : public VToolLinePoint public: VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, - const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + const qint64 &secondPointId, const Tool::Sources &typeCreation, + QGraphicsItem * parent = 0); virtual void setDialog(); static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, - const qint64 &secondPointId, const QString typeLine, const QString pointName, + const qint64 &secondPointId, const QString &typeLine, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); diff --git a/tools/drawTools/vtoolpoint.cpp b/tools/drawTools/vtoolpoint.cpp index e4b0368b6..37ac56ec9 100644 --- a/tools/drawTools/vtoolpoint.cpp +++ b/tools/drawTools/vtoolpoint.cpp @@ -36,7 +36,7 @@ VToolPoint::VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphics RefreshPointGeometry(VAbstractTool::data.GetPoint(id)); } -void VToolPoint::NameChangePosition(const QPointF pos) +void VToolPoint::NameChangePosition(const QPointF &pos) { VPointF point = VAbstractTool::data.GetPoint(id); QPointF p = pos - this->pos(); diff --git a/tools/drawTools/vtoolpoint.h b/tools/drawTools/vtoolpoint.h index 993744961..8bcd8c0b0 100644 --- a/tools/drawTools/vtoolpoint.h +++ b/tools/drawTools/vtoolpoint.h @@ -33,7 +33,7 @@ public: virtual ~VToolPoint(){} static const QString TagName; public slots: - void NameChangePosition(const QPointF pos); + void NameChangePosition(const QPointF &pos); virtual void ChangedActivDraw(const QString &newName); virtual void FullUpdateFromGui(int result) = 0; virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); diff --git a/tools/drawTools/vtoolspline.cpp b/tools/drawTools/vtoolspline.cpp index a03cf5f9a..c2324bbe3 100644 --- a/tools/drawTools/vtoolspline.cpp +++ b/tools/drawTools/vtoolspline.cpp @@ -167,8 +167,8 @@ void VToolSpline::FullUpdateFromGui(int result) dialogSpline.clear(); } -void VToolSpline::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos) +void VToolSpline::ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position, + const QPointF &pos) { Q_UNUSED(indexSpline); VSpline spl = VAbstractTool::data.GetSpline(id); diff --git a/tools/drawTools/vtoolspline.h b/tools/drawTools/vtoolspline.h index 9bcf09bc9..1960981e0 100644 --- a/tools/drawTools/vtoolspline.h +++ b/tools/drawTools/vtoolspline.h @@ -50,8 +50,8 @@ signals: public slots: virtual void FullUpdateFromFile (); virtual void FullUpdateFromGui ( int result ); - void ControlPointChangePosition ( const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos); + void ControlPointChangePosition (const qint32 &indexSpline, const SplinePoint::Position &position, + const QPointF &pos); virtual void ChangedActivDraw ( const QString &newName ); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void SetFactor(qreal factor); diff --git a/tools/drawTools/vtoolsplinepath.cpp b/tools/drawTools/vtoolsplinepath.cpp index c6162d01d..230b9a696 100644 --- a/tools/drawTools/vtoolsplinepath.cpp +++ b/tools/drawTools/vtoolsplinepath.cpp @@ -156,8 +156,8 @@ void VToolSplinePath::FullUpdateFromGui(int result) dialogSplinePath.clear(); } -void VToolSplinePath::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos) +void VToolSplinePath::ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position, + const QPointF &pos) { VSplinePath splPath = VAbstractTool::data.GetSplinePath(id); VSpline spl = splPath.GetSpline(indexSpline); diff --git a/tools/drawTools/vtoolsplinepath.h b/tools/drawTools/vtoolsplinepath.h index 734615815..804eddedf 100644 --- a/tools/drawTools/vtoolsplinepath.h +++ b/tools/drawTools/vtoolsplinepath.h @@ -48,8 +48,8 @@ signals: public slots: virtual void FullUpdateFromFile(); virtual void FullUpdateFromGui(int result); - void ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos); + void ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position, + const QPointF &pos); virtual void ChangedActivDraw(const QString &newName); virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); virtual void SetFactor(qreal factor); diff --git a/tools/drawTools/vtooltriangle.cpp b/tools/drawTools/vtooltriangle.cpp index 683cf9a5a..94affbaea 100644 --- a/tools/drawTools/vtooltriangle.cpp +++ b/tools/drawTools/vtooltriangle.cpp @@ -101,8 +101,8 @@ void VToolTriangle::Create(const qint64 _id, const QString &pointName, const qin } } -QPointF VToolTriangle::FindPoint(const QPointF axisP1, const QPointF axisP2, const QPointF firstPoint, - const QPointF secondPoint) +QPointF VToolTriangle::FindPoint(const QPointF &axisP1, const QPointF &axisP2, const QPointF &firstPoint, + const QPointF &secondPoint) { qreal c = QLineF(firstPoint, secondPoint).length(); qreal a = QLineF(axisP2, firstPoint).length(); diff --git a/tools/drawTools/vtooltriangle.h b/tools/drawTools/vtooltriangle.h index eed07c6a2..5990ef214 100644 --- a/tools/drawTools/vtooltriangle.h +++ b/tools/drawTools/vtooltriangle.h @@ -39,8 +39,8 @@ public: const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); - static QPointF FindPoint(const QPointF axisP1, const QPointF axisP2, const QPointF firstPoint, - const QPointF secondPoint); + static QPointF FindPoint(const QPointF &axisP1, const QPointF &axisP2, const QPointF &firstPoint, + const QPointF &secondPoint); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingpoint.cpp b/tools/modelingTools/vmodelingpoint.cpp index 9c0e225da..948e1bb17 100644 --- a/tools/modelingTools/vmodelingpoint.cpp +++ b/tools/modelingTools/vmodelingpoint.cpp @@ -38,7 +38,7 @@ VModelingPoint::VModelingPoint(VDomDocument *doc, VContainer *data, qint64 id, Q RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); } -void VModelingPoint::NameChangePosition(const QPointF pos) +void VModelingPoint::NameChangePosition(const QPointF &pos) { VPointF point = VAbstractTool::data.GetModelingPoint(id); QPointF p = pos - this->pos(); diff --git a/tools/modelingTools/vmodelingpoint.h b/tools/modelingTools/vmodelingpoint.h index 360db6153..33d446263 100644 --- a/tools/modelingTools/vmodelingpoint.h +++ b/tools/modelingTools/vmodelingpoint.h @@ -33,7 +33,7 @@ public: virtual ~VModelingPoint() {} static const QString TagName; public slots: - void NameChangePosition(const QPointF pos); + void NameChangePosition(const QPointF &pos); virtual void FullUpdateFromGui(int result) = 0; protected: qreal radius; diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index 40ebf04fc..d1ffd0640 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -163,7 +163,7 @@ void VModelingSpline::FullUpdateFromGui(int result) } void VModelingSpline::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos) + const QPointF &pos) { Q_UNUSED(indexSpline); VSpline spl = VAbstractTool::data.GetModelingSpline(id); diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index e52bb13b0..04d07348c 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -50,7 +50,7 @@ public slots: virtual void FullUpdateFromFile (); virtual void FullUpdateFromGui ( int result ); void ControlPointChangePosition (const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos); + const QPointF &pos); protected: virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); virtual void AddToFile (); diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/tools/modelingTools/vmodelingsplinepath.cpp index 0a79618f8..c91e3bbc7 100644 --- a/tools/modelingTools/vmodelingsplinepath.cpp +++ b/tools/modelingTools/vmodelingsplinepath.cpp @@ -153,7 +153,7 @@ void VModelingSplinePath::FullUpdateFromGui(int result) } void VModelingSplinePath::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos) + const QPointF &pos) { VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); VSpline spl = splPath.GetSpline(indexSpline); diff --git a/tools/modelingTools/vmodelingsplinepath.h b/tools/modelingTools/vmodelingsplinepath.h index 6ae804c74..141bf5317 100644 --- a/tools/modelingTools/vmodelingsplinepath.h +++ b/tools/modelingTools/vmodelingsplinepath.h @@ -47,7 +47,7 @@ public slots: virtual void FullUpdateFromFile(); virtual void FullUpdateFromGui(int result); void ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, - const QPointF pos); + const QPointF &pos); protected: virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); virtual void AddToFile(); diff --git a/tools/nodeDetails/vnodearc.cpp b/tools/nodeDetails/vnodearc.cpp index 77b654b23..254247d58 100644 --- a/tools/nodeDetails/vnodearc.cpp +++ b/tools/nodeDetails/vnodearc.cpp @@ -39,7 +39,7 @@ VNodeArc::VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, } } -void VNodeArc::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, +void VNodeArc::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation) { if (parse == Document::FullParse) diff --git a/tools/nodeDetails/vnodearc.h b/tools/nodeDetails/vnodearc.h index eb419e858..a580113d8 100644 --- a/tools/nodeDetails/vnodearc.h +++ b/tools/nodeDetails/vnodearc.h @@ -31,8 +31,8 @@ class VNodeArc :public VAbstractNode, public QGraphicsPathItem public: VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); - static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, - Draw::Draws typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, const Draw::Draws &typeobject, + const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: diff --git a/tools/nodeDetails/vnodepoint.cpp b/tools/nodeDetails/vnodepoint.cpp index ddba6ebfd..734b0434e 100644 --- a/tools/nodeDetails/vnodepoint.cpp +++ b/tools/nodeDetails/vnodepoint.cpp @@ -44,7 +44,7 @@ VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 id } } -void VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, +void VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation) { if (parse == Document::FullParse) @@ -109,7 +109,7 @@ void VNodePoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) } -void VNodePoint::NameChangePosition(const QPointF pos) +void VNodePoint::NameChangePosition(const QPointF &pos) { VPointF point = VAbstractTool::data.GetModelingPoint(id); QPointF p = pos - this->pos(); diff --git a/tools/nodeDetails/vnodepoint.h b/tools/nodeDetails/vnodepoint.h index eb4dbda0a..162e1f036 100644 --- a/tools/nodeDetails/vnodepoint.h +++ b/tools/nodeDetails/vnodepoint.h @@ -31,13 +31,13 @@ class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem public: VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); - static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, + static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: virtual void FullUpdateFromFile(); - void NameChangePosition(const QPointF pos); + void NameChangePosition(const QPointF &pos); protected: qreal radius; VGraphicsSimpleTextItem *namePoint; diff --git a/tools/nodeDetails/vnodespline.cpp b/tools/nodeDetails/vnodespline.cpp index c78ebc5e6..53dcaa9b6 100644 --- a/tools/nodeDetails/vnodespline.cpp +++ b/tools/nodeDetails/vnodespline.cpp @@ -40,7 +40,7 @@ VNodeSpline::VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 } VNodeSpline *VNodeSpline::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, const Document::Documents &parse, + const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation) { VNodeSpline *spl = 0; diff --git a/tools/nodeDetails/vnodespline.h b/tools/nodeDetails/vnodespline.h index bf7be5854..5e0f1cb7f 100644 --- a/tools/nodeDetails/vnodespline.h +++ b/tools/nodeDetails/vnodespline.h @@ -31,8 +31,9 @@ class VNodeSpline:public VAbstractNode, public QGraphicsPathItem public: VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); - static VNodeSpline *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, - const Document::Documents &parse, const Tool::Sources &typeCreation); + static VNodeSpline *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, + const Draw::Draws &typeobject, const Document::Documents &parse, + const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; public slots: diff --git a/tools/nodeDetails/vnodesplinepath.cpp b/tools/nodeDetails/vnodesplinepath.cpp index 985209598..a185cc4bd 100644 --- a/tools/nodeDetails/vnodesplinepath.cpp +++ b/tools/nodeDetails/vnodesplinepath.cpp @@ -25,7 +25,7 @@ const QString VNodeSplinePath::TagName = QStringLiteral("spline"); const QString VNodeSplinePath::ToolType = QStringLiteral("modelingPath"); VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent) + Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent) :VAbstractNode(doc, data, id, idSpline, typeobject), QGraphicsPathItem(parent) { RefreshGeometry(); @@ -40,7 +40,8 @@ VNodeSplinePath::VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, } void VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, - Draw::Draws typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation) + const Draw::Draws &typeobject, const Document::Documents &parse, + const Tool::Sources &typeCreation) { if (parse == Document::FullParse) { diff --git a/tools/nodeDetails/vnodesplinepath.h b/tools/nodeDetails/vnodesplinepath.h index e2fa1dbea..596701428 100644 --- a/tools/nodeDetails/vnodesplinepath.h +++ b/tools/nodeDetails/vnodesplinepath.h @@ -31,7 +31,7 @@ class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem public: VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); - static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, + static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; diff --git a/tools/vtooldetail.cpp b/tools/vtooldetail.cpp index 7d8983511..419224977 100644 --- a/tools/vtooldetail.cpp +++ b/tools/vtooldetail.cpp @@ -40,7 +40,7 @@ VToolDetail::VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, sceneDetails(scene) { VDetail detail = data->GetDetail(id); - for (qint32 i = 0; i< detail.CountNode(); ++i) + for (ptrdiff_t i = 0; i< detail.CountNode(); ++i) { switch (detail[i].getTypeTool()) { @@ -127,7 +127,7 @@ void VToolDetail::Create(QSharedPointer &dialog, VMainGraphicsScen { VDetail detail = dialog->getDetails(); VDetail det; - for (qint32 i = 0; i< detail.CountNode(); ++i) + for (ptrdiff_t i = 0; i< detail.CountNode(); ++i) { qint64 id = 0; switch (detail[i].getTypeTool()) @@ -252,7 +252,7 @@ void VToolDetail::FullUpdateFromGui(int result) domElement.setAttribute(AttrClosed, QString().setNum(det.getClosed())); domElement.setAttribute(AttrWidth, QString().setNum(det.getWidth())); RemoveAllChild(domElement); - for (qint32 i = 0; i < det.CountNode(); ++i) + for (ptrdiff_t i = 0; i < det.CountNode(); ++i) { AddNode(domElement, det[i]); } @@ -275,7 +275,7 @@ void VToolDetail::AddToFile() AddAttribute(domElement, AttrClosed, detail.getClosed()); AddAttribute(domElement, AttrWidth, detail.getWidth()); - for (qint32 i = 0; i < detail.CountNode(); ++i) + for (ptrdiff_t i = 0; i < detail.CountNode(); ++i) { AddNode(domElement, detail[i]); } @@ -371,7 +371,7 @@ void VToolDetail::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) void VToolDetail::RemoveReferens() { VDetail detail = VAbstractTool::data.GetDetail(id); - for (qint32 i = 0; i< detail.CountNode(); ++i) + for (ptrdiff_t i = 0; i< detail.CountNode(); ++i) { doc->DecrementReferens(detail[i].getId()); } diff --git a/widgets/vtablegraphicsview.cpp b/widgets/vtablegraphicsview.cpp index c6716255e..8bc74f639 100644 --- a/widgets/vtablegraphicsview.cpp +++ b/widgets/vtablegraphicsview.cpp @@ -50,9 +50,11 @@ void VTableGraphicsView::MirrorItem() { for ( qint32 i = 0; i < list.count(); ++i ) { - QRectF itemRectOld = list.at(i)->sceneBoundingRect(); + QGraphicsItem *item = list.at(i); + Q_ASSERT(item != 0); + QRectF itemRectOld = item->sceneBoundingRect(); //Get the current transform - QTransform transform(list.at(i)->transform()); + QTransform transform(item->transform()); qreal m11 = transform.m11(); // Horizontal scaling qreal m12 = transform.m12(); // Vertical shearing @@ -71,12 +73,12 @@ void VTableGraphicsView::MirrorItem() transform.setMatrix(m11, m12, m13, m21, m22, m23, m31, m32, m33); // Set the items transformation - list.at(i)->setTransform(transform); - QRectF itemRectNew = list.at(i)->sceneBoundingRect(); + item->setTransform(transform); + QRectF itemRectNew = item->sceneBoundingRect(); qreal dx, dy; dx = itemRectOld.center().x()-itemRectNew.center().x(); dy = itemRectOld.center().y()-itemRectNew.center().y(); - list.at(i)->moveBy(dx, dy); + item->moveBy(dx, dy); } } } @@ -154,8 +156,10 @@ void VTableGraphicsView::rotateIt() { for ( qint32 i = 0; i < list.count(); ++i ) { - list.at(i)->setTransformOriginPoint(list.at(i)->boundingRect().center()); - list.at(i)->setRotation(list.at(i)->rotation() + 180); + QGraphicsItem *item = list.at(i); + Q_ASSERT(item != 0); + item->setTransformOriginPoint(item->boundingRect().center()); + item->setRotation(item->rotation() + 180); } } } From 3c12ffaccadac194811b8c8c30b018888ce200ef Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 7 Nov 2013 16:44:55 +0200 Subject: [PATCH 15/56] Code style error. --HG-- branch : develop --- exception/vexception.h | 2 +- tools/drawTools/vtoolbisector.h | 3 ++- tools/drawTools/vtoolshoulderpoint.h | 3 ++- tools/modelingTools/vmodelingarc.cpp | 6 +++--- tools/modelingTools/vmodelingbisector.h | 3 ++- tools/modelingTools/vmodelingline.h | 3 ++- tools/modelingTools/vmodelinglineintersect.h | 3 ++- tools/modelingTools/vmodelingpointofcontact.h | 3 ++- tools/modelingTools/vmodelingspline.cpp | 3 ++- tools/modelingTools/vmodelingspline.h | 4 ++-- tools/modelingTools/vmodelingsplinepath.cpp | 4 ++-- tools/modelingTools/vmodelingsplinepath.h | 3 ++- 12 files changed, 24 insertions(+), 16 deletions(-) diff --git a/exception/vexception.h b/exception/vexception.h index 94b064d21..5a68cbad7 100644 --- a/exception/vexception.h +++ b/exception/vexception.h @@ -29,7 +29,7 @@ class VException : public QException { public: VException(const QString &what); - VException(const VException &e):what(e.What()){} + VException(const VException &e):what(e.What()){} virtual ~VException() Q_DECL_NOEXCEPT_EXPR(true){} inline void raise() const { throw *this; } inline VException *clone() const { return new VException(*this); } diff --git a/tools/drawTools/vtoolbisector.h b/tools/drawTools/vtoolbisector.h index 396affed0..1b6fc5077 100644 --- a/tools/drawTools/vtoolbisector.h +++ b/tools/drawTools/vtoolbisector.h @@ -30,7 +30,8 @@ class VToolBisector : public VToolLinePoint public: VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, - const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + const qint64 &thirdPointId, const Tool::Sources &typeCreation, + QGraphicsItem * parent = 0); static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint, const qreal& length); virtual void setDialog(); diff --git a/tools/drawTools/vtoolshoulderpoint.h b/tools/drawTools/vtoolshoulderpoint.h index f67bcbf49..71a2c30b3 100644 --- a/tools/drawTools/vtoolshoulderpoint.h +++ b/tools/drawTools/vtoolshoulderpoint.h @@ -30,7 +30,8 @@ class VToolShoulderPoint : public VToolLinePoint public: VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, - const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + const qint64 &pShoulder, const Tool::Sources &typeCreation, + QGraphicsItem * parent = 0); virtual void setDialog(); static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder, const qreal &length); diff --git a/tools/modelingTools/vmodelingarc.cpp b/tools/modelingTools/vmodelingarc.cpp index 7a8e9c8d5..f1ca4c913 100644 --- a/tools/modelingTools/vmodelingarc.cpp +++ b/tools/modelingTools/vmodelingarc.cpp @@ -59,9 +59,9 @@ VModelingArc* VModelingArc::Create(QSharedPointer &dialog, VDomDocume return Create(0, center, radius, f1, f2, doc, data, Document::FullParse, Tool::FromGui); } -VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius, - const QString &f1, const QString &f2, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) +VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, + const QString &f2, VDomDocument *doc, VContainer *data, + const Document::Documents &parse, const Tool::Sources &typeCreation) { VModelingArc *toolArc = 0; qreal calcRadius = 0, calcF1 = 0, calcF2 = 0; diff --git a/tools/modelingTools/vmodelingbisector.h b/tools/modelingTools/vmodelingbisector.h index d29840403..ed454812c 100644 --- a/tools/modelingTools/vmodelingbisector.h +++ b/tools/modelingTools/vmodelingbisector.h @@ -39,7 +39,8 @@ public: static VModelingBisector* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + VContainer *data, const Document::Documents &parse, + const Tool::Sources &typeCreation); static const QString ToolType; public slots: virtual void FullUpdateFromFile(); diff --git a/tools/modelingTools/vmodelingline.h b/tools/modelingTools/vmodelingline.h index 272dcbe68..0d7cb96ef 100644 --- a/tools/modelingTools/vmodelingline.h +++ b/tools/modelingTools/vmodelingline.h @@ -31,7 +31,8 @@ class VModelingLine: public VModelingTool, public QGraphicsLineItem Q_OBJECT public: VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, - qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + qint64 secondPoint, const Tool::Sources &typeCreation, + QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingLine* Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, diff --git a/tools/modelingTools/vmodelinglineintersect.h b/tools/modelingTools/vmodelinglineintersect.h index 12b55cf83..93282c731 100644 --- a/tools/modelingTools/vmodelinglineintersect.h +++ b/tools/modelingTools/vmodelinglineintersect.h @@ -32,7 +32,8 @@ public: VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, - const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, + QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingLineIntersect* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/tools/modelingTools/vmodelingpointofcontact.h index a6a965cde..50fd4eb1f 100644 --- a/tools/modelingTools/vmodelingpointofcontact.h +++ b/tools/modelingTools/vmodelingpointofcontact.h @@ -32,7 +32,8 @@ public: VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, - const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + const Tool::Sources &typeCreation, + QGraphicsItem * parent = 0); virtual void setDialog(); static VModelingPointOfContact* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index d1ffd0640..5806b5fc2 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -91,7 +91,8 @@ VModelingSpline *VModelingSpline::Create(QSharedPointer &dialog, V VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation) + VContainer *data, const Document::Documents &parse, + const Tool::Sources &typeCreation) { VModelingSpline *spl = 0; VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve); diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index 04d07348c..0b69d5dcf 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -32,8 +32,8 @@ class VModelingSpline:public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: - VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, - QGraphicsItem * parent = 0 ); + VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, + const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); virtual void setDialog(); static VModelingSpline* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingSpline* Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/tools/modelingTools/vmodelingsplinepath.cpp index c91e3bbc7..975b8acd8 100644 --- a/tools/modelingTools/vmodelingsplinepath.cpp +++ b/tools/modelingTools/vmodelingsplinepath.cpp @@ -24,8 +24,8 @@ const QString VModelingSplinePath::TagName = QStringLiteral("spline"); const QString VModelingSplinePath::ToolType = QStringLiteral("path"); -VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, - QGraphicsItem *parent) +VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, + const Tool::Sources &typeCreation, QGraphicsItem *parent) :VModelingTool(doc, data, id), QGraphicsPathItem(parent), dialogSplinePath(QSharedPointer()), controlPoints(QVector()) { diff --git a/tools/modelingTools/vmodelingsplinepath.h b/tools/modelingTools/vmodelingsplinepath.h index 141bf5317..a93925bb2 100644 --- a/tools/modelingTools/vmodelingsplinepath.h +++ b/tools/modelingTools/vmodelingsplinepath.h @@ -36,7 +36,8 @@ public: virtual void setDialog(); static VModelingSplinePath* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); static VModelingSplinePath* Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc, - VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + VContainer *data, const Document::Documents &parse, + const Tool::Sources &typeCreation); static const QString TagName; static const QString ToolType; signals: From 8aea1ee3f3c1918e8c52def25523ac54ed47aeda Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 12 Nov 2013 14:48:45 +0200 Subject: [PATCH 16/56] Arc, spline, spline path store their name by yourself. --HG-- branch : develop --- Valentina.pro | 2 +- dialogs/dialogdetail.cpp | 4 ++-- dialogs/dialogsplinepath.cpp | 1 + geometry/varc.cpp | 21 ++++++++++++++++----- geometry/varc.h | 8 ++++++++ geometry/vspline.cpp | 11 +++++++---- geometry/vspline.h | 5 +++++ geometry/vsplinepath.cpp | 18 +++++++++++++++--- geometry/vsplinepath.h | 4 +++- tablewindow.cpp | 3 +++ 10 files changed, 61 insertions(+), 16 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index 5b88224a5..229bd92d1 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -78,7 +78,7 @@ CONFIG(debug, debug|release){ -isystem "/usr/include/qt5/QtCore" -isystem "$$OUT_PWD/uic" -isystem "$$OUT_PWD/moc/" \ -Og -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \ -Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self \ - -Wunreachable-code + -Wunreachable-code -gdwarf-3 }else{ # Release TARGET = $$RELEASE_TARGET diff --git a/dialogs/dialogdetail.cpp b/dialogs/dialogdetail.cpp index 91d339552..106ac5cba 100644 --- a/dialogs/dialogdetail.cpp +++ b/dialogs/dialogdetail.cpp @@ -131,7 +131,7 @@ void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::D { arc = data->GetModelingArc(id); } - name = data->GetNameArc(arc.GetCenter(), id, mode); + name = arc.name(); break; } case (Tool::NodeSpline): @@ -159,7 +159,7 @@ void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::D { splPath = data->GetModelingSplinePath(id); } - name = data->GetNameSplinePath(splPath, mode); + name = splPath.name(); break; } default: diff --git a/dialogs/dialogsplinepath.cpp b/dialogs/dialogsplinepath.cpp index 76efb8bd8..132e12179 100644 --- a/dialogs/dialogsplinepath.cpp +++ b/dialogs/dialogsplinepath.cpp @@ -101,6 +101,7 @@ void DialogSplinePath::DialogAccepted() path.append( qvariant_cast(item->data(Qt::UserRole))); } path.setKCurve(ui->doubleSpinBoxKcurve->value()); + path.setName(data->GetNameSplinePath(path, mode)); emit ToolTip(""); emit DialogClosed(QDialog::Accepted); } diff --git a/geometry/varc.cpp b/geometry/varc.cpp index d7f5ef860..dff1f8840 100644 --- a/geometry/varc.cpp +++ b/geometry/varc.cpp @@ -22,20 +22,25 @@ #include "varc.h" #include "../exception/vexception.h" +class QRectF; + VArc::VArc () : f1(0), formulaF1(QString()), f2(0), formulaF2(QString()), radius(0), formulaRadius(QString()), - center(0), points(QHash()), mode(Draw::Calculation), idObject(0){} + center(0), points(QHash()), mode(Draw::Calculation), idObject(0), _name(QString()){} VArc::VArc (const QHash *points, qint64 center, qreal radius, QString formulaRadius, qreal f1, QString formulaF1, qreal f2, QString formulaF2, Draw::Draws mode, qint64 idObject) : f1(f1), formulaF1(formulaF1), f2(f2), formulaF2(formulaF2), radius(radius), formulaRadius(formulaRadius), - center(center), points(*points), mode(mode), idObject(idObject){} + center(center), points(*points), mode(mode), idObject(idObject), _name(QString()) +{ + _name = QString ("Arc_%1_%2").arg(this->GetCenterVPoint().name()).arg(radius); +} VArc::VArc(const VArc &arc) : f1(arc.GetF1()), formulaF1(arc.GetFormulaF1()), f2(arc.GetF2()), formulaF2(arc.GetFormulaF2()), radius(arc.GetRadius()), formulaRadius(arc.GetFormulaRadius()), center(arc.GetCenter()), points(arc.GetDataPoints()), mode(arc.getMode()), - idObject(arc.getIdObject()){} + idObject(arc.getIdObject()), _name(arc.name()){} VArc &VArc::operator =(const VArc &arc) { @@ -49,21 +54,27 @@ VArc &VArc::operator =(const VArc &arc) this->center = arc.GetCenter(); this->mode = arc.getMode(); this->idObject = arc.getIdObject(); + this->_name = arc.name(); return *this; } QPointF VArc::GetCenterPoint() const +{ + return GetCenterVPoint().toQPointF(); +} + +VPointF VArc::GetCenterVPoint() const { if (points.contains(center)) { - return points.value(center).toQPointF(); + return points.value(center); } else { QString error = QString(tr("Can't find id = %1 in table.")).arg(center); throw VException(error); } - return QPointF(); + return VPointF(); } QPointF VArc::GetP1() const diff --git a/geometry/varc.h b/geometry/varc.h index 6f4b4771b..5c658b453 100644 --- a/geometry/varc.h +++ b/geometry/varc.h @@ -23,6 +23,10 @@ #define VARC_H #include "vspline.h" +class QString; +class QLineF; +class QPainterPath; +class QPointF; /** * @brief VArc клас, що реалізує дугу. Дуга розраховується за годиниковою стрілкою. @@ -76,6 +80,7 @@ public: */ inline qint64 GetCenter () const {return center;} QPointF GetCenterPoint() const; + VPointF GetCenterVPoint() const; /** * @brief GetP1 повертає першу точку з якої починається дуга. * @return точку початку дуги. @@ -100,6 +105,8 @@ public: inline void setMode(const Draw::Draws &value) {mode = value;} inline qint64 getIdObject() const {return idObject;} inline void setIdObject(const qint64 &value) {idObject = value;} + QString name() const {return _name;} + void setName(const QString &name) {_name = name;} private: /** * @brief f1 початковий кут в градусах @@ -123,6 +130,7 @@ private: QHash points; Draw::Draws mode; qint64 idObject; + QString _name; }; #endif // VARC_H diff --git a/geometry/vspline.cpp b/geometry/vspline.cpp index 25b56b8db..2b6c19c6e 100644 --- a/geometry/vspline.cpp +++ b/geometry/vspline.cpp @@ -23,26 +23,28 @@ VSpline::VSpline() :p1(0), p2(QPointF()), p3(QPointF()), p4(0), angle1(0), angle2(0), kAsm1(1), kAsm2(1), kCurve(1), - points(QHash()), mode(Draw::Calculation), idObject(0){} + points(QHash()), mode(Draw::Calculation), idObject(0), _name(QString()){} VSpline::VSpline ( const VSpline & spline ) :p1(spline.GetP1 ()), p2(spline.GetP2 ()), p3(spline.GetP3 ()), p4(spline.GetP4 ()), angle1(spline.GetAngle1 ()), angle2(spline.GetAngle2 ()), kAsm1(spline.GetKasm1()), kAsm2(spline.GetKasm2()), kCurve(spline.GetKcurve()), - points(spline.GetDataPoints()), mode(spline.getMode()), idObject(spline.getIdObject()){} + points(spline.GetDataPoints()), mode(spline.getMode()), idObject(spline.getIdObject()), _name(spline.name()){} VSpline::VSpline (const QHash *points, qint64 p1, qint64 p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve, Draw::Draws mode, qint64 idObject) :p1(p1), p2(QPointF()), p3(QPointF()), p4(p4), angle1(angle1), angle2(angle2), kAsm1(kAsm1), kAsm2(kAsm2), - kCurve(kCurve), points(*points), mode(mode), idObject(idObject) + kCurve(kCurve), points(*points), mode(mode), idObject(idObject), _name(QString()) { + _name = QString("Spl_%1_%2").arg(this->GetPointP1().name(), this->GetPointP4().name()); ModifiSpl ( p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve ); } VSpline::VSpline (const QHash *points, qint64 p1, QPointF p2, QPointF p3, qint64 p4, qreal kCurve, Draw::Draws mode, qint64 idObject) :p1(p1), p2(p2), p3(p3), p4(p4), angle1(0), angle2(0), kAsm1(1), kAsm2(1), kCurve(1), points(*points), mode(mode), - idObject(idObject) + idObject(idObject), _name(QString()) { + _name = QString("Spl_%1_%2").arg(this->GetPointP1().name(), this->GetPointP4().name()); ModifiSpl ( p1, p2, p3, p4, kCurve); } @@ -778,5 +780,6 @@ VSpline &VSpline::operator =(const VSpline &spline) this->points = spline.GetDataPoints(); this->mode = spline.getMode(); this->idObject = spline.getIdObject(); + this->_name = spline.name(); return *this; } diff --git a/geometry/vspline.h b/geometry/vspline.h index a8245de01..874a3d765 100644 --- a/geometry/vspline.h +++ b/geometry/vspline.h @@ -24,6 +24,8 @@ #include "../container/vpointf.h" +class QString; + #define M_2PI 6.28318530717958647692528676655900576 /** @@ -184,6 +186,8 @@ public: inline qint64 getIdObject() const {return idObject;} inline void setIdObject(const qint64 &value) {idObject = value;} VSpline &operator=(const VSpline &spl); + QString name() const {return _name;} + void setName(const QString &name) {_name = name;} protected: /** * @brief GetPoints повертає точки з яких складається сплайн. @@ -225,6 +229,7 @@ private: QHash points; Draw::Draws mode; qint64 idObject; + QString _name; /** * @brief LengthBezier повертає дожину сплайну за його чотирьма точками. * @param p1 початкова точка сплайну. diff --git a/geometry/vsplinepath.cpp b/geometry/vsplinepath.cpp index df3baad54..3f7af17d5 100644 --- a/geometry/vsplinepath.cpp +++ b/geometry/vsplinepath.cpp @@ -23,18 +23,29 @@ #include "../exception/vexception.h" VSplinePath::VSplinePath() - : path(QVector()), kCurve(1), mode(Draw::Calculation), points(QHash()), idObject(0){} + : path(QVector()), kCurve(1), mode(Draw::Calculation), points(QHash()), idObject(0), + _name(QString()){} VSplinePath::VSplinePath(const QHash *points, qreal kCurve, Draw::Draws mode, qint64 idObject) - : path(QVector()), kCurve(kCurve), mode(mode), points(*points), idObject(idObject){} + : path(QVector()), kCurve(kCurve), mode(mode), points(*points), idObject(idObject), _name(QString()) +{} VSplinePath::VSplinePath(const VSplinePath &splPath) : path(*splPath.GetPoint()), kCurve(splPath.getKCurve()), mode(splPath.getMode()), points(splPath.GetDataPoints()), - idObject(splPath.getIdObject()){} + idObject(splPath.getIdObject()), _name(splPath.name()){} void VSplinePath::append(const VSplinePoint &point) { path.append(point); + _name = QString("SplPath"); + for (qint32 i = 1; i <= this->Count(); ++i) + { + VSpline spl = this->GetSpline(i); + VPointF first = spl.GetPointP1(); + VPointF second = spl.GetPointP4(); + QString splName = QString("_%1_%2").arg(first.name(), second.name()); + _name.append(splName); + } } qint32 VSplinePath::Count() const @@ -143,6 +154,7 @@ VSplinePath &VSplinePath::operator =(const VSplinePath &path) this->mode = path.getMode(); this->points = path.GetDataPoints(); this->idObject = path.getIdObject(); + this->_name = path.name(); return *this; } diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index 412afb317..60657783d 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -80,7 +80,8 @@ public: inline qint64 getIdObject() const {return idObject;} inline void setIdObject(const qint64 &value) {idObject = value;} - + QString name() const {return _name;} + void setName(const QString &name) {_name = name;} protected: /** * @brief path вектор з точок сплайна. @@ -90,6 +91,7 @@ protected: Draw::Draws mode; QHash points; qint64 idObject; + QString _name; }; #endif // VSPLINEPATH_H diff --git a/tablewindow.cpp b/tablewindow.cpp index d597590ff..a704e91e3 100644 --- a/tablewindow.cpp +++ b/tablewindow.cpp @@ -23,6 +23,7 @@ #include "ui_tablewindow.h" #include "widgets/vtablegraphicsview.h" #include "options.h" +#include TableWindow::TableWindow(QWidget *parent) :QMainWindow(parent), numberDetal(0), colission(0), ui(new Ui::TableWindow), @@ -375,6 +376,8 @@ void TableWindow::SvgFile(const QString &name) const generator.setTitle(tr("SVG Generator Example Drawing")); generator.setDescription(tr("An SVG drawing created by the SVG Generator " "Example provided with Qt.")); + generator.setResolution(PrintDPI); + qDebug()<<"resolution is" << generator.resolution(); QPainter painter; painter.begin(&generator); painter.setFont( QFont( "Arial", 8, QFont::Normal ) ); From 2621e7064519a186de76e6bd68811ed4e732314b Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 12 Nov 2013 15:04:18 +0200 Subject: [PATCH 17/56] VContainer no more create names of VArc, VSpline and VSplinePath. --HG-- branch : develop --- container/vcontainer.cpp | 63 +-------------------- container/vcontainer.h | 8 +-- dialogs/dialogsplinepath.cpp | 1 - tools/drawTools/vtoolarc.cpp | 4 +- tools/drawTools/vtoolspline.cpp | 4 +- tools/drawTools/vtoolsplinepath.cpp | 4 +- tools/modelingTools/vmodelingarc.cpp | 2 +- tools/modelingTools/vmodelingspline.cpp | 2 +- tools/modelingTools/vmodelingsplinepath.cpp | 2 +- 9 files changed, 12 insertions(+), 78 deletions(-) diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 5a50e0d95..eee1923cc 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -511,9 +511,9 @@ void VContainer::AddLengthSpline(const QString &name, const qreal &value) lengthSplines[name] = value; } -void VContainer::AddLengthArc(const qint64 ¢er, const qint64 &id) +void VContainer::AddLengthArc(const qint64 &id) { - AddLengthArc(GetNameArc(center, id), toMM(GetArc(id).GetLength())); + AddLengthArc(GetArc(id).name(), toMM(GetArc(id).GetLength())); } void VContainer::AddLengthArc(const QString &name, const qreal &value) @@ -705,65 +705,6 @@ QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &sec return QString("AngleLine_%1_%2").arg(first.name(), second.name()); } -QString VContainer::GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode) const -{ - VPointF first; - VPointF second; - if (mode == Draw::Calculation) - { - first = GetPoint(firstPoint); - second = GetPoint(secondPoint); - } - else - { - first = GetModelingPoint(firstPoint); - second = GetModelingPoint(secondPoint); - } - return QString("Spl_%1_%2").arg(first.name(), second.name()); -} - -QString VContainer::GetNameSplinePath(const VSplinePath &path, const Draw::Draws &mode) const -{ - if (path.Count() == 0) - { - return QString(); - } - QString name("SplPath"); - for (qint32 i = 1; i <= path.Count(); ++i) - { - VSpline spl = path.GetSpline(i); - VPointF first; - VPointF second; - if (mode == Draw::Calculation) - { - first = GetPoint(spl.GetP1()); - second = GetPoint(spl.GetP4()); - } - else - { - first = GetModelingPoint(spl.GetP1()); - second = GetModelingPoint(spl.GetP4()); - } - QString splName = QString("_%1_%2").arg(first.name(), second.name()); - name.append(splName); - } - return name; -} - -QString VContainer::GetNameArc(const qint64 ¢er, const qint64 &id, const Draw::Draws &mode) const -{ - VPointF centerPoint; - if (mode == Draw::Calculation) - { - centerPoint = GetPoint(center); - } - else - { - centerPoint = GetModelingPoint(center); - } - return QString ("Arc_%1_%2").arg(centerPoint.name()).arg(id); -} - void VContainer::UpdatePoint(qint64 id, const VPointF &point) { UpdateObject(points, id, point); diff --git a/container/vcontainer.h b/container/vcontainer.h index 1173fbc23..7e135f4c8 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -73,7 +73,7 @@ public: {incrementTable[name] = cell;} void AddLengthLine(const QString &name, const qreal &value); void AddLengthSpline(const QString &name, const qreal &value); - void AddLengthArc(const qint64 ¢er, const qint64 &id); + void AddLengthArc(const qint64 &id); void AddLengthArc(const QString &name, const qreal &value); void AddLineAngle(const QString &name, const qreal &value); void AddLine(const qint64 &firstPointId, const qint64 &secondPointId, @@ -88,12 +88,6 @@ public: const Draw::Draws &mode = Draw::Calculation) const; QString GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode = Draw::Calculation) const; - QString GetNameSpline(const qint64 &firstPoint, const qint64 &secondPoint, - const Draw::Draws &mode = Draw::Calculation) const; - QString GetNameSplinePath(const VSplinePath &path, - const Draw::Draws &mode = Draw::Calculation) const; - QString GetNameArc(const qint64 ¢er, const qint64 &id, - const Draw::Draws &mode = Draw::Calculation) const; void UpdatePoint(qint64 id, const VPointF& point); void UpdateModelingPoint(qint64 id, const VPointF& point); void UpdateDetail(qint64 id, const VDetail& detail); diff --git a/dialogs/dialogsplinepath.cpp b/dialogs/dialogsplinepath.cpp index 132e12179..76efb8bd8 100644 --- a/dialogs/dialogsplinepath.cpp +++ b/dialogs/dialogsplinepath.cpp @@ -101,7 +101,6 @@ void DialogSplinePath::DialogAccepted() path.append( qvariant_cast(item->data(Qt::UserRole))); } path.setKCurve(ui->doubleSpinBoxKcurve->value()); - path.setName(data->GetNameSplinePath(path, mode)); emit ToolTip(""); emit DialogClosed(QDialog::Accepted); } diff --git a/tools/drawTools/vtoolarc.cpp b/tools/drawTools/vtoolarc.cpp index 1e3940aa9..6d249cf06 100644 --- a/tools/drawTools/vtoolarc.cpp +++ b/tools/drawTools/vtoolarc.cpp @@ -97,12 +97,12 @@ void VToolArc::Create(const qint64 _id, const qint64 ¢er, const QString &rad if (typeCreation == Tool::FromGui) { id = data->AddArc(arc); - data->AddLengthArc(data->GetNameArc(center, id), toMM(arc.GetLength())); + data->AddLengthArc(arc.name(), toMM(arc.GetLength())); } else { data->UpdateArc(id, arc); - data->AddLengthArc(data->GetNameArc(center, id), toMM(arc.GetLength())); + data->AddLengthArc(arc.name(), toMM(arc.GetLength())); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); diff --git a/tools/drawTools/vtoolspline.cpp b/tools/drawTools/vtoolspline.cpp index c2324bbe3..65b3c4f7a 100644 --- a/tools/drawTools/vtoolspline.cpp +++ b/tools/drawTools/vtoolspline.cpp @@ -100,12 +100,12 @@ void VToolSpline::Create(const qint64 _id, const qint64 &p1, const qint64 &p4, c if (typeCreation == Tool::FromGui) { id = data->AddSpline(spline); - data->AddLengthSpline(data->GetNameSpline(p1, p4), toMM(spline.GetLength())); + data->AddLengthSpline(spline.name(), toMM(spline.GetLength())); } else { data->UpdateSpline(id, spline); - data->AddLengthSpline(data->GetNameSpline(p1, p4), toMM(spline.GetLength())); + data->AddLengthSpline(spline.name(), toMM(spline.GetLength())); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); diff --git a/tools/drawTools/vtoolsplinepath.cpp b/tools/drawTools/vtoolsplinepath.cpp index 230b9a696..1fc91c843 100644 --- a/tools/drawTools/vtoolsplinepath.cpp +++ b/tools/drawTools/vtoolsplinepath.cpp @@ -90,12 +90,12 @@ void VToolSplinePath::Create(const qint64 _id, const VSplinePath &path, VMainGra if (typeCreation == Tool::FromGui) { id = data->AddSplinePath(path); - data->AddLengthSpline(data->GetNameSplinePath(path), toMM(path.GetLength())); + data->AddLengthSpline(path.name(), toMM(path.GetLength())); } else { data->UpdateSplinePath(id, path); - data->AddLengthSpline(data->GetNameSplinePath(path), toMM(path.GetLength())); + data->AddLengthSpline(path.name(), toMM(path.GetLength())); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); diff --git a/tools/modelingTools/vmodelingarc.cpp b/tools/modelingTools/vmodelingarc.cpp index f1ca4c913..6a64019a2 100644 --- a/tools/modelingTools/vmodelingarc.cpp +++ b/tools/modelingTools/vmodelingarc.cpp @@ -102,7 +102,7 @@ VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const doc->UpdateToolData(id, data); } } - data->AddLengthArc(data->GetNameArc(center, id, Draw::Modeling), toMM(arc.GetLength())); + data->AddLengthArc(arc.name(), toMM(arc.GetLength())); if (parse == Document::FullParse) { toolArc = new VModelingArc(doc, data, id, typeCreation); diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index 5806b5fc2..65ea14951 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -109,7 +109,7 @@ VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, con doc->UpdateToolData(id, data); } } - data->AddLengthSpline(data->GetNameSpline(p1, p4, Draw::Modeling), toMM(spline.GetLength())); + data->AddLengthSpline(spline.name(), toMM(spline.GetLength())); if (parse == Document::FullParse) { spl = new VModelingSpline(doc, data, id, typeCreation); diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/tools/modelingTools/vmodelingsplinepath.cpp index 975b8acd8..9706fbfd7 100644 --- a/tools/modelingTools/vmodelingsplinepath.cpp +++ b/tools/modelingTools/vmodelingsplinepath.cpp @@ -100,7 +100,7 @@ VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplin doc->UpdateToolData(id, data); } } - data->AddLengthSpline(data->GetNameSplinePath(path), toMM(path.GetLength())); + data->AddLengthSpline(path.name(), toMM(path.GetLength())); if (parse == Document::FullParse) { spl = new VModelingSplinePath(doc, data, id, typeCreation); From fab9fa4bfbba0bfaf2e2654308f94a7e15547e4c Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 12 Nov 2013 20:29:03 +0200 Subject: [PATCH 18/56] New gcc warnings. --HG-- branch : develop --- Valentina.pro | 9 ++++++++- container/calculator.cpp | 2 ++ container/vcontainer.cpp | 2 ++ dialogs/dialogheight.cpp | 2 ++ dialogs/dialogincrements.cpp | 2 ++ dialogs/dialogtriangle.cpp | 2 ++ geometry/vspline.cpp | 10 ++++++---- main.cpp | 2 ++ mainwindow.cpp | 2 ++ tablewindow.cpp | 4 ++-- tools/drawTools/vtoolpointofcontact.cpp | 2 +- tools/drawTools/vtoolshoulderpoint.cpp | 2 +- tools/drawTools/vtooltriangle.cpp | 6 +++--- widgets/vtablegraphicsview.cpp | 4 ++++ 14 files changed, 39 insertions(+), 12 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index 229bd92d1..13ee22a43 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -76,9 +76,16 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \ -isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \ -isystem "/usr/include/qt5/QtCore" -isystem "$$OUT_PWD/uic" -isystem "$$OUT_PWD/moc/" \ + -isystem "$$OUT_PWD/rcc/" \ -Og -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \ -Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self \ - -Wunreachable-code -gdwarf-3 + -Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \ + -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k\ + -Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-format-attribute \ + -Wmissing-include-dirs -Wpacked -Wredundant-decls \ + -Wswitch-default -Wswitch-enum -Wuninitialized -Wunused-parameter -Wvariadic-macros \ + -Wlogical-op -Wnoexcept \ + -Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3 }else{ # Release TARGET = $$RELEASE_TARGET diff --git a/container/calculator.cpp b/container/calculator.cpp index 1ba0a8477..b9667ae68 100644 --- a/container/calculator.cpp +++ b/container/calculator.cpp @@ -195,6 +195,8 @@ void Calculator::arith(QChar o, qreal *r, qreal *h) // for(t=*h-1; t>0; --t) // *r = (*r) * ex; break; + default: + break; } } diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index eee1923cc..5c7908b28 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -424,6 +424,8 @@ QVector VContainer::EkvPoint(const QLineF &line1, const QLineF &line2, points.append(bigLine1.p2()); return points; break; + default: + break; } return points; } diff --git a/dialogs/dialogheight.cpp b/dialogs/dialogheight.cpp index 5f3411532..10cb66285 100644 --- a/dialogs/dialogheight.cpp +++ b/dialogs/dialogheight.cpp @@ -125,6 +125,8 @@ void DialogHeight::ChoosedObject(qint64 id, const Scene::Scenes &type) this->show(); } break; + default: + break; } } } diff --git a/dialogs/dialogincrements.cpp b/dialogs/dialogincrements.cpp index 3a499d8f3..6066a09c9 100644 --- a/dialogs/dialogincrements.cpp +++ b/dialogs/dialogincrements.cpp @@ -499,6 +499,8 @@ void DialogIncrements::cellChanged ( qint32 row, qint32 column ) emit haveLiteChange(); } break; + default: + break; } } diff --git a/dialogs/dialogtriangle.cpp b/dialogs/dialogtriangle.cpp index 7e8a0015b..ad63163d5 100644 --- a/dialogs/dialogtriangle.cpp +++ b/dialogs/dialogtriangle.cpp @@ -100,6 +100,8 @@ void DialogTriangle::ChoosedObject(qint64 id, const Scene::Scenes &type) this->show(); } break; + default: + break; } } } diff --git a/geometry/vspline.cpp b/geometry/vspline.cpp index 2b6c19c6e..5e8d4c1d3 100644 --- a/geometry/vspline.cpp +++ b/geometry/vspline.cpp @@ -364,7 +364,7 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, // All collinear OR p1==p4 //---------------------- k = dx*dx + dy*dy; - if (k == 0) + if (k < 0.000000001) { d2 = CalcSqDistance(x1, y1, x2, y2); d3 = CalcSqDistance(x4, y4, x3, y3); @@ -468,7 +468,7 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, return; } - if (m_cusp_limit != 0.0) + if (m_cusp_limit > 0.0 || m_cusp_limit < 0.0) { if (da1 > m_cusp_limit) { @@ -517,7 +517,7 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, return; } - if (m_cusp_limit != 0.0) + if (m_cusp_limit > 0.0 || m_cusp_limit < 0.0) { if (da1 > m_cusp_limit) { @@ -573,7 +573,7 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, return; } - if (m_cusp_limit != 0.0) + if (m_cusp_limit > 0.0 || m_cusp_limit < 0.0) { if (da1 > m_cusp_limit) { @@ -591,6 +591,8 @@ void VSpline::PointBezier_r ( qreal x1, qreal y1, qreal x2, qreal y2, } } break; + default: + break; } // Continue subdivision diff --git a/main.cpp b/main.cpp index bc8d1598c..9e871793e 100644 --- a/main.cpp +++ b/main.cpp @@ -45,6 +45,8 @@ void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QS fprintf(stderr, "Fatal: %s (%s:%u, %s)\n", localMsg.constData(), context.file, context.line, context.function); abort(); + default: + break; } } diff --git a/mainwindow.cpp b/mainwindow.cpp index 21d895f9d..1ef3d6eba 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -775,6 +775,8 @@ void MainWindow::keyPressEvent ( QKeyEvent * event ) case Qt::Key_Escape: ArrowTool(); break; + default: + break; } QMainWindow::keyPressEvent ( event ); } diff --git a/tablewindow.cpp b/tablewindow.cpp index a704e91e3..655f6593d 100644 --- a/tablewindow.cpp +++ b/tablewindow.cpp @@ -330,7 +330,7 @@ void TableWindow::AddLength() void TableWindow::RemoveLength() { - if (sceneRect.height()<=currentScene->sceneRect().height()-100) + if (sceneRect.height() <= currentScene->sceneRect().height() - 100) { QRectF rect = currentScene->sceneRect(); rect.setHeight(rect.height()-toPixel(279)); @@ -341,7 +341,7 @@ void TableWindow::RemoveLength() rect = paper->rect(); rect.setHeight(rect.height()-toPixel(279)); paper->setRect(rect); - if (sceneRect.height()==currentScene->sceneRect().height()) + if (fabs(sceneRect.height() - currentScene->sceneRect().height()) < 0.01) { ui->actionRemove->setDisabled(true); } diff --git a/tools/drawTools/vtoolpointofcontact.cpp b/tools/drawTools/vtoolpointofcontact.cpp index b14f31e69..9a8cf807f 100644 --- a/tools/drawTools/vtoolpointofcontact.cpp +++ b/tools/drawTools/vtoolpointofcontact.cpp @@ -58,7 +58,7 @@ QPointF VToolPointOfContact::FindPoint(const qreal &radius, const QPointF ¢e s_x = secondPoint.x()-(qAbs(secondPoint.x()-firstPoint.x()))*s; s_y = secondPoint.y()-(qAbs(secondPoint.y()-firstPoint.y()))*s; distans = QLineF(center.x(), center.y(), s_x, s_y).length(); - if (ceil(distans*10) == ceil(radius*10)) + if (fabs(distans*10 - radius*10) < 0.1) { pArc.rx() = s_x; pArc.ry() = s_y; diff --git a/tools/drawTools/vtoolshoulderpoint.cpp b/tools/drawTools/vtoolshoulderpoint.cpp index 26e5d2762..ed7fd7bdf 100644 --- a/tools/drawTools/vtoolshoulderpoint.cpp +++ b/tools/drawTools/vtoolshoulderpoint.cpp @@ -59,7 +59,7 @@ QPointF VToolShoulderPoint::FindPoint(const QPointF &p1Line, const QPointF &p2Li qDebug()<<"A3П2="< listSelectedItems = scene()->selectedItems(); if (listSelectedItems.size()>0) From 63f9f621983ff324b3159fc9bd8f3d8103294cfb Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 13 Nov 2013 16:07:40 +0200 Subject: [PATCH 19/56] Wrong define of widthMainLine. In SVG file don't show paper only details. In png file paper stayed. --HG-- branch : develop --- options.h | 2 +- tablewindow.cpp | 31 +++++++++++++++---------------- widgets/vitem.cpp | 13 +++++++++++-- widgets/vitem.h | 9 +++++++-- 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/options.h b/options.h index bf2fbad48..8891d0d72 100644 --- a/options.h +++ b/options.h @@ -28,7 +28,7 @@ #define PaperSize 50000 #define toPixel(mm) ((mm / 25.4) * PrintDPI) #define toMM(pix) ((pix / PrintDPI) * 25.4) -#define widthMainLine toPixel(1.2) +#define widthMainLine 1.2 #define widthHairLine widthMainLine/3 namespace Scene diff --git a/tablewindow.cpp b/tablewindow.cpp index 655f6593d..69b22e5eb 100644 --- a/tablewindow.cpp +++ b/tablewindow.cpp @@ -72,7 +72,7 @@ void TableWindow::AddPaper() shadowPaper->setBrush(QBrush(Qt::black)); currentScene->addItem(shadowPaper); paper = new QGraphicsRectItem(QRectF(x1, y1, x2, y2)); - paper->setPen(QPen(Qt::black, toPixel(widthMainLine))); + paper->setPen(QPen(Qt::black, widthMainLine)); paper->setBrush(QBrush(Qt::white)); currentScene->addItem(paper); qDebug()<rect().size().toSize(); @@ -88,13 +88,14 @@ void TableWindow::AddDetail() QObject::connect(Detail, SIGNAL(itemColliding(QList, int)), this, SLOT(itemColliding(QList, int))); QObject::connect(this, SIGNAL(LengthChanged()), Detail, SLOT(LengthChanged())); - Detail->setPen(QPen(Qt::black, toPixel(widthMainLine))); + Detail->setPen(QPen(Qt::black, 1)); Detail->setBrush(QBrush(Qt::white)); Detail->setPos(paper->boundingRect().center()); Detail->setFlag(QGraphicsItem::ItemIsMovable, true); Detail->setFlag(QGraphicsItem::ItemIsSelectable, true); Detail->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); - Detail->setParentItem(paper); + Detail->setPaper(paper); + currentScene->addItem(Detail); Detail->setSelected(true); indexDetail++; if (indexDetail==listDetails.count()) @@ -160,27 +161,26 @@ void TableWindow::saveScene() brush->setColor( QColor( Qt::white ) ); currentScene->setBackgroundBrush( *brush ); currentScene->clearSelection(); // Selections would also render to the file - shadowPaper->setBrush(QBrush(Qt::white)); - shadowPaper->setPen(QPen(Qt::white, 0.1)); - paper->setPen(QPen(Qt::white, 0.1)); - paper->setBrush(QBrush(Qt::white)); - currentScene->setSceneRect(currentScene->itemsBoundingRect()); - + shadowPaper->setVisible(false); QFileInfo fi(name); if (fi.suffix() == "svg") { + paper->setVisible(false); SvgFile(name); + paper->setVisible(true); } else if (fi.suffix() == "png") { + paper->setPen(QPen(Qt::white, 0.1, Qt::NoPen)); PngFile(name); + paper->setPen(QPen(Qt::black, widthMainLine)); } brush->setColor( QColor( Qt::gray ) ); brush->setStyle( Qt::SolidPattern ); currentScene->setBackgroundBrush( *brush ); - paper->setPen(QPen(Qt::black, widthMainLine)); - shadowPaper->setBrush(QBrush(Qt::black)); + shadowPaper->setVisible(true); + delete brush; } void TableWindow::itemChect(bool flag) @@ -254,7 +254,7 @@ void TableWindow::itemColliding(QList list, int number) } else { - bitem->setPen(QPen(Qt::black, toPixel(widthMainLine))); + bitem->setPen(QPen(Qt::black, widthMainLine)); } listCollidingItems.removeAt(i); } @@ -269,7 +269,7 @@ void TableWindow::itemColliding(QList list, int number) } else { - bitem->setPen(QPen(Qt::black, toPixel(widthMainLine))); + bitem->setPen(QPen(Qt::black, widthMainLine)); } listCollidingItems.clear(); collidingItems = true; @@ -372,7 +372,6 @@ void TableWindow::SvgFile(const QString &name) const QSvgGenerator generator; generator.setFileName(name); generator.setSize(paper->rect().size().toSize()); - //generator.setViewBox(QRect(0, 0, 200, 200)); generator.setTitle(tr("SVG Generator Example Drawing")); generator.setDescription(tr("An SVG drawing created by the SVG Generator " "Example provided with Qt.")); @@ -382,7 +381,7 @@ void TableWindow::SvgFile(const QString &name) const painter.begin(&generator); painter.setFont( QFont( "Arial", 8, QFont::Normal ) ); painter.setRenderHint(QPainter::Antialiasing, true); - painter.setPen(QPen(Qt::black, widthMainLine, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + painter.setPen(QPen(Qt::black, 1.2, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); currentScene->render(&painter); painter.end(); @@ -399,7 +398,7 @@ void TableWindow::PngFile(const QString &name) const QPainter painter(&image); painter.setFont( QFont( "Arial", 8, QFont::Normal ) ); painter.setRenderHint(QPainter::Antialiasing, true); - painter.setPen(QPen(Qt::black, toPixel(widthMainLine), Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); + painter.setPen(QPen(Qt::black, widthMainLine, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin)); painter.setBrush ( QBrush ( Qt::NoBrush ) ); currentScene->render(&painter); image.save(name); diff --git a/widgets/vitem.cpp b/widgets/vitem.cpp index 963a693da..bfc184409 100644 --- a/widgets/vitem.cpp +++ b/widgets/vitem.cpp @@ -20,15 +20,24 @@ ****************************************************************************/ #include "vitem.h" +#include VItem::VItem (const QPainterPath & path, int numInList, QGraphicsItem * parent ) - :QGraphicsPathItem ( path, parent ), numInOutList(numInList) + :QGraphicsPathItem ( path, parent ), numInOutList(numInList), paper(0) { } void VItem::checkItemChange() { - QRectF rect = parentItem()->sceneBoundingRect(); + QRectF rect; + if(paper == 0){ + qDebug()<<"Don't set paper for detail!!!!"; + rect = this->scene()->sceneRect(); + } + else + { + rect = paper->sceneBoundingRect(); + } QRectF myrect = sceneBoundingRect(); if ( rect.contains( myrect )==true ) { diff --git a/widgets/vitem.h b/widgets/vitem.h index cff2136c8..868848ba7 100644 --- a/widgets/vitem.h +++ b/widgets/vitem.h @@ -36,14 +36,15 @@ public: * @brief VItem конструктор за замовчуванням *Конструктор генерує пусту деталь з номером в списку, що дорівнює 0. */ - VItem ():numInOutList(0){} + VItem ():numInOutList(0), paper(0){} /** * @brief VItem конструктор * @param numInList номер в списку деталей, що передається у вікно де *укладаються деталі. * @param parent батьківський об'єкт на сцені для даного. За замовчуванням немає. */ - VItem (int numInList, QGraphicsItem * parent = 0):QGraphicsPathItem (parent), numInOutList(numInList){} + VItem (int numInList, QGraphicsItem * parent = 0):QGraphicsPathItem (parent), numInOutList(numInList), + paper(0){} /** * @brief VItem конструктор * @param path зображення що буде показуватися на сцені - об’єкт класу QPainterPath. @@ -57,6 +58,8 @@ public: * @param angle кут в градусах на який повертається деталь. */ void Rotate ( qreal angle ); + QGraphicsRectItem *getPaper() const {return paper;} + void setPaper(QGraphicsRectItem *value) {paper = value;} public slots: /** * @brief LengthChanged слот який обробляє сигнал зміни довжини листа. @@ -82,11 +85,13 @@ protected: */ void checkItemChange (); private: + Q_DISABLE_COPY(VItem) /** * @brief numInOutList для зберігання інформації про колізії від кожної деталі необхідно знати її *номер. */ qint32 numInOutList; + QGraphicsRectItem* paper; signals: /** * @brief itemOut сигнал виходу за межі листа. Посилається у будь-якому випадку. From 4df358ce47d2f54d89c4f3d07fb810ac7c3ab645 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 15 Nov 2013 14:41:26 +0200 Subject: [PATCH 20/56] Change in license. --HG-- branch : develop --- container/calculator.cpp | 17 ++++-- container/calculator.h | 17 ++++-- container/vcontainer.cpp | 17 ++++-- container/vcontainer.h | 17 ++++-- container/vincrementtablerow.cpp | 17 ++++-- container/vincrementtablerow.h | 17 ++++-- container/vpointf.cpp | 17 ++++-- container/vpointf.h | 17 ++++-- container/vstandarttablecell.cpp | 17 ++++-- container/vstandarttablecell.h | 17 ++++-- dialogs/dialogalongline.cpp | 17 ++++-- dialogs/dialogalongline.h | 17 ++++-- dialogs/dialogarc.cpp | 17 ++++-- dialogs/dialogarc.h | 17 ++++-- dialogs/dialogbisector.cpp | 17 ++++-- dialogs/dialogbisector.h | 17 ++++-- dialogs/dialogdetail.cpp | 17 ++++-- dialogs/dialogdetail.h | 17 ++++-- dialogs/dialogendline.cpp | 17 ++++-- dialogs/dialogendline.h | 17 ++++-- dialogs/dialogheight.cpp | 17 ++++-- dialogs/dialogheight.h | 17 ++++-- dialogs/dialoghistory.cpp | 17 ++++-- dialogs/dialoghistory.h | 17 ++++-- dialogs/dialogincrements.cpp | 17 ++++-- dialogs/dialogincrements.h | 17 ++++-- dialogs/dialogline.cpp | 17 ++++-- dialogs/dialogline.h | 17 ++++-- dialogs/dialoglineintersect.cpp | 17 ++++-- dialogs/dialoglineintersect.h | 17 ++++-- dialogs/dialognormal.cpp | 17 ++++-- dialogs/dialognormal.h | 17 ++++-- dialogs/dialogpointofcontact.cpp | 17 ++++-- dialogs/dialogpointofcontact.h | 17 ++++-- dialogs/dialogpointofintersection.cpp | 17 ++++-- dialogs/dialogpointofintersection.h | 17 ++++-- dialogs/dialogs.h | 17 ++++-- dialogs/dialogshoulderpoint.cpp | 17 ++++-- dialogs/dialogshoulderpoint.h | 17 ++++-- dialogs/dialogsinglepoint.cpp | 17 ++++-- dialogs/dialogsinglepoint.h | 17 ++++-- dialogs/dialogspline.cpp | 17 ++++-- dialogs/dialogspline.h | 17 ++++-- dialogs/dialogsplinepath.cpp | 17 ++++-- dialogs/dialogsplinepath.h | 17 ++++-- dialogs/dialogtool.cpp | 17 ++++-- dialogs/dialogtool.h | 17 ++++-- dialogs/dialogtriangle.cpp | 17 ++++-- dialogs/dialogtriangle.h | 17 ++++-- exception/vexception.cpp | 17 ++++-- exception/vexception.h | 17 ++++-- exception/vexceptionbadid.cpp | 17 ++++-- exception/vexceptionbadid.h | 17 ++++-- exception/vexceptionconversionerror.cpp | 17 ++++-- exception/vexceptionconversionerror.h | 17 ++++-- exception/vexceptionemptyparameter.cpp | 17 ++++-- exception/vexceptionemptyparameter.h | 17 ++++-- exception/vexceptionobjecterror.cpp | 17 ++++-- exception/vexceptionobjecterror.h | 17 ++++-- exception/vexceptionuniqueid.cpp | 17 ++++-- exception/vexceptionuniqueid.h | 17 ++++-- exception/vexceptionwrongparameterid.cpp | 17 ++++-- exception/vexceptionwrongparameterid.h | 17 ++++-- geometry/varc.cpp | 17 ++++-- geometry/varc.h | 17 ++++-- geometry/vdetail.cpp | 17 ++++-- geometry/vdetail.h | 17 ++++-- geometry/vnodedetail.cpp | 17 ++++-- geometry/vnodedetail.h | 17 ++++-- geometry/vspline.cpp | 17 ++++-- geometry/vspline.h | 17 ++++-- geometry/vsplinepath.cpp | 17 ++++-- geometry/vsplinepath.h | 17 ++++-- geometry/vsplinepoint.cpp | 17 ++++-- geometry/vsplinepoint.h | 17 ++++-- main.cpp | 17 ++++-- mainwindow.cpp | 17 ++++-- mainwindow.h | 17 ++++-- options.h | 17 ++++-- stable.cpp | 17 ++++-- stable.h | 17 ++++-- tablewindow.cpp | 17 ++++-- tablewindow.h | 17 ++++-- tools/drawTools/drawtools.h | 17 ++++-- tools/drawTools/vdrawtool.cpp | 17 ++++-- tools/drawTools/vdrawtool.h | 17 ++++-- tools/drawTools/vtoolalongline.cpp | 17 ++++-- tools/drawTools/vtoolalongline.h | 17 ++++-- tools/drawTools/vtoolarc.cpp | 17 ++++-- tools/drawTools/vtoolarc.h | 17 ++++-- tools/drawTools/vtoolbisector.cpp | 17 ++++-- tools/drawTools/vtoolbisector.h | 17 ++++-- tools/drawTools/vtoolendline.cpp | 17 ++++-- tools/drawTools/vtoolendline.h | 17 ++++-- tools/drawTools/vtoolheight.cpp | 17 ++++-- tools/drawTools/vtoolheight.h | 17 ++++-- tools/drawTools/vtoolline.cpp | 17 ++++-- tools/drawTools/vtoolline.h | 17 ++++-- tools/drawTools/vtoollineintersect.cpp | 17 ++++-- tools/drawTools/vtoollineintersect.h | 17 ++++-- tools/drawTools/vtoollinepoint.cpp | 17 ++++-- tools/drawTools/vtoollinepoint.h | 17 ++++-- tools/drawTools/vtoolnormal.cpp | 17 ++++-- tools/drawTools/vtoolnormal.h | 17 ++++-- tools/drawTools/vtoolpoint.cpp | 17 ++++-- tools/drawTools/vtoolpoint.h | 17 ++++-- tools/drawTools/vtoolpointofcontact.cpp | 17 ++++-- tools/drawTools/vtoolpointofcontact.h | 17 ++++-- tools/drawTools/vtoolpointofintersection.cpp | 17 ++++-- tools/drawTools/vtoolpointofintersection.h | 17 ++++-- tools/drawTools/vtoolshoulderpoint.cpp | 17 ++++-- tools/drawTools/vtoolshoulderpoint.h | 17 ++++-- tools/drawTools/vtoolsinglepoint.cpp | 17 ++++-- tools/drawTools/vtoolsinglepoint.h | 17 ++++-- tools/drawTools/vtoolspline.cpp | 17 ++++-- tools/drawTools/vtoolspline.h | 17 ++++-- tools/drawTools/vtoolsplinepath.cpp | 17 ++++-- tools/drawTools/vtoolsplinepath.h | 17 ++++-- tools/drawTools/vtooltriangle.cpp | 17 ++++-- tools/drawTools/vtooltriangle.h | 17 ++++-- tools/modelingTools/modelingtools.h | 17 ++++-- tools/modelingTools/vmodelingalongline.cpp | 17 ++++-- tools/modelingTools/vmodelingalongline.h | 17 ++++-- tools/modelingTools/vmodelingarc.cpp | 17 ++++-- tools/modelingTools/vmodelingarc.h | 17 ++++-- tools/modelingTools/vmodelingbisector.cpp | 17 ++++-- tools/modelingTools/vmodelingbisector.h | 17 ++++-- tools/modelingTools/vmodelingendline.cpp | 17 ++++-- tools/modelingTools/vmodelingendline.h | 17 ++++-- tools/modelingTools/vmodelingheight.cpp | 17 ++++-- tools/modelingTools/vmodelingheight.h | 17 ++++-- tools/modelingTools/vmodelingline.cpp | 17 ++++-- tools/modelingTools/vmodelingline.h | 17 ++++-- .../modelingTools/vmodelinglineintersect.cpp | 17 ++++-- tools/modelingTools/vmodelinglineintersect.h | 17 ++++-- tools/modelingTools/vmodelinglinepoint.cpp | 17 ++++-- tools/modelingTools/vmodelinglinepoint.h | 17 ++++-- tools/modelingTools/vmodelingnormal.cpp | 17 ++++-- tools/modelingTools/vmodelingnormal.h | 17 ++++-- tools/modelingTools/vmodelingpoint.cpp | 17 ++++-- tools/modelingTools/vmodelingpoint.h | 17 ++++-- .../modelingTools/vmodelingpointofcontact.cpp | 17 ++++-- tools/modelingTools/vmodelingpointofcontact.h | 17 ++++-- .../vmodelingpointofintersection.cpp | 17 ++++-- .../vmodelingpointofintersection.h | 17 ++++-- .../modelingTools/vmodelingshoulderpoint.cpp | 17 ++++-- tools/modelingTools/vmodelingshoulderpoint.h | 17 ++++-- tools/modelingTools/vmodelingspline.cpp | 17 ++++-- tools/modelingTools/vmodelingspline.h | 17 ++++-- tools/modelingTools/vmodelingsplinepath.cpp | 17 ++++-- tools/modelingTools/vmodelingsplinepath.h | 17 ++++-- tools/modelingTools/vmodelingtool.cpp | 17 ++++-- tools/modelingTools/vmodelingtool.h | 17 ++++-- tools/modelingTools/vmodelingtriangle.cpp | 17 ++++-- tools/modelingTools/vmodelingtriangle.h | 17 ++++-- tools/nodeDetails/nodedetails.h | 17 ++++-- tools/nodeDetails/vabstractnode.cpp | 17 ++++-- tools/nodeDetails/vabstractnode.h | 17 ++++-- tools/nodeDetails/vnodearc.cpp | 17 ++++-- tools/nodeDetails/vnodearc.h | 17 ++++-- tools/nodeDetails/vnodepoint.cpp | 17 ++++-- tools/nodeDetails/vnodepoint.h | 17 ++++-- tools/nodeDetails/vnodespline.cpp | 17 ++++-- tools/nodeDetails/vnodespline.h | 17 ++++-- tools/nodeDetails/vnodesplinepath.cpp | 17 ++++-- tools/nodeDetails/vnodesplinepath.h | 17 ++++-- tools/tools.h | 17 ++++-- tools/vabstracttool.cpp | 17 ++++-- tools/vabstracttool.h | 17 ++++-- tools/vdatatool.cpp | 17 ++++-- tools/vdatatool.h | 17 ++++-- tools/vtooldetail.cpp | 17 ++++-- tools/vtooldetail.h | 17 ++++-- version.h | 17 ++++-- widgets/doubledelegate.cpp | 54 ++++++++----------- widgets/doubledelegate.h | 54 ++++++++----------- widgets/vapplication.cpp | 17 ++++-- widgets/vapplication.h | 17 ++++-- widgets/vcontrolpointspline.cpp | 17 ++++-- widgets/vcontrolpointspline.h | 17 ++++-- widgets/vgraphicssimpletextitem.cpp | 17 ++++-- widgets/vgraphicssimpletextitem.h | 17 ++++-- widgets/vitem.cpp | 17 ++++-- widgets/vitem.h | 17 ++++-- widgets/vmaingraphicsscene.cpp | 17 ++++-- widgets/vmaingraphicsscene.h | 17 ++++-- widgets/vmaingraphicsview.cpp | 17 ++++-- widgets/vmaingraphicsview.h | 17 ++++-- widgets/vtablegraphicsview.cpp | 17 ++++-- widgets/vtablegraphicsview.h | 17 ++++-- xml/vdomdocument.cpp | 17 ++++-- xml/vdomdocument.h | 17 ++++-- xml/vtoolrecord.cpp | 17 ++++-- xml/vtoolrecord.h | 17 ++++-- 194 files changed, 2346 insertions(+), 1026 deletions(-) diff --git a/container/calculator.cpp b/container/calculator.cpp index b9667ae68..247672312 100644 --- a/container/calculator.cpp +++ b/container/calculator.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file calculator.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "calculator.h" diff --git a/container/calculator.h b/container/calculator.h index 6fa29c3ed..181dc99fc 100644 --- a/container/calculator.h +++ b/container/calculator.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file calculator.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef CALCULATOR_H #define CALCULATOR_H diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 5c7908b28..56e4e7bd6 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vcontainer.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vcontainer.h" #include "../exception/vexceptionbadid.h" diff --git a/container/vcontainer.h b/container/vcontainer.h index 7e135f4c8..e86b6a8c3 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vcontainer.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VCONTAINER_H #define VCONTAINER_H diff --git a/container/vincrementtablerow.cpp b/container/vincrementtablerow.cpp index e7adbca73..eae1d3402 100644 --- a/container/vincrementtablerow.cpp +++ b/container/vincrementtablerow.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vincrementtablerow.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vincrementtablerow.h" diff --git a/container/vincrementtablerow.h b/container/vincrementtablerow.h index c3d82b6d4..0e055e861 100644 --- a/container/vincrementtablerow.h +++ b/container/vincrementtablerow.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vincrementtablerow.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VINCREMENTTABLEROW_H #define VINCREMENTTABLEROW_H diff --git a/container/vpointf.cpp b/container/vpointf.cpp index bb5a2a8ad..a7b69d871 100644 --- a/container/vpointf.cpp +++ b/container/vpointf.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vpointf.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vpointf.h" diff --git a/container/vpointf.h b/container/vpointf.h index 2a71599d0..bbeda2001 100644 --- a/container/vpointf.h +++ b/container/vpointf.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vpointf.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VPOINTF_H #define VPOINTF_H diff --git a/container/vstandarttablecell.cpp b/container/vstandarttablecell.cpp index 4f08ae346..97bfbf97a 100644 --- a/container/vstandarttablecell.cpp +++ b/container/vstandarttablecell.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vstandarttablecell.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vstandarttablecell.h" diff --git a/container/vstandarttablecell.h b/container/vstandarttablecell.h index e5247f7a2..198488ce6 100644 --- a/container/vstandarttablecell.h +++ b/container/vstandarttablecell.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vstandarttablecell.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VSTANDARTTABLECELL_H #define VSTANDARTTABLECELL_H diff --git a/dialogs/dialogalongline.cpp b/dialogs/dialogalongline.cpp index 866b4bbf0..c00252c56 100644 --- a/dialogs/dialogalongline.cpp +++ b/dialogs/dialogalongline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogalongline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogalongline.h" #include "ui_dialogalongline.h" diff --git a/dialogs/dialogalongline.h b/dialogs/dialogalongline.h index f4a425163..32820bf08 100644 --- a/dialogs/dialogalongline.h +++ b/dialogs/dialogalongline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogalongline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGALONGLINE_H #define DIALOGALONGLINE_H diff --git a/dialogs/dialogarc.cpp b/dialogs/dialogarc.cpp index 47c43239e..0a26dea23 100644 --- a/dialogs/dialogarc.cpp +++ b/dialogs/dialogarc.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogarc.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogarc.h" #include "ui_dialogarc.h" diff --git a/dialogs/dialogarc.h b/dialogs/dialogarc.h index 1267f6943..a801714f4 100644 --- a/dialogs/dialogarc.h +++ b/dialogs/dialogarc.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogarc.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGARC_H #define DIALOGARC_H diff --git a/dialogs/dialogbisector.cpp b/dialogs/dialogbisector.cpp index a9869ca03..3ba18b79f 100644 --- a/dialogs/dialogbisector.cpp +++ b/dialogs/dialogbisector.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogbisector.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogbisector.h" #include "ui_dialogbisector.h" diff --git a/dialogs/dialogbisector.h b/dialogs/dialogbisector.h index 4ea1f3fb3..72f0ae42d 100644 --- a/dialogs/dialogbisector.h +++ b/dialogs/dialogbisector.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogbisector.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGBISECTOR_H #define DIALOGBISECTOR_H diff --git a/dialogs/dialogdetail.cpp b/dialogs/dialogdetail.cpp index 106ac5cba..a4d94e8fb 100644 --- a/dialogs/dialogdetail.cpp +++ b/dialogs/dialogdetail.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogdetail.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogdetail.h" diff --git a/dialogs/dialogdetail.h b/dialogs/dialogdetail.h index b39a7036f..b26a32a95 100644 --- a/dialogs/dialogdetail.h +++ b/dialogs/dialogdetail.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogdetail.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGDETAIL_H #define DIALOGDETAIL_H diff --git a/dialogs/dialogendline.cpp b/dialogs/dialogendline.cpp index db41ac062..a6a3bb01a 100644 --- a/dialogs/dialogendline.cpp +++ b/dialogs/dialogendline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogendline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogendline.h" #include "ui_dialogendline.h" diff --git a/dialogs/dialogendline.h b/dialogs/dialogendline.h index 300b8d201..f3dcac149 100644 --- a/dialogs/dialogendline.h +++ b/dialogs/dialogendline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogendline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGENDLINE_H #define DIALOGENDLINE_H diff --git a/dialogs/dialogheight.cpp b/dialogs/dialogheight.cpp index 10cb66285..ff01b473c 100644 --- a/dialogs/dialogheight.cpp +++ b/dialogs/dialogheight.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogheight.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogheight.h" #include "ui_dialogheight.h" diff --git a/dialogs/dialogheight.h b/dialogs/dialogheight.h index 4b787ff3b..2c5d11d6c 100644 --- a/dialogs/dialogheight.h +++ b/dialogs/dialogheight.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogheight.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGHEIGHT_H #define DIALOGHEIGHT_H diff --git a/dialogs/dialoghistory.cpp b/dialogs/dialoghistory.cpp index 92849163e..ac8227cae 100644 --- a/dialogs/dialoghistory.cpp +++ b/dialogs/dialoghistory.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialoghistory.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialoghistory.h" #include "ui_dialoghistory.h" diff --git a/dialogs/dialoghistory.h b/dialogs/dialoghistory.h index 21c7c4bab..1fb325c99 100644 --- a/dialogs/dialoghistory.h +++ b/dialogs/dialoghistory.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialoghistory.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGHISTORY_H #define DIALOGHISTORY_H diff --git a/dialogs/dialogincrements.cpp b/dialogs/dialogincrements.cpp index 6066a09c9..148601f54 100644 --- a/dialogs/dialogincrements.cpp +++ b/dialogs/dialogincrements.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogincrements.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogincrements.h" #include "ui_dialogincrements.h" diff --git a/dialogs/dialogincrements.h b/dialogs/dialogincrements.h index bb476393b..667068b54 100644 --- a/dialogs/dialogincrements.h +++ b/dialogs/dialogincrements.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogincrements.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGINCREMENTS_H #define DIALOGINCREMENTS_H diff --git a/dialogs/dialogline.cpp b/dialogs/dialogline.cpp index 4d95c7522..ca71c9875 100644 --- a/dialogs/dialogline.cpp +++ b/dialogs/dialogline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogline.h" #include "ui_dialogline.h" diff --git a/dialogs/dialogline.h b/dialogs/dialogline.h index 2693d2734..312048720 100644 --- a/dialogs/dialogline.h +++ b/dialogs/dialogline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGLINE_H #define DIALOGLINE_H diff --git a/dialogs/dialoglineintersect.cpp b/dialogs/dialoglineintersect.cpp index 480476c08..05c4ae270 100644 --- a/dialogs/dialoglineintersect.cpp +++ b/dialogs/dialoglineintersect.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialoglineintersect.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialoglineintersect.h" #include "ui_dialoglineintersect.h" diff --git a/dialogs/dialoglineintersect.h b/dialogs/dialoglineintersect.h index 574a83455..3a6c22e41 100644 --- a/dialogs/dialoglineintersect.h +++ b/dialogs/dialoglineintersect.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialoglineintersect.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGLINEINTERSECT_H #define DIALOGLINEINTERSECT_H diff --git a/dialogs/dialognormal.cpp b/dialogs/dialognormal.cpp index c105e8445..45f2eaf23 100644 --- a/dialogs/dialognormal.cpp +++ b/dialogs/dialognormal.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialognormal.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialognormal.h" #include "ui_dialognormal.h" diff --git a/dialogs/dialognormal.h b/dialogs/dialognormal.h index 782305582..c4e2bdc5d 100644 --- a/dialogs/dialognormal.h +++ b/dialogs/dialognormal.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialognormal.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGNORMAL_H #define DIALOGNORMAL_H diff --git a/dialogs/dialogpointofcontact.cpp b/dialogs/dialogpointofcontact.cpp index e9caa7905..584d72a84 100644 --- a/dialogs/dialogpointofcontact.cpp +++ b/dialogs/dialogpointofcontact.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogpointofcontact.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogpointofcontact.h" diff --git a/dialogs/dialogpointofcontact.h b/dialogs/dialogpointofcontact.h index 37171e72e..3aaf37abf 100644 --- a/dialogs/dialogpointofcontact.h +++ b/dialogs/dialogpointofcontact.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogpointofcontact.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGPOINTOFCONTACT_H #define DIALOGPOINTOFCONTACT_H diff --git a/dialogs/dialogpointofintersection.cpp b/dialogs/dialogpointofintersection.cpp index 7adcd8b28..032acff85 100644 --- a/dialogs/dialogpointofintersection.cpp +++ b/dialogs/dialogpointofintersection.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogpointofintersection.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogpointofintersection.h" #include "ui_dialogpointofintersection.h" diff --git a/dialogs/dialogpointofintersection.h b/dialogs/dialogpointofintersection.h index e6971853c..31f9ff7d2 100644 --- a/dialogs/dialogpointofintersection.h +++ b/dialogs/dialogpointofintersection.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogpointofintersection.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGPOINTOFINTERSECTION_H #define DIALOGPOINTOFINTERSECTION_H diff --git a/dialogs/dialogs.h b/dialogs/dialogs.h index 82faf687b..16c0e5481 100644 --- a/dialogs/dialogs.h +++ b/dialogs/dialogs.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogs.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGS_H #define DIALOGS_H diff --git a/dialogs/dialogshoulderpoint.cpp b/dialogs/dialogshoulderpoint.cpp index 809516519..ad06456fb 100644 --- a/dialogs/dialogshoulderpoint.cpp +++ b/dialogs/dialogshoulderpoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogshoulderpoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogshoulderpoint.h" #include "ui_dialogshoulderpoint.h" diff --git a/dialogs/dialogshoulderpoint.h b/dialogs/dialogshoulderpoint.h index ba516c4dd..7fba9f447 100644 --- a/dialogs/dialogshoulderpoint.h +++ b/dialogs/dialogshoulderpoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogshoulderpoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGSHOULDERPOINT_H #define DIALOGSHOULDERPOINT_H diff --git a/dialogs/dialogsinglepoint.cpp b/dialogs/dialogsinglepoint.cpp index 5abcfb5ba..18a9f00aa 100644 --- a/dialogs/dialogsinglepoint.cpp +++ b/dialogs/dialogsinglepoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogsinglepoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogsinglepoint.h" #include "ui_dialogsinglepoint.h" diff --git a/dialogs/dialogsinglepoint.h b/dialogs/dialogsinglepoint.h index 3d3d71ef2..e475df6af 100644 --- a/dialogs/dialogsinglepoint.h +++ b/dialogs/dialogsinglepoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogsinglepoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGSINGLEPOINT_H #define DIALOGSINGLEPOINT_H diff --git a/dialogs/dialogspline.cpp b/dialogs/dialogspline.cpp index 5f0d42123..9fb854423 100644 --- a/dialogs/dialogspline.cpp +++ b/dialogs/dialogspline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogspline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogspline.h" #include "ui_dialogspline.h" diff --git a/dialogs/dialogspline.h b/dialogs/dialogspline.h index f155910b6..c42c0b0bb 100644 --- a/dialogs/dialogspline.h +++ b/dialogs/dialogspline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogspline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGSPLINE_H #define DIALOGSPLINE_H diff --git a/dialogs/dialogsplinepath.cpp b/dialogs/dialogsplinepath.cpp index 76efb8bd8..07a6eb418 100644 --- a/dialogs/dialogsplinepath.cpp +++ b/dialogs/dialogsplinepath.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogsplinepath.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogsplinepath.h" #include "ui_dialogsplinepath.h" diff --git a/dialogs/dialogsplinepath.h b/dialogs/dialogsplinepath.h index b6eb49813..d6757aed1 100644 --- a/dialogs/dialogsplinepath.h +++ b/dialogs/dialogsplinepath.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogsplinepath.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGSPLINEPATH_H #define DIALOGSPLINEPATH_H diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index 2e4ea80f5..091bedf82 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogtool.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogtool.h" #include "../container/calculator.h" diff --git a/dialogs/dialogtool.h b/dialogs/dialogtool.h index 79dfeb517..70908e4e3 100644 --- a/dialogs/dialogtool.h +++ b/dialogs/dialogtool.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogtool.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGTOOL_H #define DIALOGTOOL_H diff --git a/dialogs/dialogtriangle.cpp b/dialogs/dialogtriangle.cpp index ad63163d5..8f5509855 100644 --- a/dialogs/dialogtriangle.cpp +++ b/dialogs/dialogtriangle.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogtriangle.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "dialogtriangle.h" #include "ui_dialogtriangle.h" diff --git a/dialogs/dialogtriangle.h b/dialogs/dialogtriangle.h index ec2c1da08..b54200fe4 100644 --- a/dialogs/dialogtriangle.h +++ b/dialogs/dialogtriangle.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file dialogtriangle.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DIALOGTRIANGLE_H #define DIALOGTRIANGLE_H diff --git a/exception/vexception.cpp b/exception/vexception.cpp index 07aaa4795..b53d046f6 100644 --- a/exception/vexception.cpp +++ b/exception/vexception.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexception.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vexception.h" diff --git a/exception/vexception.h b/exception/vexception.h index 5a68cbad7..ede2f942f 100644 --- a/exception/vexception.h +++ b/exception/vexception.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexception.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VEXCEPTION_H diff --git a/exception/vexceptionbadid.cpp b/exception/vexceptionbadid.cpp index f11841124..d7073cc90 100644 --- a/exception/vexceptionbadid.cpp +++ b/exception/vexceptionbadid.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionbadid.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vexceptionbadid.h" diff --git a/exception/vexceptionbadid.h b/exception/vexceptionbadid.h index dbf1b17a1..ed21121e3 100644 --- a/exception/vexceptionbadid.h +++ b/exception/vexceptionbadid.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionbadid.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VEXCEPTIONBADID_H #define VEXCEPTIONBADID_H diff --git a/exception/vexceptionconversionerror.cpp b/exception/vexceptionconversionerror.cpp index 9e53d1a54..76bb92150 100644 --- a/exception/vexceptionconversionerror.cpp +++ b/exception/vexceptionconversionerror.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionconversionerror.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vexceptionconversionerror.h" diff --git a/exception/vexceptionconversionerror.h b/exception/vexceptionconversionerror.h index 0e88427ab..9bff003e3 100644 --- a/exception/vexceptionconversionerror.h +++ b/exception/vexceptionconversionerror.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionconversionerror.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VEXCEPTIONCONVERSIONERROR_H #define VEXCEPTIONCONVERSIONERROR_H diff --git a/exception/vexceptionemptyparameter.cpp b/exception/vexceptionemptyparameter.cpp index 038f98f1d..21185861f 100644 --- a/exception/vexceptionemptyparameter.cpp +++ b/exception/vexceptionemptyparameter.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionemptyparameter.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vexceptionemptyparameter.h" diff --git a/exception/vexceptionemptyparameter.h b/exception/vexceptionemptyparameter.h index 7dfbaa2ea..eeeab750b 100644 --- a/exception/vexceptionemptyparameter.h +++ b/exception/vexceptionemptyparameter.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionemptyparameter.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VEXCEPTIONEMPTYPARAMETER_H #define VEXCEPTIONEMPTYPARAMETER_H diff --git a/exception/vexceptionobjecterror.cpp b/exception/vexceptionobjecterror.cpp index b1dcbfd5c..98eb26c0c 100644 --- a/exception/vexceptionobjecterror.cpp +++ b/exception/vexceptionobjecterror.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionobjecterror.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vexceptionobjecterror.h" #include diff --git a/exception/vexceptionobjecterror.h b/exception/vexceptionobjecterror.h index 76cdebbec..920e0ff9f 100644 --- a/exception/vexceptionobjecterror.h +++ b/exception/vexceptionobjecterror.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionobjecterror.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VEXCEPTIONOBJECTERROR_H #define VEXCEPTIONOBJECTERROR_H diff --git a/exception/vexceptionuniqueid.cpp b/exception/vexceptionuniqueid.cpp index df7c506ae..7da610fca 100644 --- a/exception/vexceptionuniqueid.cpp +++ b/exception/vexceptionuniqueid.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionuniqueid.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vexceptionuniqueid.h" diff --git a/exception/vexceptionuniqueid.h b/exception/vexceptionuniqueid.h index f34f2e56e..0ddb14b39 100644 --- a/exception/vexceptionuniqueid.h +++ b/exception/vexceptionuniqueid.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionuniqueid.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VEXCEPTIONUNIQUEID_H #define VEXCEPTIONUNIQUEID_H diff --git a/exception/vexceptionwrongparameterid.cpp b/exception/vexceptionwrongparameterid.cpp index 4e10560e3..f86e5bd25 100644 --- a/exception/vexceptionwrongparameterid.cpp +++ b/exception/vexceptionwrongparameterid.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionwrongparameterid.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vexceptionwrongparameterid.h" #include diff --git a/exception/vexceptionwrongparameterid.h b/exception/vexceptionwrongparameterid.h index 69de87b8c..9a1b3f10c 100644 --- a/exception/vexceptionwrongparameterid.h +++ b/exception/vexceptionwrongparameterid.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vexceptionwrongparameterid.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VEXCEPTIONWRONGPARAMETERID_H #define VEXCEPTIONWRONGPARAMETERID_H diff --git a/geometry/varc.cpp b/geometry/varc.cpp index dff1f8840..8c2f99f89 100644 --- a/geometry/varc.cpp +++ b/geometry/varc.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file varc.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "varc.h" #include "../exception/vexception.h" diff --git a/geometry/varc.h b/geometry/varc.h index 5c658b453..69fdd5e57 100644 --- a/geometry/varc.h +++ b/geometry/varc.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file varc.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VARC_H #define VARC_H diff --git a/geometry/vdetail.cpp b/geometry/vdetail.cpp index 105c90cba..acb74a574 100644 --- a/geometry/vdetail.cpp +++ b/geometry/vdetail.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vdetail.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vdetail.h" diff --git a/geometry/vdetail.h b/geometry/vdetail.h index c85b411a0..aad92c934 100644 --- a/geometry/vdetail.h +++ b/geometry/vdetail.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vdetail.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VDETAIL_H #define VDETAIL_H diff --git a/geometry/vnodedetail.cpp b/geometry/vnodedetail.cpp index a3e62e51f..55385ad0f 100644 --- a/geometry/vnodedetail.cpp +++ b/geometry/vnodedetail.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodedetail.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vnodedetail.h" diff --git a/geometry/vnodedetail.h b/geometry/vnodedetail.h index 38a3caced..8a6572346 100644 --- a/geometry/vnodedetail.h +++ b/geometry/vnodedetail.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodedetail.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VNODEDETAIL_H #define VNODEDETAIL_H diff --git a/geometry/vspline.cpp b/geometry/vspline.cpp index 5e8d4c1d3..1a77b2b9c 100644 --- a/geometry/vspline.cpp +++ b/geometry/vspline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vspline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vspline.h" diff --git a/geometry/vspline.h b/geometry/vspline.h index 874a3d765..58221954c 100644 --- a/geometry/vspline.h +++ b/geometry/vspline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vspline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VSPLINE_H #define VSPLINE_H diff --git a/geometry/vsplinepath.cpp b/geometry/vsplinepath.cpp index 3f7af17d5..e77f9f465 100644 --- a/geometry/vsplinepath.cpp +++ b/geometry/vsplinepath.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vsplinepath.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vsplinepath.h" #include "../exception/vexception.h" diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index 60657783d..6133ee91b 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vsplinepath.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VSPLINEPATH_H #define VSPLINEPATH_H diff --git a/geometry/vsplinepoint.cpp b/geometry/vsplinepoint.cpp index 7913d0fe9..a76e7883a 100644 --- a/geometry/vsplinepoint.cpp +++ b/geometry/vsplinepoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vsplinepoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vsplinepoint.h" diff --git a/geometry/vsplinepoint.h b/geometry/vsplinepoint.h index 41f2f9672..1454808fc 100644 --- a/geometry/vsplinepoint.h +++ b/geometry/vsplinepoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vsplinepoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VSPLINEPOINT_H #define VSPLINEPOINT_H diff --git a/main.cpp b/main.cpp index 9e871793e..61fc5f1bb 100644 --- a/main.cpp +++ b/main.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file main.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "mainwindow.h" #include "widgets/vapplication.h" diff --git a/mainwindow.cpp b/mainwindow.cpp index 1ef3d6eba..1c7db04bf 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file mainwindow.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "mainwindow.h" #include "ui_mainwindow.h" diff --git a/mainwindow.h b/mainwindow.h index 933d69aa2..05e96baa6 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file mainwindow.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef MAINWINDOW_H #define MAINWINDOW_H diff --git a/options.h b/options.h index 8891d0d72..a45dcf221 100644 --- a/options.h +++ b/options.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file options.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef OPTIONS_H #define OPTIONS_H diff --git a/stable.cpp b/stable.cpp index 7de5f227a..4bb989f56 100644 --- a/stable.cpp +++ b/stable.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file stable.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ // Build the precompiled headers. #include "stable.h" diff --git a/stable.h b/stable.h index dffda05ae..772227291 100644 --- a/stable.h +++ b/stable.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file stable.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef STABLE_H #define STABLE_H diff --git a/tablewindow.cpp b/tablewindow.cpp index 69b22e5eb..81eb1908d 100644 --- a/tablewindow.cpp +++ b/tablewindow.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file tablewindow.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "tablewindow.h" #include "ui_tablewindow.h" diff --git a/tablewindow.h b/tablewindow.h index 33facb88e..b9b40740c 100644 --- a/tablewindow.h +++ b/tablewindow.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file tablewindow.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef TABLEWINDOW_H #define TABLEWINDOW_H diff --git a/tools/drawTools/drawtools.h b/tools/drawTools/drawtools.h index 4889ad878..2e75cbd56 100644 --- a/tools/drawTools/drawtools.h +++ b/tools/drawTools/drawtools.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file drawtools.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef DRAWTOOLS_H #define DRAWTOOLS_H diff --git a/tools/drawTools/vdrawtool.cpp b/tools/drawTools/vdrawtool.cpp index 13fdf65a7..21e599c19 100644 --- a/tools/drawTools/vdrawtool.cpp +++ b/tools/drawTools/vdrawtool.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vdrawtool.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vdrawtool.h" diff --git a/tools/drawTools/vdrawtool.h b/tools/drawTools/vdrawtool.h index 59d00de8c..eae38e092 100644 --- a/tools/drawTools/vdrawtool.h +++ b/tools/drawTools/vdrawtool.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vdrawtool.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VDRAWTOOL_H #define VDRAWTOOL_H diff --git a/tools/drawTools/vtoolalongline.cpp b/tools/drawTools/vtoolalongline.cpp index 947276c29..b65e8fb20 100644 --- a/tools/drawTools/vtoolalongline.cpp +++ b/tools/drawTools/vtoolalongline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolalongline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolalongline.h" #include "../../container/calculator.h" diff --git a/tools/drawTools/vtoolalongline.h b/tools/drawTools/vtoolalongline.h index 48ca90c24..2a5141c0c 100644 --- a/tools/drawTools/vtoolalongline.h +++ b/tools/drawTools/vtoolalongline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolalongline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLALONGLINE_H #define VTOOLALONGLINE_H diff --git a/tools/drawTools/vtoolarc.cpp b/tools/drawTools/vtoolarc.cpp index 6d249cf06..c914f4a94 100644 --- a/tools/drawTools/vtoolarc.cpp +++ b/tools/drawTools/vtoolarc.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolarc.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolarc.h" #include "../../container/calculator.h" diff --git a/tools/drawTools/vtoolarc.h b/tools/drawTools/vtoolarc.h index cbfba5490..3f8f7b18d 100644 --- a/tools/drawTools/vtoolarc.h +++ b/tools/drawTools/vtoolarc.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolarc.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLARC_H #define VTOOLARC_H diff --git a/tools/drawTools/vtoolbisector.cpp b/tools/drawTools/vtoolbisector.cpp index f9b6af717..564ce8c19 100644 --- a/tools/drawTools/vtoolbisector.cpp +++ b/tools/drawTools/vtoolbisector.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolbisector.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolbisector.h" #include "../../container/calculator.h" diff --git a/tools/drawTools/vtoolbisector.h b/tools/drawTools/vtoolbisector.h index 1b6fc5077..ab1316a04 100644 --- a/tools/drawTools/vtoolbisector.h +++ b/tools/drawTools/vtoolbisector.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolbisector.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLBISECTOR_H #define VTOOLBISECTOR_H diff --git a/tools/drawTools/vtoolendline.cpp b/tools/drawTools/vtoolendline.cpp index 5199dfbbf..be53189fc 100644 --- a/tools/drawTools/vtoolendline.cpp +++ b/tools/drawTools/vtoolendline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolendline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolendline.h" #include "../../widgets/vmaingraphicsscene.h" diff --git a/tools/drawTools/vtoolendline.h b/tools/drawTools/vtoolendline.h index a6d755b88..b5806b1b3 100644 --- a/tools/drawTools/vtoolendline.h +++ b/tools/drawTools/vtoolendline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolendline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLENDLINE_H #define VTOOLENDLINE_H diff --git a/tools/drawTools/vtoolheight.cpp b/tools/drawTools/vtoolheight.cpp index ad4f41cee..599d55686 100644 --- a/tools/drawTools/vtoolheight.cpp +++ b/tools/drawTools/vtoolheight.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolheight.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolheight.h" diff --git a/tools/drawTools/vtoolheight.h b/tools/drawTools/vtoolheight.h index 3a975b693..14cf3dd17 100644 --- a/tools/drawTools/vtoolheight.h +++ b/tools/drawTools/vtoolheight.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolheight.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLHEIGHT_H #define VTOOLHEIGHT_H diff --git a/tools/drawTools/vtoolline.cpp b/tools/drawTools/vtoolline.cpp index 1cfc76e1a..161cee5b0 100644 --- a/tools/drawTools/vtoolline.cpp +++ b/tools/drawTools/vtoolline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolline.h" diff --git a/tools/drawTools/vtoolline.h b/tools/drawTools/vtoolline.h index 2c0c87ab5..934afa987 100644 --- a/tools/drawTools/vtoolline.h +++ b/tools/drawTools/vtoolline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLLINE_H #define VTOOLLINE_H diff --git a/tools/drawTools/vtoollineintersect.cpp b/tools/drawTools/vtoollineintersect.cpp index e50ad42ee..5b5adfdf7 100644 --- a/tools/drawTools/vtoollineintersect.cpp +++ b/tools/drawTools/vtoollineintersect.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoollineintersect.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoollineintersect.h" diff --git a/tools/drawTools/vtoollineintersect.h b/tools/drawTools/vtoollineintersect.h index 6d4dd0fdf..c9b328344 100644 --- a/tools/drawTools/vtoollineintersect.h +++ b/tools/drawTools/vtoollineintersect.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoollineintersect.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLLINEINTERSECT_H #define VTOOLLINEINTERSECT_H diff --git a/tools/drawTools/vtoollinepoint.cpp b/tools/drawTools/vtoollinepoint.cpp index cb829f953..89c9c0f44 100644 --- a/tools/drawTools/vtoollinepoint.cpp +++ b/tools/drawTools/vtoollinepoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoollinepoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoollinepoint.h" diff --git a/tools/drawTools/vtoollinepoint.h b/tools/drawTools/vtoollinepoint.h index 516ce890c..4faf640d4 100644 --- a/tools/drawTools/vtoollinepoint.h +++ b/tools/drawTools/vtoollinepoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoollinepoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLLINEPOINT_H #define VTOOLLINEPOINT_H diff --git a/tools/drawTools/vtoolnormal.cpp b/tools/drawTools/vtoolnormal.cpp index 4334eef3a..abd9af816 100644 --- a/tools/drawTools/vtoolnormal.cpp +++ b/tools/drawTools/vtoolnormal.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolnormal.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolnormal.h" #include "../../container/calculator.h" diff --git a/tools/drawTools/vtoolnormal.h b/tools/drawTools/vtoolnormal.h index 598496309..b1f7bc6dd 100644 --- a/tools/drawTools/vtoolnormal.h +++ b/tools/drawTools/vtoolnormal.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolnormal.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLNORMAL_H #define VTOOLNORMAL_H diff --git a/tools/drawTools/vtoolpoint.cpp b/tools/drawTools/vtoolpoint.cpp index 37ac56ec9..bd8181f1e 100644 --- a/tools/drawTools/vtoolpoint.cpp +++ b/tools/drawTools/vtoolpoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolpoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolpoint.h" diff --git a/tools/drawTools/vtoolpoint.h b/tools/drawTools/vtoolpoint.h index 8bcd8c0b0..25584de2b 100644 --- a/tools/drawTools/vtoolpoint.h +++ b/tools/drawTools/vtoolpoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolpoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLPOINT_H #define VTOOLPOINT_H diff --git a/tools/drawTools/vtoolpointofcontact.cpp b/tools/drawTools/vtoolpointofcontact.cpp index 9a8cf807f..56f73f7fe 100644 --- a/tools/drawTools/vtoolpointofcontact.cpp +++ b/tools/drawTools/vtoolpointofcontact.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolpointofcontact.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolpointofcontact.h" #include "../../container/calculator.h" diff --git a/tools/drawTools/vtoolpointofcontact.h b/tools/drawTools/vtoolpointofcontact.h index 1fc40c264..75ce0d73c 100644 --- a/tools/drawTools/vtoolpointofcontact.h +++ b/tools/drawTools/vtoolpointofcontact.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolpointofcontact.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLPOINTOFCONTACT_H #define VTOOLPOINTOFCONTACT_H diff --git a/tools/drawTools/vtoolpointofintersection.cpp b/tools/drawTools/vtoolpointofintersection.cpp index e53811d0d..b6b8c368e 100644 --- a/tools/drawTools/vtoolpointofintersection.cpp +++ b/tools/drawTools/vtoolpointofintersection.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolpointofintersection.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolpointofintersection.h" diff --git a/tools/drawTools/vtoolpointofintersection.h b/tools/drawTools/vtoolpointofintersection.h index 47029b577..99255449f 100644 --- a/tools/drawTools/vtoolpointofintersection.h +++ b/tools/drawTools/vtoolpointofintersection.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolpointofintersection.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLPOINTOFINTERSECTION_H #define VTOOLPOINTOFINTERSECTION_H diff --git a/tools/drawTools/vtoolshoulderpoint.cpp b/tools/drawTools/vtoolshoulderpoint.cpp index ed7fd7bdf..df21f544b 100644 --- a/tools/drawTools/vtoolshoulderpoint.cpp +++ b/tools/drawTools/vtoolshoulderpoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolshoulderpoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolshoulderpoint.h" #include "../../container/calculator.h" diff --git a/tools/drawTools/vtoolshoulderpoint.h b/tools/drawTools/vtoolshoulderpoint.h index 71a2c30b3..ef7986571 100644 --- a/tools/drawTools/vtoolshoulderpoint.h +++ b/tools/drawTools/vtoolshoulderpoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolshoulderpoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLSHOULDERPOINT_H #define VTOOLSHOULDERPOINT_H diff --git a/tools/drawTools/vtoolsinglepoint.cpp b/tools/drawTools/vtoolsinglepoint.cpp index a9c85ea0d..7abb58219 100644 --- a/tools/drawTools/vtoolsinglepoint.cpp +++ b/tools/drawTools/vtoolsinglepoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolsinglepoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolsinglepoint.h" diff --git a/tools/drawTools/vtoolsinglepoint.h b/tools/drawTools/vtoolsinglepoint.h index 98e3f491c..ca7f067ec 100644 --- a/tools/drawTools/vtoolsinglepoint.h +++ b/tools/drawTools/vtoolsinglepoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolsinglepoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLSINGLEPOINT_H #define VTOOLSINGLEPOINT_H diff --git a/tools/drawTools/vtoolspline.cpp b/tools/drawTools/vtoolspline.cpp index 65b3c4f7a..fe47cbcce 100644 --- a/tools/drawTools/vtoolspline.cpp +++ b/tools/drawTools/vtoolspline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolspline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolspline.h" #include "../../geometry/vspline.h" diff --git a/tools/drawTools/vtoolspline.h b/tools/drawTools/vtoolspline.h index 1960981e0..3424e87fb 100644 --- a/tools/drawTools/vtoolspline.h +++ b/tools/drawTools/vtoolspline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolspline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLSPLINE_H #define VTOOLSPLINE_H diff --git a/tools/drawTools/vtoolsplinepath.cpp b/tools/drawTools/vtoolsplinepath.cpp index 1fc91c843..302a5ffd4 100644 --- a/tools/drawTools/vtoolsplinepath.cpp +++ b/tools/drawTools/vtoolsplinepath.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolsplinepath.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolsplinepath.h" diff --git a/tools/drawTools/vtoolsplinepath.h b/tools/drawTools/vtoolsplinepath.h index 804eddedf..7ff780504 100644 --- a/tools/drawTools/vtoolsplinepath.h +++ b/tools/drawTools/vtoolsplinepath.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolsplinepath.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLSPLINEPATH_H #define VTOOLSPLINEPATH_H diff --git a/tools/drawTools/vtooltriangle.cpp b/tools/drawTools/vtooltriangle.cpp index 7e3da1574..dee16eac7 100644 --- a/tools/drawTools/vtooltriangle.cpp +++ b/tools/drawTools/vtooltriangle.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtooltriangle.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtooltriangle.h" diff --git a/tools/drawTools/vtooltriangle.h b/tools/drawTools/vtooltriangle.h index 5990ef214..329028df9 100644 --- a/tools/drawTools/vtooltriangle.h +++ b/tools/drawTools/vtooltriangle.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtooltriangle.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLTRIANGLE_H #define VTOOLTRIANGLE_H diff --git a/tools/modelingTools/modelingtools.h b/tools/modelingTools/modelingtools.h index 7a336be62..8ce388dd0 100644 --- a/tools/modelingTools/modelingtools.h +++ b/tools/modelingTools/modelingtools.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file modelingtools.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef MODELINGTOOLS_H #define MODELINGTOOLS_H diff --git a/tools/modelingTools/vmodelingalongline.cpp b/tools/modelingTools/vmodelingalongline.cpp index 5a27bb510..1f504b46a 100644 --- a/tools/modelingTools/vmodelingalongline.cpp +++ b/tools/modelingTools/vmodelingalongline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingalongline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingalongline.h" #include "../../container/calculator.h" diff --git a/tools/modelingTools/vmodelingalongline.h b/tools/modelingTools/vmodelingalongline.h index e5ecd0e69..a063f151b 100644 --- a/tools/modelingTools/vmodelingalongline.h +++ b/tools/modelingTools/vmodelingalongline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingalongline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGALONGLINE_H #define VMODELINGALONGLINE_H diff --git a/tools/modelingTools/vmodelingarc.cpp b/tools/modelingTools/vmodelingarc.cpp index 6a64019a2..c8aa15d1f 100644 --- a/tools/modelingTools/vmodelingarc.cpp +++ b/tools/modelingTools/vmodelingarc.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingarc.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingarc.h" #include "../../container/calculator.h" diff --git a/tools/modelingTools/vmodelingarc.h b/tools/modelingTools/vmodelingarc.h index 44a6439e0..bdf51efd1 100644 --- a/tools/modelingTools/vmodelingarc.h +++ b/tools/modelingTools/vmodelingarc.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingarc.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGARC_H #define VMODELINGARC_H diff --git a/tools/modelingTools/vmodelingbisector.cpp b/tools/modelingTools/vmodelingbisector.cpp index 6a1c57b52..11324c531 100644 --- a/tools/modelingTools/vmodelingbisector.cpp +++ b/tools/modelingTools/vmodelingbisector.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingbisector.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingbisector.h" #include "../drawTools/vtoolbisector.h" diff --git a/tools/modelingTools/vmodelingbisector.h b/tools/modelingTools/vmodelingbisector.h index ed454812c..3676fb0ad 100644 --- a/tools/modelingTools/vmodelingbisector.h +++ b/tools/modelingTools/vmodelingbisector.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingbisector.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGBISECTOR_H #define VMODELINGBISECTOR_H diff --git a/tools/modelingTools/vmodelingendline.cpp b/tools/modelingTools/vmodelingendline.cpp index f929a48bd..7eaf8f668 100644 --- a/tools/modelingTools/vmodelingendline.cpp +++ b/tools/modelingTools/vmodelingendline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingendline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingendline.h" #include "../../container/calculator.h" diff --git a/tools/modelingTools/vmodelingendline.h b/tools/modelingTools/vmodelingendline.h index cf33c3058..fe2aec5ca 100644 --- a/tools/modelingTools/vmodelingendline.h +++ b/tools/modelingTools/vmodelingendline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingbisector.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGENDLINE_H #define VMODELINGENDLINE_H diff --git a/tools/modelingTools/vmodelingheight.cpp b/tools/modelingTools/vmodelingheight.cpp index 68439713e..497a53346 100644 --- a/tools/modelingTools/vmodelingheight.cpp +++ b/tools/modelingTools/vmodelingheight.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingheight.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingheight.h" #include "../drawTools/vtoolheight.h" diff --git a/tools/modelingTools/vmodelingheight.h b/tools/modelingTools/vmodelingheight.h index 681c1e034..016a6d777 100644 --- a/tools/modelingTools/vmodelingheight.h +++ b/tools/modelingTools/vmodelingheight.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingheight.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGHEIGHT_H #define VMODELINGHEIGHT_H diff --git a/tools/modelingTools/vmodelingline.cpp b/tools/modelingTools/vmodelingline.cpp index d019f4d68..edd109a26 100644 --- a/tools/modelingTools/vmodelingline.cpp +++ b/tools/modelingTools/vmodelingline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingline.h" diff --git a/tools/modelingTools/vmodelingline.h b/tools/modelingTools/vmodelingline.h index 0d7cb96ef..c04e04c1b 100644 --- a/tools/modelingTools/vmodelingline.h +++ b/tools/modelingTools/vmodelingline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGLINE_H #define VMODELINGLINE_H diff --git a/tools/modelingTools/vmodelinglineintersect.cpp b/tools/modelingTools/vmodelinglineintersect.cpp index 2665df105..327dfa3d0 100644 --- a/tools/modelingTools/vmodelinglineintersect.cpp +++ b/tools/modelingTools/vmodelinglineintersect.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelinglineintersect.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelinglineintersect.h" diff --git a/tools/modelingTools/vmodelinglineintersect.h b/tools/modelingTools/vmodelinglineintersect.h index 93282c731..dfa6ce0fd 100644 --- a/tools/modelingTools/vmodelinglineintersect.h +++ b/tools/modelingTools/vmodelinglineintersect.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelinglineintersect.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGLINEINTERSECT_H #define VMODELINGLINEINTERSECT_H diff --git a/tools/modelingTools/vmodelinglinepoint.cpp b/tools/modelingTools/vmodelinglinepoint.cpp index 55802477a..f22649405 100644 --- a/tools/modelingTools/vmodelinglinepoint.cpp +++ b/tools/modelingTools/vmodelinglinepoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelinglinepoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelinglinepoint.h" diff --git a/tools/modelingTools/vmodelinglinepoint.h b/tools/modelingTools/vmodelinglinepoint.h index be3afec2e..24a0b36c9 100644 --- a/tools/modelingTools/vmodelinglinepoint.h +++ b/tools/modelingTools/vmodelinglinepoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelinglinepoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGLINEPOINT_H #define VMODELINGLINEPOINT_H diff --git a/tools/modelingTools/vmodelingnormal.cpp b/tools/modelingTools/vmodelingnormal.cpp index c4205734d..0d89bb995 100644 --- a/tools/modelingTools/vmodelingnormal.cpp +++ b/tools/modelingTools/vmodelingnormal.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingnormal.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingnormal.h" #include "../drawTools/vtoolnormal.h" diff --git a/tools/modelingTools/vmodelingnormal.h b/tools/modelingTools/vmodelingnormal.h index 03a952983..a9c70e392 100644 --- a/tools/modelingTools/vmodelingnormal.h +++ b/tools/modelingTools/vmodelingnormal.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingnormal.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGNORMAL_H #define VMODELINGNORMAL_H diff --git a/tools/modelingTools/vmodelingpoint.cpp b/tools/modelingTools/vmodelingpoint.cpp index 948e1bb17..14d74453f 100644 --- a/tools/modelingTools/vmodelingpoint.cpp +++ b/tools/modelingTools/vmodelingpoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingpoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingpoint.h" #include "../../container/vpointf.h" diff --git a/tools/modelingTools/vmodelingpoint.h b/tools/modelingTools/vmodelingpoint.h index 33d446263..d88d9d54a 100644 --- a/tools/modelingTools/vmodelingpoint.h +++ b/tools/modelingTools/vmodelingpoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingpoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGPOINT_H #define VMODELINGPOINT_H diff --git a/tools/modelingTools/vmodelingpointofcontact.cpp b/tools/modelingTools/vmodelingpointofcontact.cpp index 87de20af4..b6b3e8b41 100644 --- a/tools/modelingTools/vmodelingpointofcontact.cpp +++ b/tools/modelingTools/vmodelingpointofcontact.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingpointofcontact.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingpointofcontact.h" #include "../drawTools/vtoolpointofcontact.h" diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/tools/modelingTools/vmodelingpointofcontact.h index 50fd4eb1f..f44d2f5f8 100644 --- a/tools/modelingTools/vmodelingpointofcontact.h +++ b/tools/modelingTools/vmodelingpointofcontact.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingpointofcontact.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGPOINTOFCONTACT_H #define VMODELINGPOINTOFCONTACT_H diff --git a/tools/modelingTools/vmodelingpointofintersection.cpp b/tools/modelingTools/vmodelingpointofintersection.cpp index f66c5be85..c027fb372 100644 --- a/tools/modelingTools/vmodelingpointofintersection.cpp +++ b/tools/modelingTools/vmodelingpointofintersection.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingpointofintersection.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingpointofintersection.h" diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/tools/modelingTools/vmodelingpointofintersection.h index 7496940fb..b958256ad 100644 --- a/tools/modelingTools/vmodelingpointofintersection.h +++ b/tools/modelingTools/vmodelingpointofintersection.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingpointofintersection.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGPOINTOFINTERSECTION_H #define VMODELINGPOINTOFINTERSECTION_H diff --git a/tools/modelingTools/vmodelingshoulderpoint.cpp b/tools/modelingTools/vmodelingshoulderpoint.cpp index a13cc463f..c2a699750 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.cpp +++ b/tools/modelingTools/vmodelingshoulderpoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingshoulderpoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingshoulderpoint.h" #include "../drawTools/vtoolshoulderpoint.h" diff --git a/tools/modelingTools/vmodelingshoulderpoint.h b/tools/modelingTools/vmodelingshoulderpoint.h index 496856f70..5881ed81b 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.h +++ b/tools/modelingTools/vmodelingshoulderpoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingshoulderpoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGSHOULDERPOINT_H #define VMODELINGSHOULDERPOINT_H diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index 65ea14951..ca760b419 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingspline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingspline.h" #include "../../geometry/vspline.h" diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index 0b69d5dcf..a04cb3518 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingspline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGSPLINE_H #define VMODELINGSPLINE_H diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/tools/modelingTools/vmodelingsplinepath.cpp index 9706fbfd7..4424a3590 100644 --- a/tools/modelingTools/vmodelingsplinepath.cpp +++ b/tools/modelingTools/vmodelingsplinepath.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingsplinepath.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingsplinepath.h" diff --git a/tools/modelingTools/vmodelingsplinepath.h b/tools/modelingTools/vmodelingsplinepath.h index a93925bb2..462088c5b 100644 --- a/tools/modelingTools/vmodelingsplinepath.h +++ b/tools/modelingTools/vmodelingsplinepath.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingsplinepath.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGSPLINEPATH_H #define VMODELINGSPLINEPATH_H diff --git a/tools/modelingTools/vmodelingtool.cpp b/tools/modelingTools/vmodelingtool.cpp index cc0d58cb9..926aee6bf 100644 --- a/tools/modelingTools/vmodelingtool.cpp +++ b/tools/modelingTools/vmodelingtool.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingtool.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingtool.h" #include diff --git a/tools/modelingTools/vmodelingtool.h b/tools/modelingTools/vmodelingtool.h index e40edaacd..6bac46ff9 100644 --- a/tools/modelingTools/vmodelingtool.h +++ b/tools/modelingTools/vmodelingtool.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingtool.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGTOOL_H #define VMODELINGTOOL_H diff --git a/tools/modelingTools/vmodelingtriangle.cpp b/tools/modelingTools/vmodelingtriangle.cpp index e1e50d3e9..a09aff744 100644 --- a/tools/modelingTools/vmodelingtriangle.cpp +++ b/tools/modelingTools/vmodelingtriangle.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingtriangle.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmodelingtriangle.h" #include "../drawTools/vtooltriangle.h" diff --git a/tools/modelingTools/vmodelingtriangle.h b/tools/modelingTools/vmodelingtriangle.h index edf9a4dfd..8b6ae8cad 100644 --- a/tools/modelingTools/vmodelingtriangle.h +++ b/tools/modelingTools/vmodelingtriangle.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmodelingtriangle.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMODELINGTRIANGLE_H #define VMODELINGTRIANGLE_H diff --git a/tools/nodeDetails/nodedetails.h b/tools/nodeDetails/nodedetails.h index e9ed16c37..1b736daa5 100644 --- a/tools/nodeDetails/nodedetails.h +++ b/tools/nodeDetails/nodedetails.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file nodedetails.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef NODEDETAILS_H #define NODEDETAILS_H diff --git a/tools/nodeDetails/vabstractnode.cpp b/tools/nodeDetails/vabstractnode.cpp index ab9c6473f..2e240050b 100644 --- a/tools/nodeDetails/vabstractnode.cpp +++ b/tools/nodeDetails/vabstractnode.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vabstractnode.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vabstractnode.h" #include diff --git a/tools/nodeDetails/vabstractnode.h b/tools/nodeDetails/vabstractnode.h index a7553b878..65665cec9 100644 --- a/tools/nodeDetails/vabstractnode.h +++ b/tools/nodeDetails/vabstractnode.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vabstractnode.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VABSTRACTNODE_H #define VABSTRACTNODE_H diff --git a/tools/nodeDetails/vnodearc.cpp b/tools/nodeDetails/vnodearc.cpp index 254247d58..5d2ba5360 100644 --- a/tools/nodeDetails/vnodearc.cpp +++ b/tools/nodeDetails/vnodearc.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodearc.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vnodearc.h" diff --git a/tools/nodeDetails/vnodearc.h b/tools/nodeDetails/vnodearc.h index a580113d8..8473997b8 100644 --- a/tools/nodeDetails/vnodearc.h +++ b/tools/nodeDetails/vnodearc.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodearc.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VNODEARC_H #define VNODEARC_H diff --git a/tools/nodeDetails/vnodepoint.cpp b/tools/nodeDetails/vnodepoint.cpp index 734b0434e..3729dadb2 100644 --- a/tools/nodeDetails/vnodepoint.cpp +++ b/tools/nodeDetails/vnodepoint.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodepoint.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vnodepoint.h" diff --git a/tools/nodeDetails/vnodepoint.h b/tools/nodeDetails/vnodepoint.h index 162e1f036..975a5a69c 100644 --- a/tools/nodeDetails/vnodepoint.h +++ b/tools/nodeDetails/vnodepoint.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodepoint.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VNODEPOINT_H #define VNODEPOINT_H diff --git a/tools/nodeDetails/vnodespline.cpp b/tools/nodeDetails/vnodespline.cpp index 53dcaa9b6..1e358df25 100644 --- a/tools/nodeDetails/vnodespline.cpp +++ b/tools/nodeDetails/vnodespline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodespline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vnodespline.h" diff --git a/tools/nodeDetails/vnodespline.h b/tools/nodeDetails/vnodespline.h index 5e0f1cb7f..3cc972108 100644 --- a/tools/nodeDetails/vnodespline.h +++ b/tools/nodeDetails/vnodespline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodespline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VNODESPLINE_H #define VNODESPLINE_H diff --git a/tools/nodeDetails/vnodesplinepath.cpp b/tools/nodeDetails/vnodesplinepath.cpp index a185cc4bd..ab4ebe51b 100644 --- a/tools/nodeDetails/vnodesplinepath.cpp +++ b/tools/nodeDetails/vnodesplinepath.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodesplinepath.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vnodesplinepath.h" diff --git a/tools/nodeDetails/vnodesplinepath.h b/tools/nodeDetails/vnodesplinepath.h index 596701428..00d8887b4 100644 --- a/tools/nodeDetails/vnodesplinepath.h +++ b/tools/nodeDetails/vnodesplinepath.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vnodesplinepath.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VNODESPLINEPATH_H #define VNODESPLINEPATH_H diff --git a/tools/tools.h b/tools/tools.h index 998771f91..42748ee27 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file tools.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef TOOLS_H #define TOOLS_H diff --git a/tools/vabstracttool.cpp b/tools/vabstracttool.cpp index 1b94e56e7..5dad4aea7 100644 --- a/tools/vabstracttool.cpp +++ b/tools/vabstracttool.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vabstracttool.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vabstracttool.h" diff --git a/tools/vabstracttool.h b/tools/vabstracttool.h index 44539711e..42ed64df2 100644 --- a/tools/vabstracttool.h +++ b/tools/vabstracttool.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vabstracttool.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VABSTRACTTOOL_H #define VABSTRACTTOOL_H diff --git a/tools/vdatatool.cpp b/tools/vdatatool.cpp index d5f3ebefd..49d987c31 100644 --- a/tools/vdatatool.cpp +++ b/tools/vdatatool.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vdatatool.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vdatatool.h" diff --git a/tools/vdatatool.h b/tools/vdatatool.h index 4c9aa6285..179714baa 100644 --- a/tools/vdatatool.h +++ b/tools/vdatatool.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vdatatool.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VDATATOOL_H #define VDATATOOL_H diff --git a/tools/vtooldetail.cpp b/tools/vtooldetail.cpp index 419224977..3a7342cf2 100644 --- a/tools/vtooldetail.cpp +++ b/tools/vtooldetail.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtooldetail.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtooldetail.h" #include "nodeDetails/nodedetails.h" diff --git a/tools/vtooldetail.h b/tools/vtooldetail.h index 93b6c3fa0..1b4265b78 100644 --- a/tools/vtooldetail.h +++ b/tools/vtooldetail.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtooldetail.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLDETAIL_H #define VTOOLDETAIL_H diff --git a/version.h b/version.h index a7ac52cdc..d307318ff 100644 --- a/version.h +++ b/version.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file version.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VERSION_H #define VERSION_H diff --git a/widgets/doubledelegate.cpp b/widgets/doubledelegate.cpp index 480e68f0e..c7311bfcb 100644 --- a/widgets/doubledelegate.cpp +++ b/widgets/doubledelegate.cpp @@ -1,42 +1,30 @@ - /**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). - ** Contact: http://www.qt-project.org/legal + ** @file doubledelegate.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of the examples of the Qt Toolkit. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** $QT_BEGIN_LICENSE:BSD$ - ** You may use this file under the terms of the BSD license as follows: + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. ** - ** "Redistribution and use in source and binary forms, with or without - ** modification, are permitted provided that the following conditions are - ** met: - ** * Redistributions of source code must retain the above copyright - ** notice, this list of conditions and the following disclaimer. - ** * Redistributions in binary form must reproduce the above copyright - ** notice, this list of conditions and the following disclaimer in - ** the documentation and/or other materials provided with the - ** distribution. - ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names - ** of its contributors may be used to endorse or promote products derived - ** from this software without specific prior written permission. + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . ** - ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." - ** - ** $QT_END_LICENSE$ - ** - ****************************************************************************/ + *************************************************************************/ /* doubledelegate.cpp diff --git a/widgets/doubledelegate.h b/widgets/doubledelegate.h index 948b91851..8c0316f1f 100644 --- a/widgets/doubledelegate.h +++ b/widgets/doubledelegate.h @@ -1,42 +1,30 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). - ** Contact: http://www.qt-project.org/legal + ** @file doubledelegate.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of the examples of the Qt Toolkit. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** $QT_BEGIN_LICENSE:BSD$ - ** You may use this file under the terms of the BSD license as follows: + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. ** - ** "Redistribution and use in source and binary forms, with or without - ** modification, are permitted provided that the following conditions are - ** met: - ** * Redistributions of source code must retain the above copyright - ** notice, this list of conditions and the following disclaimer. - ** * Redistributions in binary form must reproduce the above copyright - ** notice, this list of conditions and the following disclaimer in - ** the documentation and/or other materials provided with the - ** distribution. - ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names - ** of its contributors may be used to endorse or promote products derived - ** from this software without specific prior written permission. + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . ** - ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." - ** - ** $QT_END_LICENSE$ - ** - ****************************************************************************/ + *************************************************************************/ #ifndef DOUBLEDELEGATE_H #define DOUBLEDELEGATE_H diff --git a/widgets/vapplication.cpp b/widgets/vapplication.cpp index 3b05da39b..dc5bd11c6 100644 --- a/widgets/vapplication.cpp +++ b/widgets/vapplication.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vapplication.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vapplication.h" #include "../exception/vexceptionobjecterror.h" diff --git a/widgets/vapplication.h b/widgets/vapplication.h index 1e04c118b..0a314ec36 100644 --- a/widgets/vapplication.h +++ b/widgets/vapplication.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vapplication.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VAPPLICATION_H #define VAPPLICATION_H diff --git a/widgets/vcontrolpointspline.cpp b/widgets/vcontrolpointspline.cpp index 626ad5e1d..22ad0c8b9 100644 --- a/widgets/vcontrolpointspline.cpp +++ b/widgets/vcontrolpointspline.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vcontrolpointspline.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vcontrolpointspline.h" diff --git a/widgets/vcontrolpointspline.h b/widgets/vcontrolpointspline.h index c535f981a..2d9cf83d9 100644 --- a/widgets/vcontrolpointspline.h +++ b/widgets/vcontrolpointspline.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vcontrolpointspline.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VCONTROLPOINTSPLINE_H #define VCONTROLPOINTSPLINE_H diff --git a/widgets/vgraphicssimpletextitem.cpp b/widgets/vgraphicssimpletextitem.cpp index 55fa10187..56d15d16e 100644 --- a/widgets/vgraphicssimpletextitem.cpp +++ b/widgets/vgraphicssimpletextitem.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vgraphicssimpletextitem.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vgraphicssimpletextitem.h" diff --git a/widgets/vgraphicssimpletextitem.h b/widgets/vgraphicssimpletextitem.h index dacf920ce..b60303180 100644 --- a/widgets/vgraphicssimpletextitem.h +++ b/widgets/vgraphicssimpletextitem.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vgraphicssimpletextitem.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VGRAPHICSSIMPLETEXTITEM_H #define VGRAPHICSSIMPLETEXTITEM_H diff --git a/widgets/vitem.cpp b/widgets/vitem.cpp index bfc184409..f2606a38a 100644 --- a/widgets/vitem.cpp +++ b/widgets/vitem.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vitem.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vitem.h" #include diff --git a/widgets/vitem.h b/widgets/vitem.h index 868848ba7..7c05eb75a 100644 --- a/widgets/vitem.h +++ b/widgets/vitem.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vitem.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VITEM_H #define VITEM_H diff --git a/widgets/vmaingraphicsscene.cpp b/widgets/vmaingraphicsscene.cpp index 2a6839bb4..b7ff49b3b 100644 --- a/widgets/vmaingraphicsscene.cpp +++ b/widgets/vmaingraphicsscene.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmaingraphicsscene.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmaingraphicsscene.h" diff --git a/widgets/vmaingraphicsscene.h b/widgets/vmaingraphicsscene.h index bf78f156b..5ca3d91ce 100644 --- a/widgets/vmaingraphicsscene.h +++ b/widgets/vmaingraphicsscene.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmaingraphicsscene.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMAINGRAPHICSSCENE_H #define VMAINGRAPHICSSCENE_H diff --git a/widgets/vmaingraphicsview.cpp b/widgets/vmaingraphicsview.cpp index e2fd79c91..3632ad520 100644 --- a/widgets/vmaingraphicsview.cpp +++ b/widgets/vmaingraphicsview.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmaingraphicsview.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vmaingraphicsview.h" diff --git a/widgets/vmaingraphicsview.h b/widgets/vmaingraphicsview.h index f4ad052ef..3ce745c59 100644 --- a/widgets/vmaingraphicsview.h +++ b/widgets/vmaingraphicsview.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vmaingraphicsview.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VMAINGRAPHICSVIEW_H #define VMAINGRAPHICSVIEW_H diff --git a/widgets/vtablegraphicsview.cpp b/widgets/vtablegraphicsview.cpp index 0dcc3b719..a62191ec9 100644 --- a/widgets/vtablegraphicsview.cpp +++ b/widgets/vtablegraphicsview.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtablegraphicsview.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtablegraphicsview.h" diff --git a/widgets/vtablegraphicsview.h b/widgets/vtablegraphicsview.h index 3f78d7f4f..2e7e4b45c 100644 --- a/widgets/vtablegraphicsview.h +++ b/widgets/vtablegraphicsview.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtablegraphicsview.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTABLEGRAPHICSVIEW_H #define VTABLEGRAPHICSVIEW_H diff --git a/xml/vdomdocument.cpp b/xml/vdomdocument.cpp index be966b64b..3f7ef557d 100644 --- a/xml/vdomdocument.cpp +++ b/xml/vdomdocument.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vdomdocument.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vdomdocument.h" #include "../exception/vexceptionwrongparameterid.h" diff --git a/xml/vdomdocument.h b/xml/vdomdocument.h index d49114ada..1ef7995e4 100644 --- a/xml/vdomdocument.h +++ b/xml/vdomdocument.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vdomdocument.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VDOMDOCUMENT_H #define VDOMDOCUMENT_H diff --git a/xml/vtoolrecord.cpp b/xml/vtoolrecord.cpp index 1df97da1f..8b0fbdded 100644 --- a/xml/vtoolrecord.cpp +++ b/xml/vtoolrecord.cpp @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolrecord.cpp + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #include "vtoolrecord.h" diff --git a/xml/vtoolrecord.h b/xml/vtoolrecord.h index 3a4184e63..a430e450a 100644 --- a/xml/vtoolrecord.h +++ b/xml/vtoolrecord.h @@ -1,10 +1,17 @@ -/**************************************************************************** +/************************************************************************ ** - ** Copyright (C) 2013 Valentina project All Rights Reserved. + ** @file vtoolrecord.h + ** @author Roman Telezhinsky + ** @date Friday November 15, 2013 ** - ** This file is part of Valentina. + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 Valentina project + ** All Rights Reserved. ** - ** Tox is free software: you can redistribute it and/or modify + ** Valentina is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. @@ -17,7 +24,7 @@ ** You should have received a copy of the GNU General Public License ** along with Valentina. If not, see . ** - ****************************************************************************/ + *************************************************************************/ #ifndef VTOOLRECORD_H #define VTOOLRECORD_H From 2cbe79c803ed72e354d2f65d171f3f7caf0fcaa3 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 15 Nov 2013 14:50:05 +0200 Subject: [PATCH 21/56] Change in license. --HG-- branch : develop --- container/calculator.cpp | 4 ++-- container/calculator.h | 4 ++-- container/vcontainer.cpp | 4 ++-- container/vcontainer.h | 4 ++-- container/vincrementtablerow.cpp | 4 ++-- container/vincrementtablerow.h | 4 ++-- container/vpointf.cpp | 4 ++-- container/vpointf.h | 4 ++-- container/vstandarttablecell.cpp | 4 ++-- container/vstandarttablecell.h | 4 ++-- dialogs/dialogalongline.cpp | 4 ++-- dialogs/dialogalongline.h | 4 ++-- dialogs/dialogarc.cpp | 4 ++-- dialogs/dialogarc.h | 4 ++-- dialogs/dialogbisector.cpp | 4 ++-- dialogs/dialogbisector.h | 4 ++-- dialogs/dialogdetail.cpp | 4 ++-- dialogs/dialogdetail.h | 4 ++-- dialogs/dialogendline.cpp | 4 ++-- dialogs/dialogendline.h | 4 ++-- dialogs/dialogheight.cpp | 4 ++-- dialogs/dialogheight.h | 4 ++-- dialogs/dialoghistory.cpp | 4 ++-- dialogs/dialoghistory.h | 4 ++-- dialogs/dialogincrements.cpp | 4 ++-- dialogs/dialogincrements.h | 4 ++-- dialogs/dialogline.cpp | 4 ++-- dialogs/dialogline.h | 4 ++-- dialogs/dialoglineintersect.cpp | 4 ++-- dialogs/dialoglineintersect.h | 4 ++-- dialogs/dialognormal.cpp | 4 ++-- dialogs/dialognormal.h | 4 ++-- dialogs/dialogpointofcontact.cpp | 4 ++-- dialogs/dialogpointofcontact.h | 4 ++-- dialogs/dialogpointofintersection.cpp | 4 ++-- dialogs/dialogpointofintersection.h | 4 ++-- dialogs/dialogs.h | 4 ++-- dialogs/dialogshoulderpoint.cpp | 4 ++-- dialogs/dialogshoulderpoint.h | 4 ++-- dialogs/dialogsinglepoint.cpp | 4 ++-- dialogs/dialogsinglepoint.h | 4 ++-- dialogs/dialogspline.cpp | 4 ++-- dialogs/dialogspline.h | 4 ++-- dialogs/dialogsplinepath.cpp | 4 ++-- dialogs/dialogsplinepath.h | 4 ++-- dialogs/dialogtool.cpp | 4 ++-- dialogs/dialogtool.h | 4 ++-- dialogs/dialogtriangle.cpp | 4 ++-- dialogs/dialogtriangle.h | 4 ++-- exception/vexception.cpp | 4 ++-- exception/vexception.h | 4 ++-- exception/vexceptionbadid.cpp | 4 ++-- exception/vexceptionbadid.h | 4 ++-- exception/vexceptionconversionerror.cpp | 4 ++-- exception/vexceptionconversionerror.h | 4 ++-- exception/vexceptionemptyparameter.cpp | 4 ++-- exception/vexceptionemptyparameter.h | 4 ++-- exception/vexceptionobjecterror.cpp | 4 ++-- exception/vexceptionobjecterror.h | 4 ++-- exception/vexceptionuniqueid.cpp | 4 ++-- exception/vexceptionuniqueid.h | 4 ++-- exception/vexceptionwrongparameterid.cpp | 4 ++-- exception/vexceptionwrongparameterid.h | 4 ++-- geometry/varc.cpp | 4 ++-- geometry/varc.h | 4 ++-- geometry/vdetail.cpp | 4 ++-- geometry/vdetail.h | 4 ++-- geometry/vnodedetail.cpp | 4 ++-- geometry/vnodedetail.h | 4 ++-- geometry/vspline.cpp | 4 ++-- geometry/vspline.h | 4 ++-- geometry/vsplinepath.cpp | 4 ++-- geometry/vsplinepath.h | 4 ++-- geometry/vsplinepoint.cpp | 4 ++-- geometry/vsplinepoint.h | 4 ++-- main.cpp | 4 ++-- mainwindow.cpp | 4 ++-- mainwindow.h | 4 ++-- options.h | 4 ++-- stable.cpp | 4 ++-- stable.h | 4 ++-- tablewindow.cpp | 4 ++-- tablewindow.h | 4 ++-- tools/drawTools/drawtools.h | 4 ++-- tools/drawTools/vdrawtool.cpp | 4 ++-- tools/drawTools/vdrawtool.h | 4 ++-- tools/drawTools/vtoolalongline.cpp | 4 ++-- tools/drawTools/vtoolalongline.h | 4 ++-- tools/drawTools/vtoolarc.cpp | 4 ++-- tools/drawTools/vtoolarc.h | 4 ++-- tools/drawTools/vtoolbisector.cpp | 4 ++-- tools/drawTools/vtoolbisector.h | 4 ++-- tools/drawTools/vtoolendline.cpp | 4 ++-- tools/drawTools/vtoolendline.h | 4 ++-- tools/drawTools/vtoolheight.cpp | 4 ++-- tools/drawTools/vtoolheight.h | 4 ++-- tools/drawTools/vtoolline.cpp | 4 ++-- tools/drawTools/vtoolline.h | 4 ++-- tools/drawTools/vtoollineintersect.cpp | 4 ++-- tools/drawTools/vtoollineintersect.h | 4 ++-- tools/drawTools/vtoollinepoint.cpp | 4 ++-- tools/drawTools/vtoollinepoint.h | 4 ++-- tools/drawTools/vtoolnormal.cpp | 4 ++-- tools/drawTools/vtoolnormal.h | 4 ++-- tools/drawTools/vtoolpoint.cpp | 4 ++-- tools/drawTools/vtoolpoint.h | 4 ++-- tools/drawTools/vtoolpointofcontact.cpp | 4 ++-- tools/drawTools/vtoolpointofcontact.h | 4 ++-- tools/drawTools/vtoolpointofintersection.cpp | 4 ++-- tools/drawTools/vtoolpointofintersection.h | 4 ++-- tools/drawTools/vtoolshoulderpoint.cpp | 4 ++-- tools/drawTools/vtoolshoulderpoint.h | 4 ++-- tools/drawTools/vtoolsinglepoint.cpp | 4 ++-- tools/drawTools/vtoolsinglepoint.h | 4 ++-- tools/drawTools/vtoolspline.cpp | 4 ++-- tools/drawTools/vtoolspline.h | 4 ++-- tools/drawTools/vtoolsplinepath.cpp | 4 ++-- tools/drawTools/vtoolsplinepath.h | 4 ++-- tools/drawTools/vtooltriangle.cpp | 4 ++-- tools/drawTools/vtooltriangle.h | 4 ++-- tools/modelingTools/modelingtools.h | 4 ++-- tools/modelingTools/vmodelingalongline.cpp | 4 ++-- tools/modelingTools/vmodelingalongline.h | 4 ++-- tools/modelingTools/vmodelingarc.cpp | 4 ++-- tools/modelingTools/vmodelingarc.h | 4 ++-- tools/modelingTools/vmodelingbisector.cpp | 4 ++-- tools/modelingTools/vmodelingbisector.h | 4 ++-- tools/modelingTools/vmodelingendline.cpp | 4 ++-- tools/modelingTools/vmodelingendline.h | 4 ++-- tools/modelingTools/vmodelingheight.cpp | 4 ++-- tools/modelingTools/vmodelingheight.h | 4 ++-- tools/modelingTools/vmodelingline.cpp | 4 ++-- tools/modelingTools/vmodelingline.h | 4 ++-- tools/modelingTools/vmodelinglineintersect.cpp | 4 ++-- tools/modelingTools/vmodelinglineintersect.h | 4 ++-- tools/modelingTools/vmodelinglinepoint.cpp | 4 ++-- tools/modelingTools/vmodelinglinepoint.h | 4 ++-- tools/modelingTools/vmodelingnormal.cpp | 4 ++-- tools/modelingTools/vmodelingnormal.h | 4 ++-- tools/modelingTools/vmodelingpoint.cpp | 4 ++-- tools/modelingTools/vmodelingpoint.h | 4 ++-- tools/modelingTools/vmodelingpointofcontact.cpp | 4 ++-- tools/modelingTools/vmodelingpointofcontact.h | 4 ++-- tools/modelingTools/vmodelingpointofintersection.cpp | 4 ++-- tools/modelingTools/vmodelingpointofintersection.h | 4 ++-- tools/modelingTools/vmodelingshoulderpoint.cpp | 4 ++-- tools/modelingTools/vmodelingshoulderpoint.h | 4 ++-- tools/modelingTools/vmodelingspline.cpp | 4 ++-- tools/modelingTools/vmodelingspline.h | 4 ++-- tools/modelingTools/vmodelingsplinepath.cpp | 4 ++-- tools/modelingTools/vmodelingsplinepath.h | 4 ++-- tools/modelingTools/vmodelingtool.cpp | 4 ++-- tools/modelingTools/vmodelingtool.h | 4 ++-- tools/modelingTools/vmodelingtriangle.cpp | 4 ++-- tools/modelingTools/vmodelingtriangle.h | 4 ++-- tools/nodeDetails/nodedetails.h | 4 ++-- tools/nodeDetails/vabstractnode.cpp | 4 ++-- tools/nodeDetails/vabstractnode.h | 4 ++-- tools/nodeDetails/vnodearc.cpp | 4 ++-- tools/nodeDetails/vnodearc.h | 4 ++-- tools/nodeDetails/vnodepoint.cpp | 4 ++-- tools/nodeDetails/vnodepoint.h | 4 ++-- tools/nodeDetails/vnodespline.cpp | 4 ++-- tools/nodeDetails/vnodespline.h | 4 ++-- tools/nodeDetails/vnodesplinepath.cpp | 4 ++-- tools/nodeDetails/vnodesplinepath.h | 4 ++-- tools/tools.h | 4 ++-- tools/vabstracttool.cpp | 4 ++-- tools/vabstracttool.h | 4 ++-- tools/vdatatool.cpp | 4 ++-- tools/vdatatool.h | 4 ++-- tools/vtooldetail.cpp | 4 ++-- tools/vtooldetail.h | 4 ++-- version.h | 4 ++-- widgets/doubledelegate.cpp | 4 ++-- widgets/doubledelegate.h | 4 ++-- widgets/vapplication.cpp | 4 ++-- widgets/vapplication.h | 4 ++-- widgets/vcontrolpointspline.cpp | 4 ++-- widgets/vcontrolpointspline.h | 4 ++-- widgets/vgraphicssimpletextitem.cpp | 4 ++-- widgets/vgraphicssimpletextitem.h | 4 ++-- widgets/vitem.cpp | 4 ++-- widgets/vitem.h | 4 ++-- widgets/vmaingraphicsscene.cpp | 4 ++-- widgets/vmaingraphicsscene.h | 4 ++-- widgets/vmaingraphicsview.cpp | 4 ++-- widgets/vmaingraphicsview.h | 4 ++-- widgets/vtablegraphicsview.cpp | 4 ++-- widgets/vtablegraphicsview.h | 4 ++-- xml/vdomdocument.cpp | 4 ++-- xml/vdomdocument.h | 4 ++-- xml/vtoolrecord.cpp | 4 ++-- xml/vtoolrecord.h | 4 ++-- 194 files changed, 388 insertions(+), 388 deletions(-) diff --git a/container/calculator.cpp b/container/calculator.cpp index 247672312..40ea60196 100644 --- a/container/calculator.cpp +++ b/container/calculator.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file calculator.cpp + ** @file calculator.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/calculator.h b/container/calculator.h index 181dc99fc..b18dd6d85 100644 --- a/container/calculator.h +++ b/container/calculator.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file calculator.h + ** @file calculator.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 56e4e7bd6..649c2b2d4 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vcontainer.cpp + ** @file vcontainer.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/vcontainer.h b/container/vcontainer.h index e86b6a8c3..f6370e1ae 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vcontainer.h + ** @file vcontainer.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/vincrementtablerow.cpp b/container/vincrementtablerow.cpp index eae1d3402..7b7b00655 100644 --- a/container/vincrementtablerow.cpp +++ b/container/vincrementtablerow.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vincrementtablerow.cpp + ** @file vincrementtablerow.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/vincrementtablerow.h b/container/vincrementtablerow.h index 0e055e861..5aa643e7d 100644 --- a/container/vincrementtablerow.h +++ b/container/vincrementtablerow.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vincrementtablerow.h + ** @file vincrementtablerow.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/vpointf.cpp b/container/vpointf.cpp index a7b69d871..9bae8f96f 100644 --- a/container/vpointf.cpp +++ b/container/vpointf.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vpointf.cpp + ** @file vpointf.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/vpointf.h b/container/vpointf.h index bbeda2001..b2396ce54 100644 --- a/container/vpointf.h +++ b/container/vpointf.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vpointf.h + ** @file vpointf.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/vstandarttablecell.cpp b/container/vstandarttablecell.cpp index 97bfbf97a..4a824bba9 100644 --- a/container/vstandarttablecell.cpp +++ b/container/vstandarttablecell.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vstandarttablecell.cpp + ** @file vstandarttablecell.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/container/vstandarttablecell.h b/container/vstandarttablecell.h index 198488ce6..b0fe41bb0 100644 --- a/container/vstandarttablecell.h +++ b/container/vstandarttablecell.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vstandarttablecell.h + ** @file vstandarttablecell.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogalongline.cpp b/dialogs/dialogalongline.cpp index c00252c56..adaa26647 100644 --- a/dialogs/dialogalongline.cpp +++ b/dialogs/dialogalongline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogalongline.cpp + ** @file dialogalongline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogalongline.h b/dialogs/dialogalongline.h index 32820bf08..819498b1d 100644 --- a/dialogs/dialogalongline.h +++ b/dialogs/dialogalongline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogalongline.h + ** @file dialogalongline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogarc.cpp b/dialogs/dialogarc.cpp index 0a26dea23..ed4beb7a2 100644 --- a/dialogs/dialogarc.cpp +++ b/dialogs/dialogarc.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogarc.cpp + ** @file dialogarc.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogarc.h b/dialogs/dialogarc.h index a801714f4..014955cce 100644 --- a/dialogs/dialogarc.h +++ b/dialogs/dialogarc.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogarc.h + ** @file dialogarc.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogbisector.cpp b/dialogs/dialogbisector.cpp index 3ba18b79f..2eda284bc 100644 --- a/dialogs/dialogbisector.cpp +++ b/dialogs/dialogbisector.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogbisector.cpp + ** @file dialogbisector.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogbisector.h b/dialogs/dialogbisector.h index 72f0ae42d..99a665ce9 100644 --- a/dialogs/dialogbisector.h +++ b/dialogs/dialogbisector.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogbisector.h + ** @file dialogbisector.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogdetail.cpp b/dialogs/dialogdetail.cpp index a4d94e8fb..f7ab1e834 100644 --- a/dialogs/dialogdetail.cpp +++ b/dialogs/dialogdetail.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogdetail.cpp + ** @file dialogdetail.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogdetail.h b/dialogs/dialogdetail.h index b26a32a95..e4024f9f2 100644 --- a/dialogs/dialogdetail.h +++ b/dialogs/dialogdetail.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogdetail.h + ** @file dialogdetail.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogendline.cpp b/dialogs/dialogendline.cpp index a6a3bb01a..550ea4e0e 100644 --- a/dialogs/dialogendline.cpp +++ b/dialogs/dialogendline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogendline.cpp + ** @file dialogendline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogendline.h b/dialogs/dialogendline.h index f3dcac149..0dfd06401 100644 --- a/dialogs/dialogendline.h +++ b/dialogs/dialogendline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogendline.h + ** @file dialogendline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogheight.cpp b/dialogs/dialogheight.cpp index ff01b473c..3ce7fb730 100644 --- a/dialogs/dialogheight.cpp +++ b/dialogs/dialogheight.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogheight.cpp + ** @file dialogheight.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogheight.h b/dialogs/dialogheight.h index 2c5d11d6c..186af6873 100644 --- a/dialogs/dialogheight.h +++ b/dialogs/dialogheight.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogheight.h + ** @file dialogheight.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialoghistory.cpp b/dialogs/dialoghistory.cpp index ac8227cae..fb2dcb0ca 100644 --- a/dialogs/dialoghistory.cpp +++ b/dialogs/dialoghistory.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialoghistory.cpp + ** @file dialoghistory.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialoghistory.h b/dialogs/dialoghistory.h index 1fb325c99..692f265c3 100644 --- a/dialogs/dialoghistory.h +++ b/dialogs/dialoghistory.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialoghistory.h + ** @file dialoghistory.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogincrements.cpp b/dialogs/dialogincrements.cpp index 148601f54..a50fd47dc 100644 --- a/dialogs/dialogincrements.cpp +++ b/dialogs/dialogincrements.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogincrements.cpp + ** @file dialogincrements.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogincrements.h b/dialogs/dialogincrements.h index 667068b54..58fa46611 100644 --- a/dialogs/dialogincrements.h +++ b/dialogs/dialogincrements.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogincrements.h + ** @file dialogincrements.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogline.cpp b/dialogs/dialogline.cpp index ca71c9875..f14c311d8 100644 --- a/dialogs/dialogline.cpp +++ b/dialogs/dialogline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogline.cpp + ** @file dialogline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogline.h b/dialogs/dialogline.h index 312048720..d0e3c9d1c 100644 --- a/dialogs/dialogline.h +++ b/dialogs/dialogline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogline.h + ** @file dialogline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialoglineintersect.cpp b/dialogs/dialoglineintersect.cpp index 05c4ae270..29ac3375f 100644 --- a/dialogs/dialoglineintersect.cpp +++ b/dialogs/dialoglineintersect.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialoglineintersect.cpp + ** @file dialoglineintersect.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialoglineintersect.h b/dialogs/dialoglineintersect.h index 3a6c22e41..ff3183c3c 100644 --- a/dialogs/dialoglineintersect.h +++ b/dialogs/dialoglineintersect.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialoglineintersect.h + ** @file dialoglineintersect.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialognormal.cpp b/dialogs/dialognormal.cpp index 45f2eaf23..4cf6e1d21 100644 --- a/dialogs/dialognormal.cpp +++ b/dialogs/dialognormal.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialognormal.cpp + ** @file dialognormal.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialognormal.h b/dialogs/dialognormal.h index c4e2bdc5d..b2a7329f5 100644 --- a/dialogs/dialognormal.h +++ b/dialogs/dialognormal.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialognormal.h + ** @file dialognormal.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogpointofcontact.cpp b/dialogs/dialogpointofcontact.cpp index 584d72a84..115379648 100644 --- a/dialogs/dialogpointofcontact.cpp +++ b/dialogs/dialogpointofcontact.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogpointofcontact.cpp + ** @file dialogpointofcontact.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogpointofcontact.h b/dialogs/dialogpointofcontact.h index 3aaf37abf..416e5adcf 100644 --- a/dialogs/dialogpointofcontact.h +++ b/dialogs/dialogpointofcontact.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogpointofcontact.h + ** @file dialogpointofcontact.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogpointofintersection.cpp b/dialogs/dialogpointofintersection.cpp index 032acff85..abcd9a7da 100644 --- a/dialogs/dialogpointofintersection.cpp +++ b/dialogs/dialogpointofintersection.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogpointofintersection.cpp + ** @file dialogpointofintersection.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogpointofintersection.h b/dialogs/dialogpointofintersection.h index 31f9ff7d2..9ea655f58 100644 --- a/dialogs/dialogpointofintersection.h +++ b/dialogs/dialogpointofintersection.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogpointofintersection.h + ** @file dialogpointofintersection.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogs.h b/dialogs/dialogs.h index 16c0e5481..c205f2522 100644 --- a/dialogs/dialogs.h +++ b/dialogs/dialogs.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogs.h + ** @file dialogs.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogshoulderpoint.cpp b/dialogs/dialogshoulderpoint.cpp index ad06456fb..92afa2a92 100644 --- a/dialogs/dialogshoulderpoint.cpp +++ b/dialogs/dialogshoulderpoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogshoulderpoint.cpp + ** @file dialogshoulderpoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogshoulderpoint.h b/dialogs/dialogshoulderpoint.h index 7fba9f447..b9c4df8c2 100644 --- a/dialogs/dialogshoulderpoint.h +++ b/dialogs/dialogshoulderpoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogshoulderpoint.h + ** @file dialogshoulderpoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogsinglepoint.cpp b/dialogs/dialogsinglepoint.cpp index 18a9f00aa..752d0b141 100644 --- a/dialogs/dialogsinglepoint.cpp +++ b/dialogs/dialogsinglepoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogsinglepoint.cpp + ** @file dialogsinglepoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogsinglepoint.h b/dialogs/dialogsinglepoint.h index e475df6af..02c456bd4 100644 --- a/dialogs/dialogsinglepoint.h +++ b/dialogs/dialogsinglepoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogsinglepoint.h + ** @file dialogsinglepoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogspline.cpp b/dialogs/dialogspline.cpp index 9fb854423..9d478f9ea 100644 --- a/dialogs/dialogspline.cpp +++ b/dialogs/dialogspline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogspline.cpp + ** @file dialogspline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogspline.h b/dialogs/dialogspline.h index c42c0b0bb..6ae6b45fc 100644 --- a/dialogs/dialogspline.h +++ b/dialogs/dialogspline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogspline.h + ** @file dialogspline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogsplinepath.cpp b/dialogs/dialogsplinepath.cpp index 07a6eb418..1446f4f8b 100644 --- a/dialogs/dialogsplinepath.cpp +++ b/dialogs/dialogsplinepath.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogsplinepath.cpp + ** @file dialogsplinepath.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogsplinepath.h b/dialogs/dialogsplinepath.h index d6757aed1..1ea4d587b 100644 --- a/dialogs/dialogsplinepath.h +++ b/dialogs/dialogsplinepath.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogsplinepath.h + ** @file dialogsplinepath.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index 091bedf82..d394b1967 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogtool.cpp + ** @file dialogtool.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogtool.h b/dialogs/dialogtool.h index 70908e4e3..34b9ce76e 100644 --- a/dialogs/dialogtool.h +++ b/dialogs/dialogtool.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogtool.h + ** @file dialogtool.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogtriangle.cpp b/dialogs/dialogtriangle.cpp index 8f5509855..49d607e38 100644 --- a/dialogs/dialogtriangle.cpp +++ b/dialogs/dialogtriangle.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogtriangle.cpp + ** @file dialogtriangle.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/dialogs/dialogtriangle.h b/dialogs/dialogtriangle.h index b54200fe4..a3aa2393d 100644 --- a/dialogs/dialogtriangle.h +++ b/dialogs/dialogtriangle.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file dialogtriangle.h + ** @file dialogtriangle.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexception.cpp b/exception/vexception.cpp index b53d046f6..478a7613f 100644 --- a/exception/vexception.cpp +++ b/exception/vexception.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexception.cpp + ** @file vexception.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexception.h b/exception/vexception.h index ede2f942f..426a2c4fb 100644 --- a/exception/vexception.h +++ b/exception/vexception.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexception.h + ** @file vexception.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionbadid.cpp b/exception/vexceptionbadid.cpp index d7073cc90..78bfc6327 100644 --- a/exception/vexceptionbadid.cpp +++ b/exception/vexceptionbadid.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionbadid.cpp + ** @file vexceptionbadid.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionbadid.h b/exception/vexceptionbadid.h index ed21121e3..d15c695e9 100644 --- a/exception/vexceptionbadid.h +++ b/exception/vexceptionbadid.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionbadid.h + ** @file vexceptionbadid.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionconversionerror.cpp b/exception/vexceptionconversionerror.cpp index 76bb92150..cfc0634c5 100644 --- a/exception/vexceptionconversionerror.cpp +++ b/exception/vexceptionconversionerror.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionconversionerror.cpp + ** @file vexceptionconversionerror.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionconversionerror.h b/exception/vexceptionconversionerror.h index 9bff003e3..a864fc98e 100644 --- a/exception/vexceptionconversionerror.h +++ b/exception/vexceptionconversionerror.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionconversionerror.h + ** @file vexceptionconversionerror.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionemptyparameter.cpp b/exception/vexceptionemptyparameter.cpp index 21185861f..af84d8ebd 100644 --- a/exception/vexceptionemptyparameter.cpp +++ b/exception/vexceptionemptyparameter.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionemptyparameter.cpp + ** @file vexceptionemptyparameter.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionemptyparameter.h b/exception/vexceptionemptyparameter.h index eeeab750b..e877f3220 100644 --- a/exception/vexceptionemptyparameter.h +++ b/exception/vexceptionemptyparameter.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionemptyparameter.h + ** @file vexceptionemptyparameter.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionobjecterror.cpp b/exception/vexceptionobjecterror.cpp index 98eb26c0c..7b77be4a3 100644 --- a/exception/vexceptionobjecterror.cpp +++ b/exception/vexceptionobjecterror.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionobjecterror.cpp + ** @file vexceptionobjecterror.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionobjecterror.h b/exception/vexceptionobjecterror.h index 920e0ff9f..c0b3fbaf7 100644 --- a/exception/vexceptionobjecterror.h +++ b/exception/vexceptionobjecterror.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionobjecterror.h + ** @file vexceptionobjecterror.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionuniqueid.cpp b/exception/vexceptionuniqueid.cpp index 7da610fca..10a3136ca 100644 --- a/exception/vexceptionuniqueid.cpp +++ b/exception/vexceptionuniqueid.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionuniqueid.cpp + ** @file vexceptionuniqueid.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionuniqueid.h b/exception/vexceptionuniqueid.h index 0ddb14b39..2ca8b1be2 100644 --- a/exception/vexceptionuniqueid.h +++ b/exception/vexceptionuniqueid.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionuniqueid.h + ** @file vexceptionuniqueid.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionwrongparameterid.cpp b/exception/vexceptionwrongparameterid.cpp index f86e5bd25..14f5ab8ef 100644 --- a/exception/vexceptionwrongparameterid.cpp +++ b/exception/vexceptionwrongparameterid.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionwrongparameterid.cpp + ** @file vexceptionwrongparameterid.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/exception/vexceptionwrongparameterid.h b/exception/vexceptionwrongparameterid.h index 9a1b3f10c..ab5d2f2ee 100644 --- a/exception/vexceptionwrongparameterid.h +++ b/exception/vexceptionwrongparameterid.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vexceptionwrongparameterid.h + ** @file vexceptionwrongparameterid.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/varc.cpp b/geometry/varc.cpp index 8c2f99f89..771f59b1f 100644 --- a/geometry/varc.cpp +++ b/geometry/varc.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file varc.cpp + ** @file varc.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/varc.h b/geometry/varc.h index 69fdd5e57..5939e7bf4 100644 --- a/geometry/varc.h +++ b/geometry/varc.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file varc.h + ** @file varc.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vdetail.cpp b/geometry/vdetail.cpp index acb74a574..a5453788c 100644 --- a/geometry/vdetail.cpp +++ b/geometry/vdetail.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vdetail.cpp + ** @file vdetail.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vdetail.h b/geometry/vdetail.h index aad92c934..2b366c547 100644 --- a/geometry/vdetail.h +++ b/geometry/vdetail.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vdetail.h + ** @file vdetail.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vnodedetail.cpp b/geometry/vnodedetail.cpp index 55385ad0f..b7b09a005 100644 --- a/geometry/vnodedetail.cpp +++ b/geometry/vnodedetail.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodedetail.cpp + ** @file vnodedetail.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vnodedetail.h b/geometry/vnodedetail.h index 8a6572346..799a355aa 100644 --- a/geometry/vnodedetail.h +++ b/geometry/vnodedetail.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodedetail.h + ** @file vnodedetail.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vspline.cpp b/geometry/vspline.cpp index 1a77b2b9c..572ce9342 100644 --- a/geometry/vspline.cpp +++ b/geometry/vspline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vspline.cpp + ** @file vspline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vspline.h b/geometry/vspline.h index 58221954c..644ff709d 100644 --- a/geometry/vspline.h +++ b/geometry/vspline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vspline.h + ** @file vspline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vsplinepath.cpp b/geometry/vsplinepath.cpp index e77f9f465..79b2acf76 100644 --- a/geometry/vsplinepath.cpp +++ b/geometry/vsplinepath.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vsplinepath.cpp + ** @file vsplinepath.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index 6133ee91b..212bda56c 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vsplinepath.h + ** @file vsplinepath.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vsplinepoint.cpp b/geometry/vsplinepoint.cpp index a76e7883a..e57a7363a 100644 --- a/geometry/vsplinepoint.cpp +++ b/geometry/vsplinepoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vsplinepoint.cpp + ** @file vsplinepoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/geometry/vsplinepoint.h b/geometry/vsplinepoint.h index 1454808fc..d6f6ef6d5 100644 --- a/geometry/vsplinepoint.h +++ b/geometry/vsplinepoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vsplinepoint.h + ** @file vsplinepoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/main.cpp b/main.cpp index 61fc5f1bb..8a2cf8320 100644 --- a/main.cpp +++ b/main.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file main.cpp + ** @file main.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/mainwindow.cpp b/mainwindow.cpp index 1c7db04bf..f8f742463 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file mainwindow.cpp + ** @file mainwindow.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/mainwindow.h b/mainwindow.h index 05e96baa6..2c0f2c47e 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file mainwindow.h + ** @file mainwindow.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/options.h b/options.h index a45dcf221..beccd32d3 100644 --- a/options.h +++ b/options.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file options.h + ** @file options.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/stable.cpp b/stable.cpp index 4bb989f56..57b3c2027 100644 --- a/stable.cpp +++ b/stable.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file stable.cpp + ** @file stable.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/stable.h b/stable.h index 772227291..bcc23a610 100644 --- a/stable.h +++ b/stable.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file stable.h + ** @file stable.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tablewindow.cpp b/tablewindow.cpp index 81eb1908d..132c3a5e8 100644 --- a/tablewindow.cpp +++ b/tablewindow.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file tablewindow.cpp + ** @file tablewindow.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tablewindow.h b/tablewindow.h index b9b40740c..8d3ca8801 100644 --- a/tablewindow.h +++ b/tablewindow.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file tablewindow.h + ** @file tablewindow.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/drawtools.h b/tools/drawTools/drawtools.h index 2e75cbd56..b0102c570 100644 --- a/tools/drawTools/drawtools.h +++ b/tools/drawTools/drawtools.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file drawtools.h + ** @file drawtools.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vdrawtool.cpp b/tools/drawTools/vdrawtool.cpp index 21e599c19..20c93c55b 100644 --- a/tools/drawTools/vdrawtool.cpp +++ b/tools/drawTools/vdrawtool.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vdrawtool.cpp + ** @file vdrawtool.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vdrawtool.h b/tools/drawTools/vdrawtool.h index eae38e092..86632645c 100644 --- a/tools/drawTools/vdrawtool.h +++ b/tools/drawTools/vdrawtool.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vdrawtool.h + ** @file vdrawtool.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolalongline.cpp b/tools/drawTools/vtoolalongline.cpp index b65e8fb20..c8bb272c2 100644 --- a/tools/drawTools/vtoolalongline.cpp +++ b/tools/drawTools/vtoolalongline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolalongline.cpp + ** @file vtoolalongline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolalongline.h b/tools/drawTools/vtoolalongline.h index 2a5141c0c..797383e95 100644 --- a/tools/drawTools/vtoolalongline.h +++ b/tools/drawTools/vtoolalongline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolalongline.h + ** @file vtoolalongline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolarc.cpp b/tools/drawTools/vtoolarc.cpp index c914f4a94..9951bfcfb 100644 --- a/tools/drawTools/vtoolarc.cpp +++ b/tools/drawTools/vtoolarc.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolarc.cpp + ** @file vtoolarc.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolarc.h b/tools/drawTools/vtoolarc.h index 3f8f7b18d..17a757f88 100644 --- a/tools/drawTools/vtoolarc.h +++ b/tools/drawTools/vtoolarc.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolarc.h + ** @file vtoolarc.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolbisector.cpp b/tools/drawTools/vtoolbisector.cpp index 564ce8c19..e29886be5 100644 --- a/tools/drawTools/vtoolbisector.cpp +++ b/tools/drawTools/vtoolbisector.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolbisector.cpp + ** @file vtoolbisector.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolbisector.h b/tools/drawTools/vtoolbisector.h index ab1316a04..f449a462e 100644 --- a/tools/drawTools/vtoolbisector.h +++ b/tools/drawTools/vtoolbisector.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolbisector.h + ** @file vtoolbisector.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolendline.cpp b/tools/drawTools/vtoolendline.cpp index be53189fc..0f08affbc 100644 --- a/tools/drawTools/vtoolendline.cpp +++ b/tools/drawTools/vtoolendline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolendline.cpp + ** @file vtoolendline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolendline.h b/tools/drawTools/vtoolendline.h index b5806b1b3..a9ce3fa14 100644 --- a/tools/drawTools/vtoolendline.h +++ b/tools/drawTools/vtoolendline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolendline.h + ** @file vtoolendline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolheight.cpp b/tools/drawTools/vtoolheight.cpp index 599d55686..528f1515c 100644 --- a/tools/drawTools/vtoolheight.cpp +++ b/tools/drawTools/vtoolheight.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolheight.cpp + ** @file vtoolheight.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolheight.h b/tools/drawTools/vtoolheight.h index 14cf3dd17..1d070a225 100644 --- a/tools/drawTools/vtoolheight.h +++ b/tools/drawTools/vtoolheight.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolheight.h + ** @file vtoolheight.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolline.cpp b/tools/drawTools/vtoolline.cpp index 161cee5b0..5b6e0f3bf 100644 --- a/tools/drawTools/vtoolline.cpp +++ b/tools/drawTools/vtoolline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolline.cpp + ** @file vtoolline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolline.h b/tools/drawTools/vtoolline.h index 934afa987..bcc7ac170 100644 --- a/tools/drawTools/vtoolline.h +++ b/tools/drawTools/vtoolline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolline.h + ** @file vtoolline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoollineintersect.cpp b/tools/drawTools/vtoollineintersect.cpp index 5b5adfdf7..1663b4c71 100644 --- a/tools/drawTools/vtoollineintersect.cpp +++ b/tools/drawTools/vtoollineintersect.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoollineintersect.cpp + ** @file vtoollineintersect.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoollineintersect.h b/tools/drawTools/vtoollineintersect.h index c9b328344..aeb34b54d 100644 --- a/tools/drawTools/vtoollineintersect.h +++ b/tools/drawTools/vtoollineintersect.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoollineintersect.h + ** @file vtoollineintersect.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoollinepoint.cpp b/tools/drawTools/vtoollinepoint.cpp index 89c9c0f44..e0042b60d 100644 --- a/tools/drawTools/vtoollinepoint.cpp +++ b/tools/drawTools/vtoollinepoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoollinepoint.cpp + ** @file vtoollinepoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoollinepoint.h b/tools/drawTools/vtoollinepoint.h index 4faf640d4..dc10aeb17 100644 --- a/tools/drawTools/vtoollinepoint.h +++ b/tools/drawTools/vtoollinepoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoollinepoint.h + ** @file vtoollinepoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolnormal.cpp b/tools/drawTools/vtoolnormal.cpp index abd9af816..0acb05cdf 100644 --- a/tools/drawTools/vtoolnormal.cpp +++ b/tools/drawTools/vtoolnormal.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolnormal.cpp + ** @file vtoolnormal.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolnormal.h b/tools/drawTools/vtoolnormal.h index b1f7bc6dd..0f2b1fd07 100644 --- a/tools/drawTools/vtoolnormal.h +++ b/tools/drawTools/vtoolnormal.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolnormal.h + ** @file vtoolnormal.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolpoint.cpp b/tools/drawTools/vtoolpoint.cpp index bd8181f1e..3deec4002 100644 --- a/tools/drawTools/vtoolpoint.cpp +++ b/tools/drawTools/vtoolpoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolpoint.cpp + ** @file vtoolpoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolpoint.h b/tools/drawTools/vtoolpoint.h index 25584de2b..c7e26939e 100644 --- a/tools/drawTools/vtoolpoint.h +++ b/tools/drawTools/vtoolpoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolpoint.h + ** @file vtoolpoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolpointofcontact.cpp b/tools/drawTools/vtoolpointofcontact.cpp index 56f73f7fe..9d94bc7e9 100644 --- a/tools/drawTools/vtoolpointofcontact.cpp +++ b/tools/drawTools/vtoolpointofcontact.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolpointofcontact.cpp + ** @file vtoolpointofcontact.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolpointofcontact.h b/tools/drawTools/vtoolpointofcontact.h index 75ce0d73c..54025adde 100644 --- a/tools/drawTools/vtoolpointofcontact.h +++ b/tools/drawTools/vtoolpointofcontact.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolpointofcontact.h + ** @file vtoolpointofcontact.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolpointofintersection.cpp b/tools/drawTools/vtoolpointofintersection.cpp index b6b8c368e..dc0d4d7e8 100644 --- a/tools/drawTools/vtoolpointofintersection.cpp +++ b/tools/drawTools/vtoolpointofintersection.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolpointofintersection.cpp + ** @file vtoolpointofintersection.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolpointofintersection.h b/tools/drawTools/vtoolpointofintersection.h index 99255449f..f311b5cbe 100644 --- a/tools/drawTools/vtoolpointofintersection.h +++ b/tools/drawTools/vtoolpointofintersection.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolpointofintersection.h + ** @file vtoolpointofintersection.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolshoulderpoint.cpp b/tools/drawTools/vtoolshoulderpoint.cpp index df21f544b..115cc7b47 100644 --- a/tools/drawTools/vtoolshoulderpoint.cpp +++ b/tools/drawTools/vtoolshoulderpoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolshoulderpoint.cpp + ** @file vtoolshoulderpoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolshoulderpoint.h b/tools/drawTools/vtoolshoulderpoint.h index ef7986571..efede5abd 100644 --- a/tools/drawTools/vtoolshoulderpoint.h +++ b/tools/drawTools/vtoolshoulderpoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolshoulderpoint.h + ** @file vtoolshoulderpoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolsinglepoint.cpp b/tools/drawTools/vtoolsinglepoint.cpp index 7abb58219..0308f2963 100644 --- a/tools/drawTools/vtoolsinglepoint.cpp +++ b/tools/drawTools/vtoolsinglepoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolsinglepoint.cpp + ** @file vtoolsinglepoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolsinglepoint.h b/tools/drawTools/vtoolsinglepoint.h index ca7f067ec..d0d482fd4 100644 --- a/tools/drawTools/vtoolsinglepoint.h +++ b/tools/drawTools/vtoolsinglepoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolsinglepoint.h + ** @file vtoolsinglepoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolspline.cpp b/tools/drawTools/vtoolspline.cpp index fe47cbcce..b1ab4c6dd 100644 --- a/tools/drawTools/vtoolspline.cpp +++ b/tools/drawTools/vtoolspline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolspline.cpp + ** @file vtoolspline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolspline.h b/tools/drawTools/vtoolspline.h index 3424e87fb..d4277af40 100644 --- a/tools/drawTools/vtoolspline.h +++ b/tools/drawTools/vtoolspline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolspline.h + ** @file vtoolspline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolsplinepath.cpp b/tools/drawTools/vtoolsplinepath.cpp index 302a5ffd4..bd656dc79 100644 --- a/tools/drawTools/vtoolsplinepath.cpp +++ b/tools/drawTools/vtoolsplinepath.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolsplinepath.cpp + ** @file vtoolsplinepath.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtoolsplinepath.h b/tools/drawTools/vtoolsplinepath.h index 7ff780504..a58ddc2ee 100644 --- a/tools/drawTools/vtoolsplinepath.h +++ b/tools/drawTools/vtoolsplinepath.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolsplinepath.h + ** @file vtoolsplinepath.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtooltriangle.cpp b/tools/drawTools/vtooltriangle.cpp index dee16eac7..7f0c65081 100644 --- a/tools/drawTools/vtooltriangle.cpp +++ b/tools/drawTools/vtooltriangle.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtooltriangle.cpp + ** @file vtooltriangle.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/drawTools/vtooltriangle.h b/tools/drawTools/vtooltriangle.h index 329028df9..dc848c76b 100644 --- a/tools/drawTools/vtooltriangle.h +++ b/tools/drawTools/vtooltriangle.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtooltriangle.h + ** @file vtooltriangle.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/modelingtools.h b/tools/modelingTools/modelingtools.h index 8ce388dd0..3203357b1 100644 --- a/tools/modelingTools/modelingtools.h +++ b/tools/modelingTools/modelingtools.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file modelingtools.h + ** @file modelingtools.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingalongline.cpp b/tools/modelingTools/vmodelingalongline.cpp index 1f504b46a..fce43cb07 100644 --- a/tools/modelingTools/vmodelingalongline.cpp +++ b/tools/modelingTools/vmodelingalongline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingalongline.cpp + ** @file vmodelingalongline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingalongline.h b/tools/modelingTools/vmodelingalongline.h index a063f151b..7bdba7e28 100644 --- a/tools/modelingTools/vmodelingalongline.h +++ b/tools/modelingTools/vmodelingalongline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingalongline.h + ** @file vmodelingalongline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingarc.cpp b/tools/modelingTools/vmodelingarc.cpp index c8aa15d1f..49ece909d 100644 --- a/tools/modelingTools/vmodelingarc.cpp +++ b/tools/modelingTools/vmodelingarc.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingarc.cpp + ** @file vmodelingarc.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingarc.h b/tools/modelingTools/vmodelingarc.h index bdf51efd1..510ba9d07 100644 --- a/tools/modelingTools/vmodelingarc.h +++ b/tools/modelingTools/vmodelingarc.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingarc.h + ** @file vmodelingarc.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingbisector.cpp b/tools/modelingTools/vmodelingbisector.cpp index 11324c531..7cdf15366 100644 --- a/tools/modelingTools/vmodelingbisector.cpp +++ b/tools/modelingTools/vmodelingbisector.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingbisector.cpp + ** @file vmodelingbisector.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingbisector.h b/tools/modelingTools/vmodelingbisector.h index 3676fb0ad..cb5196cd2 100644 --- a/tools/modelingTools/vmodelingbisector.h +++ b/tools/modelingTools/vmodelingbisector.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingbisector.h + ** @file vmodelingbisector.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingendline.cpp b/tools/modelingTools/vmodelingendline.cpp index 7eaf8f668..1886c0672 100644 --- a/tools/modelingTools/vmodelingendline.cpp +++ b/tools/modelingTools/vmodelingendline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingendline.cpp + ** @file vmodelingendline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingendline.h b/tools/modelingTools/vmodelingendline.h index fe2aec5ca..2bf52d30a 100644 --- a/tools/modelingTools/vmodelingendline.h +++ b/tools/modelingTools/vmodelingendline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingbisector.h + ** @file vmodelingbisector.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingheight.cpp b/tools/modelingTools/vmodelingheight.cpp index 497a53346..53ae05ac1 100644 --- a/tools/modelingTools/vmodelingheight.cpp +++ b/tools/modelingTools/vmodelingheight.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingheight.cpp + ** @file vmodelingheight.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingheight.h b/tools/modelingTools/vmodelingheight.h index 016a6d777..791779e46 100644 --- a/tools/modelingTools/vmodelingheight.h +++ b/tools/modelingTools/vmodelingheight.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingheight.h + ** @file vmodelingheight.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingline.cpp b/tools/modelingTools/vmodelingline.cpp index edd109a26..619467dd5 100644 --- a/tools/modelingTools/vmodelingline.cpp +++ b/tools/modelingTools/vmodelingline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingline.cpp + ** @file vmodelingline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingline.h b/tools/modelingTools/vmodelingline.h index c04e04c1b..2798eadb7 100644 --- a/tools/modelingTools/vmodelingline.h +++ b/tools/modelingTools/vmodelingline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingline.h + ** @file vmodelingline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelinglineintersect.cpp b/tools/modelingTools/vmodelinglineintersect.cpp index 327dfa3d0..4a3eec24b 100644 --- a/tools/modelingTools/vmodelinglineintersect.cpp +++ b/tools/modelingTools/vmodelinglineintersect.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelinglineintersect.cpp + ** @file vmodelinglineintersect.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelinglineintersect.h b/tools/modelingTools/vmodelinglineintersect.h index dfa6ce0fd..b8ca4d2eb 100644 --- a/tools/modelingTools/vmodelinglineintersect.h +++ b/tools/modelingTools/vmodelinglineintersect.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelinglineintersect.h + ** @file vmodelinglineintersect.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelinglinepoint.cpp b/tools/modelingTools/vmodelinglinepoint.cpp index f22649405..2c88505ad 100644 --- a/tools/modelingTools/vmodelinglinepoint.cpp +++ b/tools/modelingTools/vmodelinglinepoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelinglinepoint.cpp + ** @file vmodelinglinepoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelinglinepoint.h b/tools/modelingTools/vmodelinglinepoint.h index 24a0b36c9..4ca0e9ced 100644 --- a/tools/modelingTools/vmodelinglinepoint.h +++ b/tools/modelingTools/vmodelinglinepoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelinglinepoint.h + ** @file vmodelinglinepoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingnormal.cpp b/tools/modelingTools/vmodelingnormal.cpp index 0d89bb995..d0d662b1c 100644 --- a/tools/modelingTools/vmodelingnormal.cpp +++ b/tools/modelingTools/vmodelingnormal.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingnormal.cpp + ** @file vmodelingnormal.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingnormal.h b/tools/modelingTools/vmodelingnormal.h index a9c70e392..3d9062a0e 100644 --- a/tools/modelingTools/vmodelingnormal.h +++ b/tools/modelingTools/vmodelingnormal.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingnormal.h + ** @file vmodelingnormal.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingpoint.cpp b/tools/modelingTools/vmodelingpoint.cpp index 14d74453f..af97dd218 100644 --- a/tools/modelingTools/vmodelingpoint.cpp +++ b/tools/modelingTools/vmodelingpoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingpoint.cpp + ** @file vmodelingpoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingpoint.h b/tools/modelingTools/vmodelingpoint.h index d88d9d54a..e03799136 100644 --- a/tools/modelingTools/vmodelingpoint.h +++ b/tools/modelingTools/vmodelingpoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingpoint.h + ** @file vmodelingpoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingpointofcontact.cpp b/tools/modelingTools/vmodelingpointofcontact.cpp index b6b3e8b41..9c4ba59b0 100644 --- a/tools/modelingTools/vmodelingpointofcontact.cpp +++ b/tools/modelingTools/vmodelingpointofcontact.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingpointofcontact.cpp + ** @file vmodelingpointofcontact.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/tools/modelingTools/vmodelingpointofcontact.h index f44d2f5f8..d9be2cda2 100644 --- a/tools/modelingTools/vmodelingpointofcontact.h +++ b/tools/modelingTools/vmodelingpointofcontact.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingpointofcontact.h + ** @file vmodelingpointofcontact.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingpointofintersection.cpp b/tools/modelingTools/vmodelingpointofintersection.cpp index c027fb372..cfa4006d7 100644 --- a/tools/modelingTools/vmodelingpointofintersection.cpp +++ b/tools/modelingTools/vmodelingpointofintersection.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingpointofintersection.cpp + ** @file vmodelingpointofintersection.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/tools/modelingTools/vmodelingpointofintersection.h index b958256ad..4a859ea84 100644 --- a/tools/modelingTools/vmodelingpointofintersection.h +++ b/tools/modelingTools/vmodelingpointofintersection.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingpointofintersection.h + ** @file vmodelingpointofintersection.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingshoulderpoint.cpp b/tools/modelingTools/vmodelingshoulderpoint.cpp index c2a699750..ceec80d1b 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.cpp +++ b/tools/modelingTools/vmodelingshoulderpoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingshoulderpoint.cpp + ** @file vmodelingshoulderpoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingshoulderpoint.h b/tools/modelingTools/vmodelingshoulderpoint.h index 5881ed81b..7b9d27027 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.h +++ b/tools/modelingTools/vmodelingshoulderpoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingshoulderpoint.h + ** @file vmodelingshoulderpoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index ca760b419..951bc7efc 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingspline.cpp + ** @file vmodelingspline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index a04cb3518..7173fc501 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingspline.h + ** @file vmodelingspline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/tools/modelingTools/vmodelingsplinepath.cpp index 4424a3590..515e80a96 100644 --- a/tools/modelingTools/vmodelingsplinepath.cpp +++ b/tools/modelingTools/vmodelingsplinepath.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingsplinepath.cpp + ** @file vmodelingsplinepath.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingsplinepath.h b/tools/modelingTools/vmodelingsplinepath.h index 462088c5b..09d77d2ff 100644 --- a/tools/modelingTools/vmodelingsplinepath.h +++ b/tools/modelingTools/vmodelingsplinepath.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingsplinepath.h + ** @file vmodelingsplinepath.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingtool.cpp b/tools/modelingTools/vmodelingtool.cpp index 926aee6bf..d3b8f05fd 100644 --- a/tools/modelingTools/vmodelingtool.cpp +++ b/tools/modelingTools/vmodelingtool.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingtool.cpp + ** @file vmodelingtool.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingtool.h b/tools/modelingTools/vmodelingtool.h index 6bac46ff9..53c57236c 100644 --- a/tools/modelingTools/vmodelingtool.h +++ b/tools/modelingTools/vmodelingtool.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingtool.h + ** @file vmodelingtool.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingtriangle.cpp b/tools/modelingTools/vmodelingtriangle.cpp index a09aff744..57db01474 100644 --- a/tools/modelingTools/vmodelingtriangle.cpp +++ b/tools/modelingTools/vmodelingtriangle.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingtriangle.cpp + ** @file vmodelingtriangle.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/modelingTools/vmodelingtriangle.h b/tools/modelingTools/vmodelingtriangle.h index 8b6ae8cad..09dfdfb21 100644 --- a/tools/modelingTools/vmodelingtriangle.h +++ b/tools/modelingTools/vmodelingtriangle.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmodelingtriangle.h + ** @file vmodelingtriangle.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/nodedetails.h b/tools/nodeDetails/nodedetails.h index 1b736daa5..d230f7456 100644 --- a/tools/nodeDetails/nodedetails.h +++ b/tools/nodeDetails/nodedetails.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file nodedetails.h + ** @file nodedetails.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vabstractnode.cpp b/tools/nodeDetails/vabstractnode.cpp index 2e240050b..48374a891 100644 --- a/tools/nodeDetails/vabstractnode.cpp +++ b/tools/nodeDetails/vabstractnode.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vabstractnode.cpp + ** @file vabstractnode.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vabstractnode.h b/tools/nodeDetails/vabstractnode.h index 65665cec9..7fff53e9e 100644 --- a/tools/nodeDetails/vabstractnode.h +++ b/tools/nodeDetails/vabstractnode.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vabstractnode.h + ** @file vabstractnode.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vnodearc.cpp b/tools/nodeDetails/vnodearc.cpp index 5d2ba5360..826174a68 100644 --- a/tools/nodeDetails/vnodearc.cpp +++ b/tools/nodeDetails/vnodearc.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodearc.cpp + ** @file vnodearc.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vnodearc.h b/tools/nodeDetails/vnodearc.h index 8473997b8..f71096694 100644 --- a/tools/nodeDetails/vnodearc.h +++ b/tools/nodeDetails/vnodearc.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodearc.h + ** @file vnodearc.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vnodepoint.cpp b/tools/nodeDetails/vnodepoint.cpp index 3729dadb2..e7495c3c3 100644 --- a/tools/nodeDetails/vnodepoint.cpp +++ b/tools/nodeDetails/vnodepoint.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodepoint.cpp + ** @file vnodepoint.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vnodepoint.h b/tools/nodeDetails/vnodepoint.h index 975a5a69c..7874715c6 100644 --- a/tools/nodeDetails/vnodepoint.h +++ b/tools/nodeDetails/vnodepoint.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodepoint.h + ** @file vnodepoint.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vnodespline.cpp b/tools/nodeDetails/vnodespline.cpp index 1e358df25..26dd21a01 100644 --- a/tools/nodeDetails/vnodespline.cpp +++ b/tools/nodeDetails/vnodespline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodespline.cpp + ** @file vnodespline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vnodespline.h b/tools/nodeDetails/vnodespline.h index 3cc972108..fc8dcb202 100644 --- a/tools/nodeDetails/vnodespline.h +++ b/tools/nodeDetails/vnodespline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodespline.h + ** @file vnodespline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vnodesplinepath.cpp b/tools/nodeDetails/vnodesplinepath.cpp index ab4ebe51b..8defab838 100644 --- a/tools/nodeDetails/vnodesplinepath.cpp +++ b/tools/nodeDetails/vnodesplinepath.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodesplinepath.cpp + ** @file vnodesplinepath.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/nodeDetails/vnodesplinepath.h b/tools/nodeDetails/vnodesplinepath.h index 00d8887b4..f5b0c9cba 100644 --- a/tools/nodeDetails/vnodesplinepath.h +++ b/tools/nodeDetails/vnodesplinepath.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vnodesplinepath.h + ** @file vnodesplinepath.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/tools.h b/tools/tools.h index 42748ee27..69adbf1ce 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file tools.h + ** @file tools.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/vabstracttool.cpp b/tools/vabstracttool.cpp index 5dad4aea7..0d52f3faf 100644 --- a/tools/vabstracttool.cpp +++ b/tools/vabstracttool.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vabstracttool.cpp + ** @file vabstracttool.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/vabstracttool.h b/tools/vabstracttool.h index 42ed64df2..f3a2ea372 100644 --- a/tools/vabstracttool.h +++ b/tools/vabstracttool.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vabstracttool.h + ** @file vabstracttool.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/vdatatool.cpp b/tools/vdatatool.cpp index 49d987c31..58a6eb39f 100644 --- a/tools/vdatatool.cpp +++ b/tools/vdatatool.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vdatatool.cpp + ** @file vdatatool.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/vdatatool.h b/tools/vdatatool.h index 179714baa..86d0b2927 100644 --- a/tools/vdatatool.h +++ b/tools/vdatatool.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vdatatool.h + ** @file vdatatool.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/vtooldetail.cpp b/tools/vtooldetail.cpp index 3a7342cf2..3556182cf 100644 --- a/tools/vtooldetail.cpp +++ b/tools/vtooldetail.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtooldetail.cpp + ** @file vtooldetail.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/tools/vtooldetail.h b/tools/vtooldetail.h index 1b4265b78..b0079d5b8 100644 --- a/tools/vtooldetail.h +++ b/tools/vtooldetail.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtooldetail.h + ** @file vtooldetail.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/version.h b/version.h index d307318ff..fb95d4e3b 100644 --- a/version.h +++ b/version.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file version.h + ** @file version.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/doubledelegate.cpp b/widgets/doubledelegate.cpp index c7311bfcb..7e5529553 100644 --- a/widgets/doubledelegate.cpp +++ b/widgets/doubledelegate.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file doubledelegate.cpp + ** @file doubledelegate.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/doubledelegate.h b/widgets/doubledelegate.h index 8c0316f1f..c4bc8ac49 100644 --- a/widgets/doubledelegate.h +++ b/widgets/doubledelegate.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file doubledelegate.h + ** @file doubledelegate.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vapplication.cpp b/widgets/vapplication.cpp index dc5bd11c6..34327663f 100644 --- a/widgets/vapplication.cpp +++ b/widgets/vapplication.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vapplication.cpp + ** @file vapplication.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vapplication.h b/widgets/vapplication.h index 0a314ec36..359dd1806 100644 --- a/widgets/vapplication.h +++ b/widgets/vapplication.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vapplication.h + ** @file vapplication.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vcontrolpointspline.cpp b/widgets/vcontrolpointspline.cpp index 22ad0c8b9..8a81c7f0e 100644 --- a/widgets/vcontrolpointspline.cpp +++ b/widgets/vcontrolpointspline.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vcontrolpointspline.cpp + ** @file vcontrolpointspline.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vcontrolpointspline.h b/widgets/vcontrolpointspline.h index 2d9cf83d9..fddc4ccec 100644 --- a/widgets/vcontrolpointspline.h +++ b/widgets/vcontrolpointspline.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vcontrolpointspline.h + ** @file vcontrolpointspline.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vgraphicssimpletextitem.cpp b/widgets/vgraphicssimpletextitem.cpp index 56d15d16e..5e34555ce 100644 --- a/widgets/vgraphicssimpletextitem.cpp +++ b/widgets/vgraphicssimpletextitem.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vgraphicssimpletextitem.cpp + ** @file vgraphicssimpletextitem.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vgraphicssimpletextitem.h b/widgets/vgraphicssimpletextitem.h index b60303180..3f3b2a2a8 100644 --- a/widgets/vgraphicssimpletextitem.h +++ b/widgets/vgraphicssimpletextitem.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vgraphicssimpletextitem.h + ** @file vgraphicssimpletextitem.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vitem.cpp b/widgets/vitem.cpp index f2606a38a..37c6614cc 100644 --- a/widgets/vitem.cpp +++ b/widgets/vitem.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vitem.cpp + ** @file vitem.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vitem.h b/widgets/vitem.h index 7c05eb75a..750b41305 100644 --- a/widgets/vitem.h +++ b/widgets/vitem.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vitem.h + ** @file vitem.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vmaingraphicsscene.cpp b/widgets/vmaingraphicsscene.cpp index b7ff49b3b..6b5299fb9 100644 --- a/widgets/vmaingraphicsscene.cpp +++ b/widgets/vmaingraphicsscene.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmaingraphicsscene.cpp + ** @file vmaingraphicsscene.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vmaingraphicsscene.h b/widgets/vmaingraphicsscene.h index 5ca3d91ce..8d605d64d 100644 --- a/widgets/vmaingraphicsscene.h +++ b/widgets/vmaingraphicsscene.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmaingraphicsscene.h + ** @file vmaingraphicsscene.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vmaingraphicsview.cpp b/widgets/vmaingraphicsview.cpp index 3632ad520..8fc8fe703 100644 --- a/widgets/vmaingraphicsview.cpp +++ b/widgets/vmaingraphicsview.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmaingraphicsview.cpp + ** @file vmaingraphicsview.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vmaingraphicsview.h b/widgets/vmaingraphicsview.h index 3ce745c59..c4bb43956 100644 --- a/widgets/vmaingraphicsview.h +++ b/widgets/vmaingraphicsview.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vmaingraphicsview.h + ** @file vmaingraphicsview.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vtablegraphicsview.cpp b/widgets/vtablegraphicsview.cpp index a62191ec9..a60b22567 100644 --- a/widgets/vtablegraphicsview.cpp +++ b/widgets/vtablegraphicsview.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtablegraphicsview.cpp + ** @file vtablegraphicsview.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/widgets/vtablegraphicsview.h b/widgets/vtablegraphicsview.h index 2e7e4b45c..da6f9a5fa 100644 --- a/widgets/vtablegraphicsview.h +++ b/widgets/vtablegraphicsview.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtablegraphicsview.h + ** @file vtablegraphicsview.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/xml/vdomdocument.cpp b/xml/vdomdocument.cpp index 3f7ef557d..55071e861 100644 --- a/xml/vdomdocument.cpp +++ b/xml/vdomdocument.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vdomdocument.cpp + ** @file vdomdocument.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/xml/vdomdocument.h b/xml/vdomdocument.h index 1ef7995e4..1042beb9a 100644 --- a/xml/vdomdocument.h +++ b/xml/vdomdocument.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vdomdocument.h + ** @file vdomdocument.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/xml/vtoolrecord.cpp b/xml/vtoolrecord.cpp index 8b0fbdded..e5e69ac0a 100644 --- a/xml/vtoolrecord.cpp +++ b/xml/vtoolrecord.cpp @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolrecord.cpp + ** @file vtoolrecord.cpp ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright diff --git a/xml/vtoolrecord.h b/xml/vtoolrecord.h index a430e450a..a2f964970 100644 --- a/xml/vtoolrecord.h +++ b/xml/vtoolrecord.h @@ -1,8 +1,8 @@ /************************************************************************ ** - ** @file vtoolrecord.h + ** @file vtoolrecord.h ** @author Roman Telezhinsky - ** @date Friday November 15, 2013 + ** @date November 15, 2013 ** ** @brief ** @copyright From e89883f778495d3235648889b7b4a339c5d7bffd Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 15 Nov 2013 15:19:43 +0200 Subject: [PATCH 22/56] Now no need install ccache for build release version of application. --HG-- branch : develop --- Valentina.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Valentina.pro b/Valentina.pro index 13ee22a43..15171136b 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -16,7 +16,6 @@ RELEASE_TARGET = Valentina CONFIG -= debug_and_release debug_and_release_target CONFIG += c++11 precompile_header -QMAKE_CXX = ccache g++ #DEFINES += ... # Precompiled headers (PCH) @@ -71,6 +70,7 @@ TRANSLATIONS += translations/valentina_ru.ts \ CONFIG(debug, debug|release){ # Debug + QMAKE_CXX = ccache g++ TARGET = $$DEBUG_TARGET QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \ From 4a15ccf0687c07520ba0bc334d867f8c25f61dd8 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 15 Nov 2013 17:42:24 +0200 Subject: [PATCH 23/56] ChangeLog file. --HG-- branch : develop --- ChangeLog | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ChangeLog diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 000000000..f43868e56 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,3 @@ +# Version 0.2.0 Released October 29, 2013 + + From f3ff6d430333c4f2847204bae4a8e66b20cc99a7 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 15 Nov 2013 17:48:01 +0200 Subject: [PATCH 24/56] File AUTHORS. --HG-- branch : develop --- AUTHORS | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 AUTHORS diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..dd9952069 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,5 @@ +Author: + + (*) Roman Telezhinsky + Founder of the project. + From fe04b63722e06cd4953a7ff784afc9e57bde6a92 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 15 Nov 2013 19:38:29 +0200 Subject: [PATCH 25/56] This methods can't be inline. --HG-- branch : develop --- container/vcontainer.cpp | 45 ++++++++++++++++++++++++++++++++++++++++ container/vcontainer.h | 18 ++++++++-------- 2 files changed, 54 insertions(+), 9 deletions(-) diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 649c2b2d4..5bbe38e15 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -87,6 +87,16 @@ void VContainer::setData(const VContainer &data) details = *data.DataDetails(); } +VPointF VContainer::GetPoint(qint64 id) const +{ + return GetObject(points, id); +} + +VPointF VContainer::GetModelingPoint(qint64 id) const +{ + return GetObject(modelingPoints, id); +} + template val VContainer::GetObject(const QHash &obj, key id) { @@ -136,6 +146,41 @@ qreal VContainer::GetLineAngle(const QString &name) const return GetObject(lineAngles, name); } +VSpline VContainer::GetSpline(qint64 id) const +{ + return GetObject(splines, id); +} + +VSpline VContainer::GetModelingSpline(qint64 id) const +{ + return GetObject(modelingSplines, id); +} + +VArc VContainer::GetArc(qint64 id) const +{ + return GetObject(arcs, id); +} + +VArc VContainer::GetModelingArc(qint64 id) const +{ + return GetObject(modelingArcs, id); +} + +VSplinePath VContainer::GetSplinePath(qint64 id) const +{ + return GetObject(splinePaths, id); +} + +VSplinePath VContainer::GetModelingSplinePath(qint64 id) const +{ + return GetObject(modelingSplinePaths, id); +} + +VDetail VContainer::GetDetail(qint64 id) const +{ + return GetObject(details, id); +} + qint64 VContainer::AddPoint(const VPointF &point) { return AddObject(points, point); diff --git a/container/vcontainer.h b/container/vcontainer.h index f6370e1ae..3044cec98 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -55,21 +55,21 @@ public: * @param id * @return */ - inline VPointF GetPoint(qint64 id) const {return GetObject(points, id);} - inline VPointF GetModelingPoint(qint64 id) const {return GetObject(modelingPoints, id);} + VPointF GetPoint(qint64 id) const; + VPointF GetModelingPoint(qint64 id) const; VStandartTableCell GetStandartTableCell(const QString& name) const; VIncrementTableRow GetIncrementTableRow(const QString& name) const; qreal GetLine(const QString &name) const; qreal GetLengthArc(const QString &name) const; qreal GetLengthSpline(const QString &name) const; qreal GetLineAngle(const QString &name) const; - inline VSpline GetSpline(qint64 id) const {return GetObject(splines, id);} - inline VSpline GetModelingSpline(qint64 id) const {return GetObject(modelingSplines, id);} - inline VArc GetArc(qint64 id) const {return GetObject(arcs, id);} - inline VArc GetModelingArc(qint64 id) const {return GetObject(modelingArcs, id);} - inline VSplinePath GetSplinePath(qint64 id) const {return GetObject(splinePaths, id);} - inline VSplinePath GetModelingSplinePath(qint64 id) const {return GetObject(modelingSplinePaths, id);} - inline VDetail GetDetail(qint64 id) const {return GetObject(details, id);} + VSpline GetSpline(qint64 id) const; + VSpline GetModelingSpline(qint64 id) const; + VArc GetArc(qint64 id) const; + VArc GetModelingArc(qint64 id) const; + VSplinePath GetSplinePath(qint64 id) const; + VSplinePath GetModelingSplinePath(qint64 id) const; + VDetail GetDetail(qint64 id) const; static qint64 getId() {return _id;} qint64 AddPoint(const VPointF& point); qint64 AddModelingPoint(const VPointF& point); From e99268e028130b0101380b688f4ef4b7595e349d Mon Sep 17 00:00:00 2001 From: dismine Date: Sun, 17 Nov 2013 15:20:53 +0200 Subject: [PATCH 26/56] README file. --HG-- branch : develop --- README | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 000000000..e225bef05 --- /dev/null +++ b/README @@ -0,0 +1,38 @@ +Valentina +========== +Open source project of creating a pattern making program, whose allow create and modeling patterns of clothing. + +Supported Platforms +=================== +The standalone binary packages support the following platforms: + +Windows XP SP2 or later +Ubuntu Linux 11.10 (32-bit) or later + +Building the sources requires Qt 5.0.0 or later. + +Compiling Valentina +==================== +Prerequisites: + * Qt 5.0.0 or later + * On Windows: + - MinGW or Visual Studio + +The installed toolchains have to match the one Qt was compiled with. + +You can build Valentina with + + cd $SOURCE_DIRECTORY + qmake -r + make (or mingw32-make or nmake or jom, depending on your platform) + +Installation ("make install") is not needed. + +Note:In order to build and use Valentina, the PATH environment variable needs to be extended: + + PATH - to locate qmake, moc and other Qt tools +This is done by adding c:\Qt\%VERSION%\bin to the PATH variable. + +For newer versions of Windows, PATH can be extended through the Control Panel|System|Advanced|Environment variables menu. + +You may also need to ensure that the locations of your compiler and other build tools are listed in the PATH variable. This will depend on your choice of software development environment. From 22ed94bb0caa460b6c3ad780c8a4369961b17959 Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 18 Nov 2013 12:03:47 +0200 Subject: [PATCH 27/56] TODO file. --HG-- branch : develop --- TODO | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 TODO diff --git a/TODO b/TODO new file mode 100644 index 000000000..1499e59a6 --- /dev/null +++ b/TODO @@ -0,0 +1,33 @@ +Valentina TODO file. +For more information see https://bitbucket.org/dismine/valentina/issues + +(c) Valentina Team 2013 + + * Rotate details. + * Reflection details. + * Theme with icon for windows version of program. + * Label on detail. + * Checking integrity of file. + * Description of pattern. + * Type of lines. + * New way create detail. + * Tuck transfer. + * Point on arc, curve and curve path. + * Union details. + * Сonditions. + * New format name. + * Standard table of measurements. + * Localization. + * Window "Option". + * Undo/redo functionality in applications. + * Checking file integrity. + * Sketch drawing. + * Graduation card. + * Individual mode of construction pattern. + * Description about pattern in SVG file. + * Visualization. + + + + + From 65e55ddfb9f47539c457cb7f8ce438717e6c4985 Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 18 Nov 2013 12:08:54 +0200 Subject: [PATCH 28/56] Changes in readme. --HG-- branch : develop --- README | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README b/README index e225bef05..ccf3d0cc9 100644 --- a/README +++ b/README @@ -1,6 +1,8 @@ Valentina ========== -Open source project of creating a pattern making program, whose allow create and modeling patterns of clothing. +Open source project of creating a pattern making program, whose allow +create and modeling patterns of clothing. +Published under GNU GPL v3 license. Supported Platforms =================== @@ -28,11 +30,15 @@ You can build Valentina with Installation ("make install") is not needed. -Note:In order to build and use Valentina, the PATH environment variable needs to be extended: +Note:In order to build and use Valentina, the PATH environment variable +needs to be extended: PATH - to locate qmake, moc and other Qt tools This is done by adding c:\Qt\%VERSION%\bin to the PATH variable. -For newer versions of Windows, PATH can be extended through the Control Panel|System|Advanced|Environment variables menu. +For newer versions of Windows, PATH can be extended through the +Control Panel|System|Advanced|Environment variables menu. -You may also need to ensure that the locations of your compiler and other build tools are listed in the PATH variable. This will depend on your choice of software development environment. +You may also need to ensure that the locations of your compiler and +other build tools are listed in the PATH variable. This will depend on +your choice of software development environment. From 70e2daf8f95a9e8ea905f33fd5940a46aa7d790d Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 18 Nov 2013 13:36:51 +0200 Subject: [PATCH 29/56] Updated Doxyfile. --HG-- branch : feature --- docs/Doxyfile | 236 +++++++++++++++++++++++++++++++++++--------------- 1 file changed, 167 insertions(+), 69 deletions(-) diff --git a/docs/Doxyfile b/docs/Doxyfile index 2bb9214ea..f17ebac22 100644 --- a/docs/Doxyfile +++ b/docs/Doxyfile @@ -1,8 +1,10 @@ -# Doxyfile 1.8.1.2 +# Doxyfile 1.8.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # +# All text after a double hash (##) is considered a comment and is placed +# in front of the TAG it is preceding . # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] @@ -70,9 +72,9 @@ CREATE_SUBDIRS = NO # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. +# messages), Korean, Korean-en, Latvian, Lithuanian, Norwegian, Macedonian, +# Persian, Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, +# Slovak, Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English @@ -126,7 +128,9 @@ FULL_PATH_NAMES = YES # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the -# path to strip. +# path to strip. Note that you specify absolute paths here, but also +# relative paths, which will be relative from the directory where doxygen is +# started. STRIP_FROM_PATH = @@ -229,14 +233,15 @@ OPTIMIZE_FOR_FORTRAN = NO OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, +# and language is one of the parsers supported by doxygen: IDL, Java, +# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, +# C++. For instance to make doxygen treat .inc files as Fortran files (default +# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note +# that for custom extensions you also need to set FILE_PATTERNS otherwise the +# files are not read by doxygen. EXTENSION_MAPPING = @@ -249,6 +254,13 @@ EXTENSION_MAPPING = MARKDOWN_SUPPORT = YES +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. + +AUTOLINK_SUPPORT = YES + # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and @@ -269,10 +281,10 @@ CPP_CLI_SUPPORT = NO SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES (the +# default) will make doxygen replace the get and set methods by a property in +# the documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. @@ -301,11 +313,11 @@ SUBGROUPING = YES INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and -# unions with only public data fields will be shown inline in the documentation -# of the scope in which they are defined (i.e. file, namespace, or group -# documentation), provided this scope is documented. If set to NO (the default), -# structs, classes, and unions are shown on a separate page (for HTML and Man -# pages) or section (for LaTeX and RTF). +# unions with only public data fields or simple typedef fields will be shown +# inline in the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO (the default), structs, classes, and unions are shown on a separate +# page (for HTML and Man pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO @@ -319,30 +331,14 @@ INLINE_SIMPLE_STRUCTS = NO TYPEDEF_HIDES_STRUCT = NO -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penalty. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will roughly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols. - -SYMBOL_CACHE_SIZE = 0 - -# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be -# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given -# their name and scope. Since this can be an expensive process and often the -# same symbol appear multiple times in the code, doxygen keeps a cache of -# pre-resolved symbols. If the cache is too small doxygen will become slower. -# If the cache is too large, memory is wasted. The cache size is given by this -# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols. +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can +# be an expensive process and often the same symbol appear multiple times in +# the code, doxygen keeps a cache of pre-resolved symbols. If the cache is too +# small doxygen will become slower. If the cache is too large, memory is wasted. +# The cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid +# range is 0..9, the default is 0, corresponding to a cache size of 2^16 = 65536 +# symbols. LOOKUP_CACHE_SIZE = 0 @@ -353,7 +349,7 @@ LOOKUP_CACHE_SIZE = 0 # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES +# the EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES EXTRACT_ALL = YES @@ -362,7 +358,8 @@ EXTRACT_ALL = YES EXTRACT_PRIVATE = YES -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal scope will be included in the documentation. +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. EXTRACT_PACKAGE = NO @@ -533,7 +530,8 @@ GENERATE_BUGLIST = YES GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. +# documentation sections, marked by \if section-label ... \endif +# and \cond section-label ... \endcond blocks. ENABLED_SECTIONS = @@ -591,7 +589,8 @@ LAYOUT_FILE = # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this -# feature you need bibtex and perl available in the search path. +# feature you need bibtex and perl available in the search path. Do not use +# file names with spaces, bibtex cannot handle them. CITE_BIB_FILES = @@ -655,7 +654,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = +INPUT = # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -743,8 +742,10 @@ IMAGE_PATH = # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. -# If FILTER_PATTERNS is specified, this tag will be -# ignored. +# If FILTER_PATTERNS is specified, this tag will be ignored. +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. INPUT_FILTER = @@ -773,6 +774,13 @@ FILTER_SOURCE_FILES = NO FILTER_SOURCE_PATTERNS = +# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- @@ -894,17 +902,27 @@ HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# style sheet in the HTML output directory as well, or it will be erased! +# fine-tune the look of the HTML output. If left blank doxygen will +# generate a default style sheet. Note that it is recommended to use +# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this +# tag will in the future become obsolete. HTML_STYLESHEET = +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional +# user-defined cascading style sheet that is included after the standard +# style sheets created by doxygen. Using this option one can overrule +# certain style aspects. This is preferred over using HTML_STYLESHEET +# since it does not replace the standard style sheet and is therefor more +# robust against future updates. Doxygen will copy the style sheet file to +# the output directory. + +HTML_EXTRA_STYLESHEET = + # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the -# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. @@ -985,9 +1003,9 @@ DOCSET_FEEDNAME = "Doxygen generated docs" DOCSET_BUNDLE_ID = org.doxygen.Project -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. +# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely +# identify the documentation publisher. This should be a reverse domain-name +# style string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher @@ -1172,6 +1190,13 @@ FORMULA_TRANSPARENT = YES USE_MATHJAX = NO +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and +# SVG. The default value is HTML-CSS, which is slower, but has the best +# compatibility. + +MATHJAX_FORMAT = HTML-CSS + # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax @@ -1189,6 +1214,11 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest MATHJAX_EXTENSIONS = +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript +# pieces of code that will be used on startup of the MathJax code. + +MATHJAX_CODEFILE = + # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using @@ -1200,15 +1230,55 @@ MATHJAX_EXTENSIONS = SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be -# implemented using a PHP enabled web server instead of at the web client -# using Javascript. Doxygen will generate the search PHP script and index -# file to put on the web server. The advantage of the server -# based approach is that it scales better to large projects and allows -# full text search. The disadvantages are that it is more difficult to setup -# and does not have live searching capabilities. +# implemented using a web server instead of a web client using Javascript. +# There are two flavours of web server based search depending on the +# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for +# searching and an index file used by the script. When EXTERNAL_SEARCH is +# enabled the indexing and searching needs to be provided by external tools. +# See the manual for details. SERVER_BASED_SEARCH = NO +# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP +# script for searching. Instead the search results are written to an XML file +# which needs to be processed by an external indexer. Doxygen will invoke an +# external search engine pointed to by the SEARCHENGINE_URL option to obtain +# the search results. Doxygen ships with an example indexer (doxyindexer) and +# search engine (doxysearch.cgi) which are based on the open source search +# engine library Xapian. See the manual for configuration details. + +EXTERNAL_SEARCH = NO + +# The SEARCHENGINE_URL should point to a search engine hosted by a web server +# which will returned the search results when EXTERNAL_SEARCH is enabled. +# Doxygen ships with an example search engine (doxysearch) which is based on +# the open source search engine library Xapian. See the manual for configuration +# details. + +SEARCHENGINE_URL = + +# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed +# search data is written to a file for indexing by an external tool. With the +# SEARCHDATA_FILE tag the name of this file can be specified. + +SEARCHDATA_FILE = searchdata.xml + +# When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the +# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is +# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple +# projects and redirect the results back to the right project. + +EXTERNAL_SEARCH_ID = + +# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen +# projects other than the one defined by this configuration file, but that are +# all added to the same external search index. Each project needs to have a +# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id +# of to a relative location where the documentation can be found. +# The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... + +EXTRA_SEARCH_MAPPINGS = + #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- @@ -1246,7 +1316,7 @@ COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and -# executive. If left blank a4wide will be used. +# executive. If left blank a4 will be used. PAPER_TYPE = a4 @@ -1269,6 +1339,13 @@ LATEX_HEADER = LATEX_FOOTER = +# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images +# or other source files which should be copied to the LaTeX output directory. +# Note that the files will be copied as-is; there are no commands or markers +# available. + +LATEX_EXTRA_FILES = + # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references @@ -1413,6 +1490,21 @@ XML_DTD = XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options related to the DOCBOOK output +#--------------------------------------------------------------------------- + +# If the GENERATE_DOCBOOK tag is set to YES Doxygen will generate DOCBOOK files +# that can be used to generate PDF. + +GENERATE_DOCBOOK = NO + +# The DOCBOOK_OUTPUT tag is used to specify where the DOCBOOK pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in +# front of it. If left blank docbook will be used as the default path. + +DOCBOOK_OUTPUT = docbook + #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- @@ -1562,6 +1654,12 @@ ALLEXTERNALS = NO EXTERNAL_GROUPS = YES +# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed +# in the related pages index. If set to NO, only the current project's +# pages will be listed. + +EXTERNAL_PAGES = YES + # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). @@ -1658,7 +1756,7 @@ UML_LOOK = YES # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more -# managable. Set this to 0 for no limit. Note that the threshold may be +# manageable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. UML_LIMIT_NUM_FIELDS = 10 From c44bf1c517e03dcd0517666cc36a79cb36276131 Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 18 Nov 2013 18:37:17 +0200 Subject: [PATCH 30/56] Documentation for class VContainer. --HG-- branch : feature --- container/calculator.h | 1 + container/vcontainer.cpp | 100 ++-- container/vcontainer.h | 552 ++++++++++++++++-- dialogs/dialogalongline.cpp | 2 +- dialogs/dialogarc.cpp | 2 +- dialogs/dialogbisector.cpp | 2 +- dialogs/dialogdetail.cpp | 8 +- dialogs/dialogendline.cpp | 2 +- dialogs/dialogheight.cpp | 2 +- dialogs/dialogline.cpp | 2 +- dialogs/dialoglineintersect.cpp | 2 +- dialogs/dialognormal.cpp | 2 +- dialogs/dialogpointofcontact.cpp | 2 +- dialogs/dialogpointofintersection.cpp | 2 +- dialogs/dialogshoulderpoint.cpp | 2 +- dialogs/dialogspline.cpp | 6 +- dialogs/dialogsplinepath.cpp | 2 +- dialogs/dialogtool.cpp | 2 +- dialogs/dialogtriangle.cpp | 2 +- tools/modelingTools/vmodelingalongline.cpp | 12 +- tools/modelingTools/vmodelingarc.cpp | 14 +- tools/modelingTools/vmodelingbisector.cpp | 14 +- tools/modelingTools/vmodelingendline.cpp | 10 +- tools/modelingTools/vmodelingheight.cpp | 14 +- tools/modelingTools/vmodelingline.cpp | 8 +- .../modelingTools/vmodelinglineintersect.cpp | 18 +- tools/modelingTools/vmodelinglinepoint.cpp | 10 +- tools/modelingTools/vmodelingnormal.cpp | 12 +- tools/modelingTools/vmodelingpoint.cpp | 4 +- .../modelingTools/vmodelingpointofcontact.cpp | 16 +- .../modelingTools/vmodelingshoulderpoint.cpp | 14 +- tools/modelingTools/vmodelingspline.cpp | 26 +- tools/modelingTools/vmodelingsplinepath.cpp | 18 +- tools/nodeDetails/vnodearc.cpp | 2 +- tools/nodeDetails/vnodepoint.cpp | 8 +- tools/nodeDetails/vnodespline.cpp | 2 +- tools/nodeDetails/vnodesplinepath.cpp | 4 +- tools/vtooldetail.cpp | 16 +- xml/vdomdocument.cpp | 24 +- 39 files changed, 714 insertions(+), 227 deletions(-) diff --git a/container/calculator.h b/container/calculator.h index 28f7d6535..36074771f 100644 --- a/container/calculator.h +++ b/container/calculator.h @@ -47,6 +47,7 @@ public: /** * @brief eval calculate formula. * @param prog string of formula. + * @param errorMsg keep error message. * @return value of formula. */ qreal eval(QString prog, QString *errorMsg); diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 5bbe38e15..67b458951 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -33,13 +33,13 @@ qint64 VContainer::_id = 0; VContainer::VContainer() :base(QHash()), points(QHash()), - modelingPoints(QHash()), + pointsModeling(QHash()), standartTable(QHash()), incrementTable(QHash()), lengthLines(QHash()), lineAngles(QHash()), splines(QHash()), - modelingSplines(QHash()), - lengthSplines(QHash()), arcs(QHash()), modelingArcs(QHash()), + splinesModeling(QHash()), + lengthSplines(QHash()), arcs(QHash()), arcsModeling(QHash()), lengthArcs(QHash()), - splinePaths(QHash()), modelingSplinePaths(QHash()), + splinePaths(QHash()), splinePathsModeling(QHash()), details(QHash()) { SetSize(500); @@ -55,13 +55,13 @@ VContainer &VContainer::operator =(const VContainer &data) VContainer::VContainer(const VContainer &data) :base(QHash()), points(QHash()), - modelingPoints(QHash()), + pointsModeling(QHash()), standartTable(QHash()), incrementTable(QHash()), lengthLines(QHash()), lineAngles(QHash()), splines(QHash()), - modelingSplines(QHash()), - lengthSplines(QHash()), arcs(QHash()), modelingArcs(QHash()), + splinesModeling(QHash()), + lengthSplines(QHash()), arcs(QHash()), arcsModeling(QHash()), lengthArcs(QHash()), - splinePaths(QHash()), modelingSplinePaths(QHash()), + splinePaths(QHash()), splinePathsModeling(QHash()), details(QHash()) { setData(data); @@ -71,19 +71,19 @@ void VContainer::setData(const VContainer &data) { base = *data.DataBase(); points = *data.DataPoints(); - modelingPoints = *data.DataModelingPoints(); + pointsModeling = *data.DataPointsModeling(); standartTable = *data.DataStandartTable(); incrementTable = *data.DataIncrementTable(); lengthLines = *data.DataLengthLines(); lineAngles = *data.DataLineAngles(); splines = *data.DataSplines(); - modelingSplines = *data.DataModelingSplines(); + splinesModeling = *data.DataSplinesModeling(); lengthSplines = *data.DataLengthSplines(); arcs = *data.DataArcs(); - modelingArcs = *data.DataModelingArcs(); + arcsModeling = *data.DataArcsModeling(); lengthArcs = *data.DataLengthArcs(); splinePaths = *data.DataSplinePaths(); - modelingSplinePaths = *data.DataModelingSplinePaths(); + splinePathsModeling = *data.DataSplinePathsModeling(); details = *data.DataDetails(); } @@ -92,9 +92,9 @@ VPointF VContainer::GetPoint(qint64 id) const return GetObject(points, id); } -VPointF VContainer::GetModelingPoint(qint64 id) const +VPointF VContainer::GetPointModeling(qint64 id) const { - return GetObject(modelingPoints, id); + return GetObject(pointsModeling, id); } template @@ -151,9 +151,9 @@ VSpline VContainer::GetSpline(qint64 id) const return GetObject(splines, id); } -VSpline VContainer::GetModelingSpline(qint64 id) const +VSpline VContainer::GetSplineModeling(qint64 id) const { - return GetObject(modelingSplines, id); + return GetObject(splinesModeling, id); } VArc VContainer::GetArc(qint64 id) const @@ -161,9 +161,9 @@ VArc VContainer::GetArc(qint64 id) const return GetObject(arcs, id); } -VArc VContainer::GetModelingArc(qint64 id) const +VArc VContainer::GetArcModeling(qint64 id) const { - return GetObject(modelingArcs, id); + return GetObject(arcsModeling, id); } VSplinePath VContainer::GetSplinePath(qint64 id) const @@ -171,9 +171,9 @@ VSplinePath VContainer::GetSplinePath(qint64 id) const return GetObject(splinePaths, id); } -VSplinePath VContainer::GetModelingSplinePath(qint64 id) const +VSplinePath VContainer::GetSplinePathModeling(qint64 id) const { - return GetObject(modelingSplinePaths, id); + return GetObject(splinePathsModeling, id); } VDetail VContainer::GetDetail(qint64 id) const @@ -186,9 +186,9 @@ qint64 VContainer::AddPoint(const VPointF &point) return AddObject(points, point); } -qint64 VContainer::AddModelingPoint(const VPointF &point) +qint64 VContainer::AddPointModeling(const VPointF &point) { - return AddObject(modelingPoints, point); + return AddObject(pointsModeling, point); } qint64 VContainer::AddDetail(const VDetail &detail) @@ -221,7 +221,7 @@ QPainterPath VContainer::ContourPath(qint64 idDetail) const { case (Tool::NodePoint): { - VPointF point = GetModelingPoint(detail[i].getId()); + VPointF point = GetPointModeling(detail[i].getId()); points.append(point.toQPointF()); if (detail.getSupplement() == true) { @@ -234,7 +234,7 @@ QPainterPath VContainer::ContourPath(qint64 idDetail) const break; case (Tool::NodeArc): { - VArc arc = GetModelingArc(detail[i].getId()); + VArc arc = GetArcModeling(detail[i].getId()); qreal len1 = GetLengthContour(points, arc.GetPoints()); qreal lenReverse = GetLengthContour(points, GetReversePoint(arc.GetPoints())); if (len1 <= lenReverse) @@ -257,7 +257,7 @@ QPainterPath VContainer::ContourPath(qint64 idDetail) const break; case (Tool::NodeSpline): { - VSpline spline = GetModelingSpline(detail[i].getId()); + VSpline spline = GetSplineModeling(detail[i].getId()); qreal len1 = GetLengthContour(points, spline.GetPoints()); qreal lenReverse = GetLengthContour(points, GetReversePoint(spline.GetPoints())); if (len1 <= lenReverse) @@ -281,7 +281,7 @@ QPainterPath VContainer::ContourPath(qint64 idDetail) const break; case (Tool::NodeSplinePath): { - VSplinePath splinePath = GetModelingSplinePath(detail[i].getId()); + VSplinePath splinePath = GetSplinePathModeling(detail[i].getId()); qreal len1 = GetLengthContour(points, splinePath.GetPathPoints()); qreal lenReverse = GetLengthContour(points, GetReversePoint(splinePath.GetPathPoints())); if (len1 <= lenReverse) @@ -609,10 +609,10 @@ void VContainer::Clear() lengthArcs.clear(); lineAngles.clear(); details.clear(); - modelingArcs.clear(); - modelingPoints.clear(); - modelingSplinePaths.clear(); - modelingSplines.clear(); + arcsModeling.clear(); + pointsModeling.clear(); + splinePathsModeling.clear(); + splinesModeling.clear(); ClearObject(); CreateManTableIGroup (); } @@ -679,8 +679,8 @@ void VContainer::AddLine(const qint64 &firstPointId, const qint64 &secondPointId } else { - first = GetModelingPoint(firstPointId); - second = GetModelingPoint(secondPointId); + first = GetPointModeling(firstPointId); + second = GetPointModeling(secondPointId); } AddLengthLine(nameLine, toMM(QLineF(first.toQPointF(), second.toQPointF()).length())); nameLine = GetNameLineAngle(firstPointId, secondPointId, mode); @@ -692,9 +692,9 @@ qint64 VContainer::AddSpline(const VSpline &spl) return AddObject(splines, spl); } -qint64 VContainer::AddModelingSpline(const VSpline &spl) +qint64 VContainer::AddSplineModeling(const VSpline &spl) { - return AddObject(modelingSplines, spl); + return AddObject(splinesModeling, spl); } qint64 VContainer::AddSplinePath(const VSplinePath &splPath) @@ -702,9 +702,9 @@ qint64 VContainer::AddSplinePath(const VSplinePath &splPath) return AddObject(splinePaths, splPath); } -qint64 VContainer::AddModelingSplinePath(const VSplinePath &splPath) +qint64 VContainer::AddSplinePathModeling(const VSplinePath &splPath) { - return AddObject(modelingSplinePaths, splPath); + return AddObject(splinePathsModeling, splPath); } qint64 VContainer::AddArc(const VArc &arc) @@ -712,9 +712,9 @@ qint64 VContainer::AddArc(const VArc &arc) return AddObject(arcs, arc); } -qint64 VContainer::AddModelingArc(const VArc &arc) +qint64 VContainer::AddArcModeling(const VArc &arc) { - return AddObject(modelingArcs, arc); + return AddObject(arcsModeling, arc); } template @@ -736,8 +736,8 @@ QString VContainer::GetNameLine(const qint64 &firstPoint, const qint64 &secondPo } else { - first = GetModelingPoint(firstPoint); - second = GetModelingPoint(secondPoint); + first = GetPointModeling(firstPoint); + second = GetPointModeling(secondPoint); } return QString("Line_%1_%2").arg(first.name(), second.name()); } @@ -753,8 +753,8 @@ QString VContainer::GetNameLineAngle(const qint64 &firstPoint, const qint64 &sec } else { - first = GetModelingPoint(firstPoint); - second = GetModelingPoint(secondPoint); + first = GetPointModeling(firstPoint); + second = GetPointModeling(secondPoint); } return QString("AngleLine_%1_%2").arg(first.name(), second.name()); } @@ -764,9 +764,9 @@ void VContainer::UpdatePoint(qint64 id, const VPointF &point) UpdateObject(points, id, point); } -void VContainer::UpdateModelingPoint(qint64 id, const VPointF &point) +void VContainer::UpdatePointModeling(qint64 id, const VPointF &point) { - UpdateObject(modelingPoints, id, point); + UpdateObject(pointsModeling, id, point); } void VContainer::UpdateDetail(qint64 id, const VDetail &detail) @@ -779,9 +779,9 @@ void VContainer::UpdateSpline(qint64 id, const VSpline &spl) UpdateObject(splines, id, spl); } -void VContainer::UpdateModelingSpline(qint64 id, const VSpline &spl) +void VContainer::UpdateSplineModeling(qint64 id, const VSpline &spl) { - UpdateObject(modelingSplines, id, spl); + UpdateObject(splinesModeling, id, spl); } void VContainer::UpdateSplinePath(qint64 id, const VSplinePath &splPath) @@ -789,9 +789,9 @@ void VContainer::UpdateSplinePath(qint64 id, const VSplinePath &splPath) UpdateObject(splinePaths, id, splPath); } -void VContainer::UpdateModelingSplinePath(qint64 id, const VSplinePath &splPath) +void VContainer::UpdateSplinePathModeling(qint64 id, const VSplinePath &splPath) { - UpdateObject(modelingSplinePaths, id, splPath); + UpdateObject(splinePathsModeling, id, splPath); } void VContainer::UpdateArc(qint64 id, const VArc &arc) @@ -799,9 +799,9 @@ void VContainer::UpdateArc(qint64 id, const VArc &arc) UpdateObject(arcs, id, arc); } -void VContainer::UpdateModelingArc(qint64 id, const VArc &arc) +void VContainer::UpdateArcModeling(qint64 id, const VArc &arc) { - UpdateObject(modelingArcs, id, arc); + UpdateObject(arcsModeling, id, arc); } void VContainer::AddLengthLine(const QString &name, const qreal &value) diff --git a/container/vcontainer.h b/container/vcontainer.h index c093f0477..e96901596 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -70,133 +70,619 @@ public: */ VPointF GetPoint(qint64 id) const; /** - * @brief GetModelingPoint return a modeling point by id - * @param id id of modeling point - * @return modeling point + * @brief GetPointModeling return a point modeling by id + * @param id id of point modeling + * @return point modeling */ - VPointF GetModelingPoint(qint64 id) const; + VPointF GetPointModeling(qint64 id) const; /** - * @brief GetStandartTableCell - * @param name - * @return + * @brief GetStandartTableCell return standart table row by name + * @param name name of standart table row + * @return row of standart table */ VStandartTableCell GetStandartTableCell(const QString& name) const; + /** + * @brief GetIncrementTableRow return increment table row by name + * @param name name of increment table row + * @return row of increment table + */ VIncrementTableRow GetIncrementTableRow(const QString& name) const; + /** + * @brief GetLine return length of line by name + * @param name name of line + * @return length of line in mm + */ qreal GetLine(const QString &name) const; + /** + * @brief GetLengthArc return length of arc by name + * @param name name of arc + * @return length of arc in mm + */ qreal GetLengthArc(const QString &name) const; + /** + * @brief GetLengthSpline return length of spline by name + * @param name name of spline + * @return length of spline in mm + */ qreal GetLengthSpline(const QString &name) const; + /** + * @brief GetLineAngle return angle of line + * @param name name of line angle + * @return angle in degree + */ qreal GetLineAngle(const QString &name) const; + /** + * @brief GetSpline return spline by id + * @param id id of spline + * @return spline + */ VSpline GetSpline(qint64 id) const; - VSpline GetModelingSpline(qint64 id) const; + /** + * @brief GetSplineModeling return spline modeling by id + * @param id id of spline modeling + * @return spline modeling + */ + VSpline GetSplineModeling(qint64 id) const; + /** + * @brief GetArc return arc by id + * @param id id of arc + * @return arc + */ VArc GetArc(qint64 id) const; - VArc GetModelingArc(qint64 id) const; + /** + * @brief GetArcModeling return arc modeling by id + * @param id id of arc modeling + * @return arc modeling + */ + VArc GetArcModeling(qint64 id) const; + /** + * @brief GetSplinePath return spline path by id + * @param id id of spline path + * @return spline path + */ VSplinePath GetSplinePath(qint64 id) const; - VSplinePath GetModelingSplinePath(qint64 id) const; + /** + * @brief GetSplinePathModeling return spline path modeling by id + * @param id id of spline modeling path + * @return spline modeling path + */ + VSplinePath GetSplinePathModeling(qint64 id) const; + /** + * @brief GetDetail return detail by id + * @param id id of detail + * @return detail + */ VDetail GetDetail(qint64 id) const; + /** + * @brief getId return current id + * @return current id + */ static qint64 getId() {return _id;} + /** + * @brief AddPoint add new point to container + * @param point new point + * @return return id of new point in container + */ qint64 AddPoint(const VPointF& point); - qint64 AddModelingPoint(const VPointF& point); + /** + * @brief AddPointModeling add new point modeling to container + * @param point new point modeling + * @return return id of new point modeling in container + */ + qint64 AddPointModeling(const VPointF& point); + /** + * @brief AddDetail add new detail to container + * @param detail new detail + * @return return id of new detail in container + */ qint64 AddDetail(const VDetail& detail); + /** + * @brief AddStandartTableCell add new row of standart table + * @param name name of row of standart table + * @param cell row of standart table + */ inline void AddStandartTableCell(const QString& name, const VStandartTableCell& cell) {standartTable[name] = cell;} - inline void AddIncrementTableRow(const QString& name, const VIncrementTableRow &cell) - {incrementTable[name] = cell;} + /** + * @brief AddIncrementTableRow add new row of increment table + * @param name name of new row of increment table + * @param row new row of increment table + */ + inline void AddIncrementTableRow(const QString& name, const VIncrementTableRow &row) + {incrementTable[name] = row;} + /** + * @brief AddLengthLine add length of line to container + * @param name name of line + * @param value length of line + */ void AddLengthLine(const QString &name, const qreal &value); + /** + * @brief AddLengthSpline add length of spline to container + * @param name name of spline + * @param value length of spline + */ void AddLengthSpline(const QString &name, const qreal &value); + /** + * @brief AddLengthArc add length of arc to container + * @param id id of arc + */ void AddLengthArc(const qint64 &id); + /** + * @brief AddLengthArc add length of arc + * @param name name of arc + * @param value length of arc + */ void AddLengthArc(const QString &name, const qreal &value); + /** + * @brief AddLineAngle add angle of line to container + * @param name name of line angle + * @param value angle in degree + */ void AddLineAngle(const QString &name, const qreal &value); + /** + * @brief AddLine add line to container + * @param firstPointId id of first point of line + * @param secondPointId id of second point of line + * @param mode mode of line + */ void AddLine(const qint64 &firstPointId, const qint64 &secondPointId, const Draw::Draws &mode = Draw::Calculation); + /** + * @brief AddSpline add spline to container + * @param spl new spline + * @return id of spline in container + */ qint64 AddSpline(const VSpline& spl); - qint64 AddModelingSpline(const VSpline& spl); + /** + * @brief AddSplineModeling add spline modeling to container + * @param spl new spline modeling + * @return id of spline modeling in container + */ + qint64 AddSplineModeling(const VSpline& spl); + /** + * @brief AddSplinePath add spline path to container + * @param splPath new spline path + * @return id of spline path in container + */ qint64 AddSplinePath(const VSplinePath& splPath); - qint64 AddModelingSplinePath(const VSplinePath& splPath); + /** + * @brief AddSplinePathModeling add spline path modeling to container + * @param splPath new spline path + * @return id of spline path in container + */ + qint64 AddSplinePathModeling(const VSplinePath& splPath); + /** + * @brief AddArc add arc to container + * @param arc new arc + * @return id of arc in container in container + */ qint64 AddArc(const VArc& arc); - qint64 AddModelingArc(const VArc& arc); + /** + * @brief AddArcModeling add arc modeling to container + * @param arc new arc modeling + * @return id of new arc modeling in container + */ + qint64 AddArcModeling(const VArc& arc); + /** + * @brief GetNameLine return name of line + * @param firstPoint id of first point of line + * @param secondPoint id of second point of line + * @param mode mode of line + * @return name of line + */ QString GetNameLine(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode = Draw::Calculation) const; + /** + * @brief GetNameLineAngle return name of line angle + * @param firstPoint id of first point of line + * @param secondPoint id of second point of line + * @param mode mode of line + * @return name of angle of line + */ QString GetNameLineAngle(const qint64 &firstPoint, const qint64 &secondPoint, const Draw::Draws &mode = Draw::Calculation) const; + /** + * @brief UpdatePoint update point by id + * @param id id of existing point + * @param point point + */ void UpdatePoint(qint64 id, const VPointF& point); - void UpdateModelingPoint(qint64 id, const VPointF& point); + /** + * @brief UpdatePointModeling update point modeling by id + * @param id id of existing point modeling + * @param point point modeling + */ + void UpdatePointModeling(qint64 id, const VPointF& point); + /** + * @brief UpdateDetail update detail by id + * @param id id of existing detail + * @param detail detail + */ void UpdateDetail(qint64 id, const VDetail& detail); + /** + * @brief UpdateSpline update spline by id + * @param id if of existing spline + * @param spl spline + */ void UpdateSpline(qint64 id, const VSpline& spl); - void UpdateModelingSpline(qint64 id, const VSpline& spl); + /** + * @brief UpdateSplineModeling update spline modeling by id + * @param id id of existing spline modeling + * @param spl spline modeling + */ + void UpdateSplineModeling(qint64 id, const VSpline& spl); + /** + * @brief UpdateSplinePath update spline path by id + * @param id id of existing spline path + * @param splPath spline path + */ void UpdateSplinePath(qint64 id, const VSplinePath& splPath); - void UpdateModelingSplinePath(qint64 id, const VSplinePath& splPath); + /** + * @brief UpdateSplinePathModeling update spline path modeling by id + * @param id id of existing spline path modeling + * @param splPath spline path modeling + */ + void UpdateSplinePathModeling(qint64 id, const VSplinePath& splPath); + /** + * @brief UpdateArc update arc by id + * @param id id of existing arc + * @param arc arc + */ void UpdateArc(qint64 id, const VArc& arc); - void UpdateModelingArc(qint64 id, const VArc& arc); + /** + * @brief UpdateArcModeling update arc modeling by id + * @param id id of existing arc modeling + * @param arc arc modeling + */ + void UpdateArcModeling(qint64 id, const VArc& arc); + /** + * @brief UpdateStandartTableCell update standart table row by name + * @param name name of row + * @param cell row of standart table + */ inline void UpdateStandartTableCell(const QString& name, const VStandartTableCell& cell) {standartTable[name] = cell;} - inline void UpdateIncrementTableRow(const QString& name, const VIncrementTableRow& cell) - {incrementTable[name] = cell;} + /** + * @brief UpdateIncrementTableRow update increment table row by name + * @param name name of row + * @param row row + */ + inline void UpdateIncrementTableRow(const QString& name, const VIncrementTableRow& row) + {incrementTable[name] = row;} + /** + * @brief GetValueStandartTableCell return value of standart table row by name + * @param name name of row + * @return value in mm + */ qreal GetValueStandartTableCell(const QString& name) const; + /** + * @brief GetValueIncrementTableRow return value of increment table row by name + * @param name name of row + * @return value of row in mm + */ qreal GetValueIncrementTableRow(const QString& name) const; + /** + * @brief Clear clear data in container. Id will be 0. + */ void Clear(); + /** + * @brief ClearObject points, splines, arcs, spline paths will be cleared. + */ void ClearObject(); + /** + * @brief ClearIncrementTable clear increment table + */ inline void ClearIncrementTable() {incrementTable.clear();} + /** + * @brief ClearLengthLines clear length lines + */ inline void ClearLengthLines() {lengthLines.clear();} + /** + * @brief ClearLengthSplines clear length splines + */ inline void ClearLengthSplines() {lengthSplines.clear();} + /** + * @brief ClearLengthArcs clear length arcs + */ inline void ClearLengthArcs() {lengthArcs.clear();} + /** + * @brief ClearLineAngles clear angles of lines + */ inline void ClearLineAngles() {lineAngles.clear();} + /** + * @brief SetSize set value of size + * @param size value of size in mm + */ inline void SetSize(qint32 size) {base["Сг"] = size;} + /** + * @brief SetGrowth set value of growth + * @param growth value of growth in mm + */ inline void SetGrowth(qint32 growth) {base["Р"] = growth;} + /** + * @brief size return size + * @return size in mm + */ inline qint32 size() const {return base.value("Сг");} + /** + * @brief growth return growth + * @return growth in mm + */ inline qint32 growth() const {return base.value("Р");} + /** + * @brief FindVar return value of variable by name + * @param name name of variable + * @param ok false if can't find variable + * @return value of variable + */ qreal FindVar(const QString& name, bool *ok)const; + /** + * @brief IncrementTableContains check if increment table contains name + * @param name name of row + * @return true if contains + */ inline bool IncrementTableContains(const QString& name) {return incrementTable.contains(name);} + /** + * @brief getNextId generate next unique id + * @return next unique id + */ static qint64 getNextId(); + /** + * @brief RemoveIncrementTableRow remove row by name from increment table + * @param name name of existing row + */ inline void RemoveIncrementTableRow(const QString& name) {incrementTable.remove(name);} + /** + * @brief DataPoints return container of points + * @return pointer on container of points + */ inline const QHash *DataPoints() const {return &points;} - inline const QHash *DataModelingPoints() const {return &modelingPoints;} + /** + * @brief DataPointsModeling return container of points modeling + * @return pointer on container of points modeling + */ + inline const QHash *DataPointsModeling() const {return &pointsModeling;} + /** + * @brief DataSplines return container of splines + * @return pointer on container of splines + */ inline const QHash *DataSplines() const {return &splines;} - inline const QHash *DataModelingSplines() const {return &modelingSplines;} + /** + * @brief DataSplinesModeling return container of splines modeling + * @return pointer on container of splines modeling + */ + inline const QHash *DataSplinesModeling() const {return &splinesModeling;} + /** + * @brief DataArcs return container of arcs + * @return pointer on container of arcs + */ inline const QHash *DataArcs() const {return &arcs;} - inline const QHash *DataModelingArcs() const {return &modelingArcs;} + /** + * @brief DataArcsModeling return container of arcs modeling + * @return pointer on container of arcs modeling + */ + inline const QHash *DataArcsModeling() const {return &arcsModeling;} + /** + * @brief DataBase return container of data + * @return pointer on container of base data + */ inline const QHash *DataBase() const {return &base;} + /** + * @brief DataStandartTable return container of standart table + * @return pointer on container of standart table + */ inline const QHash *DataStandartTable() const {return &standartTable;} + /** + * @brief DataIncrementTable return container of increment table + * @return pointer on container of increment table + */ inline const QHash *DataIncrementTable() const {return &incrementTable;} + /** + * @brief DataLengthLines return container of lines lengths + * @return pointer on container of lines lengths + */ inline const QHash *DataLengthLines() const {return &lengthLines;} + /** + * @brief DataLengthSplines return container of splines lengths + * @return pointer on container of splines lengths + */ inline const QHash *DataLengthSplines() const {return &lengthSplines;} + /** + * @brief DataLengthArcs return container of arcs length + * @return pointer on container of arcs length + */ inline const QHash *DataLengthArcs() const {return &lengthArcs;} + /** + * @brief DataLineAngles return container of angles of line + * @return pointer on container of angles of line + */ inline const QHash *DataLineAngles() const {return &lineAngles;} + /** + * @brief DataSplinePaths return container of spline paths + * @return pointer on container of spline paths + */ inline const QHash *DataSplinePaths() const {return &splinePaths;} - inline const QHash *DataModelingSplinePaths() const {return &modelingSplinePaths;} + /** + * @brief DataSplinePathsModeling return container of spline paths modeling + * @return pointer on container of spline paths modeling + */ + inline const QHash *DataSplinePathsModeling() const {return &splinePathsModeling;} + /** + * @brief DataDetails return container of details + * @return pointer on container of details + */ inline const QHash *DataDetails() const {return &details;} + /** + * @brief UpdateId update id. If new id bigger when current save new like current. + * @param newId id + */ static void UpdateId(qint64 newId); + /** + * @brief ContourPath create painter path for detail + * @param idDetail id of detail + * @return return painter path of contour detail + */ QPainterPath ContourPath(qint64 idDetail) const; + /** + * @brief biasPoints bias point + * @param points vector of points + * @param mx offset respect to x + * @param my offset respect to y + * @return new vector biased points + */ QVector biasPoints(const QVector &points, const qreal &mx, const qreal &my) const; + /** + * @brief Equidistant create equidistant painter path for detail + * @param points vector of points + * @param eqv type of equidistant + * @param width width of equidistant + * @return return painter path of equidistant + */ QPainterPath Equidistant(QVector points, const Detail::Equidistant &eqv, const qreal &width)const; + /** + * @brief ParallelLine create parallel line + * @param line starting line + * @param width width to parallel line + * @return parallel line + */ static QLineF ParallelLine(const QLineF &line, qreal width ); + /** + * @brief SingleParallelPoint return point of parallel line + * @param line starting line + * @param angle angle in degree + * @param width width to parallel line + * @return point of parallel line + */ static QPointF SingleParallelPoint(const QLineF &line, const qreal &angle, const qreal &width); + /** + * @brief EkvPoint return vector of points of equidistant two lines. Last point of two lines must be equal. + * @param line1 first line + * @param line2 second line + * @param width width of equidistant + * @return vector of points + */ QVector EkvPoint(const QLineF &line1, const QLineF &line2, const qreal &width)const; + /** + * @brief CheckLoops seek and delete loops in equidistant + * @param points vector of points of equidistant + * @return vector of points of equidistant + */ QVector CheckLoops(const QVector &points) const; + /** + * @brief PrepareDetails prepare detail for creation layout + * @param list list of details + */ void PrepareDetails(QVector & list) const; private: + /** + * @brief _id current id. New object will have value +1. For full class equal 0. + */ static qint64 _id; + /** + * @brief base container of base data (size and growth) + */ QHash base; + /** + * @brief points container of points + */ QHash points; - QHash modelingPoints; + /** + * @brief pointsModeling container of points modeling + */ + QHash pointsModeling; + /** + * @brief standartTable container of standart table rows + */ QHash standartTable; + /** + * @brief incrementTable + */ QHash incrementTable; + /** + * @brief lengthLines container of lines lengths + */ QHash lengthLines; + /** + * @brief lineAngles container of angles of lines + */ QHash lineAngles; + /** + * @brief splines container of splines + */ QHash splines; - QHash modelingSplines; + /** + * @brief splinesModeling container of splines modeling + */ + QHash splinesModeling; + /** + * @brief lengthSplines container of splines length + */ QHash lengthSplines; + /** + * @brief arcs container of arcs + */ QHash arcs; - QHash modelingArcs; + /** + * @brief arcsModeling container of arcs modeling + */ + QHash arcsModeling; + /** + * @brief lengthArcs container of arcs length + */ QHash lengthArcs; + /** + * @brief splinePaths container of spline paths + */ QHash splinePaths; - QHash modelingSplinePaths; + /** + * @brief splinePathsModeling container of spline paths modeling + */ + QHash splinePathsModeling; + /** + * @brief details container of details + */ QHash details; + /** + * @brief CreateManTableIGroup generate man standart table of measurements + */ void CreateManTableIGroup (); + /** + * @brief GetReversePoint return revers container of points + * @param points container with points + * @return reverced points + */ QVector GetReversePoint(const QVector &points)const; + /** + * @brief GetLengthContour return length of contour + * @param contour container with points of contour + * @param newPoints point whos we try to add to contour + * @return length length of contour + */ qreal GetLengthContour(const QVector &contour, const QVector &newPoints)const; - template static val GetObject(const QHash &obj, key id); - template static void UpdateObject(QHash &obj, const qint64 &id, const val& point); - template static qint64 AddObject(QHash &obj, const val& value); + template + /** + * @brief GetObject return object from container + * @param obj container + * @param id id of object + * @return Object + */ + static val GetObject(const QHash &obj, key id); + template + /** + * @brief UpdateObject update object in container + * @param obj container + * @param id id of existing object + * @param point object + */ + static void UpdateObject(QHash &obj, const qint64 &id, const val& point); + template + /** + * @brief AddObject add object to container + * @param obj container + * @param value object + * @return id of object in container + */ + static qint64 AddObject(QHash &obj, const val& value); }; #endif // VCONTAINER_H diff --git a/dialogs/dialogalongline.cpp b/dialogs/dialogalongline.cpp index adaa26647..a6d29a2f8 100644 --- a/dialogs/dialogalongline.cpp +++ b/dialogs/dialogalongline.cpp @@ -105,7 +105,7 @@ void DialogAlongLine::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { diff --git a/dialogs/dialogarc.cpp b/dialogs/dialogarc.cpp index ed4beb7a2..8ef73f743 100644 --- a/dialogs/dialogarc.cpp +++ b/dialogs/dialogarc.cpp @@ -140,7 +140,7 @@ void DialogArc::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } ChangeCurrentText(ui->comboBoxBasePoint, point.name()); emit ToolTip(""); diff --git a/dialogs/dialogbisector.cpp b/dialogs/dialogbisector.cpp index 2eda284bc..c9c3ec23a 100644 --- a/dialogs/dialogbisector.cpp +++ b/dialogs/dialogbisector.cpp @@ -105,7 +105,7 @@ void DialogBisector::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { diff --git a/dialogs/dialogdetail.cpp b/dialogs/dialogdetail.cpp index f7ab1e834..83aab4f27 100644 --- a/dialogs/dialogdetail.cpp +++ b/dialogs/dialogdetail.cpp @@ -122,7 +122,7 @@ void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::D } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } name = point.name(); break; @@ -136,7 +136,7 @@ void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::D } else { - arc = data->GetModelingArc(id); + arc = data->GetArcModeling(id); } name = arc.name(); break; @@ -150,7 +150,7 @@ void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::D } else { - spl = data->GetModelingSpline(id); + spl = data->GetSplineModeling(id); } name = spl.GetName(); break; @@ -164,7 +164,7 @@ void DialogDetail::NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::D } else { - splPath = data->GetModelingSplinePath(id); + splPath = data->GetSplinePathModeling(id); } name = splPath.name(); break; diff --git a/dialogs/dialogendline.cpp b/dialogs/dialogendline.cpp index 550ea4e0e..809dd4456 100644 --- a/dialogs/dialogendline.cpp +++ b/dialogs/dialogendline.cpp @@ -115,7 +115,7 @@ void DialogEndLine::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } ChangeCurrentText(ui->comboBoxBasePoint, point.name()); emit ToolTip(""); diff --git a/dialogs/dialogheight.cpp b/dialogs/dialogheight.cpp index 3ce7fb730..9c3bfb8e7 100644 --- a/dialogs/dialogheight.cpp +++ b/dialogs/dialogheight.cpp @@ -109,7 +109,7 @@ void DialogHeight::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } switch (number) { diff --git a/dialogs/dialogline.cpp b/dialogs/dialogline.cpp index f14c311d8..8a829db8a 100644 --- a/dialogs/dialogline.cpp +++ b/dialogs/dialogline.cpp @@ -105,7 +105,7 @@ void DialogLine::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { diff --git a/dialogs/dialoglineintersect.cpp b/dialogs/dialoglineintersect.cpp index 29ac3375f..2c291b9e4 100644 --- a/dialogs/dialoglineintersect.cpp +++ b/dialogs/dialoglineintersect.cpp @@ -80,7 +80,7 @@ void DialogLineIntersect::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { diff --git a/dialogs/dialognormal.cpp b/dialogs/dialognormal.cpp index 4cf6e1d21..289459d98 100644 --- a/dialogs/dialognormal.cpp +++ b/dialogs/dialognormal.cpp @@ -121,7 +121,7 @@ void DialogNormal::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { diff --git a/dialogs/dialogpointofcontact.cpp b/dialogs/dialogpointofcontact.cpp index 115379648..66443ed3f 100644 --- a/dialogs/dialogpointofcontact.cpp +++ b/dialogs/dialogpointofcontact.cpp @@ -98,7 +98,7 @@ void DialogPointOfContact::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { diff --git a/dialogs/dialogpointofintersection.cpp b/dialogs/dialogpointofintersection.cpp index abcd9a7da..391912f67 100644 --- a/dialogs/dialogpointofintersection.cpp +++ b/dialogs/dialogpointofintersection.cpp @@ -83,7 +83,7 @@ void DialogPointOfIntersection::ChoosedObject(qint64 id, const Scene::Scenes &ty } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { diff --git a/dialogs/dialogshoulderpoint.cpp b/dialogs/dialogshoulderpoint.cpp index 92afa2a92..a182dd88e 100644 --- a/dialogs/dialogshoulderpoint.cpp +++ b/dialogs/dialogshoulderpoint.cpp @@ -106,7 +106,7 @@ void DialogShoulderPoint::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { diff --git a/dialogs/dialogspline.cpp b/dialogs/dialogspline.cpp index 9d478f9ea..9e8849ae4 100644 --- a/dialogs/dialogspline.cpp +++ b/dialogs/dialogspline.cpp @@ -79,7 +79,7 @@ void DialogSpline::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } if (number == 0) { @@ -111,8 +111,8 @@ void DialogSpline::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - p1 = data->GetModelingPoint(p1Id).toQPointF(); - p4 = data->GetModelingPoint(id).toQPointF(); + p1 = data->GetPointModeling(p1Id).toQPointF(); + p4 = data->GetPointModeling(id).toQPointF(); } ui->spinBoxAngle1->setValue(static_cast(QLineF(p1, p4).angle())); ui->spinBoxAngle2->setValue(static_cast(QLineF(p4, p1).angle())); diff --git a/dialogs/dialogsplinepath.cpp b/dialogs/dialogsplinepath.cpp index 1446f4f8b..f5984ed0c 100644 --- a/dialogs/dialogsplinepath.cpp +++ b/dialogs/dialogsplinepath.cpp @@ -173,7 +173,7 @@ void DialogSplinePath::NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } QListWidgetItem *item = new QListWidgetItem(point.name()); item->setFont(QFont("Times", 12, QFont::Bold)); diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index d394b1967..e4b6a3b72 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -99,7 +99,7 @@ void DialogTool::FillComboBoxPoints(QComboBox *box, const qint64 &id) const { if (det[i].getId() != id) { - VPointF point = data->GetModelingPoint(det[i].getId()); + VPointF point = data->GetPointModeling(det[i].getId()); box->addItem(point.name(), det[i].getId()); } } diff --git a/dialogs/dialogtriangle.cpp b/dialogs/dialogtriangle.cpp index 49d607e38..1580251ae 100644 --- a/dialogs/dialogtriangle.cpp +++ b/dialogs/dialogtriangle.cpp @@ -79,7 +79,7 @@ void DialogTriangle::ChoosedObject(qint64 id, const Scene::Scenes &type) } else { - point = data->GetModelingPoint(id); + point = data->GetPointModeling(id); } switch (number) { diff --git a/tools/modelingTools/vmodelingalongline.cpp b/tools/modelingTools/vmodelingalongline.cpp index fce43cb07..2f38aa88a 100644 --- a/tools/modelingTools/vmodelingalongline.cpp +++ b/tools/modelingTools/vmodelingalongline.cpp @@ -83,7 +83,7 @@ void VModelingAlongLine::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) void VModelingAlongLine::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); @@ -109,7 +109,7 @@ void VModelingAlongLine::RemoveReferens() void VModelingAlongLine::setDialog() { Q_ASSERT(dialogAlongLine.isNull() == false); - VPointF p = VAbstractTool::data.GetModelingPoint(id); + VPointF p = VAbstractTool::data.GetPointModeling(id); dialogAlongLine->setTypeLine(typeLine); dialogAlongLine->setFormula(formula); dialogAlongLine->setFirstPointId(basePointId, id); @@ -136,8 +136,8 @@ VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString & const Tool::Sources &typeCreation) { VModelingAlongLine *point = 0; - VPointF firstPoint = data->GetModelingPoint(firstPointId); - VPointF secondPoint = data->GetModelingPoint(secondPointId); + VPointF firstPoint = data->GetPointModeling(firstPointId); + VPointF secondPoint = data->GetPointModeling(secondPointId); QLineF line = QLineF(firstPoint.toQPointF(), secondPoint.toQPointF()); Calculator cal(data); QString errorMsg; @@ -148,11 +148,11 @@ VModelingAlongLine *VModelingAlongLine::Create(const qint64 _id, const QString & qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingPoint(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); + id = data->AddPointModeling(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); } else { - data->UpdateModelingPoint(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); + data->UpdatePointModeling(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); diff --git a/tools/modelingTools/vmodelingarc.cpp b/tools/modelingTools/vmodelingarc.cpp index 49ece909d..676a3c151 100644 --- a/tools/modelingTools/vmodelingarc.cpp +++ b/tools/modelingTools/vmodelingarc.cpp @@ -50,7 +50,7 @@ VModelingArc::VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, const void VModelingArc::setDialog() { Q_ASSERT(dialogArc.isNull() == false); - VArc arc = VAbstractTool::data.GetModelingArc(id); + VArc arc = VAbstractTool::data.GetArcModeling(id); dialogArc->SetCenter(arc.GetCenter()); dialogArc->SetRadius(arc.GetFormulaRadius()); dialogArc->SetF1(arc.GetFormulaF1()); @@ -95,15 +95,15 @@ VModelingArc* VModelingArc::Create(const qint64 _id, const qint64 ¢er, const calcF2 = result; } - VArc arc = VArc(data->DataModelingPoints(), center, calcRadius, radius, calcF1, f1, calcF2, f2 ); + VArc arc = VArc(data->DataPointsModeling(), center, calcRadius, radius, calcF1, f1, calcF2, f2 ); qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingArc(arc); + id = data->AddArcModeling(arc); } else { - data->UpdateModelingArc(id, arc); + data->UpdateArcModeling(id, arc); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -148,7 +148,7 @@ void VModelingArc::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) void VModelingArc::AddToFile() { - VArc arc = VAbstractTool::data.GetModelingArc(id); + VArc arc = VAbstractTool::data.GetArcModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); @@ -184,13 +184,13 @@ void VModelingArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VModelingArc::RemoveReferens() { - VArc arc = VAbstractTool::data.GetModelingArc(id); + VArc arc = VAbstractTool::data.GetArcModeling(id); doc->DecrementReferens(arc.GetCenter()); } void VModelingArc::RefreshGeometry() { - VArc arc = VAbstractTool::data.GetModelingArc(id); + VArc arc = VAbstractTool::data.GetArcModeling(id); QPainterPath path; path.addPath(arc.GetPath()); path.setFillRule( Qt::WindingFill ); diff --git a/tools/modelingTools/vmodelingbisector.cpp b/tools/modelingTools/vmodelingbisector.cpp index 7cdf15366..ccb3266af 100644 --- a/tools/modelingTools/vmodelingbisector.cpp +++ b/tools/modelingTools/vmodelingbisector.cpp @@ -51,7 +51,7 @@ VModelingBisector::VModelingBisector(VDomDocument *doc, VContainer *data, const void VModelingBisector::setDialog() { Q_ASSERT(dialogBisector.isNull() == false); - VPointF p = VAbstractTool::data.GetModelingPoint(id); + VPointF p = VAbstractTool::data.GetPointModeling(id); dialogBisector->setTypeLine(typeLine); dialogBisector->setFormula(formula); dialogBisector->setFirstPointId(firstPointId, id); @@ -81,9 +81,9 @@ VModelingBisector *VModelingBisector::Create(const qint64 _id, const QString &fo const Tool::Sources &typeCreation) { VModelingBisector *point = 0; - VPointF firstPoint = data->GetModelingPoint(firstPointId); - VPointF secondPoint = data->GetModelingPoint(secondPointId); - VPointF thirdPoint = data->GetModelingPoint(thirdPointId); + VPointF firstPoint = data->GetPointModeling(firstPointId); + VPointF secondPoint = data->GetPointModeling(secondPointId); + VPointF thirdPoint = data->GetPointModeling(thirdPointId); Calculator cal(data); QString errorMsg; @@ -95,11 +95,11 @@ VModelingBisector *VModelingBisector::Create(const qint64 _id, const QString &fo qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + id = data->AddPointModeling(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); } else { - data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + data->UpdatePointModeling(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -159,7 +159,7 @@ void VModelingBisector::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) void VModelingBisector::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); diff --git a/tools/modelingTools/vmodelingendline.cpp b/tools/modelingTools/vmodelingendline.cpp index 1886c0672..26ae9ec22 100644 --- a/tools/modelingTools/vmodelingendline.cpp +++ b/tools/modelingTools/vmodelingendline.cpp @@ -46,7 +46,7 @@ VModelingEndLine::VModelingEndLine(VDomDocument *doc, VContainer *data, const qi void VModelingEndLine::setDialog() { Q_ASSERT(dialogEndLine.isNull() == false); - VPointF p = VAbstractTool::data.GetModelingPoint(id); + VPointF p = VAbstractTool::data.GetPointModeling(id); dialogEndLine->setTypeLine(typeLine); dialogEndLine->setFormula(formula); dialogEndLine->setAngle(angle); @@ -72,7 +72,7 @@ VModelingEndLine *VModelingEndLine::Create(const qint64 _id, const QString &poin const Document::Documents &parse, const Tool::Sources &typeCreation) { VModelingEndLine *point = 0; - VPointF basePoint = data->GetModelingPoint(basePointId); + VPointF basePoint = data->GetPointModeling(basePointId); QLineF line = QLineF(basePoint.toQPointF(), QPointF(basePoint.x()+100, basePoint.y())); Calculator cal(data); QString errorMsg; @@ -84,11 +84,11 @@ VModelingEndLine *VModelingEndLine::Create(const qint64 _id, const QString &poin qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingPoint(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); + id = data->AddPointModeling(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); } else { - data->UpdateModelingPoint(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); + data->UpdatePointModeling(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -143,7 +143,7 @@ void VModelingEndLine::FullUpdateFromGui(int result) void VModelingEndLine::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); diff --git a/tools/modelingTools/vmodelingheight.cpp b/tools/modelingTools/vmodelingheight.cpp index 53ae05ac1..99eeab418 100644 --- a/tools/modelingTools/vmodelingheight.cpp +++ b/tools/modelingTools/vmodelingheight.cpp @@ -48,7 +48,7 @@ VModelingHeight::VModelingHeight(VDomDocument *doc, VContainer *data, const qint void VModelingHeight::setDialog() { Q_ASSERT(dialogHeight.isNull() == false); - VPointF p = VAbstractTool::data.GetModelingPoint(id); + VPointF p = VAbstractTool::data.GetPointModeling(id); dialogHeight->setTypeLine(typeLine); dialogHeight->setBasePointId(basePointId, id); dialogHeight->setP1LineId(p1LineId, id); @@ -75,9 +75,9 @@ VModelingHeight *VModelingHeight::Create(const qint64 _id, const QString &pointN const Document::Documents &parse, const Tool::Sources &typeCreation) { VModelingHeight *point = 0; - VPointF basePoint = data->GetModelingPoint(basePointId); - VPointF p1Line = data->GetModelingPoint(p1LineId); - VPointF p2Line = data->GetModelingPoint(p2LineId); + VPointF basePoint = data->GetPointModeling(basePointId); + VPointF p1Line = data->GetPointModeling(p1LineId); + VPointF p2Line = data->GetPointModeling(p2LineId); QPointF pHeight = VToolHeight::FindPoint(QLineF(p1Line.toQPointF(), p2Line.toQPointF()), basePoint.toQPointF()); @@ -85,11 +85,11 @@ VModelingHeight *VModelingHeight::Create(const qint64 _id, const QString &pointN qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingPoint(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); + id = data->AddPointModeling(VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); } else { - data->UpdateModelingPoint(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); + data->UpdatePointModeling(id, VPointF(line.p2().x(), line.p2().y(), pointName, mx, my)); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -145,7 +145,7 @@ void VModelingHeight::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) void VModelingHeight::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); diff --git a/tools/modelingTools/vmodelingline.cpp b/tools/modelingTools/vmodelingline.cpp index 619467dd5..3ae98a59f 100644 --- a/tools/modelingTools/vmodelingline.cpp +++ b/tools/modelingTools/vmodelingline.cpp @@ -37,8 +37,8 @@ VModelingLine::VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qin { ignoreFullUpdate = true; //Лінія - VPointF first = data->GetModelingPoint(firstPoint); - VPointF second = data->GetModelingPoint(secondPoint); + VPointF first = data->GetPointModeling(firstPoint); + VPointF second = data->GetPointModeling(secondPoint); this->setLine(QLineF(first.toQPointF(), second.toQPointF())); this->setFlag(QGraphicsItem::ItemStacksBehindParent, true); this->setFlag(QGraphicsItem::ItemIsSelectable, true); @@ -102,8 +102,8 @@ void VModelingLine::FullUpdateFromFile() firstPoint = domElement.attribute(AttrFirstPoint, "").toLongLong(); secondPoint = domElement.attribute(AttrSecondPoint, "").toLongLong(); } - VPointF first = VAbstractTool::data.GetModelingPoint(firstPoint); - VPointF second = VAbstractTool::data.GetModelingPoint(secondPoint); + VPointF first = VAbstractTool::data.GetPointModeling(firstPoint); + VPointF second = VAbstractTool::data.GetPointModeling(secondPoint); this->setLine(QLineF(first.toQPointF(), second.toQPointF())); } diff --git a/tools/modelingTools/vmodelinglineintersect.cpp b/tools/modelingTools/vmodelinglineintersect.cpp index 4a3eec24b..dd15b7a09 100644 --- a/tools/modelingTools/vmodelinglineintersect.cpp +++ b/tools/modelingTools/vmodelinglineintersect.cpp @@ -46,7 +46,7 @@ VModelingLineIntersect::VModelingLineIntersect(VDomDocument *doc, VContainer *da void VModelingLineIntersect::setDialog() { Q_ASSERT(dialogLineIntersect.isNull() == false); - VPointF p = VAbstractTool::data.GetModelingPoint(id); + VPointF p = VAbstractTool::data.GetPointModeling(id); dialogLineIntersect->setP1Line1(p1Line1); dialogLineIntersect->setP2Line1(p2Line1); dialogLineIntersect->setP1Line2(p1Line2); @@ -74,10 +74,10 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q const Tool::Sources &typeCreation) { VModelingLineIntersect *point = 0; - VPointF p1Line1 = data->GetModelingPoint(p1Line1Id); - VPointF p2Line1 = data->GetModelingPoint(p2Line1Id); - VPointF p1Line2 = data->GetModelingPoint(p1Line2Id); - VPointF p2Line2 = data->GetModelingPoint(p2Line2Id); + VPointF p1Line1 = data->GetPointModeling(p1Line1Id); + VPointF p2Line1 = data->GetPointModeling(p2Line1Id); + VPointF p1Line2 = data->GetPointModeling(p1Line2Id); + VPointF p2Line2 = data->GetPointModeling(p2Line2Id); QLineF line1(p1Line1.toQPointF(), p2Line1.toQPointF()); QLineF line2(p1Line2.toQPointF(), p2Line2.toQPointF()); @@ -88,11 +88,11 @@ VModelingLineIntersect *VModelingLineIntersect::Create(const qint64 _id, const q qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + id = data->AddPointModeling(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); } else { - data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + data->UpdatePointModeling(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -126,7 +126,7 @@ void VModelingLineIntersect::FullUpdateFromFile() p1Line2 = domElement.attribute(AttrP1Line2, "").toLongLong(); p2Line2 = domElement.attribute(AttrP2Line2, "").toLongLong(); } - RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); + RefreshPointGeometry(VAbstractTool::data.GetPointModeling(id)); } void VModelingLineIntersect::FullUpdateFromGui(int result) @@ -154,7 +154,7 @@ void VModelingLineIntersect::contextMenuEvent(QGraphicsSceneContextMenuEvent *ev void VModelingLineIntersect::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); diff --git a/tools/modelingTools/vmodelinglinepoint.cpp b/tools/modelingTools/vmodelinglinepoint.cpp index 2c88505ad..b68231cfe 100644 --- a/tools/modelingTools/vmodelinglinepoint.cpp +++ b/tools/modelingTools/vmodelinglinepoint.cpp @@ -35,8 +35,8 @@ VModelingLinePoint::VModelingLinePoint(VDomDocument *doc, VContainer *data, cons basePointId(basePointId), mainLine(0) { //Лінія, що з'єднує дві точки - QPointF point1 = data->GetModelingPoint(basePointId).toQPointF(); - QPointF point2 = data->GetModelingPoint(id).toQPointF(); + QPointF point1 = data->GetPointModeling(basePointId).toQPointF(); + QPointF point2 = data->GetPointModeling(id).toQPointF(); mainLine = new QGraphicsLineItem(QLineF(point1 - point2, QPointF()), this); mainLine->setPen(QPen(Qt::black, widthHairLine)); mainLine->setFlag(QGraphicsItem::ItemStacksBehindParent, true); @@ -52,9 +52,9 @@ VModelingLinePoint::VModelingLinePoint(VDomDocument *doc, VContainer *data, cons void VModelingLinePoint::RefreshGeometry() { - VModelingPoint::RefreshPointGeometry(VModelingTool::data.GetModelingPoint(id)); - QPointF point = VModelingTool::data.GetModelingPoint(id).toQPointF(); - QPointF basePoint = VModelingTool::data.GetModelingPoint(basePointId).toQPointF(); + VModelingPoint::RefreshPointGeometry(VModelingTool::data.GetPointModeling(id)); + QPointF point = VModelingTool::data.GetPointModeling(id).toQPointF(); + QPointF basePoint = VModelingTool::data.GetPointModeling(basePointId).toQPointF(); mainLine->setLine(QLineF(basePoint - point, QPointF())); if (typeLine == TypeLineNone) { diff --git a/tools/modelingTools/vmodelingnormal.cpp b/tools/modelingTools/vmodelingnormal.cpp index d0d662b1c..91daea902 100644 --- a/tools/modelingTools/vmodelingnormal.cpp +++ b/tools/modelingTools/vmodelingnormal.cpp @@ -47,7 +47,7 @@ VModelingNormal::VModelingNormal(VDomDocument *doc, VContainer *data, const qint void VModelingNormal::setDialog() { Q_ASSERT(dialogNormal.isNull() == false); - VPointF p = VAbstractTool::data.GetModelingPoint(id); + VPointF p = VAbstractTool::data.GetPointModeling(id); dialogNormal->setTypeLine(typeLine); dialogNormal->setFormula(formula); dialogNormal->setAngle(angle); @@ -75,8 +75,8 @@ VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formul const Tool::Sources &typeCreation) { VModelingNormal *point = 0; - VPointF firstPoint = data->GetModelingPoint(firstPointId); - VPointF secondPoint = data->GetModelingPoint(secondPointId); + VPointF firstPoint = data->GetPointModeling(firstPointId); + VPointF secondPoint = data->GetPointModeling(secondPointId); Calculator cal(data); QString errorMsg; qreal result = cal.eval(formula, &errorMsg); @@ -87,11 +87,11 @@ VModelingNormal *VModelingNormal::Create(const qint64 _id, const QString &formul qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + id = data->AddPointModeling(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); } else { - data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + data->UpdatePointModeling(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -150,7 +150,7 @@ void VModelingNormal::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) void VModelingNormal::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); diff --git a/tools/modelingTools/vmodelingpoint.cpp b/tools/modelingTools/vmodelingpoint.cpp index af97dd218..c13c3951d 100644 --- a/tools/modelingTools/vmodelingpoint.cpp +++ b/tools/modelingTools/vmodelingpoint.cpp @@ -42,12 +42,12 @@ VModelingPoint::VModelingPoint(VDomDocument *doc, VContainer *data, qint64 id, Q this->setBrush(QBrush(Qt::NoBrush)); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); + RefreshPointGeometry(VAbstractTool::data.GetPointModeling(id)); } void VModelingPoint::NameChangePosition(const QPointF &pos) { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QPointF p = pos - this->pos(); point.setMx(p.x()); point.setMy(p.y()); diff --git a/tools/modelingTools/vmodelingpointofcontact.cpp b/tools/modelingTools/vmodelingpointofcontact.cpp index 9c4ba59b0..43dd485fd 100644 --- a/tools/modelingTools/vmodelingpointofcontact.cpp +++ b/tools/modelingTools/vmodelingpointofcontact.cpp @@ -48,7 +48,7 @@ VModelingPointOfContact::VModelingPointOfContact(VDomDocument *doc, VContainer * void VModelingPointOfContact::setDialog() { Q_ASSERT(dialogPointOfContact.isNull() == false); - VPointF p = VAbstractTool::data.GetModelingPoint(id); + VPointF p = VAbstractTool::data.GetPointModeling(id); dialogPointOfContact->setRadius(radius); dialogPointOfContact->setCenter(center, id); dialogPointOfContact->setFirstPoint(firstPointId, id); @@ -77,9 +77,9 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const const Tool::Sources &typeCreation) { VModelingPointOfContact *point = 0; - VPointF centerP = data->GetModelingPoint(center); - VPointF firstP = data->GetModelingPoint(firstPointId); - VPointF secondP = data->GetModelingPoint(secondPointId); + VPointF centerP = data->GetPointModeling(center); + VPointF firstP = data->GetPointModeling(firstPointId); + VPointF secondP = data->GetPointModeling(secondPointId); Calculator cal(data); QString errorMsg; @@ -91,11 +91,11 @@ VModelingPointOfContact *VModelingPointOfContact::Create(const qint64 _id, const qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + id = data->AddPointModeling(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); } else { - data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + data->UpdatePointModeling(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -124,7 +124,7 @@ void VModelingPointOfContact::FullUpdateFromFile() firstPointId = domElement.attribute(AttrFirstPoint, "").toLongLong(); secondPointId = domElement.attribute(AttrSecondPoint, "").toLongLong(); } - RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); + RefreshPointGeometry(VAbstractTool::data.GetPointModeling(id)); } void VModelingPointOfContact::FullUpdateFromGui(int result) @@ -152,7 +152,7 @@ void VModelingPointOfContact::contextMenuEvent(QGraphicsSceneContextMenuEvent *e void VModelingPointOfContact::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); diff --git a/tools/modelingTools/vmodelingshoulderpoint.cpp b/tools/modelingTools/vmodelingshoulderpoint.cpp index ceec80d1b..68320fdd2 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.cpp +++ b/tools/modelingTools/vmodelingshoulderpoint.cpp @@ -48,7 +48,7 @@ VModelingShoulderPoint::VModelingShoulderPoint(VDomDocument *doc, VContainer *da void VModelingShoulderPoint::setDialog() { Q_ASSERT(dialogShoulderPoint.isNull() == false); - VPointF p = VAbstractTool::data.GetModelingPoint(id); + VPointF p = VAbstractTool::data.GetPointModeling(id); dialogShoulderPoint->setTypeLine(typeLine); dialogShoulderPoint->setFormula(formula); dialogShoulderPoint->setP1Line(basePointId, id); @@ -79,9 +79,9 @@ VModelingShoulderPoint *VModelingShoulderPoint::Create(const qint64 _id, const Q const Tool::Sources &typeCreation) { VModelingShoulderPoint *point = 0; - VPointF firstPoint = data->GetModelingPoint(p1Line); - VPointF secondPoint = data->GetModelingPoint(p2Line); - VPointF shoulderPoint = data->GetModelingPoint(pShoulder); + VPointF firstPoint = data->GetPointModeling(p1Line); + VPointF secondPoint = data->GetPointModeling(p2Line); + VPointF shoulderPoint = data->GetPointModeling(pShoulder); Calculator cal(data); QString errorMsg; @@ -93,11 +93,11 @@ VModelingShoulderPoint *VModelingShoulderPoint::Create(const qint64 _id, const Q qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingPoint(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + id = data->AddPointModeling(VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); } else { - data->UpdateModelingPoint(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); + data->UpdatePointModeling(id, VPointF(fPoint.x(), fPoint.y(), pointName, mx, my)); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -158,7 +158,7 @@ void VModelingShoulderPoint::contextMenuEvent(QGraphicsSceneContextMenuEvent *ev void VModelingShoulderPoint::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); diff --git a/tools/modelingTools/vmodelingspline.cpp b/tools/modelingTools/vmodelingspline.cpp index 951bc7efc..9c9be55ba 100644 --- a/tools/modelingTools/vmodelingspline.cpp +++ b/tools/modelingTools/vmodelingspline.cpp @@ -38,7 +38,7 @@ VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id, dialogSpline(QSharedPointer()), controlPoints(QVector()) { ignoreFullUpdate = true; - VSpline spl = data->GetModelingSpline(id); + VSpline spl = data->GetSplineModeling(id); QPainterPath path; path.addPath(spl.GetPath()); path.setFillRule( Qt::WindingFill ); @@ -72,7 +72,7 @@ VModelingSpline::VModelingSpline(VDomDocument *doc, VContainer *data, qint64 id, void VModelingSpline::setDialog() { Q_ASSERT(dialogSpline.isNull() == false); - VSpline spl = VAbstractTool::data.GetModelingSpline(id); + VSpline spl = VAbstractTool::data.GetSplineModeling(id); dialogSpline->setP1(spl.GetP1()); dialogSpline->setP4(spl.GetP4()); dialogSpline->setAngle1(spl.GetAngle1()); @@ -102,15 +102,15 @@ VModelingSpline *VModelingSpline::Create(const qint64 _id, const qint64 &p1, con const Tool::Sources &typeCreation) { VModelingSpline *spl = 0; - VSpline spline = VSpline(data->DataModelingPoints(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve); + VSpline spline = VSpline(data->DataPointsModeling(), p1, p4, angle1, angle2, kAsm1, kAsm2, kCurve); qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingSpline(spline); + id = data->AddSplineModeling(spline); } else { - data->UpdateModelingSpline(id, spline); + data->UpdateSplineModeling(id, spline); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -136,7 +136,7 @@ void VModelingSpline::FullUpdateFromGui(int result) { if (result == QDialog::Accepted) { - VSpline spl = VSpline (VAbstractTool::data.DataModelingPoints(), dialogSpline->getP1(), + VSpline spl = VSpline (VAbstractTool::data.DataPointsModeling(), dialogSpline->getP1(), dialogSpline->getP4(), dialogSpline->getAngle1(), dialogSpline->getAngle2(), dialogSpline->getKAsm1(), dialogSpline->getKAsm2(), dialogSpline->getKCurve()); @@ -151,7 +151,7 @@ void VModelingSpline::FullUpdateFromGui(int result) connect(controlPoints[1], &VControlPointSpline::ControlPointChangePosition, this, &VModelingSpline::ControlPointChangePosition); - spl = VSpline (VAbstractTool::data.DataModelingPoints(), dialogSpline->getP1(), + spl = VSpline (VAbstractTool::data.DataPointsModeling(), dialogSpline->getP1(), controlPoints[0]->pos(), controlPoints[1]->pos(), dialogSpline->getP4(), dialogSpline->getKCurve()); QDomElement domElement = doc->elementById(QString().setNum(id)); @@ -174,7 +174,7 @@ void VModelingSpline::ControlPointChangePosition(const qint32 &indexSpline, Spli const QPointF &pos) { Q_UNUSED(indexSpline); - VSpline spl = VAbstractTool::data.GetModelingSpline(id); + VSpline spl = VAbstractTool::data.GetSplineModeling(id); if (position == SplinePoint::FirstPoint) { spl.ModifiSpl (spl.GetP1(), pos, spl.GetP3(), spl.GetP4(), spl.GetKcurve()); @@ -202,7 +202,7 @@ void VModelingSpline::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) void VModelingSpline::AddToFile() { - VSpline spl = VAbstractTool::data.GetModelingSpline(id); + VSpline spl = VAbstractTool::data.GetSplineModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); @@ -241,22 +241,22 @@ void VModelingSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VModelingSpline::RemoveReferens() { - VSpline spl = VAbstractTool::data.GetModelingSpline(id); + VSpline spl = VAbstractTool::data.GetSplineModeling(id); doc->DecrementReferens(spl.GetP1()); doc->DecrementReferens(spl.GetP4()); } void VModelingSpline::RefreshGeometry() { - VSpline spl = VAbstractTool::data.GetModelingSpline(id); + VSpline spl = VAbstractTool::data.GetSplineModeling(id); QPainterPath path; path.addPath(spl.GetPath()); path.setFillRule( Qt::WindingFill ); this->setPath(path); - QPointF splinePoint = VAbstractTool::data.GetModelingPoint(spl.GetP1()).toQPointF(); + QPointF splinePoint = VAbstractTool::data.GetPointModeling(spl.GetP1()).toQPointF(); QPointF controlPoint = spl.GetP2(); emit RefreshLine(1, SplinePoint::FirstPoint, controlPoint, splinePoint); - splinePoint = VAbstractTool::data.GetModelingPoint(spl.GetP4()).toQPointF(); + splinePoint = VAbstractTool::data.GetPointModeling(spl.GetP4()).toQPointF(); controlPoint = spl.GetP3(); emit RefreshLine(1, SplinePoint::LastPoint, controlPoint, splinePoint); diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/tools/modelingTools/vmodelingsplinepath.cpp index 515e80a96..012713a78 100644 --- a/tools/modelingTools/vmodelingsplinepath.cpp +++ b/tools/modelingTools/vmodelingsplinepath.cpp @@ -37,7 +37,7 @@ VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qi controlPoints(QVector()) { ignoreFullUpdate = true; - VSplinePath splPath = data->GetModelingSplinePath(id); + VSplinePath splPath = data->GetSplinePathModeling(id); QPainterPath path; path.addPath(splPath.GetPath()); path.setFillRule( Qt::WindingFill ); @@ -74,7 +74,7 @@ VModelingSplinePath::VModelingSplinePath(VDomDocument *doc, VContainer *data, qi void VModelingSplinePath::setDialog() { Q_ASSERT(dialogSplinePath.isNull() == false); - VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); + VSplinePath splPath = VAbstractTool::data.GetSplinePathModeling(id); dialogSplinePath->SetPath(splPath); } @@ -97,11 +97,11 @@ VModelingSplinePath * VModelingSplinePath::Create(const qint64 _id, const VSplin qint64 id = _id; if (typeCreation == Tool::FromGui) { - id = data->AddModelingSplinePath(path); + id = data->AddSplinePathModeling(path); } else { - data->UpdateModelingSplinePath(id, path); + data->UpdateSplinePathModeling(id, path); if (parse != Document::FullParse) { doc->UpdateToolData(id, data); @@ -141,7 +141,7 @@ void VModelingSplinePath::FullUpdateFromGui(int result) connect(controlPoints[j-1], &VControlPointSpline::ControlPointChangePosition, this, &VModelingSplinePath::ControlPointChangePosition); - spl = VSpline (VAbstractTool::data.DataModelingPoints(), spl.GetP1(), controlPoints[j-2]->pos(), + spl = VSpline (VAbstractTool::data.DataPointsModeling(), spl.GetP1(), controlPoints[j-2]->pos(), controlPoints[j-1]->pos(), spl.GetP4(), splPath.getKCurve()); CorectControlPoints(spl, splPath, i); CorectControlPoints(spl, splPath, i); @@ -162,7 +162,7 @@ void VModelingSplinePath::FullUpdateFromGui(int result) void VModelingSplinePath::ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &pos) { - VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); + VSplinePath splPath = VAbstractTool::data.GetSplinePathModeling(id); VSpline spl = splPath.GetSpline(indexSpline); if (position == SplinePoint::FirstPoint) { @@ -221,7 +221,7 @@ void VModelingSplinePath::contextMenuEvent(QGraphicsSceneContextMenuEvent *event void VModelingSplinePath::AddToFile() { - VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); + VSplinePath splPath = VAbstractTool::data.GetSplinePathModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); @@ -271,7 +271,7 @@ void VModelingSplinePath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VModelingSplinePath::RemoveReferens() { - VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); + VSplinePath splPath = VAbstractTool::data.GetSplinePathModeling(id); for (qint32 i = 0; i < splPath.Count(); ++i) { doc->DecrementReferens(splPath[i].P()); @@ -280,7 +280,7 @@ void VModelingSplinePath::RemoveReferens() void VModelingSplinePath::RefreshGeometry() { - VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); + VSplinePath splPath = VAbstractTool::data.GetSplinePathModeling(id); QPainterPath path; path.addPath(splPath.GetPath()); path.setFillRule( Qt::WindingFill ); diff --git a/tools/nodeDetails/vnodearc.cpp b/tools/nodeDetails/vnodearc.cpp index 826174a68..3ebf3808c 100644 --- a/tools/nodeDetails/vnodearc.cpp +++ b/tools/nodeDetails/vnodearc.cpp @@ -109,7 +109,7 @@ void VNodeArc::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VNodeArc::RefreshGeometry() { - VArc arc = VAbstractTool::data.GetModelingArc(id); + VArc arc = VAbstractTool::data.GetArcModeling(id); QPainterPath path; path.addPath(arc.GetPath()); path.setFillRule( Qt::WindingFill ); diff --git a/tools/nodeDetails/vnodepoint.cpp b/tools/nodeDetails/vnodepoint.cpp index e7495c3c3..b4bdfeb85 100644 --- a/tools/nodeDetails/vnodepoint.cpp +++ b/tools/nodeDetails/vnodepoint.cpp @@ -44,7 +44,7 @@ VNodePoint::VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 id this->setBrush(QBrush(Qt::NoBrush)); this->setFlag(QGraphicsItem::ItemIsSelectable, true); this->setAcceptHoverEvents(true); - RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); + RefreshPointGeometry(VAbstractTool::data.GetPointModeling(id)); if (typeCreation == Tool::FromGui) { AddToFile(); @@ -69,12 +69,12 @@ void VNodePoint::Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 i void VNodePoint::FullUpdateFromFile() { - RefreshPointGeometry(VAbstractTool::data.GetModelingPoint(id)); + RefreshPointGeometry(VAbstractTool::data.GetPointModeling(id)); } void VNodePoint::AddToFile() { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QDomElement domElement = doc->createElement(TagName); AddAttribute(domElement, AttrId, id); @@ -118,7 +118,7 @@ void VNodePoint::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VNodePoint::NameChangePosition(const QPointF &pos) { - VPointF point = VAbstractTool::data.GetModelingPoint(id); + VPointF point = VAbstractTool::data.GetPointModeling(id); QPointF p = pos - this->pos(); point.setMx(p.x()); point.setMy(p.y()); diff --git a/tools/nodeDetails/vnodespline.cpp b/tools/nodeDetails/vnodespline.cpp index 26dd21a01..56ed8fc25 100644 --- a/tools/nodeDetails/vnodespline.cpp +++ b/tools/nodeDetails/vnodespline.cpp @@ -111,7 +111,7 @@ void VNodeSpline::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VNodeSpline::RefreshGeometry() { - VSpline spl = VAbstractTool::data.GetModelingSpline(id); + VSpline spl = VAbstractTool::data.GetSplineModeling(id); QPainterPath path; path.addPath(spl.GetPath()); path.setFillRule( Qt::WindingFill ); diff --git a/tools/nodeDetails/vnodesplinepath.cpp b/tools/nodeDetails/vnodesplinepath.cpp index 8defab838..ebd70564f 100644 --- a/tools/nodeDetails/vnodesplinepath.cpp +++ b/tools/nodeDetails/vnodesplinepath.cpp @@ -55,7 +55,7 @@ void VNodeSplinePath::Create(VDomDocument *doc, VContainer *data, qint64 id, qin VNodeSplinePath *splPath = new VNodeSplinePath(doc, data, id, idSpline, typeobject, typeCreation); Q_ASSERT(splPath != 0); doc->AddTool(id, splPath); - VSplinePath path = data->GetModelingSplinePath(id); + VSplinePath path = data->GetSplinePathModeling(id); const QVector *points = path.GetPoint(); for (qint32 i = 0; isize(); ++i) { @@ -115,7 +115,7 @@ void VNodeSplinePath::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) void VNodeSplinePath::RefreshGeometry() { - VSplinePath splPath = VAbstractTool::data.GetModelingSplinePath(id); + VSplinePath splPath = VAbstractTool::data.GetSplinePathModeling(id); QPainterPath path; path.addPath(splPath.GetPath()); path.setFillRule( Qt::WindingFill ); diff --git a/tools/vtooldetail.cpp b/tools/vtooldetail.cpp index 3556182cf..aeffdcee5 100644 --- a/tools/vtooldetail.cpp +++ b/tools/vtooldetail.cpp @@ -148,9 +148,9 @@ void VToolDetail::Create(QSharedPointer &dialog, VMainGraphicsScen } else { - point = data->GetModelingPoint(detail[i].getId()); + point = data->GetPointModeling(detail[i].getId()); } - id = data->AddModelingPoint(point); + id = data->AddPointModeling(point); VNodePoint::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), Document::FullParse, Tool::FromGui); } @@ -164,9 +164,9 @@ void VToolDetail::Create(QSharedPointer &dialog, VMainGraphicsScen } else { - arc = data->GetModelingArc(detail[i].getId()); + arc = data->GetArcModeling(detail[i].getId()); } - id = data->AddModelingArc(arc); + id = data->AddArcModeling(arc); VNodeArc::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), Document::FullParse, Tool::FromGui); } @@ -180,9 +180,9 @@ void VToolDetail::Create(QSharedPointer &dialog, VMainGraphicsScen } else { - spline = data->GetModelingSpline(detail[i].getId()); + spline = data->GetSplineModeling(detail[i].getId()); } - id = data->AddModelingSpline(spline); + id = data->AddSplineModeling(spline); VNodeSpline::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), Document::FullParse, Tool::FromGui); } @@ -196,9 +196,9 @@ void VToolDetail::Create(QSharedPointer &dialog, VMainGraphicsScen } else { - splinePath = data->GetModelingSplinePath(detail[i].getId()); + splinePath = data->GetSplinePathModeling(detail[i].getId()); } - id = data->AddModelingSplinePath(splinePath); + id = data->AddSplinePathModeling(splinePath); VNodeSplinePath::Create(doc, data, id, detail[i].getId(), detail[i].getMode(), Document::FullParse, Tool::FromGui); } diff --git a/xml/vdomdocument.cpp b/xml/vdomdocument.cpp index 55071e861..a61dceb0d 100644 --- a/xml/vdomdocument.cpp +++ b/xml/vdomdocument.cpp @@ -591,28 +591,28 @@ void VDomDocument::ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDo if (t == "NodePoint") { tool = Tool::NodePoint; - VPointF point = data->GetModelingPoint(id); + VPointF point = data->GetPointModeling(id); mode = point.getMode(); oldDetail.append(VNodeDetail(point.getIdObject(), tool, mode, NodeDetail::Contour)); } else if (t == "NodeArc") { tool = Tool::NodeArc; - VArc arc = data->GetModelingArc(id); + VArc arc = data->GetArcModeling(id); mode = arc.getMode(); oldDetail.append(VNodeDetail(arc.getIdObject(), tool, mode, NodeDetail::Contour)); } else if (t == "NodeSpline") { tool = Tool::NodeSpline; - VSpline spl = data->GetModelingSpline(id); + VSpline spl = data->GetSplineModeling(id); mode = spl.getMode(); oldDetail.append(VNodeDetail(spl.getIdObject(), tool, mode, NodeDetail::Contour)); } else if (t == "NodeSplinePath") { tool = Tool::NodeSplinePath; - VSplinePath splPath = data->GetModelingSplinePath(id); + VSplinePath splPath = data->GetSplinePathModeling(id); mode = splPath.getMode(); oldDetail.append(VNodeDetail(splPath.getIdObject(), tool, mode, NodeDetail::Contour)); } @@ -993,11 +993,11 @@ void VDomDocument::ParsePointElement(VMainGraphicsScene *scene, const QDomElemen else { typeObject = Draw::Modeling; - point = data->GetModelingPoint(idObject); + point = data->GetPointModeling(idObject); } qreal mx = toPixel(GetParametrDouble(domElement, "mx")); qreal my = toPixel(GetParametrDouble(domElement, "my")); - data->UpdateModelingPoint(id, VPointF(point.x(), point.y(), point.name(), mx, my, typeObject, + data->UpdatePointModeling(id, VPointF(point.x(), point.y(), point.name(), mx, my, typeObject, idObject )); VNodePoint::Create(this, data, id, idObject, mode, parse, Tool::FromFile); return; @@ -1236,11 +1236,11 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme else { typeObject = Draw::Modeling; - spl = data->GetModelingSpline(idObject); + spl = data->GetSplineModeling(idObject); } spl.setMode(typeObject); spl.setIdObject(idObject); - data->UpdateModelingSpline(id, spl); + data->UpdateSplineModeling(id, spl); VNodeSpline::Create(this, data, id, idObject, mode, parse, Tool::FromFile); return; } @@ -1268,11 +1268,11 @@ void VDomDocument::ParseSplineElement(VMainGraphicsScene *scene, const QDomEleme else { typeObject = Draw::Modeling; - path = data->GetModelingSplinePath(idObject); + path = data->GetSplinePathModeling(idObject); } path.setMode(typeObject); path.setIdObject(idObject); - data->UpdateModelingSplinePath(id, path); + data->UpdateSplinePathModeling(id, path); VNodeSplinePath::Create(this, data, id, idObject, mode, parse, Tool::FromFile); return; } @@ -1336,11 +1336,11 @@ void VDomDocument::ParseArcElement(VMainGraphicsScene *scene, const QDomElement else { typeObject = Draw::Modeling; - arc = data->GetModelingArc(idObject); + arc = data->GetArcModeling(idObject); } arc.setMode(typeObject); arc.setIdObject(idObject); - data->UpdateModelingArc(id, arc); + data->UpdateArcModeling(id, arc); VNodeArc::Create(this, data, id, idObject, mode, parse, Tool::FromFile); return; } From 8d1146c1af88d8b5147f289ac3658e591e32a136 Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 19 Nov 2013 22:56:49 +0200 Subject: [PATCH 31/56] Documentation for dialogs. --HG-- branch : feature --- container/calculator.h | 2 +- container/container.pri | 6 +- container/vcontainer.cpp | 116 +++--- container/vcontainer.h | 44 +-- container/vincrementtablerow.h | 69 ++++ container/vpointf.h | 106 +++++ ...arttablecell.cpp => vstandarttablerow.cpp} | 6 +- ...tandarttablecell.h => vstandarttablerow.h} | 53 ++- dialogs/dialogalongline.h | 80 ++++ dialogs/dialogarc.h | 122 ++++++ dialogs/dialogbisector.h | 96 ++++- dialogs/dialogdetail.h | 66 ++++ dialogs/dialogendline.h | 76 ++++ dialogs/dialogheight.h | 81 ++++ dialogs/dialoghistory.h | 60 +++ dialogs/dialogincrements.cpp | 6 +- dialogs/dialogincrements.h | 86 ++++ dialogs/dialogline.h | 45 +++ dialogs/dialoglineintersect.h | 104 +++++ dialogs/dialognormal.h | 91 +++++ dialogs/dialogpointofcontact.h | 81 ++++ dialogs/dialogpointofintersection.h | 58 +++ dialogs/dialogshoulderpoint.h | 92 +++++ dialogs/dialogsinglepoint.h | 37 ++ dialogs/dialogspline.h | 108 ++++- dialogs/dialogsplinepath.h | 77 ++++ dialogs/dialogtool.cpp | 2 +- dialogs/dialogtool.h | 246 +++++++++++- dialogs/dialogtriangle.h | 82 ++++ exception/vexception.h | 33 ++ exception/vexceptionbadid.h | 35 ++ exception/vexceptionconversionerror.h | 23 ++ exception/vexceptionemptyparameter.h | 49 +++ exception/vexceptionobjecterror.h | 52 +++ exception/vexceptionuniqueid.h | 41 ++ exception/vexceptionwrongparameterid.h | 41 ++ geometry/varc.h | 115 +++++- geometry/vdetail.h | 124 ++++++ geometry/vnodedetail.h | 93 +++++ geometry/vspline.h | 89 +++++ geometry/vsplinepath.h | 126 +++++- geometry/vsplinepoint.h | 20 + mainwindow.h | 373 ++++++++++++++++++ options.h | 12 + tablewindow.h | 20 +- tools/drawTools/vdrawtool.h | 76 ++++ tools/drawTools/vtoolalongline.h | 71 ++++ tools/drawTools/vtoolarc.h | 89 +++++ tools/drawTools/vtoolbisector.h | 84 ++++ tools/drawTools/vtoolendline.h | 61 +++ tools/drawTools/vtoolheight.h | 73 ++++ tools/drawTools/vtoolline.h | 88 +++++ tools/drawTools/vtoollineintersect.h | 80 ++++ tools/drawTools/vtoollinepoint.h | 43 ++ tools/drawTools/vtoolnormal.h | 81 ++++ tools/drawTools/vtoolpoint.h | 68 ++++ tools/drawTools/vtoolpointofcontact.h | 88 +++++ tools/drawTools/vtoolpointofintersection.h | 66 ++++ tools/drawTools/vtoolshoulderpoint.h | 84 ++++ tools/drawTools/vtoolsinglepoint.h | 54 +++ tools/drawTools/vtoolspline.h | 112 ++++++ tools/drawTools/vtoolsplinepath.h | 122 ++++++ tools/drawTools/vtooltriangle.h | 84 ++++ tools/modelingTools/vmodelingalongline.h | 67 ++++ tools/modelingTools/vmodelingarc.h | 75 ++++ tools/modelingTools/vmodelingbisector.h | 72 ++++ tools/modelingTools/vmodelingendline.h | 61 +++ tools/modelingTools/vmodelingheight.h | 67 ++++ tools/modelingTools/vmodelingline.h | 74 ++++ tools/modelingTools/vmodelinglineintersect.h | 76 ++++ tools/modelingTools/vmodelinglinepoint.h | 35 ++ tools/modelingTools/vmodelingnormal.h | 69 ++++ tools/modelingTools/vmodelingpoint.h | 54 +++ tools/modelingTools/vmodelingpointofcontact.h | 76 ++++ .../vmodelingpointofintersection.h | 66 ++++ tools/modelingTools/vmodelingshoulderpoint.h | 72 ++++ tools/modelingTools/vmodelingspline.h | 98 +++++ tools/modelingTools/vmodelingsplinepath.h | 108 +++++ tools/modelingTools/vmodelingtool.h | 41 ++ tools/modelingTools/vmodelingtriangle.h | 76 ++++ tools/nodeDetails/vabstractnode.h | 37 ++ tools/nodeDetails/vnodearc.h | 50 +++ tools/nodeDetails/vnodepoint.h | 72 ++++ tools/nodeDetails/vnodespline.h | 51 +++ tools/nodeDetails/vnodesplinepath.h | 50 +++ tools/vabstracttool.h | 208 ++++++++++ tools/vdatatool.h | 37 ++ tools/vtooldetail.h | 115 ++++++ widgets/doubledelegate.h | 31 ++ widgets/vapplication.h | 14 + widgets/vcontrolpointspline.h | 77 ++++ widgets/vgraphicssimpletextitem.h | 37 ++ widgets/vitem.h | 11 + widgets/vmaingraphicsscene.h | 74 ++++ widgets/vmaingraphicsview.h | 29 ++ widgets/vtablegraphicsview.h | 6 + xml/vdomdocument.h | 292 ++++++++++++++ xml/vtoolrecord.h | 45 +++ 98 files changed, 7068 insertions(+), 123 deletions(-) rename container/{vstandarttablecell.cpp => vstandarttablerow.cpp} (88%) rename container/{vstandarttablecell.h => vstandarttablerow.h} (52%) diff --git a/container/calculator.h b/container/calculator.h index 36074771f..34513faf0 100644 --- a/container/calculator.h +++ b/container/calculator.h @@ -78,7 +78,7 @@ private: */ qint32 index; /** - * @brief data container of all variables. + * @brief data container with data container of all variables. */ const VContainer *data; /** diff --git a/container/container.pri b/container/container.pri index a6461484b..9cf0c82f3 100644 --- a/container/container.pri +++ b/container/container.pri @@ -3,11 +3,11 @@ SOURCES += \ container/vincrementtablerow.cpp \ container/vcontainer.cpp \ container/calculator.cpp \ - container/vstandarttablecell.cpp + container/vstandarttablerow.cpp HEADERS += \ - container/vstandarttablecell.h \ container/vpointf.h \ container/vincrementtablerow.h \ container/vcontainer.h \ - container/calculator.h + container/calculator.h \ + container/vstandarttablerow.h diff --git a/container/vcontainer.cpp b/container/vcontainer.cpp index 67b458951..0aa373568 100644 --- a/container/vcontainer.cpp +++ b/container/vcontainer.cpp @@ -34,7 +34,7 @@ qint64 VContainer::_id = 0; VContainer::VContainer() :base(QHash()), points(QHash()), pointsModeling(QHash()), - standartTable(QHash()), incrementTable(QHash()), + standartTable(QHash()), incrementTable(QHash()), lengthLines(QHash()), lineAngles(QHash()), splines(QHash()), splinesModeling(QHash()), lengthSplines(QHash()), arcs(QHash()), arcsModeling(QHash()), @@ -56,7 +56,7 @@ VContainer &VContainer::operator =(const VContainer &data) VContainer::VContainer(const VContainer &data) :base(QHash()), points(QHash()), pointsModeling(QHash()), - standartTable(QHash()), incrementTable(QHash()), + standartTable(QHash()), incrementTable(QHash()), lengthLines(QHash()), lineAngles(QHash()), splines(QHash()), splinesModeling(QHash()), lengthSplines(QHash()), arcs(QHash()), arcsModeling(QHash()), @@ -110,7 +110,7 @@ val VContainer::GetObject(const QHash &obj, key id) } } -VStandartTableCell VContainer::GetStandartTableCell(const QString &name) const +VStandartTableRow VContainer::GetStandartTableCell(const QString &name) const { Q_ASSERT(name.isEmpty()==false); return GetObject(standartTable, name); @@ -584,7 +584,7 @@ void VContainer::AddLineAngle(const QString &name, const qreal &value) qreal VContainer::GetValueStandartTableCell(const QString& name) const { - VStandartTableCell cell = GetStandartTableCell(name); + VStandartTableRow cell = GetStandartTableCell(name); qreal k_size = ( static_cast (size()/10.0) - 50.0 ) / 2.0; qreal k_growth = ( static_cast (growth()/10.0) - 176.0 ) / 6.0; qreal value = cell.GetBase() + k_size*cell.GetKsize() + k_growth*cell.GetKgrowth(); @@ -812,60 +812,60 @@ void VContainer::AddLengthLine(const QString &name, const qreal &value) void VContainer::CreateManTableIGroup () { - AddStandartTableCell("Pkor", VStandartTableCell(84, 0, 3)); - AddStandartTableCell("Pkor", VStandartTableCell(84, 0, 3)); - AddStandartTableCell("Vtos", VStandartTableCell(1450, 2, 51)); - AddStandartTableCell("Vtosh", VStandartTableCell(1506, 2, 54)); - AddStandartTableCell("Vpt", VStandartTableCell(1438, 3, 52)); - AddStandartTableCell("Vst", VStandartTableCell(1257, -1, 49)); - AddStandartTableCell("Vlt", VStandartTableCell(1102, 0, 43)); - AddStandartTableCell("Vk", VStandartTableCell(503, 0, 22)); - AddStandartTableCell("Vsht", VStandartTableCell(1522, 2, 54)); - AddStandartTableCell("Vzy", VStandartTableCell(1328, 0, 49)); - AddStandartTableCell("Vlop", VStandartTableCell(1320, 0, 49)); - AddStandartTableCell("Vps", VStandartTableCell(811, -1, 36)); - AddStandartTableCell("Ssh", VStandartTableCell(202, 4, 1)); - AddStandartTableCell("SgI", VStandartTableCell(517, 18, 2)); - AddStandartTableCell("SgII", VStandartTableCell(522, 19, 1)); - AddStandartTableCell("SgIII", VStandartTableCell(500, 20, 0)); - AddStandartTableCell("St", VStandartTableCell(390, 20, 0)); - AddStandartTableCell("Sb", VStandartTableCell(492, 15, 5)); - AddStandartTableCell("SbI", VStandartTableCell(482, 12, 6)); - AddStandartTableCell("Obed", VStandartTableCell(566, 18, 6)); - AddStandartTableCell("Ok", VStandartTableCell(386, 8, 8)); - AddStandartTableCell("Oi", VStandartTableCell(380, 8, 6)); - AddStandartTableCell("Osch", VStandartTableCell(234, 4, 4)); - AddStandartTableCell("Dsb", VStandartTableCell(1120, 0, 44)); - AddStandartTableCell("Dsp", VStandartTableCell(1110, 0, 43)); - AddStandartTableCell("Dn", VStandartTableCell(826, -3, 37)); - AddStandartTableCell("Dps", VStandartTableCell(316, 4, 7)); - AddStandartTableCell("Dpob", VStandartTableCell(783, 14, 15)); - AddStandartTableCell("Ds", VStandartTableCell(260, 1, 6)); - AddStandartTableCell("Op", VStandartTableCell(316, 12, 0)); - AddStandartTableCell("Ozap", VStandartTableCell(180, 4, 0)); - AddStandartTableCell("Pkis", VStandartTableCell(250, 4, 0)); - AddStandartTableCell("SHp", VStandartTableCell(160, 1, 4)); - AddStandartTableCell("Dlych", VStandartTableCell(500, 2, 15)); - AddStandartTableCell("Dzap", VStandartTableCell(768, 2, 24)); - AddStandartTableCell("DIIIp", VStandartTableCell(970, 2, 29)); - AddStandartTableCell("Vprp", VStandartTableCell(214, 3, 3)); - AddStandartTableCell("Vg", VStandartTableCell(262, 8, 3)); - AddStandartTableCell("Dtp", VStandartTableCell(460, 7, 9)); - AddStandartTableCell("Dp", VStandartTableCell(355, 5, 5)); - AddStandartTableCell("Vprz", VStandartTableCell(208, 3, 5)); - AddStandartTableCell("Dts", VStandartTableCell(438, 2, 10)); - AddStandartTableCell("DtsI", VStandartTableCell(469, 2, 10)); - AddStandartTableCell("Dvcht", VStandartTableCell(929, 9, 19)); - AddStandartTableCell("SHg", VStandartTableCell(370, 14, 4)); - AddStandartTableCell("Cg", VStandartTableCell(224, 6, 0)); - AddStandartTableCell("SHs", VStandartTableCell(416, 10, 2)); - AddStandartTableCell("dpzr", VStandartTableCell(121, 6, 0)); - AddStandartTableCell("Ogol", VStandartTableCell(576, 4, 4)); - AddStandartTableCell("Ssh1", VStandartTableCell(205, 5, 0)); - AddStandartTableCell("St", VStandartTableCell(410, 20, 0)); - AddStandartTableCell("Drzap", VStandartTableCell(594, 3, 19)); - AddStandartTableCell("DbII", VStandartTableCell(1020, 0, 44)); - AddStandartTableCell("Sb", VStandartTableCell(504, 15, 4)); + AddStandartTableCell("Pkor", VStandartTableRow(84, 0, 3)); + AddStandartTableCell("Pkor", VStandartTableRow(84, 0, 3)); + AddStandartTableCell("Vtos", VStandartTableRow(1450, 2, 51)); + AddStandartTableCell("Vtosh", VStandartTableRow(1506, 2, 54)); + AddStandartTableCell("Vpt", VStandartTableRow(1438, 3, 52)); + AddStandartTableCell("Vst", VStandartTableRow(1257, -1, 49)); + AddStandartTableCell("Vlt", VStandartTableRow(1102, 0, 43)); + AddStandartTableCell("Vk", VStandartTableRow(503, 0, 22)); + AddStandartTableCell("Vsht", VStandartTableRow(1522, 2, 54)); + AddStandartTableCell("Vzy", VStandartTableRow(1328, 0, 49)); + AddStandartTableCell("Vlop", VStandartTableRow(1320, 0, 49)); + AddStandartTableCell("Vps", VStandartTableRow(811, -1, 36)); + AddStandartTableCell("Ssh", VStandartTableRow(202, 4, 1)); + AddStandartTableCell("SgI", VStandartTableRow(517, 18, 2)); + AddStandartTableCell("SgII", VStandartTableRow(522, 19, 1)); + AddStandartTableCell("SgIII", VStandartTableRow(500, 20, 0)); + AddStandartTableCell("St", VStandartTableRow(390, 20, 0)); + AddStandartTableCell("Sb", VStandartTableRow(492, 15, 5)); + AddStandartTableCell("SbI", VStandartTableRow(482, 12, 6)); + AddStandartTableCell("Obed", VStandartTableRow(566, 18, 6)); + AddStandartTableCell("Ok", VStandartTableRow(386, 8, 8)); + AddStandartTableCell("Oi", VStandartTableRow(380, 8, 6)); + AddStandartTableCell("Osch", VStandartTableRow(234, 4, 4)); + AddStandartTableCell("Dsb", VStandartTableRow(1120, 0, 44)); + AddStandartTableCell("Dsp", VStandartTableRow(1110, 0, 43)); + AddStandartTableCell("Dn", VStandartTableRow(826, -3, 37)); + AddStandartTableCell("Dps", VStandartTableRow(316, 4, 7)); + AddStandartTableCell("Dpob", VStandartTableRow(783, 14, 15)); + AddStandartTableCell("Ds", VStandartTableRow(260, 1, 6)); + AddStandartTableCell("Op", VStandartTableRow(316, 12, 0)); + AddStandartTableCell("Ozap", VStandartTableRow(180, 4, 0)); + AddStandartTableCell("Pkis", VStandartTableRow(250, 4, 0)); + AddStandartTableCell("SHp", VStandartTableRow(160, 1, 4)); + AddStandartTableCell("Dlych", VStandartTableRow(500, 2, 15)); + AddStandartTableCell("Dzap", VStandartTableRow(768, 2, 24)); + AddStandartTableCell("DIIIp", VStandartTableRow(970, 2, 29)); + AddStandartTableCell("Vprp", VStandartTableRow(214, 3, 3)); + AddStandartTableCell("Vg", VStandartTableRow(262, 8, 3)); + AddStandartTableCell("Dtp", VStandartTableRow(460, 7, 9)); + AddStandartTableCell("Dp", VStandartTableRow(355, 5, 5)); + AddStandartTableCell("Vprz", VStandartTableRow(208, 3, 5)); + AddStandartTableCell("Dts", VStandartTableRow(438, 2, 10)); + AddStandartTableCell("DtsI", VStandartTableRow(469, 2, 10)); + AddStandartTableCell("Dvcht", VStandartTableRow(929, 9, 19)); + AddStandartTableCell("SHg", VStandartTableRow(370, 14, 4)); + AddStandartTableCell("Cg", VStandartTableRow(224, 6, 0)); + AddStandartTableCell("SHs", VStandartTableRow(416, 10, 2)); + AddStandartTableCell("dpzr", VStandartTableRow(121, 6, 0)); + AddStandartTableCell("Ogol", VStandartTableRow(576, 4, 4)); + AddStandartTableCell("Ssh1", VStandartTableRow(205, 5, 0)); + AddStandartTableCell("St", VStandartTableRow(410, 20, 0)); + AddStandartTableCell("Drzap", VStandartTableRow(594, 3, 19)); + AddStandartTableCell("DbII", VStandartTableRow(1020, 0, 44)); + AddStandartTableCell("Sb", VStandartTableRow(504, 15, 4)); } QVector VContainer::GetReversePoint(const QVector &points) const diff --git a/container/vcontainer.h b/container/vcontainer.h index e96901596..91044d5cf 100644 --- a/container/vcontainer.h +++ b/container/vcontainer.h @@ -29,7 +29,7 @@ #ifndef VCONTAINER_H #define VCONTAINER_H -#include "vstandarttablecell.h" +#include "vstandarttablerow.h" #include "vincrementtablerow.h" #include "../geometry/varc.h" #include "../geometry/vsplinepath.h" @@ -80,7 +80,7 @@ public: * @param name name of standart table row * @return row of standart table */ - VStandartTableCell GetStandartTableCell(const QString& name) const; + VStandartTableRow GetStandartTableCell(const QString& name) const; /** * @brief GetIncrementTableRow return increment table row by name * @param name name of increment table row @@ -181,7 +181,7 @@ public: * @param name name of row of standart table * @param cell row of standart table */ - inline void AddStandartTableCell(const QString& name, const VStandartTableCell& cell) + inline void AddStandartTableCell(const QString& name, const VStandartTableRow& cell) {standartTable[name] = cell;} /** * @brief AddIncrementTableRow add new row of increment table @@ -340,7 +340,7 @@ public: * @param name name of row * @param cell row of standart table */ - inline void UpdateStandartTableCell(const QString& name, const VStandartTableCell& cell) + inline void UpdateStandartTableCell(const QString& name, const VStandartTableRow& cell) {standartTable[name] = cell;} /** * @brief UpdateIncrementTableRow update increment table row by name @@ -433,82 +433,82 @@ public: */ inline void RemoveIncrementTableRow(const QString& name) {incrementTable.remove(name);} /** - * @brief DataPoints return container of points + * @brief data container with dataPoints return container of points * @return pointer on container of points */ inline const QHash *DataPoints() const {return &points;} /** - * @brief DataPointsModeling return container of points modeling + * @brief data container with dataPointsModeling return container of points modeling * @return pointer on container of points modeling */ inline const QHash *DataPointsModeling() const {return &pointsModeling;} /** - * @brief DataSplines return container of splines + * @brief data container with dataSplines return container of splines * @return pointer on container of splines */ inline const QHash *DataSplines() const {return &splines;} /** - * @brief DataSplinesModeling return container of splines modeling + * @brief data container with dataSplinesModeling return container of splines modeling * @return pointer on container of splines modeling */ inline const QHash *DataSplinesModeling() const {return &splinesModeling;} /** - * @brief DataArcs return container of arcs + * @brief data container with dataArcs return container of arcs * @return pointer on container of arcs */ inline const QHash *DataArcs() const {return &arcs;} /** - * @brief DataArcsModeling return container of arcs modeling + * @brief data container with dataArcsModeling return container of arcs modeling * @return pointer on container of arcs modeling */ inline const QHash *DataArcsModeling() const {return &arcsModeling;} /** - * @brief DataBase return container of data + * @brief data container with dataBase return container of data * @return pointer on container of base data */ inline const QHash *DataBase() const {return &base;} /** - * @brief DataStandartTable return container of standart table + * @brief data container with dataStandartTable return container of standart table * @return pointer on container of standart table */ - inline const QHash *DataStandartTable() const {return &standartTable;} + inline const QHash *DataStandartTable() const {return &standartTable;} /** - * @brief DataIncrementTable return container of increment table + * @brief data container with dataIncrementTable return container of increment table * @return pointer on container of increment table */ inline const QHash *DataIncrementTable() const {return &incrementTable;} /** - * @brief DataLengthLines return container of lines lengths + * @brief data container with dataLengthLines return container of lines lengths * @return pointer on container of lines lengths */ inline const QHash *DataLengthLines() const {return &lengthLines;} /** - * @brief DataLengthSplines return container of splines lengths + * @brief data container with dataLengthSplines return container of splines lengths * @return pointer on container of splines lengths */ inline const QHash *DataLengthSplines() const {return &lengthSplines;} /** - * @brief DataLengthArcs return container of arcs length + * @brief data container with dataLengthArcs return container of arcs length * @return pointer on container of arcs length */ inline const QHash *DataLengthArcs() const {return &lengthArcs;} /** - * @brief DataLineAngles return container of angles of line + * @brief data container with dataLineAngles return container of angles of line * @return pointer on container of angles of line */ inline const QHash *DataLineAngles() const {return &lineAngles;} /** - * @brief DataSplinePaths return container of spline paths + * @brief data container with dataSplinePaths return container of spline paths * @return pointer on container of spline paths */ inline const QHash *DataSplinePaths() const {return &splinePaths;} /** - * @brief DataSplinePathsModeling return container of spline paths modeling + * @brief data container with dataSplinePathsModeling return container of spline paths modeling * @return pointer on container of spline paths modeling */ inline const QHash *DataSplinePathsModeling() const {return &splinePathsModeling;} /** - * @brief DataDetails return container of details + * @brief data container with dataDetails return container of details * @return pointer on container of details */ inline const QHash *DataDetails() const {return &details;} @@ -593,7 +593,7 @@ private: /** * @brief standartTable container of standart table rows */ - QHash standartTable; + QHash standartTable; /** * @brief incrementTable */ diff --git a/container/vincrementtablerow.h b/container/vincrementtablerow.h index 5aa643e7d..9b805ed2c 100644 --- a/container/vincrementtablerow.h +++ b/container/vincrementtablerow.h @@ -29,27 +29,96 @@ #ifndef VINCREMENTTABLEROW_H #define VINCREMENTTABLEROW_H +/** + * @brief The VIncrementTableRow class keep data row of increment table + */ class VIncrementTableRow { public: + /** + * @brief VIncrementTableRow create enpty row + */ VIncrementTableRow(); + /** + * @brief VIncrementTableRow create row + * @param id id + * @param base value in base size and growth + * @param ksize increment in sizes + * @param kgrowth increment in growths + * @param description description of increment + */ VIncrementTableRow(qint64 id, qreal base, qreal ksize, qreal kgrowth, QString description = QString()); + /** + * @brief getId return id of row + * @return id + */ inline qint64 getId() const {return id;} + /** + * @brief setId set id of row + * @param value id + */ inline void setId(const qint64 &value) {id = value;} + /** + * @brief getBase return value in base size and growth + * @return value + */ inline qreal getBase() const {return base;} + /** + * @brief setBase set value in base size and growth + * @param value base value + */ inline void setBase(const qreal &value) {base = value;} + /** + * @brief getKsize return increment in sizes + * @return increment + */ inline qreal getKsize() const {return ksize;} + /** + * @brief setKsize set increment in sizes + * @param value value of increment + */ inline void setKsize(const qreal &value) {ksize = value;} + /** + * @brief getKgrowth return increment in growths + * @return increment + */ inline qreal getKgrowth() const {return kgrowth;} + /** + * @brief setKgrowth set increment in growths + * @param value value of increment + */ inline void setKgrowth(const qreal &value) {kgrowth = value;} + /** + * @brief getDescription return description + * @return description + */ inline QString getDescription() const {return description;} + /** + * @brief setDescription set description for row + * @param value description + */ inline void setDescription(const QString &value) {description = value;} private: + /** + * @brief id identificator + */ qint64 id; + /** + * @brief base value in base size and growth + */ qreal base; + /** + * @brief ksize increment in sizes + */ qreal ksize; + /** + * @brief kgrowth increment in growths + */ qreal kgrowth; + /** + * @brief description description of increment + */ QString description; }; diff --git a/container/vpointf.h b/container/vpointf.h index b2396ce54..ae9188a43 100644 --- a/container/vpointf.h +++ b/container/vpointf.h @@ -29,41 +29,147 @@ #ifndef VPOINTF_H #define VPOINTF_H +/** + * @brief The VPointF class keep data of point. + */ class VPointF { public: + /** + * @brief VPointF creat empty point + */ inline VPointF () :_name(QString()), _mx(0), _my(0), _x(0), _y(0), mode(Draw::Calculation), idObject(0){} + /** + * @brief VPointF copy constructor + * @param point + */ inline VPointF (const VPointF &point ) :_name(point.name()), _mx(point.mx()), _my(point.my()), _x(point.x()), _y(point.y()), mode(point.getMode()), idObject(point.getIdObject()){} + /** + * @brief VPointF create new point + * @param x x coordinate + * @param y y coordinate + * @param name name of point + * @param mx offset name respect to x + * @param my offset name respect to y + * @param mode mode of draw + * @param idObject point modeling keep here id of parent point + */ inline VPointF ( qreal x, qreal y, QString name, qreal mx, qreal my, Draw::Draws mode = Draw::Calculation, qint64 idObject = 0) :_name(name), _mx(mx), _my(my), _x(x), _y(y), mode(mode), idObject(idObject){} + /** + * @brief operator = assignment operator + * @param point point + * @return point + */ VPointF &operator=(const VPointF &point); ~VPointF(){} + /** + * @brief name return name of point + * @return name + */ inline QString name() const { return _name;} + /** + * @brief mx return offset name respect to x + * @return offset + */ inline qreal mx() const {return _mx;} + /** + * @brief my return offset name respect to y + * @return offset + */ inline qreal my() const {return _my;} + /** + * @brief setName set name of point + * @param name name + */ inline void setName(const QString &name) {_name = name;} + /** + * @brief setMx set offset name respect to x + * @param mx offset + */ inline void setMx(qreal mx) {_mx = mx;} + /** + * @brief setMy set offset name respect to y + * @param my offset + */ inline void setMy(qreal my) {_my = my;} + /** + * @brief toQPointF convert to QPointF + * @return QPointF point + */ inline QPointF toQPointF()const {return QPointF(_x, _y);} + /** + * @brief x return x coordinate + * @return value + */ inline qreal x() const {return _x;} + /** + * @brief setX set x coordinate + * @param value x coordinate + */ inline void setX(const qreal &value){_x = value;} + /** + * @brief y return y coordinate + * @return value + */ inline qreal y() const {return _y;} + /** + * @brief setY set y coordinate + * @param value y coordinate + */ inline void setY(const qreal &value){_y = value;} + /** + * @brief getMode return mode of point + * @return mode + */ inline Draw::Draws getMode() const{return mode;} + /** + * @brief setMode set mode for point + * @param value mode + */ inline void setMode(const Draw::Draws &value) {mode = value;} + /** + * @brief getIdObject return id of parrent. + * @return id + */ inline qint64 getIdObject() const {return idObject;} + /** + * @brief setIdObject set id of parent + * @param value id + */ inline void setIdObject(const qint64 &value) {idObject = value;} private: + /** + * @brief _name name of point + */ QString _name; + /** + * @brief _mx offset name respect to x + */ qreal _mx; + /** + * @brief _my offset name respect to y + */ qreal _my; + /** + * @brief _x x coordinate + */ qreal _x; + /** + * @brief _y y coordinate + */ qreal _y; + /** + * @brief mode mode of point + */ Draw::Draws mode; + /** + * @brief idObject id of parent. Only for point modeling. All another return 0. + */ qint64 idObject; }; diff --git a/container/vstandarttablecell.cpp b/container/vstandarttablerow.cpp similarity index 88% rename from container/vstandarttablecell.cpp rename to container/vstandarttablerow.cpp index 4a824bba9..668036804 100644 --- a/container/vstandarttablecell.cpp +++ b/container/vstandarttablerow.cpp @@ -26,10 +26,10 @@ ** *************************************************************************/ -#include "vstandarttablecell.h" +#include "vstandarttablerow.h" -VStandartTableCell::VStandartTableCell() +VStandartTableRow::VStandartTableRow() :base(0), ksize(0), kgrowth(0), description(QString()){} -VStandartTableCell::VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description) +VStandartTableRow::VStandartTableRow(qint32 base, qreal ksize, qreal kgrowth, QString description) :base(base), ksize(ksize), kgrowth(kgrowth), description(description){} diff --git a/container/vstandarttablecell.h b/container/vstandarttablerow.h similarity index 52% rename from container/vstandarttablecell.h rename to container/vstandarttablerow.h index b0fe41bb0..0a2dd2231 100644 --- a/container/vstandarttablecell.h +++ b/container/vstandarttablerow.h @@ -26,23 +26,64 @@ ** *************************************************************************/ -#ifndef VSTANDARTTABLECELL_H -#define VSTANDARTTABLECELL_H +#ifndef VSTANDARTTABLEROW_H +#define VSTANDARTTABLEROW_H -class VStandartTableCell +/** + * @brief The VStandartTableRow class keep data row of standart table + */ +class VStandartTableRow { public: - VStandartTableCell(); - VStandartTableCell(qint32 base, qreal ksize, qreal kgrowth, QString description = QString()); + /** + * @brief VStandartTableRow create empty row + */ + VStandartTableRow(); + /** + * @brief VStandartTableRow create row + * @param base value in base size and growth + * @param ksize increment in sizes + * @param kgrowth increment in growths + * @param description description of increment + */ + VStandartTableRow(qint32 base, qreal ksize, qreal kgrowth, QString description = QString()); + /** + * @brief GetBase return value in base size and growth + * @return value + */ inline qint32 GetBase() const {return base;} + /** + * @brief GetKsize return increment in sizes + * @return increment + */ inline qreal GetKsize() const {return ksize;} + /** + * @brief GetKgrowth return increment in growths + * @return increment + */ inline qreal GetKgrowth() const {return kgrowth;} + /** + * @brief GetDescription return description + * @return description + */ inline QString GetDescription() const {return description;} private: + /** + * @brief base value in base size and growth + */ qint32 base; + /** + * @brief ksize increment in sizes + */ qreal ksize; + /** + * @brief kgrowth increment in growths + */ qreal kgrowth; + /** + * @brief description description measurement + */ QString description; }; -#endif // VSTANDARTTABLECELL_H +#endif // VSTANDARTTABLEROW_H diff --git a/dialogs/dialogalongline.h b/dialogs/dialogalongline.h index 819498b1d..67aa5f0a2 100644 --- a/dialogs/dialogalongline.h +++ b/dialogs/dialogalongline.h @@ -36,34 +36,114 @@ namespace Ui class DialogAlongLine; } +/** + * @brief The DialogAlongLine class dialog for ToolAlongLine. Help create point and edit option. + */ class DialogAlongLine : public DialogTool { Q_OBJECT public: + /** + * @brief DialogAlongLine create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogAlongLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogAlongLine(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getFirstPointId return id first point of line + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id first point of line + * @param value id + * @param id id of current point + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id second point of line + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id second point of line + * @param value id + * @param id id of current point + */ void setSecondPointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogAlongLine) + /** + * @brief ui keeps information about user interface + */ Ui::DialogAlongLine *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief firstPointId id first point of line + */ qint64 firstPointId; + /** + * @brief secondPointId id second point of line + */ qint64 secondPointId; }; diff --git a/dialogs/dialogarc.h b/dialogs/dialogarc.h index 014955cce..27bf820bb 100644 --- a/dialogs/dialogarc.h +++ b/dialogs/dialogarc.h @@ -36,49 +36,171 @@ namespace Ui class DialogArc; } +/** + * @brief The DialogArc class dialog for ToolArc. Help create arc and edit option. + */ class DialogArc : public DialogTool { Q_OBJECT public: + /** + * @brief DialogArc create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogArc(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogArc(); + /** + * @brief GetCenter return id of center point + * @return id id + */ inline qint64 GetCenter() const {return center;} + /** + * @brief SetCenter set id of center point + * @param value id + */ void SetCenter(const qint64 &value); + /** + * @brief GetRadius return formula of radius + * @return formula + */ inline QString GetRadius() const {return radius;} + /** + * @brief SetRadius set formula of radius + * @param value formula + */ void SetRadius(const QString &value); + /** + * @brief GetF1 return formula first angle of arc + * @return formula + */ inline QString GetF1() const {return f1;} + /** + * @brief SetF1 set formula first angle of arc + * @param value formula + */ void SetF1(const QString &value); + /** + * @brief GetF2 return formula second angle of arc + * @return formula + */ inline QString GetF2() const {return f2;} + /** + * @brief SetF2 set formula second angle of arc + * @param value formula + */ void SetF2(const QString &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief ValChenged show description angles of lines + * @param row number of row + */ virtual void ValChenged(int row); + /** + * @brief PutRadius put variable into formula of radius + */ void PutRadius(); + /** + * @brief PutF1 put variable into formula of first angle + */ void PutF1(); + /** + * @brief PutF2 put variable into formula of second angle + */ void PutF2(); + /** + * @brief LineAngles show variable angles of lines + */ void LineAngles(); + /** + * @brief RadiusChanged after change formula of radius calculate value and show result + */ void RadiusChanged(); + /** + * @brief F1Changed after change formula of first angle calculate value and show result + */ void F1Changed(); + /** + * @brief F2Changed after change formula of second angle calculate value and show result + */ void F2Changed(); protected: + /** + * @brief CheckState if all is right enable button ok + */ virtual void CheckState(); private: Q_DISABLE_COPY(DialogArc) + /** + * @brief ui keeps information about user interface + */ Ui::DialogArc *ui; + /** + * @brief flagRadius true if value of radius is correct + */ bool flagRadius; + /** + * @brief flagF1 true if value of first angle is correct + */ bool flagF1; + /** + * @brief flagF2 true if value of second angle is correct + */ bool flagF2; + /** + * @brief timerRadius timer of check formula of radius + */ QTimer *timerRadius; + /** + * @brief timerF1 timer of check formula of first angle + */ QTimer *timerF1; + /** + * @brief timerF2 timer of check formula of second angle + */ QTimer *timerF2; + /** + * @brief center id of center point + */ qint64 center; + /** + * @brief radius formula of radius + */ QString radius; + /** + * @brief f1 formula of first angle + */ QString f1; + /** + * @brief f2 formula of second angle + */ QString f2; + /** + * @brief EvalRadius calculate value of radius + */ void EvalRadius(); + /** + * @brief EvalF1 calculate value of first angle + */ void EvalF1(); + /** + * @brief EvalF2 calculate value of second angle + */ void EvalF2(); + /** + * @brief ShowLineAngles show varibles angles of lines + */ void ShowLineAngles(); }; diff --git a/dialogs/dialogbisector.h b/dialogs/dialogbisector.h index 99a665ce9..dbdb03280 100644 --- a/dialogs/dialogbisector.h +++ b/dialogs/dialogbisector.h @@ -36,37 +36,129 @@ namespace Ui class DialogBisector; } +/** + * @brief The DialogBisector class dialog for ToolBisector. Help create point and edit option. + */ class DialogBisector : public DialogTool { Q_OBJECT public: - explicit DialogBisector(const VContainer *data, Draw::Draws mode = Draw::Calculation, - QWidget *parent = 0); + /** + * @brief DialogBisector create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ + DialogBisector(const VContainer *data, Draw::Draws mode = Draw::Calculation, + QWidget *parent = 0); ~DialogBisector(); + /** + * @brief getPointName return name of point + * @return name + */ QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getFirstPointId return id of first point + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id of first point + * @param value id + * @param id don't show this id in list + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id of second point + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id of second point + * @param value id + * @param id don't show this id in list + */ void setSecondPointId(const qint64 &value, const qint64 &id); + /** + * @brief getThirdPointId return id of third point + * @return id + */ inline qint64 getThirdPointId() const {return thirdPointId;} + /** + * @brief setThirdPointId set id of third point + * @param value id + * @param id don't show this id in list + */ void setThirdPointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogBisector) + /** + * @brief ui keeps information about user interface + */ Ui::DialogBisector *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief firstPointId id of first point + */ qint64 firstPointId; + /** + * @brief secondPointId id of second point + */ qint64 secondPointId; + /** + * @brief thirdPointId id of third point + */ qint64 thirdPointId; }; diff --git a/dialogs/dialogdetail.h b/dialogs/dialogdetail.h index e4024f9f2..3253422cd 100644 --- a/dialogs/dialogdetail.h +++ b/dialogs/dialogdetail.h @@ -32,26 +32,92 @@ #include "ui_dialogdetail.h" #include "dialogtool.h" +/** + * @brief The DialogDetail class dialog for ToolDetai. Help create detail and edit option. + */ class DialogDetail : public DialogTool { Q_OBJECT public: + /** + * @brief DialogDetail create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent = 0); + /** + * @brief getDetails return detail + * @return detail + */ inline VDetail getDetails() const {return details;} + /** + * @brief setDetails set detail + * @param value detail + */ void setDetails(const VDetail &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of objects (points, arcs, splines, spline paths) + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief BiasXChanged changed value of offset for object respect to x + * @param d value in mm + */ void BiasXChanged(qreal d); + /** + * @brief BiasYChanged changed value of offset for object respect to y + * @param d value in mm + */ void BiasYChanged(qreal d); + /** + * @brief ClickedSeams save supplement of seams for detail + * @param checked 1 - need supplement, 0 - don't need supplement + */ void ClickedSeams(bool checked); + /** + * @brief ClickedClosed save closed equdistant or not + * @param checked 1 - closed, 0 - don't closed + */ void ClickedClosed(bool checked); + /** + * @brief ObjectChanged changed new object (point, arc, spline or spline path) form list + * @param row number of row + */ void ObjectChanged(int row); private: + /** + * @brief ui keeps information about user interface + */ Ui::DialogDetail ui; + /** + * @brief details detail + */ VDetail details; + /** + * @brief supplement keep option supplement of seams + */ bool supplement; + /** + * @brief closed keep option about equdistant (closed or not) + */ bool closed; + /** + * @brief NewItem add new object (point, arc, spline or spline path) to list + * @param id id of object + * @param typeTool type of tool + * @param mode mode + * @param typeNode type of node in detail + * @param mx offset respect to x + * @param my offset respect to y + */ void NewItem(qint64 id, const Tool::Tools &typeTool, const Draw::Draws &mode, const NodeDetail::NodeDetails &typeNode, qreal mx = 0, qreal my = 0); }; diff --git a/dialogs/dialogendline.h b/dialogs/dialogendline.h index 0dfd06401..394ad7876 100644 --- a/dialogs/dialogendline.h +++ b/dialogs/dialogendline.h @@ -36,32 +36,108 @@ namespace Ui class DialogEndLine; } +/** + * @brief The DialogEndLine class dialog for ToolEndLine. Help create point and edit option. + */ class DialogEndLine : public DialogTool { Q_OBJECT public: + /** + * @brief DialogEndLine create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogEndLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogEndLine(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getAngle return angle of line + * @return angle in degree + */ inline qreal getAngle() const {return angle;} + /** + * @brief setAngle set angle of line + * @param value angle in degree + */ void setAngle(const qreal &value); + /** + * @brief getBasePointId return id base point of line + * @return id + */ inline qint64 getBasePointId() const {return basePointId;} + /** + * @brief setBasePointId set id base point of line + * @param value id + * @param id don't show this id in list + */ void setBasePointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogEndLine) + /** + * @brief ui keeps information about user interface + */ Ui::DialogEndLine *ui; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief angle angle of line + */ qreal angle; + /** + * @brief basePointId id base point of line + */ qint64 basePointId; }; diff --git a/dialogs/dialogheight.h b/dialogs/dialogheight.h index 186af6873..dfa360a9b 100644 --- a/dialogs/dialogheight.h +++ b/dialogs/dialogheight.h @@ -36,34 +36,115 @@ namespace Ui class DialogHeight; } +/** + * @brief The DialogHeight class dialog for ToolHeight. Help create point and edit option. + */ class DialogHeight : public DialogTool { Q_OBJECT public: + /** + * @brief DialogHeight create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogHeight(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogHeight(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getBasePointId return id base point of height + * @return id + */ inline qint64 getBasePointId() const {return basePointId;} + /** + * @brief setBasePointId set id base point of height + * @param value id + * @param id don't show this id in list + */ void setBasePointId(const qint64 &value, const qint64 &id); + /** + * @brief getP1LineId return id first point of line + * @return id id + */ inline qint64 getP1LineId() const {return p1LineId;} + /** + * @brief setP1LineId set id first point of line + * @param value id + * @param id don't show this id in list + */ void setP1LineId(const qint64 &value, const qint64 &id); + /** + * @brief getP2LineId return id second point of line + * @return id + */ inline qint64 getP2LineId() const{return p2LineId;} + /** + * @brief setP2LineId set id second point of line + * @param value id + * @param id don't show this id in list + */ void setP2LineId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogHeight) + /** + * @brief ui keeps information about user interface + */ Ui::DialogHeight *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief basePointId id base point of height + */ qint64 basePointId; + /** + * @brief p1LineId id first point of line + */ qint64 p1LineId; + /** + * @brief p2LineId id second point of line + */ qint64 p2LineId; }; diff --git a/dialogs/dialoghistory.h b/dialogs/dialoghistory.h index 692f265c3..120fff0ee 100644 --- a/dialogs/dialoghistory.h +++ b/dialogs/dialoghistory.h @@ -37,30 +37,90 @@ namespace Ui class DialogHistory; } +/** + * @brief The DialogHistory class show dialog history. + */ class DialogHistory : public DialogTool { Q_OBJECT public: + /** + * @brief DialogHistory create dialog + * @param data container with data + * @param doc dom document container + * @param parent parent widget + */ DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent = 0); virtual ~DialogHistory(); public slots: + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief cellClicked changed history record + * @param row number row in table + * @param column number column in table + */ void cellClicked(int row, int column); + /** + * @brief ChangedCursor changed cursor of input. Cursor show after what record we will insert new object + * @param id id of object + */ void ChangedCursor(qint64 id); + /** + * @brief UpdateHistory update history table + */ void UpdateHistory(); signals: + /** + * @brief ShowHistoryTool signal change color of selected in records tool + * @param id id of tool + * @param color new color of tool + * @param enable true enable selection, false disable selection + */ void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable); protected: + /** + * @brief closeEvent handle when windows is closing + * @param event event + */ virtual void closeEvent ( QCloseEvent * event ); private: Q_DISABLE_COPY(DialogHistory) + /** + * @brief ui keeps information about user interface + */ Ui::DialogHistory *ui; + /** + * @brief doc dom document container + */ VDomDocument *doc; + /** + * @brief cursorRow save number of row where is cursor + */ qint32 cursorRow; + /** + * @brief cursorToolRecordRow save number of row selected record + */ qint32 cursorToolRecordRow; + /** + * @brief FillTable fill table + */ void FillTable(); + /** + * @brief Record return description for record + * @param tool record data + * @return description + */ QString Record(const VToolRecord &tool); + /** + * @brief InitialTable set initial option of table + */ void InitialTable(); + /** + * @brief ShowPoint show selected point + */ void ShowPoint(); }; diff --git a/dialogs/dialogincrements.cpp b/dialogs/dialogincrements.cpp index a50fd47dc..f22ac2614 100644 --- a/dialogs/dialogincrements.cpp +++ b/dialogs/dialogincrements.cpp @@ -67,14 +67,14 @@ DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget void DialogIncrements::FillStandartTable() { - const QHash *standartTable = data->DataStandartTable(); + const QHash *standartTable = data->DataStandartTable(); qint32 currentRow = -1; - QHashIterator i(*standartTable); + QHashIterator i(*standartTable); ui->tableWidgetStandart->setRowCount ( standartTable->size() ); while (i.hasNext()) { i.next(); - VStandartTableCell cell = i.value(); + VStandartTableRow cell = i.value(); currentRow++; QTableWidgetItem *item = new QTableWidgetItem(QString(i.key())); diff --git a/dialogs/dialogincrements.h b/dialogs/dialogincrements.h index 58fa46611..d5c1e895e 100644 --- a/dialogs/dialogincrements.h +++ b/dialogs/dialogincrements.h @@ -37,38 +37,124 @@ namespace Ui class DialogIncrements; } +/** + * @brief The DialogIncrements class show dialog increments. Tables of all variables in program will be here. + */ class DialogIncrements : public DialogTool { Q_OBJECT public: + /** + * @brief DialogIncrements create dialog + * @param data container with data + * @param doc dom document container + * @param parent parent widget + */ DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent = 0); ~DialogIncrements(); public slots: + /** + * @brief clickedToolButtonAdd create new row in table + */ void clickedToolButtonAdd(); + /** + * @brief clickedToolButtonRemove remove one row from table + */ void clickedToolButtonRemove(); + /** + * @brief cellChanged cell in table was changed + * @param row number of row + * @param column number of column + */ void cellChanged ( qint32 row, qint32 column ); + /** + * @brief FullUpdateFromFile update information in tables form file + */ void FullUpdateFromFile(); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); signals: + /** + * @brief FullUpdateTree signal update data for dom document + */ void FullUpdateTree(); + /** + * @brief haveLiteChange signal show sign of change + */ void haveLiteChange(); private: Q_DISABLE_COPY(DialogIncrements) + /** + * @brief ui keeps information about user interface + */ Ui::DialogIncrements *ui; + /** + * @brief data container with data + */ VContainer *data; // need because we must change data + /** + * @brief doc dom document container + */ VDomDocument *doc; + /** + * @brief row save number of row current selected cell + */ qint32 row; + /** + * @brief column save number of column current selected cell + */ qint32 column; + /** + * @brief InitialStandartTable initial option standart table + */ void InitialStandartTable(); + /** + * @brief InitialIncrementTable initial option increment table + */ void InitialIncrementTable(); + /** + * @brief InitialLinesTable initial option lines table + */ void InitialLinesTable(); + /** + * @brief InitialSplinesTable initial option splines table + */ void InitialSplinesTable(); + /** + * @brief InitialArcsTable initial option arcs table + */ void InitialArcsTable(); + /** + * @brief FillStandartTable fill data for standart table + */ void FillStandartTable(); + /** + * @brief FillIncrementTable fill data for increment table + */ void FillIncrementTable(); + /** + * @brief FillLengthLines fill data for table of lines lengths + */ void FillLengthLines(); + /** + * @brief FillLengthSplines fill data for table of splines lengths + */ void FillLengthSplines(); + /** + * @brief FillLengthArcs fill data for table of arcs lengths + */ void FillLengthArcs(); + /** + * @brief AddIncrementToFile save created increment to file + * @param id id of increment + * @param name name + * @param base base value + * @param ksize increment in sizes + * @param kgrowth increment in growths + * @param description description of increment + */ void AddIncrementToFile(qint64 id, QString name, qreal base, qreal ksize, qreal kgrowth, QString description); }; diff --git a/dialogs/dialogline.h b/dialogs/dialogline.h index d0e3c9d1c..74194b6fd 100644 --- a/dialogs/dialogline.h +++ b/dialogs/dialogline.h @@ -36,24 +36,69 @@ namespace Ui class DialogLine; } +/** + * @brief The DialogLine class dialog for ToolLine. Help create line and edit option. + */ class DialogLine : public DialogTool { Q_OBJECT public: + /** + * @brief DialogLine create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogLine(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogLine(); + /** + * @brief getFirstPoint return id first point + * @return id + */ inline qint64 getFirstPoint() const {return firstPoint;} + /** + * @brief setFirstPoint set id first point + * @param value id + */ void setFirstPoint(const qint64 &value); + /** + * @brief getSecondPoint return id second point + * @return id + */ inline qint64 getSecondPoint() const {return secondPoint;} + /** + * @brief setSecondPoint set id second point + * @param value id + */ void setSecondPoint(const qint64 &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogLine) + /** + * @brief ui keeps information about user interface + */ Ui::DialogLine *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief firstPoint id first point + */ qint64 firstPoint; + /** + * @brief secondPoint id second point + */ qint64 secondPoint; }; diff --git a/dialogs/dialoglineintersect.h b/dialogs/dialoglineintersect.h index ff3183c3c..8fbbb410b 100644 --- a/dialogs/dialoglineintersect.h +++ b/dialogs/dialoglineintersect.h @@ -36,41 +36,145 @@ namespace Ui class DialogLineIntersect; } +/** + * @brief The DialogLineIntersect class dialog for ToolLineIntersect. Help create point and edit option. + */ class DialogLineIntersect : public DialogTool { Q_OBJECT public: + /** + * @brief DialogLineIntersect create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogLineIntersect(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogLineIntersect(); + /** + * @brief getP1Line1 return id first point of first line + * @return id + */ inline qint64 getP1Line1() const {return p1Line1;} + /** + * @brief setP1Line1 set id first point of first line + * @param value id + */ void setP1Line1(const qint64 &value); + /** + * @brief getP2Line1 return id second point of first line + * @return id + */ inline qint64 getP2Line1() const {return p2Line1;} + /** + * @brief setP2Line1 set id second point of first line + * @param value id + */ void setP2Line1(const qint64 &value); + /** + * @brief getP1Line2 return id first point of second line + * @return id + */ inline qint64 getP1Line2() const {return p1Line2;} + /** + * @brief setP1Line2 set id first point of second line + * @param value id + */ void setP1Line2(const qint64 &value); + /** + * @brief getP2Line2 return id second point of second line + * @return id + */ inline qint64 getP2Line2() const {return p2Line2;} + /** + * @brief setP2Line2 set id second point of second line + * @param value id + */ void setP2Line2(const qint64 &value); + /** + * @brief getPointName return name of point + * @return + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value + */ void setPointName(const QString &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief P1Line1Changed changed first point of first line + * @param index index in list + */ void P1Line1Changed( int index); + /** + * @brief P2Line1Changed changed second point of first line + * @param index index in list + */ void P2Line1Changed( int index); + /** + * @brief P1Line2Changed changed first point of second line + * @param index index in list + */ void P1Line2Changed( int index); + /** + * @brief P2Line2Changed changed second point of second line + * @param index index in list + */ void P2Line2Changed( int index); private: Q_DISABLE_COPY(DialogLineIntersect) + /** + * @brief ui keeps information about user interface + */ Ui::DialogLineIntersect *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief p1Line1 id first point of first line + */ qint64 p1Line1; + /** + * @brief p2Line1 id second point of first line + */ qint64 p2Line1; + /** + * @brief p1Line2 id first point of second line + */ qint64 p1Line2; + /** + * @brief p2Line2 id second point of second line + */ qint64 p2Line2; + /** + * @brief flagPoint keep state of point + */ bool flagPoint; + /** + * @brief CheckState check state of dialog. Enable or disable button ok. + */ virtual void CheckState(); + /** + * @brief CheckIntersecion check intersection of points + * @return true - line have intersection, false = don't have + */ bool CheckIntersecion(); }; diff --git a/dialogs/dialognormal.h b/dialogs/dialognormal.h index b2a7329f5..4d8e97d56 100644 --- a/dialogs/dialognormal.h +++ b/dialogs/dialognormal.h @@ -36,36 +36,127 @@ namespace Ui class DialogNormal; } +/** + * @brief The DialogNormal class dialog for ToolNormal. Help create point and edit option. + */ class DialogNormal : public DialogTool { Q_OBJECT public: + /** + * @brief DialogNormal create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogNormal(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogNormal(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const{return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getAngle return aditional angle of normal + * @return angle in degree + */ inline qreal getAngle() const {return angle;} + /** + * @brief setAngle set aditional angle of normal + * @param value angle in degree + */ void setAngle(const qreal &value); + /** + * @brief getFirstPointId return id of first point + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id of first point + * @param value id + * @param id don't show this id in list + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id of second point + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id of second point + * @param value id + * @param id don't show this id in list + */ void setSecondPointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogNormal) + /** + * @brief ui keeps information about user interface + */ Ui::DialogNormal *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief angle aditional angle of normal + */ qreal angle; + /** + * @brief firstPointId id first point of line + */ qint64 firstPointId; + /** + * @brief secondPointId id second point of line + */ qint64 secondPointId; }; diff --git a/dialogs/dialogpointofcontact.h b/dialogs/dialogpointofcontact.h index 416e5adcf..c8076c74a 100644 --- a/dialogs/dialogpointofcontact.h +++ b/dialogs/dialogpointofcontact.h @@ -32,33 +32,114 @@ #include "ui_dialogpointofcontact.h" #include "dialogtool.h" +/** + * @brief The DialogPointOfContact class dialog for ToolPointOfContact. Help create point and edit option. + */ class DialogPointOfContact : public DialogTool { Q_OBJECT public: + /** + * @brief DialogPointOfContact create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogPointOfContact(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getRadius return formula radius of arc + * @return formula + */ inline QString getRadius() const {return radius;} + /** + * @brief setRadius set formula radius of arc + * @param value formula + */ void setRadius(const QString &value); + /** + * @brief GetCenter return id of center point + * @return id + */ inline qint64 getCenter() const {return center;} + /** + * @brief SetCenter set id of center point + * @param value id + * @param id don't show this id in list. + */ void setCenter(const qint64 &value, const qint64 &id); + /** + * @brief getFirstPoint return id first point + * @return id + */ inline qint64 getFirstPoint() const {return firstPoint;} + /** + * @brief setFirstPoint set id first point + * @param value id + * @param id don't show this id in list. + */ void setFirstPoint(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPoint return id second point + * @return id + */ inline qint64 getSecondPoint() const {return secondPoint;} + /** + * @brief setSecondPoint set id second point + * @param value id + * @param id don't show this id in list. + */ void setSecondPoint(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogPointOfContact) + /** + * @brief ui keeps information about user interface + */ Ui::DialogPointOfContact ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief radius radius of arc + */ QString radius; + /** + * @brief center id center point of arc + */ qint64 center; + /** + * @brief firstPoint id first point of line + */ qint64 firstPoint; + /** + * @brief secondPoint id second point of line + */ qint64 secondPoint; }; diff --git a/dialogs/dialogpointofintersection.h b/dialogs/dialogpointofintersection.h index 9ea655f58..3c4041153 100644 --- a/dialogs/dialogpointofintersection.h +++ b/dialogs/dialogpointofintersection.h @@ -36,28 +36,86 @@ namespace Ui class DialogPointOfIntersection; } +/** + * @brief The DialogPointOfIntersection class dialog for ToolPointOfIntersection. Help create point and edit option. + */ class DialogPointOfIntersection : public DialogTool { Q_OBJECT public: + /** + * @brief DialogPointOfIntersection create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogPointOfIntersection(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogPointOfIntersection(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getFirstPointId return id of first point + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id of first point + * @param value id + * @param id don't show this id in list. + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id of second point + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id of second point + * @param value id + * @param id don't show this id in list. + */ void setSecondPointId(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogPointOfIntersection) + /** + * @brief ui keeps information about user interface + */ Ui::DialogPointOfIntersection *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief firstPointId id first point of line + */ qint64 firstPointId; + /** + * @brief secondPointId id second point of line + */ qint64 secondPointId; }; diff --git a/dialogs/dialogshoulderpoint.h b/dialogs/dialogshoulderpoint.h index b9c4df8c2..ce01f3235 100644 --- a/dialogs/dialogshoulderpoint.h +++ b/dialogs/dialogshoulderpoint.h @@ -36,37 +36,129 @@ namespace Ui class DialogShoulderPoint; } +/** + * @brief The DialogShoulderPoint class dialog for ToolShoulderPoint. Help create point and edit option. + */ class DialogShoulderPoint : public DialogTool { Q_OBJECT public: + /** + * @brief DialogShoulderPoint create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogShoulderPoint(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogShoulderPoint(); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); + /** + * @brief getTypeLine return type of line + * @return type + */ inline QString getTypeLine() const {return typeLine;} + /** + * @brief setTypeLine set type of line + * @param value type + */ void setTypeLine(const QString &value); + /** + * @brief getFormula return string of formula + * @return formula + */ inline QString getFormula() const {return formula;} + /** + * @brief setFormula set string of formula + * @param value formula + */ void setFormula(const QString &value); + /** + * @brief getP1Line return id first point of line + * @return id + */ inline qint64 getP1Line() const {return p1Line;} + /** + * @brief setP1Line set id first point of line + * @param value id + * @param id don't show this id in list + */ void setP1Line(const qint64 &value, const qint64 &id); + /** + * @brief getP2Line return id second point of line + * @return id + */ inline qint64 getP2Line() const {return p2Line;} + /** + * @brief setP2Line set id second point of line + * @param value id + * @param id don't show this id in list + */ void setP2Line(const qint64 &value, const qint64 &id); + /** + * @brief getPShoulder return id shoulder point + * @return id + */ inline qint64 getPShoulder() const {return pShoulder;} + /** + * @brief setPShoulder set id shoulder point + * @param value id + * @param id don't show this id in list + */ void setPShoulder(const qint64 &value, const qint64 &id); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogShoulderPoint) + /** + * @brief ui keeps information about user interface + */ Ui::DialogShoulderPoint *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief typeLine type of line + */ QString typeLine; + /** + * @brief formula formula + */ QString formula; + /** + * @brief p1Line id first point of line + */ qint64 p1Line; + /** + * @brief p2Line id second point of line + */ qint64 p2Line; + /** + * @brief pShoulder id shoulder point + */ qint64 pShoulder; }; diff --git a/dialogs/dialogsinglepoint.h b/dialogs/dialogsinglepoint.h index 02c456bd4..ac667adc5 100644 --- a/dialogs/dialogsinglepoint.h +++ b/dialogs/dialogsinglepoint.h @@ -36,22 +36,59 @@ namespace Ui class DialogSinglePoint; } +/** + * @brief The DialogSinglePoint class dialog for ToolSinglePoint. Help create point and edit option. + */ class DialogSinglePoint : public DialogTool { Q_OBJECT public: + /** + * @brief DialogSinglePoint create dialog + * @param data container with data + * @param parent parent widget + */ DialogSinglePoint(const VContainer *data, QWidget *parent = 0); + /** + * @brief setData set name and point + * @param name name of point + * @param point data for point + */ void setData(const QString &name, const QPointF &point); + /** + * @brief getName return name + * @return name + */ inline QString getName()const {return name;} + /** + * @brief getPoint return point + * @return point + */ inline QPointF getPoint()const {return point;} ~DialogSinglePoint(); public slots: + /** + * @brief mousePress get mouse position + * @param scenePos position of cursor + */ void mousePress(const QPointF &scenePos); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogSinglePoint) + /** + * @brief ui keeps information about user interface + */ Ui::DialogSinglePoint *ui; + /** + * @brief name name of point + */ QString name; + /** + * @brief point data of point + */ QPointF point; }; diff --git a/dialogs/dialogspline.h b/dialogs/dialogspline.h index 6ae6b45fc..1df76c69e 100644 --- a/dialogs/dialogspline.h +++ b/dialogs/dialogspline.h @@ -36,39 +36,139 @@ namespace Ui class DialogSpline; } +/** + * @brief The DialogSpline class dialog for ToolSpline. Help create spline and edit option. + */ class DialogSpline : public DialogTool { Q_OBJECT public: + /** + * @brief DialogSpline create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogSpline(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogSpline(); + /** + * @brief getP1 return id first point of spline + * @return id + */ inline qint64 getP1() const {return p1;} + /** + * @brief setP1 set id first point of spline + * @param value id + */ void setP1(const qint64 &value); + /** + * @brief getP4 return id fourth point of spline + * @return id + */ inline qint64 getP4() const {return p4;} + /** + * @brief setP4 set id fourth point of spline + * @param value id + */ void setP4(const qint64 &value); + /** + * @brief getAngle1 return first angle of spline + * @return angle in degree + */ inline qreal getAngle1() const {return angle1;} + /** + * @brief setAngle1 set first angle of spline + * @param value angle in degree + */ void setAngle1(const qreal &value); + /** + * @brief getAngle2 return second angle of spline + * @return angle in degree + */ inline qreal getAngle2() const {return angle2;} + /** + * @brief setAngle2 set second angle of spline + * @param value angle in degree + */ void setAngle2(const qreal &value); + /** + * @brief getKAsm1 return first coefficient asymmetry + * @return value. Can be >= 0. + */ inline qreal getKAsm1() const {return kAsm1;} + /** + * @brief setKAsm1 set first coefficient asymmetry + * @param value value. Can be >= 0. + */ void setKAsm1(const qreal &value); + /** + * @brief getKAsm2 return second coefficient asymmetry + * @return value. Can be >= 0. + */ inline qreal getKAsm2() const {return kAsm2;} + /** + * @brief setKAsm2 set second coefficient asymmetry + * @param value value. Can be >= 0. + */ void setKAsm2(const qreal &value); + /** + * @brief getKCurve return coefficient curve + * @return value. Can be >= 0. + */ inline qreal getKCurve() const {return kCurve;} + /** + * @brief setKCurve set coefficient curve + * @param value value. Can be >= 0. + */ void setKCurve(const qreal &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogSpline) + /** + * @brief ui keeps information about user interface + */ Ui::DialogSpline *ui; + /** + * @brief number number of handled objects + */ qint32 number; - qint64 p1; // перша точка - qint64 p4; // четверта точка - qreal angle1; // кут нахилу дотичної в першій точці - qreal angle2; // кут нахилу дотичної в другій точці + /** + * @brief p1 id first point of spline + */ + qint64 p1; + /** + * @brief p4 id fourth point of spline + */ + qint64 p4; + /** + * @brief angle1 first angle of spline in degree + */ + qreal angle1; + /** + * @brief angle2 second angle of spline in degree + */ + qreal angle2; + /** + * @brief kAsm1 first coefficient asymmetry + */ qreal kAsm1; + /** + * @brief kAsm2 second coefficient asymmetry + */ qreal kAsm2; + /** + * @brief kCurve coefficient curve + */ qreal kCurve; }; diff --git a/dialogs/dialogsplinepath.h b/dialogs/dialogsplinepath.h index 1ea4d587b..9cf20e16c 100644 --- a/dialogs/dialogsplinepath.h +++ b/dialogs/dialogsplinepath.h @@ -37,31 +37,108 @@ namespace Ui class DialogSplinePath; } +/** + * @brief The DialogSplinePath class dialog for ToolSplinePath. Help create spline path and edit option. + */ class DialogSplinePath : public DialogTool { Q_OBJECT public: + /** + * @brief DialogSplinePath create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogSplinePath(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogSplinePath(); + /** + * @brief GetPath return spline path + * @return path + */ inline VSplinePath GetPath() const {return path;} + /** + * @brief SetPath set spline path + * @param value path + */ void SetPath(const VSplinePath &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type don't show this id in list + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief PointChenged selected another point in list + * @param row number of row + */ void PointChenged(int row); + /** + * @brief currentPointChanged changed point in combo box + * @param index index in list + */ void currentPointChanged( int index ); + /** + * @brief Angle1Changed changed first angle + * @param index index in list + */ void Angle1Changed( int index ); + /** + * @brief Angle2Changed changed second angle + * @param index index in list + */ void Angle2Changed( int index ); + /** + * @brief KAsm1Changed changed first coefficient asymmetry + * @param d value + */ void KAsm1Changed(qreal d); + /** + * @brief KAsm2Changed changed second coefficient asymmetry + * @param d value + */ void KAsm2Changed(qreal d); private: Q_DISABLE_COPY(DialogSplinePath) + /** + * @brief ui keeps information about user interface + */ Ui::DialogSplinePath *ui; + /** + * @brief path spline path + */ VSplinePath path; + /** + * @brief NewItem add point to list + * @param id id + * @param kAsm1 first coefficient asymmetry + * @param angle angle in degree + * @param kAsm2 second coefficient asymmetry + */ void NewItem(qint64 id, qreal kAsm1, qreal angle, qreal kAsm2); + /** + * @brief dataPoint show data of point in fields + * @param id id + * @param kAsm1 first coefficient asymmetry + * @param angle1 first angle of spline + * @param kAsm2 second coefficient asymmetry + * @param angle2 second angle of spline + */ void DataPoint(qint64 id, qreal kAsm1, qreal angle1, qreal kAsm2, qreal angle2); + /** + * @brief EnableFields enable or disable fields + */ void EnableFields(); + /** + * @brief SetAngle set angle of point + * @param angle angle in degree + */ void SetAngle(qint32 angle); }; diff --git a/dialogs/dialogtool.cpp b/dialogs/dialogtool.cpp index e4b6a3b72..6484785c1 100644 --- a/dialogs/dialogtool.cpp +++ b/dialogs/dialogtool.cpp @@ -443,7 +443,7 @@ void DialogTool::ValChenged(int row) } if (radioButtonStandartTable->isChecked()) { - VStandartTableCell stable = data->GetStandartTableCell(item->text()); + VStandartTableRow stable = data->GetStandartTableCell(item->text()); QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetValueStandartTableCell(item->text())) .arg(stable.GetDescription()); labelDescription->setText(desc); diff --git a/dialogs/dialogtool.h b/dialogs/dialogtool.h index 34b9ce76e..074570314 100644 --- a/dialogs/dialogtool.h +++ b/dialogs/dialogtool.h @@ -32,80 +32,324 @@ #include #include "../container/vcontainer.h" +/** + * @brief The DialogTool class parent for all dialog of tools. + */ class DialogTool : public QDialog { Q_OBJECT public: + /** + * @brief DialogTool create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogTool(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); virtual ~DialogTool() {} + /** + * @brief getIdDetail return id detail + * @return id + */ inline qint64 getIdDetail() const {return idDetail;} + /** + * @brief setIdDetail set id detail + * @param value id + */ inline void setIdDetail(const qint64 &value) {idDetail = value;} signals: + /** + * @brief DialogClosed signal dialog closed + * @param result keep result + */ void DialogClosed(int result); + /** + * @brief ToolTip emit tooltipe for tool + * @param toolTip text tooltipe + */ void ToolTip(const QString &toolTip); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief NamePointChanged check name of point + */ void NamePointChanged(); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); + /** + * @brief DialogRejected emit signal dialog rejected + */ virtual void DialogRejected(); + /** + * @brief formula check formula + */ void FormulaChanged(); + /** + * @brief ArrowUp set angle value 90 degree + */ void ArrowUp(); + /** + * @brief ArrowDown set angle value 270 degree + */ void ArrowDown(); + /** + * @brief ArrowLeft set angle value 180 degree + */ void ArrowLeft(); + /** + * @brief ArrowRight set angle value 0 degree + */ void ArrowRight(); + /** + * @brief ArrowLeftUp set angle value 135 degree + */ void ArrowLeftUp(); + /** + * @brief ArrowLeftDown set angle value 225 degree + */ void ArrowLeftDown(); + /** + * @brief ArrowRightUp set angle value 45 degree + */ void ArrowRightUp(); + /** + * @brief ArrowRightDown set angle value 315 degree + */ void ArrowRightDown(); + /** + * @brief EvalFormula evaluate formula + */ void EvalFormula(); + /** + * @brief SizeGrowth show in list base variables + */ void SizeGrowth(); + /** + * @brief StandartTable show in list standart table variables + */ void StandartTable(); + /** + * @brief LengthLines show in list lengths of lines variables + */ void LengthLines(); + /** + * @brief LengthArcs show in list lengths of arcs variables + */ void LengthArcs(); + /** + * @brief LengthCurves show in list lengths of curves variables + */ void LengthCurves(); + /** + * @brief Increments show in list increment variables + */ void Increments(); + /** + * @brief PutHere put variable into edit + */ void PutHere(); + /** + * @brief PutVal put variable into edit + * @param item chosen item of list widget + */ void PutVal(QListWidgetItem * item); + /** + * @brief ValChenged show description when current variable changed + * @param row number of row + */ virtual void ValChenged(int row); + /** + * @brief UpdateList update lists of variables + */ void UpdateList(); protected: Q_DISABLE_COPY(DialogTool) + /** + * @brief data container with data + */ const VContainer *data; + /** + * @brief isInitialized true if window is initialized + */ bool isInitialized; + /** + * @brief flagName true if name is correct + */ bool flagName; + /** + * @brief flagFormula true if formula correct + */ bool flagFormula; + /** + * @brief timerFormula timer for check formula + */ QTimer *timerFormula; + /** + * @brief bOk button ok + */ QPushButton *bOk; + /** + * @brief spinBoxAngle spinbox for angle + */ QDoubleSpinBox *spinBoxAngle; + /** + * @brief lineEditFormula linEdit for formula + */ QLineEdit *lineEditFormula; + /** + * @brief listWidget listWidget with variables + */ QListWidget *listWidget; + /** + * @brief labelResultCalculation label with result of calculation + */ QLabel *labelResultCalculation; + /** + * @brief labelDescription description of variable + */ QLabel *labelDescription; + /** + * @brief labelEditNamePoint label used when need show wrong name of point + */ QLabel *labelEditNamePoint; + /** + * @brief labelEditFormula label used when need show wrong formula + */ QLabel *labelEditFormula; + /** + * @brief radioButtonSizeGrowth radio button for base variables + */ QRadioButton *radioButtonSizeGrowth; + /** + * @brief radioButtonStandartTable radio button for standart table variables + */ QRadioButton *radioButtonStandartTable; + /** + * @brief radioButtonIncrements radio button for increments variables + */ QRadioButton *radioButtonIncrements; + /** + * @brief radioButtonLengthLine radio button for lengths od lines variables + */ QRadioButton *radioButtonLengthLine; + /** + * @brief radioButtonLengthArc radio button for lengths of arcs variables + */ QRadioButton *radioButtonLengthArc; + /** + * @brief radioButtonLengthCurve radio button for lengths of curves variables + */ QRadioButton *radioButtonLengthCurve; + /** + * @brief idDetail id detail + */ qint64 idDetail; + /** + * @brief mode mode + */ Draw::Draws mode; + /** + * @brief CheckObject check if object belongs to detail + * @param id id of object (point, arc, spline, spline path) + * @return true - belons, false - don't + */ bool CheckObject(const qint64 &id); + /** + * @brief closeEvent handle when dialog cloded + * @param event event + */ virtual void closeEvent ( QCloseEvent * event ); + /** + * @brief showEvent handle when window show + * @param event event + */ virtual void showEvent( QShowEvent *event ); + /** + * @brief FillComboBoxPoints fill comboBox list of points + * @param box comboBox + * @param id don't show this id in list + */ void FillComboBoxPoints(QComboBox *box, const qint64 &id = 0)const; + /** + * @brief FillComboBoxTypeLine fill comboBox list of type lines + * @param box comboBox + */ void FillComboBoxTypeLine(QComboBox *box) const; + /** + * @brief CheckState enable, when all is correct, or disable, when something wrong, button ok + */ virtual void CheckState(); + /** + * @brief getTypeLine return type of line + * @param box combobox + * @return type + */ QString GetTypeLine(const QComboBox *box)const; - template void ShowVariable(const QHash *var); + template + /** + * @brief ShowVariable show variables in list + * @param var container with variables + */ + void ShowVariable(const QHash *var); + /** + * @brief SetupTypeLine setupe type of line + * @param box combobox + * @param value string from pattern file + */ void SetupTypeLine(QComboBox *box, const QString &value); + /** + * @brief ChangeCurrentText select item in combobox by name + * @param box combobox + * @param value name of item + */ void ChangeCurrentText(QComboBox *box, const QString &value); + /** + * @brief ChangeCurrentData select item in combobox by id + * @param box combobox + * @param value id of item + */ void ChangeCurrentData(QComboBox *box, const qint64 &value) const; + /** + * @brief PutValHere put variable into line edit from list + * @param lineEdit lineEdit + * @param listWidget listWidget + */ void PutValHere(QLineEdit *lineEdit, QListWidget *listWidget); + /** + * @brief ValFormulaChanged handle change formula + * @param flag flag state of formula + * @param edit LineEdit + * @param timer timer of formula + */ void ValFormulaChanged(bool &flag, QLineEdit *edit, QTimer * timer); + /** + * @brief Eval evaluate formula and show result + * @param edit lineEdit of formula + * @param flag flag state of formula + * @param timer timer of formula + * @param label label for signal error + */ void Eval(QLineEdit *edit, bool &flag, QTimer *timer, QLabel *label); + /** + * @brief setCurrentPointId set current point id in combobox + * @param box combobox + * @param pointId save current point id + * @param value point id + * @param id don't show this id in list + */ void setCurrentPointId(QComboBox *box, qint64 &pointId, const qint64 &value, const qint64 &id) const; + /** + * @brief getCurrentPointId return current point id in combobox + * @param box combobox + * @return id or -1 if combobox is empty + */ qint64 getCurrentPointId(QComboBox *box) const; }; diff --git a/dialogs/dialogtriangle.h b/dialogs/dialogtriangle.h index a3aa2393d..68f9cbbcb 100644 --- a/dialogs/dialogtriangle.h +++ b/dialogs/dialogtriangle.h @@ -36,33 +36,115 @@ namespace Ui class DialogTriangle; } +/** + * @brief The DialogTriangle class dialog for ToolTriangle. Help create point and edit option. + */ class DialogTriangle : public DialogTool { Q_OBJECT public: + /** + * @brief DialogTriangle create dialog + * @param data container with data + * @param mode mode of creation tool + * @param parent parent widget + */ DialogTriangle(const VContainer *data, Draw::Draws mode = Draw::Calculation, QWidget *parent = 0); ~DialogTriangle(); + /** + * @brief getAxisP1Id return id first point of axis + * @return id + */ inline qint64 getAxisP1Id() const {return axisP1Id;} + /** + * @brief setAxisP1Id set id first point of axis + * @param value id + * @param id don't show this point in list + */ void setAxisP1Id(const qint64 &value, const qint64 &id); + /** + * @brief getAxisP2Id return id second point of axis + * @return id + */ inline qint64 getAxisP2Id() const {return axisP2Id;} + /** + * @brief setAxisP2Id set id second point of axis + * @param value id + * @param id don't show this point in list + */ void setAxisP2Id(const qint64 &value, const qint64 &id); + /** + * @brief getFirstPointId return id of first point + * @return id + */ inline qint64 getFirstPointId() const {return firstPointId;} + /** + * @brief setFirstPointId set id of first point + * @param value id + * @param id don't show this point in list + */ void setFirstPointId(const qint64 &value, const qint64 &id); + /** + * @brief getSecondPointId return id of second point + * @return id + */ inline qint64 getSecondPointId() const {return secondPointId;} + /** + * @brief setSecondPointId set id of second point + * @param value id + * @param id don't show this point in list + */ void setSecondPointId(const qint64 &value, const qint64 &id); + /** + * @brief getPointName return name of point + * @return name + */ inline QString getPointName() const {return pointName;} + /** + * @brief setPointName set name of point + * @param value name + */ void setPointName(const QString &value); public slots: + /** + * @brief ChoosedObject gets id and type of selected object. Save right data and ignore wrong. + * @param id id of point or detail + * @param type type of object + */ virtual void ChoosedObject(qint64 id, const Scene::Scenes &type); + /** + * @brief DialogAccepted save data and emit signal about closed dialog. + */ virtual void DialogAccepted(); private: Q_DISABLE_COPY(DialogTriangle) + /** + * @brief ui keeps information about user interface + */ Ui::DialogTriangle *ui; + /** + * @brief number number of handled objects + */ qint32 number; + /** + * @brief pointName name of point + */ QString pointName; + /** + * @brief axisP1Id id first point of axis + */ qint64 axisP1Id; + /** + * @brief axisP2Id id second point of axis + */ qint64 axisP2Id; + /** + * @brief firstPointId id first point of line + */ qint64 firstPointId; + /** + * @brief secondPointId id second point of line + */ qint64 secondPointId; }; diff --git a/exception/vexception.h b/exception/vexception.h index 426a2c4fb..1e8e355b6 100644 --- a/exception/vexception.h +++ b/exception/vexception.h @@ -32,18 +32,51 @@ #include +/** + * @brief The VException class + */ class VException : public QException { public: + /** + * @brief VException + * @param what + */ VException(const QString &what); + /** + * @brief VException + * @param e + */ VException(const VException &e):what(e.What()){} virtual ~VException() Q_DECL_NOEXCEPT_EXPR(true){} + /** + * @brief raise + */ inline void raise() const { throw *this; } + /** + * @brief clone + * @return + */ inline VException *clone() const { return new VException(*this); } + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const { return QString(); } + /** + * @brief What + * @return + */ inline QString What() const {return what;} protected: + /** + * @brief what + */ QString what; }; diff --git a/exception/vexceptionbadid.h b/exception/vexceptionbadid.h index d15c695e9..356ca02f3 100644 --- a/exception/vexceptionbadid.h +++ b/exception/vexceptionbadid.h @@ -31,21 +31,56 @@ #include "vexception.h" +/** + * @brief The VExceptionBadId class + */ class VExceptionBadId : public VException { public: + /** + * @brief VExceptionBadId + * @param what + * @param id + */ VExceptionBadId(const QString &what, const qint64 &id) :VException(what), id(id), key(QString()){} + /** + * @brief VExceptionBadId + * @param what + * @param key + */ VExceptionBadId(const QString &what, const QString &key) :VException(what), id(0), key(key){} + /** + * @brief VExceptionBadId + * @param e + */ VExceptionBadId(const VExceptionBadId &e) :VException(e), id(e.BadId()), key(e.BadKey()){} virtual ~VExceptionBadId() Q_DECL_NOEXCEPT_EXPR(true){} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief BadId + * @return + */ inline qint64 BadId() const {return id; } + /** + * @brief BadKey + * @return + */ inline QString BadKey() const {return key; } protected: + /** + * @brief id + */ qint64 id; + /** + * @brief key + */ QString key; }; diff --git a/exception/vexceptionconversionerror.h b/exception/vexceptionconversionerror.h index a864fc98e..53678f4c1 100644 --- a/exception/vexceptionconversionerror.h +++ b/exception/vexceptionconversionerror.h @@ -31,16 +31,39 @@ #include "vexception.h" +/** + * @brief The VExceptionConversionError class + */ class VExceptionConversionError : public VException { public: + /** + * @brief VExceptionConversionError + * @param what + * @param str + */ VExceptionConversionError(const QString &what, const QString &str); + /** + * @brief VExceptionConversionError + * @param e + */ VExceptionConversionError(const VExceptionConversionError &e) :VException(e), str(e.String()){} virtual ~VExceptionConversionError() Q_DECL_NOEXCEPT_EXPR(true) {} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief String + * @return + */ inline QString String() const {return str;} protected: + /** + * @brief str + */ QString str; }; diff --git a/exception/vexceptionemptyparameter.h b/exception/vexceptionemptyparameter.h index e877f3220..bcdb5b296 100644 --- a/exception/vexceptionemptyparameter.h +++ b/exception/vexceptionemptyparameter.h @@ -31,24 +31,73 @@ #include "vexception.h" +/** + * @brief The VExceptionEmptyParameter class + */ class VExceptionEmptyParameter : public VException { public: + /** + * @brief VExceptionEmptyParameter + * @param what + * @param name + * @param domElement + */ VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement); + /** + * @brief VExceptionEmptyParameter + * @param e + */ VExceptionEmptyParameter(const VExceptionEmptyParameter &e) :VException(e), name(e.Name()), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionEmptyParameter() Q_DECL_NOEXCEPT_EXPR(true) {} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const; + /** + * @brief Name + * @return + */ inline QString Name() const {return name;} + /** + * @brief TagText + * @return + */ inline QString TagText() const {return tagText;} + /** + * @brief TagName + * @return + */ inline QString TagName() const {return tagName;} + /** + * @brief LineNumber + * @return + */ inline qint32 LineNumber() const {return lineNumber;} protected: + /** + * @brief name + */ QString name; + /** + * @brief tagText + */ QString tagText; + /** + * @brief tagName + */ QString tagName; + /** + * @brief lineNumber + */ qint32 lineNumber; }; diff --git a/exception/vexceptionobjecterror.h b/exception/vexceptionobjecterror.h index c0b3fbaf7..620f4d189 100644 --- a/exception/vexceptionobjecterror.h +++ b/exception/vexceptionobjecterror.h @@ -31,25 +31,77 @@ #include "vexception.h" +/** + * @brief The VExceptionObjectError class + */ class VExceptionObjectError : public VException { public: + /** + * @brief VExceptionObjectError + * @param what + * @param domElement + */ VExceptionObjectError(const QString &what, const QDomElement &domElement); + /** + * @brief VExceptionObjectError + * @param e + */ VExceptionObjectError(const VExceptionObjectError &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()), moreInfo(e.MoreInformation()){} virtual ~VExceptionObjectError() Q_DECL_NOEXCEPT_EXPR(true) {} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const; + /** + * @brief TagText + * @return + */ inline QString TagText() const {return tagText;} + /** + * @brief TagName + * @return + */ inline QString TagName() const {return tagName;} + /** + * @brief LineNumber + * @return + */ inline qint32 LineNumber() const {return lineNumber;} + /** + * @brief AddMoreInformation + * @param info + */ void AddMoreInformation(const QString &info); + /** + * @brief MoreInformation + * @return + */ inline QString MoreInformation() const {return moreInfo;} protected: + /** + * @brief tagText + */ QString tagText; + /** + * @brief tagName + */ QString tagName; + /** + * @brief lineNumber + */ qint32 lineNumber; + /** + * @brief moreInfo + */ QString moreInfo; }; diff --git a/exception/vexceptionuniqueid.h b/exception/vexceptionuniqueid.h index 2ca8b1be2..397935954 100644 --- a/exception/vexceptionuniqueid.h +++ b/exception/vexceptionuniqueid.h @@ -31,21 +31,62 @@ #include "vexception.h" +/** + * @brief The VExceptionUniqueId class + */ class VExceptionUniqueId : public VException { public: + /** + * @brief VExceptionUniqueId + * @param what + * @param domElement + */ VExceptionUniqueId(const QString &what, const QDomElement &domElement); + /** + * @brief VExceptionUniqueId + * @param e + */ VExceptionUniqueId(const VExceptionUniqueId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionUniqueId() Q_DECL_NOEXCEPT_EXPR(true){} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const; + /** + * @brief TagText + * @return + */ inline QString TagText() const {return tagText;} + /** + * @brief TagName + * @return + */ inline QString TagName() const {return tagName;} + /** + * @brief LineNumber + * @return + */ inline qint32 LineNumber() const {return lineNumber;} protected: + /** + * @brief tagText + */ QString tagText; + /** + * @brief tagName + */ QString tagName; + /** + * @brief lineNumber + */ qint32 lineNumber; }; diff --git a/exception/vexceptionwrongparameterid.h b/exception/vexceptionwrongparameterid.h index ab5d2f2ee..726785a56 100644 --- a/exception/vexceptionwrongparameterid.h +++ b/exception/vexceptionwrongparameterid.h @@ -31,21 +31,62 @@ #include "vexception.h" +/** + * @brief The VExceptionWrongParameterId class + */ class VExceptionWrongParameterId : public VException { public: + /** + * @brief VExceptionWrongParameterId + * @param what + * @param domElement + */ VExceptionWrongParameterId(const QString &what, const QDomElement &domElement); + /** + * @brief VExceptionWrongParameterId + * @param e + */ VExceptionWrongParameterId(const VExceptionWrongParameterId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionWrongParameterId() Q_DECL_NOEXCEPT_EXPR(true){} + /** + * @brief ErrorMessage + * @return + */ virtual QString ErrorMessage() const; + /** + * @brief DetailedInformation + * @return + */ virtual QString DetailedInformation() const; + /** + * @brief TagText + * @return + */ inline QString TagText() const {return tagText;} + /** + * @brief TagName + * @return + */ inline QString TagName() const {return tagName;} + /** + * @brief LineNumber + * @return + */ inline qint32 LineNumber() const {return lineNumber;} protected: + /** + * @brief tagText + */ QString tagText; + /** + * @brief tagName + */ QString tagName; + /** + * @brief lineNumber + */ qint32 lineNumber; }; diff --git a/geometry/varc.h b/geometry/varc.h index 5939e7bf4..caab908cf 100644 --- a/geometry/varc.h +++ b/geometry/varc.h @@ -42,33 +42,50 @@ class VArc { Q_DECLARE_TR_FUNCTIONS(VArc) public: - /** - * @brief VArc конструктор по замовчуванню. - */ + /** + * @brief VArc конструктор по замовчуванню. + */ VArc (); - /** - * @brief VArc конструктор. - * @param center точка центру. - * @param radius радіус. - * @param f1 початковий кут в градусах. - * @param f2 кінцевий кут в градусах. - */ + /** + * @brief VArc конструктор. + * @param center точка центру. + * @param radius радіус. + * @param f1 початковий кут в градусах. + * @param f2 кінцевий кут в градусах. + */ VArc (const QHash *points, qint64 center, qreal radius, QString formulaRadius, qreal f1, QString formulaF1, qreal f2, QString formulaF2, Draw::Draws mode = Draw::Calculation, qint64 idObject = 0); + /** + * @brief VArc + * @param arc + */ VArc(const VArc &arc); + /** + * @brief operator = + * @param arc + * @return + */ VArc& operator= (const VArc &arc); /** * @brief GetF1 повертає початковий кут дуги. * @return повертає кут в градусах. */ inline QString GetFormulaF1 () const {return formulaF1;} + /** + * @brief GetF1 + * @return + */ inline qreal GetF1 () const {return f1;} /** * @brief GetF2 повертає кінцевий кут дуги. * @return повертає кут в градусах. */ inline QString GetFormulaF2 () const {return formulaF2;} + /** + * @brief GetF2 + * @return + */ inline qreal GetF2 () const {return f2;} /** * @brief GetLength повертає довжину дуги. @@ -80,13 +97,25 @@ public: * @return повертає радіус дуги. */ inline QString GetFormulaRadius () const {return formulaRadius;} + /** + * @brief GetRadius + * @return + */ inline qreal GetRadius () const {return radius;} /** * @brief GetCenter повертає точку центра дуги. * @return повертає точку центра дуги. */ inline qint64 GetCenter () const {return center;} + /** + * @brief GetCenterPoint + * @return + */ QPointF GetCenterPoint() const; + /** + * @brief GetCenterVPoint + * @return + */ VPointF GetCenterVPoint() const; /** * @brief GetP1 повертає першу точку з якої починається дуга. @@ -98,45 +127,111 @@ public: * @return точку кінця дуги. */ QPointF GetP2 () const; + /** + * @brief GetDataPoints + * @return + */ const QHash GetDataPoints() const; /** * @brief GetPath будує шлях по даній дузі. * @return повертає шлях. */ QPainterPath GetPath() const; + /** + * @brief AngleArc + * @return + */ qreal AngleArc() const; + /** + * @brief NumberSplOfArc + * @return + */ qint32 NumberSplOfArc () const; + /** + * @brief GetPoints + * @return + */ QVector GetPoints () const; + /** + * @brief SplOfArc + * @param number + * @return + */ QVector SplOfArc( qint32 number ) const; + /** + * @brief getMode + * @return + */ inline Draw::Draws getMode() const {return mode;} + /** + * @brief setMode + * @param value + */ inline void setMode(const Draw::Draws &value) {mode = value;} + /** + * @brief getIdObject + * @return + */ inline qint64 getIdObject() const {return idObject;} + /** + * @brief setIdObject + * @param value + */ inline void setIdObject(const qint64 &value) {idObject = value;} + /** + * @brief name + * @return + */ QString name() const {return _name;} + /** + * @brief setName + * @param name + */ void setName(const QString &name) {_name = name;} private: /** * @brief f1 початковий кут в градусах */ qreal f1; // початковий кут нахилу дуги (градуси) + /** + * @brief formulaF1 + */ QString formulaF1; /** * @brief f2 кінцевий кут в градусах */ qreal f2; // кінцевий кут нахилу дуги (градуси) + /** + * @brief formulaF2 + */ QString formulaF2; /** * @brief radius радіус дуги. */ qreal radius; + /** + * @brief formulaRadius + */ QString formulaRadius; /** * @brief center центральна точка дуги. */ qint64 center; + /** + * @brief points + */ QHash points; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief idObject + */ qint64 idObject; + /** + * @brief _name + */ QString _name; }; diff --git a/geometry/vdetail.h b/geometry/vdetail.h index 2b366c547..f80289efa 100644 --- a/geometry/vdetail.h +++ b/geometry/vdetail.h @@ -33,48 +33,172 @@ namespace Detail { + /** + * @brief The Contour enum + */ enum Contour { OpenContour, CloseContour }; Q_DECLARE_FLAGS(Contours, Contour) + /** + * @brief The Equidistant enum + */ enum Equidistant { OpenEquidistant, CloseEquidistant }; Q_DECLARE_FLAGS(Equidistants, Equidistant) } Q_DECLARE_OPERATORS_FOR_FLAGS(Detail::Contours) Q_DECLARE_OPERATORS_FOR_FLAGS(Detail::Equidistants) +/** + * @brief The VDetail class + */ class VDetail { public: + /** + * @brief VDetail + */ VDetail(); + /** + * @brief VDetail + * @param name + * @param nodes + */ VDetail(const QString &name, const QVector &nodes); + /** + * @brief VDetail + * @param detail + */ VDetail(const VDetail &detail); + /** + * @brief operator = + * @param detail + * @return + */ VDetail &operator=(const VDetail &detail); + /** + * @brief append + * @param node + */ inline void append(const VNodeDetail &node) {nodes.append(node);} + /** + * @brief Clear + */ void Clear(); + /** + * @brief CountNode + * @return + */ inline qint32 CountNode() const {return nodes.size();} + /** + * @brief Containes + * @param id + * @return + */ bool Containes(const qint64 &id)const; + /** + * @brief operator [] + * @param indx + * @return + */ VNodeDetail & operator[](ptrdiff_t indx); + /** + * @brief getName + * @return + */ inline QString getName() const {return name;} + /** + * @brief setName + * @param value + */ inline void setName(const QString &value) {name = value;} + /** + * @brief getMx + * @return + */ inline qreal getMx() const {return mx;} + /** + * @brief setMx + * @param value + */ inline void setMx(const qreal &value) {mx = value;} + /** + * @brief getMy + * @return + */ inline qreal getMy() const {return my;} + /** + * @brief setMy + * @param value + */ inline void setMy(const qreal &value) {my = value;} + /** + * @brief getSupplement + * @return + */ inline bool getSupplement() const {return supplement;} + /** + * @brief setSupplement + * @param value + */ inline void setSupplement(bool value) {supplement = value;} + /** + * @brief getClosed + * @return + */ inline bool getClosed() const {return closed;} + /** + * @brief setClosed + * @param value + */ inline void setClosed(bool value) {closed = value;} + /** + * @brief getWidth + * @return + */ inline qreal getWidth() const {return width;} + /** + * @brief setWidth + * @param value + */ inline void setWidth(const qreal &value) {width = value;} + /** + * @brief getNodes + * @return + */ inline QVector getNodes() const {return nodes;} + /** + * @brief setNodes + * @param value + */ inline void setNodes(const QVector &value) {nodes = value;} private: + /** + * @brief nodes + */ QVector nodes; + /** + * @brief name + */ QString name; + /** + * @brief mx + */ qreal mx; + /** + * @brief my + */ qreal my; + /** + * @brief supplement + */ bool supplement; + /** + * @brief closed + */ bool closed; + /** + * @brief width + */ qreal width; }; diff --git a/geometry/vnodedetail.h b/geometry/vnodedetail.h index 799a355aa..14e3dbc31 100644 --- a/geometry/vnodedetail.h +++ b/geometry/vnodedetail.h @@ -34,37 +34,130 @@ namespace NodeDetail { + /** + * @brief The NodeDetail enum + */ enum NodeDetail { Contour, Modeling }; Q_DECLARE_FLAGS(NodeDetails, NodeDetail) } Q_DECLARE_OPERATORS_FOR_FLAGS(NodeDetail::NodeDetails) +/** + * @brief The VNodeDetail class + */ class VNodeDetail { public: + /** + * @brief VNodeDetail + */ VNodeDetail(); + /** + * @brief VNodeDetail + * @param id + * @param typeTool + * @param mode + * @param typeNode + * @param mx + * @param my + */ VNodeDetail(qint64 id, Tool::Tools typeTool, Draw::Draws mode, NodeDetail::NodeDetails typeNode, qreal mx = 0, qreal my = 0); + /** + * @brief VNodeDetail + * @param node + */ VNodeDetail(const VNodeDetail &node); + /** + * @brief operator = + * @param node + * @return + */ VNodeDetail &operator=(const VNodeDetail &node); + /** + * @brief getId + * @return + */ inline qint64 getId() const {return id;} + /** + * @brief setId + * @param value + */ inline void setId(const qint64 &value) {id = value;} + /** + * @brief getTypeTool + * @return + */ inline Tool::Tools getTypeTool() const {return typeTool;} + /** + * @brief setTypeTool + * @param value + */ inline void setTypeTool(const Tool::Tools &value) {typeTool = value;} + /** + * @brief getMode + * @return + */ inline Draw::Draws getMode() const {return mode;} + /** + * @brief setMode + * @param value + */ inline void setMode(const Draw::Draws &value) {mode = value;} + /** + * @brief getTypeNode + * @return + */ inline NodeDetail::NodeDetails getTypeNode() const {return typeNode;} + /** + * @brief setTypeNode + * @param value + */ inline void setTypeNode(const NodeDetail::NodeDetails &value) {typeNode = value;} + /** + * @brief getMx + * @return + */ inline qreal getMx() const {return mx;} + /** + * @brief setMx + * @param value + */ inline void setMx(const qreal &value) {mx = value;} + /** + * @brief getMy + * @return + */ inline qreal getMy() const {return my;} + /** + * @brief setMy + * @param value + */ inline void setMy(const qreal &value) {my = value;} private: + /** + * @brief id + */ qint64 id; + /** + * @brief typeTool + */ Tool::Tools typeTool; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief typeNode + */ NodeDetail::NodeDetails typeNode; + /** + * @brief mx + */ qreal mx; + /** + * @brief my + */ qreal my; }; diff --git a/geometry/vspline.h b/geometry/vspline.h index 644ff709d..9d0db6340 100644 --- a/geometry/vspline.h +++ b/geometry/vspline.h @@ -107,6 +107,10 @@ public: * @return перша точка сплайну. */ qint64 GetP1 () const {return p1;} + /** + * @brief GetPointP1 + * @return + */ VPointF GetPointP1() const; /** * @brief GetP2 повертує першу контрольну точку сплайну. @@ -123,6 +127,10 @@ public: * @return остання точка сплайну. */ inline qint64 GetP4 () const {return p4;} + /** + * @brief GetPointP4 + * @return + */ VPointF GetPointP4 () const; /** * @brief GetAngle1 повертає кут першої напрямної. @@ -139,10 +147,30 @@ public: * @return довжина сплайну. */ qreal GetLength () const; + /** + * @brief GetName + * @return + */ QString GetName () const; + /** + * @brief GetKasm1 + * @return + */ inline qreal GetKasm1() const {return kAsm1;} + /** + * @brief GetKasm2 + * @return + */ inline qreal GetKasm2() const {return kAsm2;} + /** + * @brief GetKcurve + * @return + */ inline qreal GetKcurve() const {return kCurve;} + /** + * @brief GetDataPoints + * @return + */ inline const QHash GetDataPoints() const {return points;} /** * @brief CrossingSplLine перевіряє перетин сплайну з лінією. @@ -186,14 +214,54 @@ public: * @param Pmirror точка відносно якої відбувається вертикальне дзеркалення сплайну. */ // void Mirror(const QPointF Pmirror); + /** + * @brief getMode + * @return + */ inline Draw::Draws getMode() const {return mode;} + /** + * @brief setMode + * @param value + */ inline void setMode(const Draw::Draws &value) {mode = value;} + /** + * @brief SplinePoints + * @param p1 + * @param p4 + * @param angle1 + * @param angle2 + * @param kAsm1 + * @param kAsm2 + * @param kCurve + * @return + */ static QVector SplinePoints(const QPointF &p1, const QPointF &p4, qreal angle1, qreal angle2, qreal kAsm1, qreal kAsm2, qreal kCurve); + /** + * @brief getIdObject + * @return + */ inline qint64 getIdObject() const {return idObject;} + /** + * @brief setIdObject + * @param value + */ inline void setIdObject(const qint64 &value) {idObject = value;} + /** + * @brief operator = + * @param spl + * @return + */ VSpline &operator=(const VSpline &spl); + /** + * @brief name + * @return + */ QString name() const {return _name;} + /** + * @brief setName + * @param name + */ void setName(const QString &name) {_name = name;} protected: /** @@ -230,12 +298,33 @@ private: * @brief angle2 кут в градусах другої напрямної. */ qreal angle2; // кут нахилу дотичної в другій точці + /** + * @brief kAsm1 + */ qreal kAsm1; + /** + * @brief kAsm2 + */ qreal kAsm2; + /** + * @brief kCurve + */ qreal kCurve; + /** + * @brief points + */ QHash points; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief idObject + */ qint64 idObject; + /** + * @brief _name + */ QString _name; /** * @brief LengthBezier повертає дожину сплайну за його чотирьма точками. diff --git a/geometry/vsplinepath.h b/geometry/vsplinepath.h index 212bda56c..446c0d7e4 100644 --- a/geometry/vsplinepath.h +++ b/geometry/vsplinepath.h @@ -36,6 +36,9 @@ namespace SplinePoint { + /** + * @brief The Position enum + */ enum Position { FirstPoint, LastPoint }; Q_DECLARE_FLAGS(Positions, Position) } @@ -48,56 +51,165 @@ class VSplinePath { Q_DECLARE_TR_FUNCTIONS(VSplinePath) public: - /** - * @brief VSplinePath конструктор по замовчуванню. - */ + /** + * @brief VSplinePath конструктор по замовчуванню. + */ VSplinePath(); - /** - * @brief VSplinePath конструктор по замовчуванню. - */ + /** + * @brief VSplinePath конструктор по замовчуванню. + */ VSplinePath(const QHash *points, qreal kCurve = 1, Draw::Draws mode = Draw::Calculation, qint64 idObject = 0); + /** + * @brief VSplinePath + * @param splPath + */ VSplinePath(const VSplinePath& splPath); /** * @brief append додає точку сплайну до шляху. * @param point точка. */ void append(const VSplinePoint &point); + /** + * @brief Count + * @return + */ qint32 Count() const; + /** + * @brief CountPoint + * @return + */ inline qint32 CountPoint() const {return path.size();} + /** + * @brief GetSpline + * @param index + * @return + */ VSpline GetSpline(qint32 index) const; + /** + * @brief GetPath + * @return + */ QPainterPath GetPath() const; + /** + * @brief GetPathPoints + * @return + */ QVector GetPathPoints() const; + /** + * @brief GetSplinePath + * @return + */ inline QVector GetSplinePath() const {return path;} + /** + * @brief GetLength + * @return + */ qreal GetLength() const; + /** + * @brief GetDataPoints + * @return + */ inline QHash GetDataPoints() const {return points;} + /** + * @brief UpdatePoint + * @param indexSpline + * @param pos + * @param point + */ void UpdatePoint(qint32 indexSpline, const SplinePoint::Position &pos, const VSplinePoint &point); + /** + * @brief GetSplinePoint + * @param indexSpline + * @param pos + * @return + */ VSplinePoint GetSplinePoint(qint32 indexSpline, SplinePoint::Position pos) const; /** * @brief Clear очищає шлях сплайнів. */ inline void Clear() {path.clear();} + /** + * @brief getKCurve + * @return + */ inline qreal getKCurve() const {return kCurve;} + /** + * @brief setKCurve + * @param value + */ inline void setKCurve(const qreal &value) {kCurve = value;} + /** + * @brief GetPoint + * @return + */ inline const QVector *GetPoint() const {return &path;} + /** + * @brief operator = + * @param path + * @return + */ VSplinePath &operator=(const VSplinePath &path); + /** + * @brief operator [] + * @param indx + * @return + */ VSplinePoint &operator[](ptrdiff_t indx); + /** + * @brief getMode + * @return + */ inline Draw::Draws getMode() const {return mode;} + /** + * @brief setMode + * @param value + */ inline void setMode(const Draw::Draws &value) {mode = value;} - + /** + * @brief getIdObject + * @return + */ inline qint64 getIdObject() const {return idObject;} + /** + * @brief setIdObject + * @param value + */ inline void setIdObject(const qint64 &value) {idObject = value;} + /** + * @brief name + * @return + */ QString name() const {return _name;} + /** + * @brief setName + * @param name + */ void setName(const QString &name) {_name = name;} protected: /** * @brief path вектор з точок сплайна. */ QVector path; + /** + * @brief kCurve + */ qreal kCurve; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief points + */ QHash points; + /** + * @brief idObject + */ qint64 idObject; + /** + * @brief _name + */ QString _name; }; diff --git a/geometry/vsplinepoint.h b/geometry/vsplinepoint.h index d6f6ef6d5..9d3bd4667 100644 --- a/geometry/vsplinepoint.h +++ b/geometry/vsplinepoint.h @@ -48,6 +48,10 @@ public: * @param factor коефіцієнт довжини дотичної. */ VSplinePoint(qint64 pSpline, qreal kAsm1, qreal angle, qreal kAsm2); + /** + * @brief VSplinePoint + * @param point + */ VSplinePoint(const VSplinePoint &point); ~VSplinePoint() {} /** @@ -55,12 +59,20 @@ public: * @return точка. */ inline qint64 P() const {return pSpline;} + /** + * @brief SetP + * @param value + */ inline void SetP(const qint64 &value) {pSpline = value;} /** * @brief Angle1 повертає кут дотичної сплайна. * @return кут в градусах. */ inline qreal Angle1() const {return angle+180;} + /** + * @brief SetAngle + * @param value + */ inline void SetAngle(const qreal &value) {angle = value;} /** * @brief Angle2 повертає кут дотичної сплайна. @@ -72,12 +84,20 @@ public: * @return коефіцієнт. */ inline qreal KAsm1() const {return kAsm1;} + /** + * @brief SetKAsm1 + * @param value + */ inline void SetKAsm1(const qreal &value) {kAsm1 = value;} /** * @brief KAsm2 повертає коефіцієнт довжини дотичної. * @return коефіцієнт. */ inline qreal KAsm2() const {return kAsm2;} + /** + * @brief SetKAsm2 + * @param value + */ inline void SetKAsm2(const qreal &value) {kAsm2 = value;} protected: /** diff --git a/mainwindow.h b/mainwindow.h index 2c0f2c47e..bdd4fb190 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -44,65 +44,272 @@ namespace Ui class MainWindow; } +/** + * @brief The MainWindow class + */ class MainWindow : public QMainWindow { Q_OBJECT public: + /** + * @brief MainWindow + * @param parent + */ explicit MainWindow(QWidget *parent = 0); ~MainWindow(); + /** + * @brief OpenPattern + * @param fileName + */ void OpenPattern(const QString &fileName); public slots: + /** + * @brief mouseMove + * @param scenePos + */ void mouseMove(const QPointF &scenePos); + /** + * @brief ActionAroowTool + */ void ActionAroowTool(); + /** + * @brief ActionDraw + * @param checked + */ void ActionDraw(bool checked); + /** + * @brief ActionDetails + * @param checked + */ void ActionDetails(bool checked); + /** + * @brief ActionNewDraw + */ void ActionNewDraw(); + /** + * @brief ActionSaveAs + */ void ActionSaveAs(); + /** + * @brief ActionSave + */ void ActionSave(); + /** + * @brief ActionOpen + */ void ActionOpen(); + /** + * @brief ActionNew + */ void ActionNew(); + /** + * @brief ActionTable + * @param checked + */ void ActionTable(bool checked); + /** + * @brief ActionHistory + * @param checked + */ void ActionHistory(bool checked); + /** + * @brief ActionLayout + * @param checked + */ void ActionLayout(bool checked); + /** + * @brief currentDrawChanged + * @param index + */ void currentDrawChanged( int index ); + /** + * @brief OptionDraw + */ void OptionDraw(); + /** + * @brief haveChange + */ void haveChange(); + /** + * @brief ChangedSize + * @param text + */ void ChangedSize(const QString &text); + /** + * @brief ChangedGrowth + * @param text + */ void ChangedGrowth(const QString & text); + /** + * @brief ClosedActionTable + */ void ClosedActionTable(); + /** + * @brief ClosedActionHistory + */ void ClosedActionHistory(); + /** + * @brief ToolEndLine + * @param checked + */ void ToolEndLine(bool checked); + /** + * @brief ToolLine + * @param checked + */ void ToolLine(bool checked); + /** + * @brief ToolAlongLine + * @param checked + */ void ToolAlongLine(bool checked); + /** + * @brief ToolShoulderPoint + * @param checked + */ void ToolShoulderPoint(bool checked); + /** + * @brief ToolNormal + * @param checked + */ void ToolNormal(bool checked); + /** + * @brief ToolBisector + * @param checked + */ void ToolBisector(bool checked); + /** + * @brief ToolLineIntersect + * @param checked + */ void ToolLineIntersect(bool checked); + /** + * @brief ToolSpline + * @param checked + */ void ToolSpline(bool checked); + /** + * @brief ToolArc + * @param checked + */ void ToolArc(bool checked); + /** + * @brief ToolSplinePath + * @param checked + */ void ToolSplinePath(bool checked); + /** + * @brief ToolPointOfContact + * @param checked + */ void ToolPointOfContact(bool checked); + /** + * @brief ToolDetail + * @param checked + */ void ToolDetail(bool checked); + /** + * @brief ToolHeight + * @param checked + */ void ToolHeight(bool checked); + /** + * @brief ToolTriangle + * @param checked + */ void ToolTriangle(bool checked); + /** + * @brief ToolPointOfIntersection + * @param checked + */ void ToolPointOfIntersection(bool checked); + /** + * @brief ClosedDialogEndLine + * @param result + */ void ClosedDialogEndLine(int result); + /** + * @brief ClosedDialogLine + * @param result + */ void ClosedDialogLine(int result); + /** + * @brief ClosedDialogAlongLine + * @param result + */ void ClosedDialogAlongLine(int result); + /** + * @brief ClosedDialogShoulderPoint + * @param result + */ void ClosedDialogShoulderPoint(int result); + /** + * @brief ClosedDialogNormal + * @param result + */ void ClosedDialogNormal(int result); + /** + * @brief ClosedDialogBisector + * @param result + */ void ClosedDialogBisector(int result); + /** + * @brief ClosedDialogLineIntersect + * @param result + */ void ClosedDialogLineIntersect(int result); + /** + * @brief ClosedDialogSpline + * @param result + */ void ClosedDialogSpline(int result); + /** + * @brief ClosedDialogArc + * @param result + */ void ClosedDialogArc(int result); + /** + * @brief ClosedDialogSplinePath + * @param result + */ void ClosedDialogSplinePath(int result); + /** + * @brief ClosedDialogPointOfContact + * @param result + */ void ClosedDialogPointOfContact(int result); + /** + * @brief ClosedDialogDetail + * @param result + */ void ClosedDialogDetail(int result); + /** + * @brief ClosedDialogHeight + * @param result + */ void ClosedDialogHeight(int result); + /** + * @brief ClosedDialogTriangle + * @param result + */ void ClosedDialogTriangle(int result); + /** + * @brief ClosedDialogPointOfIntersection + * @param result + */ void ClosedDialogPointOfIntersection(int result); + /** + * @brief About + */ void About(); + /** + * @brief AboutQt + */ void AboutQt(); + /** + * @brief ShowToolTip + * @param toolTip + */ void ShowToolTip(const QString &toolTip); /** * @brief tableClosed Слот, що виконується при отриманні сигналу закриття вікна укладання @@ -116,60 +323,226 @@ signals: */ void ModelChosen(QVector listDetails); protected: + /** + * @brief keyPressEvent + * @param event + */ virtual void keyPressEvent ( QKeyEvent * event ); + /** + * @brief showEvent + * @param event + */ virtual void showEvent( QShowEvent *event ); + /** + * @brief closeEvent + * @param event + */ virtual void closeEvent( QCloseEvent * event ); + /** + * @brief Clear + */ void Clear(); private: Q_DISABLE_COPY(MainWindow) + /** + * @brief ui keeps information about user interface + */ Ui::MainWindow *ui; + /** + * @brief tool + */ Tool::Tools tool; + /** + * @brief currentScene + */ VMainGraphicsScene *currentScene; + /** + * @brief sceneDraw + */ VMainGraphicsScene *sceneDraw; + /** + * @brief sceneDetails + */ VMainGraphicsScene *sceneDetails; + /** + * @brief mouseCoordinate + */ QLabel *mouseCoordinate; + /** + * @brief helpLabel + */ QLabel *helpLabel; + /** + * @brief view + */ VMainGraphicsView *view; + /** + * @brief isInitialized + */ bool isInitialized; + /** + * @brief dialogTable + */ DialogIncrements *dialogTable; + /** + * @brief dialogEndLine + */ QSharedPointer dialogEndLine; + /** + * @brief dialogLine + */ QSharedPointer dialogLine; + /** + * @brief dialogAlongLine + */ QSharedPointer dialogAlongLine; + /** + * @brief dialogShoulderPoint + */ QSharedPointer dialogShoulderPoint; + /** + * @brief dialogNormal + */ QSharedPointer dialogNormal; + /** + * @brief dialogBisector + */ QSharedPointer dialogBisector; + /** + * @brief dialogLineIntersect + */ QSharedPointer dialogLineIntersect; + /** + * @brief dialogSpline + */ QSharedPointer dialogSpline; + /** + * @brief dialogArc + */ QSharedPointer dialogArc; + /** + * @brief dialogSplinePath + */ QSharedPointer dialogSplinePath; + /** + * @brief dialogPointOfContact + */ QSharedPointer dialogPointOfContact; + /** + * @brief dialogDetail + */ QSharedPointer dialogDetail; + /** + * @brief dialogHeight + */ QSharedPointer dialogHeight; + /** + * @brief dialogTriangle + */ QSharedPointer dialogTriangle; + /** + * @brief dialogPointOfIntersection + */ QSharedPointer dialogPointOfIntersection; + /** + * @brief dialogHistory + */ DialogHistory *dialogHistory; + /** + * @brief doc dom document container + */ VDomDocument *doc; + /** + * @brief data container with data + */ VContainer *data; + /** + * @brief comboBoxDraws + */ QComboBox *comboBoxDraws; + /** + * @brief fileName + */ QString fileName; + /** + * @brief changeInFile + */ bool changeInFile; + /** + * @brief mode + */ Draw::Draws mode; + /** + * @brief ToolBarOption + */ void ToolBarOption(); + /** + * @brief ToolBarDraws + */ void ToolBarDraws(); + /** + * @brief CanselTool + */ void CanselTool(); + /** + * @brief ArrowTool + */ void ArrowTool(); + /** + * @brief SetEnableWidgets + * @param enable + */ void SetEnableWidgets(bool enable); + /** + * @brief SetEnableTool + * @param enable + */ void SetEnableTool(bool enable); + /** + * + */ template + /** + * @brief SetToolButton + * @param checked + * @param t + * @param cursor + * @param toolTip + * @param dialog + * @param closeDialogSlot + */ void SetToolButton(bool checked, Tool::Tools t, const QString &cursor, const QString &toolTip, QSharedPointer &dialog, Func closeDialogSlot); + /** + * @brief MinimumScrollBar + */ void MinimumScrollBar(); template + /** + * @brief AddToolToDetail + * @param tool + * @param id + * @param typeTool + * @param idDetail + */ void AddToolToDetail(T *tool, const qint64 &id, Tool::Tools typeTool, const qint64 &idDetail); template + /** + * @brief ClosedDialog + * @param dialog + * @param result + */ void ClosedDialog(QSharedPointer &dialog, int result); + /** + * @brief SafeSaveing + * @param fileName + * @return + */ bool SafeSaveing(const QString &fileName)const; + /** + * @brief AutoSavePattern + */ void AutoSavePattern(); }; diff --git a/options.h b/options.h index beccd32d3..6f86d23d2 100644 --- a/options.h +++ b/options.h @@ -40,6 +40,9 @@ namespace Scene { + /** + * @brief The Scene enum + */ enum Scene { Point, Line, Spline, Arc, SplinePath, Detail }; Q_DECLARE_FLAGS(Scenes, Scene) } @@ -47,6 +50,9 @@ Q_DECLARE_OPERATORS_FOR_FLAGS( Scene::Scenes ) namespace Tool { + /** + * @brief The Tool enum + */ enum Tool { ArrowTool, @@ -73,6 +79,9 @@ namespace Tool }; Q_DECLARE_FLAGS(Tools, Tool) + /** + * @brief The Source enum + */ enum Source { FromGui, FromFile }; Q_DECLARE_FLAGS(Sources, Source) } @@ -81,6 +90,9 @@ Q_DECLARE_OPERATORS_FOR_FLAGS( Tool::Sources ) namespace Draw { + /** + * @brief The Draw enum + */ enum Draw { Calculation, Modeling }; Q_DECLARE_FLAGS(Draws, Draw) } diff --git a/tablewindow.h b/tablewindow.h index 8d3ca8801..d82380015 100644 --- a/tablewindow.h +++ b/tablewindow.h @@ -54,7 +54,7 @@ public: QLabel* colission; /** * @brief TableWindow Конструктор класу вікна створення розкладки. - * @param parent Батько об'єкту. За замовчуванням = 0. + * @param parent parent widget Батько об'єкту. За замовчуванням = 0. */ explicit TableWindow(QWidget *parent = 0); /** @@ -131,11 +131,15 @@ protected: * @param event Подія що отримується. */ void showEvent ( QShowEvent * event ); + /** + * @brief keyPressEvent + * @param event + */ void keyPressEvent ( QKeyEvent * event ); private: Q_DISABLE_COPY(TableWindow) /** - * @brief ui Змінна для доступу до об'єктів вікна. + * @brief ui keeps information about user interface Змінна для доступу до об'єктів вікна. */ Ui::TableWindow* ui; /** @@ -190,8 +194,20 @@ private: * @brief sceneRect Мінімальний розмір листа паперу що буде показуватися на сцені. */ QRectF sceneRect; + /** + * @brief SvgFile + * @param name + */ void SvgFile(const QString &name)const; + /** + * @brief PngFile + * @param name + */ void PngFile(const QString &name)const; + /** + * @brief PsFile + * @param name + */ void PsFile(const QString &name)const; }; diff --git a/tools/drawTools/vdrawtool.h b/tools/drawTools/vdrawtool.h index 86632645c..fc0f1bea9 100644 --- a/tools/drawTools/vdrawtool.h +++ b/tools/drawTools/vdrawtool.h @@ -31,28 +31,97 @@ #include "../vabstracttool.h" +/** + * @brief The VDrawTool class + */ class VDrawTool : public VAbstractTool { Q_OBJECT public: + /** + * @brief VDrawTool + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VDrawTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VDrawTool() {} + /** + * @brief setDialog + */ virtual void setDialog() {} + /** + * @brief AddRecord + * @param id + * @param toolType + * @param doc dom document container + */ static void AddRecord(const qint64 id, const Tool::Tools &toolType, VDomDocument *doc); + /** + * @brief ignoreContextMenu + * @param enable + */ void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;} public slots: + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief ChangedNameDraw + * @param oldName + * @param newName + */ void ChangedNameDraw(const QString &oldName, const QString &newName); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result)=0; + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief ignoreContextMenuEvent + */ bool ignoreContextMenuEvent; + /** + * @brief ignoreFullUpdate + */ bool ignoreFullUpdate; + /** + * @brief nameActivDraw + */ QString nameActivDraw; + /** + * @brief factor + */ static qreal factor; + /** + * @brief AddToCalculation + * @param domElement + */ void AddToCalculation(const QDomElement &domElement); template + /** + * @brief ContextMenu + * @param dialog + * @param tool + * @param event + * @param showRemove + */ void ContextMenu(QSharedPointer &dialog, Tool *tool, QGraphicsSceneContextMenuEvent *event, bool showRemove = true) { @@ -118,6 +187,13 @@ protected: } } template + /** + * @brief ShowItem + * @param item + * @param id + * @param color + * @param enable + */ void ShowItem(Item *item, qint64 id, Qt::GlobalColor color, bool enable) { Q_ASSERT(item != 0); diff --git a/tools/drawTools/vtoolalongline.h b/tools/drawTools/vtoolalongline.h index 797383e95..99dd29f6c 100644 --- a/tools/drawTools/vtoolalongline.h +++ b/tools/drawTools/vtoolalongline.h @@ -32,31 +32,102 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogalongline.h" +/** + * @brief The VToolAlongLine class + */ class VToolAlongLine : public VToolLinePoint { Q_OBJECT public: + /** + * @brief VToolAlongLine + * @param doc dom document container + * @param data + * @param id + * @param formula + * @param firstPointId + * @param secondPointId + * @param typeLine + * @param typeCreation + * @param parent + */ VToolAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param formula + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogAlongLine + */ QSharedPointer dialogAlongLine; }; diff --git a/tools/drawTools/vtoolarc.h b/tools/drawTools/vtoolarc.h index 17a757f88..57b940c10 100644 --- a/tools/drawTools/vtoolarc.h +++ b/tools/drawTools/vtoolarc.h @@ -34,35 +34,124 @@ #include "../../dialogs/dialogarc.h" #include "../../widgets/vcontrolpointspline.h" +/** + * @brief The VToolArc class + */ class VToolArc :public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VToolArc + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VToolArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param center + * @param radius + * @param f1 + * @param f2 + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogArc + */ QSharedPointer dialogArc; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/drawTools/vtoolbisector.h b/tools/drawTools/vtoolbisector.h index f449a462e..824e102aa 100644 --- a/tools/drawTools/vtoolbisector.h +++ b/tools/drawTools/vtoolbisector.h @@ -32,35 +32,119 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogbisector.h" +/** + * @brief The VToolBisector class + */ class VToolBisector : public VToolLinePoint { public: + /** + * @brief VToolBisector + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param firstPointId + * @param secondPointId + * @param thirdPointId + * @param typeCreation + * @param parent + */ VToolBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief FindPoint + * @param firstPoint + * @param secondPoint + * @param thirdPoint + * @param length + * @return + */ static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const QPointF &thirdPoint, const qreal& length); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param firstPointId + * @param secondPointId + * @param thirdPointId + * @param typeLine + * @param pointName + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief thirdPointId + */ qint64 thirdPointId; + /** + * @brief dialogBisector + */ QSharedPointer dialogBisector; }; diff --git a/tools/drawTools/vtoolendline.h b/tools/drawTools/vtoolendline.h index a9ce3fa14..35c802911 100644 --- a/tools/drawTools/vtoolendline.h +++ b/tools/drawTools/vtoolendline.h @@ -32,28 +32,89 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogendline.h" +/** + * @brief The VToolEndLine class + */ class VToolEndLine : public VToolLinePoint { Q_OBJECT public: + /** + * @brief VToolEndLine + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param angle + * @param basePointId + * @param typeCreation + * @param parent + */ VToolEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param formula + * @param angle + * @param basePointId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: + /** + * @brief dialogEndLine + */ QSharedPointer dialogEndLine; }; diff --git a/tools/drawTools/vtoolheight.h b/tools/drawTools/vtoolheight.h index 1d070a225..3aa016801 100644 --- a/tools/drawTools/vtoolheight.h +++ b/tools/drawTools/vtoolheight.h @@ -32,31 +32,104 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogheight.h" +/** + * @brief The VToolHeight class + */ class VToolHeight: public VToolLinePoint { Q_OBJECT public: + /** + * @brief VToolHeight + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param basePointId + * @param p1LineId + * @param p2LineId + * @param typeCreation + * @param parent + */ VToolHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param basePointId + * @param p1LineId + * @param p2LineId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief FindPoint + * @param line + * @param point + * @return + */ static QPointF FindPoint(const QLineF &line, const QPointF &point); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: + /** + * @brief dialogHeight + */ QSharedPointer dialogHeight; + /** + * @brief p1LineId + */ qint64 p1LineId; + /** + * @brief p2LineId + */ qint64 p2LineId; }; diff --git a/tools/drawTools/vtoolline.h b/tools/drawTools/vtoolline.h index bcc7ac170..80df5efcf 100644 --- a/tools/drawTools/vtoolline.h +++ b/tools/drawTools/vtoolline.h @@ -33,35 +33,123 @@ #include #include "../../dialogs/dialogline.h" +/** + * @brief The VToolLine class + */ class VToolLine: public VDrawTool, public QGraphicsLineItem { Q_OBJECT public: + /** + * @brief VToolLine + * @param doc dom document container + * @param data + * @param id + * @param firstPoint + * @param secondPoint + * @param typeCreation + * @param parent + */ VToolLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param firstPoint + * @param secondPoint + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief firstPoint + */ qint64 firstPoint; + /** + * @brief secondPoint + */ qint64 secondPoint; + /** + * @brief dialogLine + */ QSharedPointer dialogLine; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/drawTools/vtoollineintersect.h b/tools/drawTools/vtoollineintersect.h index aeb34b54d..1812d638f 100644 --- a/tools/drawTools/vtoollineintersect.h +++ b/tools/drawTools/vtoollineintersect.h @@ -32,34 +32,114 @@ #include "vtoolpoint.h" #include "../../dialogs/dialoglineintersect.h" +/** + * @brief The VToolLineIntersect class + */ class VToolLineIntersect:public VToolPoint { Q_OBJECT public: + /** + * @brief VToolLineIntersect + * @param doc dom document container + * @param data + * @param id + * @param p1Line1 + * @param p2Line1 + * @param p1Line2 + * @param p2Line2 + * @param typeCreation + * @param parent + */ VToolLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param p1Line1Id + * @param p2Line1Id + * @param p1Line2Id + * @param p2Line2Id + * @param pointName + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id, const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief p1Line1 + */ qint64 p1Line1; + /** + * @brief p2Line1 + */ qint64 p2Line1; + /** + * @brief p1Line2 + */ qint64 p1Line2; + /** + * @brief p2Line2 + */ qint64 p2Line2; + /** + * @brief dialogLineIntersect + */ QSharedPointer dialogLineIntersect; }; diff --git a/tools/drawTools/vtoollinepoint.h b/tools/drawTools/vtoollinepoint.h index dc10aeb17..0cfcfb093 100644 --- a/tools/drawTools/vtoollinepoint.h +++ b/tools/drawTools/vtoollinepoint.h @@ -31,23 +31,66 @@ #include "vtoolpoint.h" +/** + * @brief The VToolLinePoint class + */ class VToolLinePoint : public VToolPoint { Q_OBJECT public: + /** + * @brief VToolLinePoint + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param basePointId + * @param angle + * @param parent + */ VToolLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &basePointId, const qreal &angle, QGraphicsItem * parent = 0); public slots: + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief typeLine + */ QString typeLine; + /** + * @brief formula + */ QString formula; + /** + * @brief angle + */ qreal angle; + /** + * @brief basePointId + */ qint64 basePointId; + /** + * @brief mainLine + */ QGraphicsLineItem *mainLine; + /** + * @brief RefreshGeometry + */ virtual void RefreshGeometry(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens() {doc->DecrementReferens(basePointId);} private: Q_DISABLE_COPY(VToolLinePoint) diff --git a/tools/drawTools/vtoolnormal.h b/tools/drawTools/vtoolnormal.h index 0f2b1fd07..830eeff5a 100644 --- a/tools/drawTools/vtoolnormal.h +++ b/tools/drawTools/vtoolnormal.h @@ -32,35 +32,116 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialognormal.h" +/** + * @brief The VToolNormal class + */ class VToolNormal : public VToolLinePoint { Q_OBJECT public: + /** + * @brief VToolNormal + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param angle + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VToolNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param firstPointId + * @param secondPointId + * @param typeLine + * @param pointName + * @param angle + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief FindPoint + * @param firstPoint + * @param secondPoint + * @param length + * @param angle + * @return + */ static QPointF FindPoint(const QPointF &firstPoint, const QPointF &secondPoint, const qreal &length, const qreal &angle = 0); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogNormal + */ QSharedPointer dialogNormal; }; diff --git a/tools/drawTools/vtoolpoint.h b/tools/drawTools/vtoolpoint.h index c7e26939e..e902fce32 100644 --- a/tools/drawTools/vtoolpoint.h +++ b/tools/drawTools/vtoolpoint.h @@ -32,28 +32,96 @@ #include "vdrawtool.h" #include "../../widgets/vgraphicssimpletextitem.h" +/** + * @brief The VToolPoint class + */ class VToolPoint: public VDrawTool, public QGraphicsEllipseItem { Q_OBJECT public: + /** + * @brief VToolPoint + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VToolPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0); virtual ~VToolPoint(){} + /** + * @brief TagName + */ static const QString TagName; public slots: + /** + * @brief NameChangePosition + * @param pos + */ void NameChangePosition(const QPointF &pos); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result) = 0; + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief radius + */ qreal radius; + /** + * @brief namePoint + */ VGraphicsSimpleTextItem *namePoint; + /** + * @brief lineName + */ QGraphicsLineItem *lineName; + /** + * @brief UpdateNamePosition + * @param mx + * @param my + */ virtual void UpdateNamePosition(qreal mx, qreal my); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RefreshPointGeometry + * @param point + */ virtual void RefreshPointGeometry(const VPointF &point); + /** + * @brief RefreshLine + */ void RefreshLine(); private: Q_DISABLE_COPY(VToolPoint) diff --git a/tools/drawTools/vtoolpointofcontact.h b/tools/drawTools/vtoolpointofcontact.h index 54025adde..d53113fa2 100644 --- a/tools/drawTools/vtoolpointofcontact.h +++ b/tools/drawTools/vtoolpointofcontact.h @@ -32,36 +32,124 @@ #include "vtoolpoint.h" #include "../../dialogs/dialogpointofcontact.h" +/** + * @brief The VToolPointOfContact class + */ class VToolPointOfContact : public VToolPoint { public: + /** + * @brief VToolPointOfContact + * @param doc dom document container + * @param data + * @param id + * @param radius + * @param center + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VToolPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief FindPoint + * @param radius + * @param center + * @param firstPoint + * @param secondPoint + * @return + */ static QPointF FindPoint(const qreal &radius, const QPointF ¢er, const QPointF &firstPoint, const QPointF &secondPoint); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param radius + * @param center + * @param firstPointId + * @param secondPointId + * @param pointName + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief radius + */ QString radius; + /** + * @brief center + */ qint64 center; + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogPointOfContact + */ QSharedPointer dialogPointOfContact; }; diff --git a/tools/drawTools/vtoolpointofintersection.h b/tools/drawTools/vtoolpointofintersection.h index f311b5cbe..2aa964adc 100644 --- a/tools/drawTools/vtoolpointofintersection.h +++ b/tools/drawTools/vtoolpointofintersection.h @@ -32,32 +32,98 @@ #include "vtoolpoint.h" #include "../../dialogs/dialogpointofintersection.h" +/** + * @brief The VToolPointOfIntersection class + */ class VToolPointOfIntersection : public VToolPoint { Q_OBJECT public: + /** + * @brief VToolPointOfIntersection + * @param doc dom document container + * @param data + * @param id + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VToolPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: Q_DISABLE_COPY(VToolPointOfIntersection) + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogPointOfIntersection + */ QSharedPointer dialogPointOfIntersection; }; diff --git a/tools/drawTools/vtoolshoulderpoint.h b/tools/drawTools/vtoolshoulderpoint.h index efede5abd..a6f9faf1a 100644 --- a/tools/drawTools/vtoolshoulderpoint.h +++ b/tools/drawTools/vtoolshoulderpoint.h @@ -32,34 +32,118 @@ #include "vtoollinepoint.h" #include "../../dialogs/dialogshoulderpoint.h" +/** + * @brief The VToolShoulderPoint class + */ class VToolShoulderPoint : public VToolLinePoint { public: + /** + * @brief VToolShoulderPoint + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param p1Line + * @param p2Line + * @param pShoulder + * @param typeCreation + * @param parent + */ VToolShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief FindPoint + * @param p1Line + * @param p2Line + * @param pShoulder + * @param length + * @return + */ static QPointF FindPoint(const QPointF &p1Line, const QPointF &p2Line, const QPointF &pShoulder, const qreal &length); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param p1Line + * @param p2Line + * @param pShoulder + * @param typeLine + * @param pointName + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief p2Line + */ qint64 p2Line; + /** + * @brief pShoulder + */ qint64 pShoulder; + /** + * @brief dialogShoulderPoint + */ QSharedPointer dialogShoulderPoint; }; diff --git a/tools/drawTools/vtoolsinglepoint.h b/tools/drawTools/vtoolsinglepoint.h index d0d482fd4..8079d2ce7 100644 --- a/tools/drawTools/vtoolsinglepoint.h +++ b/tools/drawTools/vtoolsinglepoint.h @@ -32,27 +32,81 @@ #include "vtoolpoint.h" #include "../../dialogs/dialogsinglepoint.h" +/** + * @brief The VToolSinglePoint class + */ class VToolSinglePoint : public VToolPoint { Q_OBJECT public: + /** + * @brief VToolSinglePoint + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VToolSinglePoint (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); signals: + /** + * @brief FullUpdateTree + */ void FullUpdateTree(); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief itemChange + * @param change + * @param value + * @return + */ QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); + /** + * @brief decrementReferens + */ virtual void decrementReferens(); private: + /** + * @brief dialogSinglePoint + */ QSharedPointer dialogSinglePoint; }; diff --git a/tools/drawTools/vtoolspline.h b/tools/drawTools/vtoolspline.h index d4277af40..cf0aeaf8e 100644 --- a/tools/drawTools/vtoolspline.h +++ b/tools/drawTools/vtoolspline.h @@ -35,43 +35,155 @@ #include "../../widgets/vcontrolpointspline.h" #include "../../geometry/vsplinepath.h" +/** + * @brief The VToolSpline class + */ class VToolSpline:public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VToolSpline + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VToolSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param p1 + * @param p4 + * @param kAsm1 + * @param kAsm2 + * @param angle1 + * @param angle2 + * @param kCurve + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; signals: + /** + * @brief RefreshLine + * @param indexSpline + * @param position + * @param controlPoint + * @param splinePoint + */ void RefreshLine ( const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint ); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint ( bool enable ); public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile (); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui ( int result ); + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition (const qint32 &indexSpline, const SplinePoint::Position &position, const QPointF &pos); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw ( const QString &newName ); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile (); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogSpline + */ QSharedPointer dialogSpline; + /** + * @brief controlPoints + */ QVector controlPoints; + /** + * @brief RefreshGeometry + */ void RefreshGeometry (); }; diff --git a/tools/drawTools/vtoolsplinepath.h b/tools/drawTools/vtoolsplinepath.h index a58ddc2ee..5f20851c4 100644 --- a/tools/drawTools/vtoolsplinepath.h +++ b/tools/drawTools/vtoolsplinepath.h @@ -34,45 +34,167 @@ #include "../../dialogs/dialogsplinepath.h" #include "../../widgets/vcontrolpointspline.h" +/** + * @brief The VToolSplinePath class + */ class VToolSplinePath:public VDrawTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VToolSplinePath + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VToolSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param path + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const VSplinePath &path, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; signals: + /** + * @brief RefreshLine + * @param indexSpline + * @param pos + * @param controlPoint + * @param splinePoint + */ void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos, const QPointF &controlPoint, const QPointF &splinePoint); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint(bool enable); public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition(const qint32 &indexSpline, const SplinePoint::Position &position, const QPointF &pos); + /** + * @brief ChangedActivDraw + * @param newName + */ virtual void ChangedActivDraw(const QString &newName); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ virtual void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief SetFactor + * @param factor + */ virtual void SetFactor(qreal factor); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogSplinePath + */ QSharedPointer dialogSplinePath; + /** + * @brief controlPoints + */ QVector controlPoints; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); + /** + * @brief AddPathPoint + * @param domElement + * @param splPoint + */ void AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint); + /** + * @brief UpdatePathPoint + * @param node + * @param path + */ void UpdatePathPoint(QDomNode& node, VSplinePath &path); + /** + * @brief CorectControlPoints + * @param spl + * @param splPath + * @param indexSpline + */ void CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline); }; diff --git a/tools/drawTools/vtooltriangle.h b/tools/drawTools/vtooltriangle.h index dc848c76b..5a9543cde 100644 --- a/tools/drawTools/vtooltriangle.h +++ b/tools/drawTools/vtooltriangle.h @@ -32,36 +32,120 @@ #include "vtoolpoint.h" #include "../../dialogs/dialogtriangle.h" +/** + * @brief The VToolTriangle class + */ class VToolTriangle : public VToolPoint { Q_OBJECT public: + /** + * @brief VToolTriangle + * @param doc dom document container + * @param data + * @param id + * @param axisP1Id + * @param axisP2Id + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VToolTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param axisP1Id + * @param axisP2Id + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief FindPoint + * @param axisP1 + * @param axisP2 + * @param firstPoint + * @param secondPoint + * @return + */ static QPointF FindPoint(const QPointF &axisP1, const QPointF &axisP2, const QPointF &firstPoint, const QPointF &secondPoint); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: Q_DISABLE_COPY(VToolTriangle) + /** + * @brief axisP1Id + */ qint64 axisP1Id; + /** + * @brief axisP2Id + */ qint64 axisP2Id; + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogTriangle + */ QSharedPointer dialogTriangle; }; diff --git a/tools/modelingTools/vmodelingalongline.h b/tools/modelingTools/vmodelingalongline.h index 7bdba7e28..b5ddd9f8c 100644 --- a/tools/modelingTools/vmodelingalongline.h +++ b/tools/modelingTools/vmodelingalongline.h @@ -32,30 +32,97 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogalongline.h" +/** + * @brief The VModelingAlongLine class + */ class VModelingAlongLine : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingAlongLine + * @param doc dom document container + * @param data + * @param id + * @param formula + * @param firstPointId + * @param secondPointId + * @param typeLine + * @param typeCreation + * @param parent + */ VModelingAlongLine(VDomDocument *doc, VContainer *data, qint64 id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingAlongLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param formula + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingAlongLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogAlongLine + */ QSharedPointer dialogAlongLine; }; diff --git a/tools/modelingTools/vmodelingarc.h b/tools/modelingTools/vmodelingarc.h index 510ba9d07..e32f8f6cf 100644 --- a/tools/modelingTools/vmodelingarc.h +++ b/tools/modelingTools/vmodelingarc.h @@ -34,31 +34,106 @@ #include "../../dialogs/dialogarc.h" #include "../../widgets/vcontrolpointspline.h" +/** + * @brief The VModelingArc class + */ class VModelingArc :public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VModelingArc + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VModelingArc(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingArc* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param center + * @param radius + * @param f1 + * @param f2 + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingArc* Create(const qint64 _id, const qint64 ¢er, const QString &radius, const QString &f1, const QString &f2, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogArc + */ QSharedPointer dialogArc; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/modelingTools/vmodelingbisector.h b/tools/modelingTools/vmodelingbisector.h index cb5196cd2..21b83161e 100644 --- a/tools/modelingTools/vmodelingbisector.h +++ b/tools/modelingTools/vmodelingbisector.h @@ -32,33 +32,105 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogbisector.h" +/** + * @brief The VModelingBisector class + */ class VModelingBisector : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingBisector + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param firstPointId + * @param secondPointId + * @param thirdPointId + * @param typeCreation + * @param parent + */ VModelingBisector(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingBisector* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param firstPointId + * @param secondPointId + * @param thirdPointId + * @param typeLine + * @param pointName + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingBisector* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const qint64 &thirdPointId, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief thirdPointId + */ qint64 thirdPointId; + /** + * @brief dialogBisector + */ QSharedPointer dialogBisector; }; diff --git a/tools/modelingTools/vmodelingendline.h b/tools/modelingTools/vmodelingendline.h index 2bf52d30a..f22ab5bf5 100644 --- a/tools/modelingTools/vmodelingendline.h +++ b/tools/modelingTools/vmodelingendline.h @@ -32,28 +32,89 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogendline.h" +/** + * @brief The VModelingEndLine class + */ class VModelingEndLine : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingEndLine + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param angle + * @param basePointId + * @param typeCreation + * @param parent + */ VModelingEndLine(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingEndLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param formula + * @param angle + * @param basePointId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingEndLine* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &basePointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: + /** + * @brief dialogEndLine + */ QSharedPointer dialogEndLine; }; diff --git a/tools/modelingTools/vmodelingheight.h b/tools/modelingTools/vmodelingheight.h index 791779e46..d89f5a4d9 100644 --- a/tools/modelingTools/vmodelingheight.h +++ b/tools/modelingTools/vmodelingheight.h @@ -32,30 +32,97 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogheight.h" +/** + * @brief The VModelingHeight class + */ class VModelingHeight : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingHeight + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param basePointId + * @param p1LineId + * @param p2LineId + * @param typeCreation + * @param parent + */ VModelingHeight(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingHeight* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param typeLine + * @param basePointId + * @param p1LineId + * @param p2LineId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingHeight* Create(const qint64 _id, const QString &pointName, const QString &typeLine, const qint64 &basePointId, const qint64 &p1LineId, const qint64 &p2LineId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: + /** + * @brief dialogHeight + */ QSharedPointer dialogHeight; + /** + * @brief p1LineId + */ qint64 p1LineId; + /** + * @brief p2LineId + */ qint64 p2LineId; }; diff --git a/tools/modelingTools/vmodelingline.h b/tools/modelingTools/vmodelingline.h index 2798eadb7..bf9729389 100644 --- a/tools/modelingTools/vmodelingline.h +++ b/tools/modelingTools/vmodelingline.h @@ -33,32 +33,106 @@ #include #include "../../dialogs/dialogline.h" +/** + * @brief The VModelingLine class + */ class VModelingLine: public VModelingTool, public QGraphicsLineItem { Q_OBJECT public: + /** + * @brief VModelingLine + * @param doc dom document container + * @param data + * @param id + * @param firstPoint + * @param secondPoint + * @param typeCreation + * @param parent + */ VModelingLine(VDomDocument *doc, VContainer *data, qint64 id, qint64 firstPoint, qint64 secondPoint, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingLine* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param firstPoint + * @param secondPoint + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingLine* Create(const qint64 &_id, const qint64 &firstPoint, const qint64 &secondPoint, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief firstPoint + */ qint64 firstPoint; + /** + * @brief secondPoint + */ qint64 secondPoint; + /** + * @brief dialogLine + */ QSharedPointer dialogLine; }; diff --git a/tools/modelingTools/vmodelinglineintersect.h b/tools/modelingTools/vmodelinglineintersect.h index b8ca4d2eb..b0dfd515f 100644 --- a/tools/modelingTools/vmodelinglineintersect.h +++ b/tools/modelingTools/vmodelinglineintersect.h @@ -32,35 +32,111 @@ #include "vmodelingpoint.h" #include "../../dialogs/dialoglineintersect.h" +/** + * @brief The VModelingLineIntersect class + */ class VModelingLineIntersect:public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingLineIntersect + * @param doc dom document container + * @param data + * @param id + * @param p1Line1 + * @param p2Line1 + * @param p1Line2 + * @param p2Line2 + * @param typeCreation + * @param parent + */ VModelingLineIntersect(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &p1Line1, const qint64 &p2Line1, const qint64 &p1Line2, const qint64 &p2Line2, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingLineIntersect* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param p1Line1Id + * @param p2Line1Id + * @param p1Line2Id + * @param p2Line2Id + * @param pointName + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingLineIntersect* Create(const qint64 _id, const qint64 &p1Line1Id, const qint64 &p2Line1Id, const qint64 &p1Line2Id, const qint64 &p2Line2Id, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief p1Line1 + */ qint64 p1Line1; + /** + * @brief p2Line1 + */ qint64 p2Line1; + /** + * @brief p1Line2 + */ qint64 p1Line2; + /** + * @brief p2Line2 + */ qint64 p2Line2; + /** + * @brief dialogLineIntersect + */ QSharedPointer dialogLineIntersect; }; diff --git a/tools/modelingTools/vmodelinglinepoint.h b/tools/modelingTools/vmodelinglinepoint.h index 4ca0e9ced..1ef7ee104 100644 --- a/tools/modelingTools/vmodelinglinepoint.h +++ b/tools/modelingTools/vmodelinglinepoint.h @@ -31,20 +31,55 @@ #include "vmodelingpoint.h" +/** + * @brief The VModelingLinePoint class + */ class VModelingLinePoint : public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingLinePoint + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param basePointId + * @param angle + * @param parent + */ VModelingLinePoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &basePointId, const qreal &angle, QGraphicsItem * parent = 0); protected: + /** + * @brief typeLine + */ QString typeLine; + /** + * @brief formula + */ QString formula; + /** + * @brief angle + */ qreal angle; + /** + * @brief basePointId + */ qint64 basePointId; + /** + * @brief mainLine + */ QGraphicsLineItem *mainLine; + /** + * @brief RefreshGeometry + */ virtual void RefreshGeometry(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens() {doc->DecrementReferens(basePointId);} private: Q_DISABLE_COPY(VModelingLinePoint) diff --git a/tools/modelingTools/vmodelingnormal.h b/tools/modelingTools/vmodelingnormal.h index 3d9062a0e..362b4897d 100644 --- a/tools/modelingTools/vmodelingnormal.h +++ b/tools/modelingTools/vmodelingnormal.h @@ -32,31 +32,100 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialognormal.h" +/** + * @brief The VModelingNormal class + */ class VModelingNormal : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingNormal + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param angle + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VModelingNormal(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qreal &angle, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingNormal* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param firstPointId + * @param secondPointId + * @param typeLine + * @param pointName + * @param angle + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingNormal* Create(const qint64 _id, const QString &formula, const qint64 &firstPointId, const qint64 &secondPointId, const QString &typeLine, const QString &pointName, const qreal angle, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogNormal + */ QSharedPointer dialogNormal; }; diff --git a/tools/modelingTools/vmodelingpoint.h b/tools/modelingTools/vmodelingpoint.h index e03799136..4a1e88432 100644 --- a/tools/modelingTools/vmodelingpoint.h +++ b/tools/modelingTools/vmodelingpoint.h @@ -32,25 +32,79 @@ #include "vmodelingtool.h" #include "../../widgets/vgraphicssimpletextitem.h" +/** + * @brief The VModelingPoint class + */ class VModelingPoint: public VModelingTool, public QGraphicsEllipseItem { Q_OBJECT public: + /** + * @brief VModelingPoint + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VModelingPoint(VDomDocument *doc, VContainer *data, qint64 id, QGraphicsItem * parent = 0); virtual ~VModelingPoint() {} + /** + * @brief TagName + */ static const QString TagName; public slots: + /** + * @brief NameChangePosition + * @param pos + */ void NameChangePosition(const QPointF &pos); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result) = 0; protected: + /** + * @brief radius + */ qreal radius; + /** + * @brief namePoint + */ VGraphicsSimpleTextItem *namePoint; + /** + * @brief lineName + */ QGraphicsLineItem *lineName; + /** + * @brief UpdateNamePosition + * @param mx + * @param my + */ virtual void UpdateNamePosition(qreal mx, qreal my); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RefreshPointGeometry + * @param point + */ virtual void RefreshPointGeometry(const VPointF &point); + /** + * @brief RefreshLine + */ void RefreshLine(); private: Q_DISABLE_COPY(VModelingPoint) diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/tools/modelingTools/vmodelingpointofcontact.h index d9be2cda2..df58ee4f2 100644 --- a/tools/modelingTools/vmodelingpointofcontact.h +++ b/tools/modelingTools/vmodelingpointofcontact.h @@ -32,36 +32,112 @@ #include "vmodelingpoint.h" #include "../../dialogs/dialogpointofcontact.h" +/** + * @brief The VModelingPointOfContact class + */ class VModelingPointOfContact : public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingPointOfContact + * @param doc dom document container + * @param data + * @param id + * @param radius + * @param center + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VModelingPointOfContact(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingPointOfContact* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param radius + * @param center + * @param firstPointId + * @param secondPointId + * @param pointName + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingPointOfContact* Create(const qint64 _id, const QString &radius, const qint64 ¢er, const qint64 &firstPointId, const qint64 &secondPointId, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief radius + */ QString radius; + /** + * @brief center + */ qint64 center; + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogPointOfContact + */ QSharedPointer dialogPointOfContact; }; diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/tools/modelingTools/vmodelingpointofintersection.h index 4a859ea84..30a5b0d8f 100644 --- a/tools/modelingTools/vmodelingpointofintersection.h +++ b/tools/modelingTools/vmodelingpointofintersection.h @@ -32,33 +32,99 @@ #include "vmodelingpoint.h" #include "../../dialogs/dialogpointofintersection.h" +/** + * @brief The VModelingPointOfIntersection class + */ class VModelingPointOfIntersection : public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingPointOfIntersection + * @param doc dom document container + * @param data + * @param id + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VModelingPointOfIntersection(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingPointOfIntersection* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingPointOfIntersection* Create(const qint64 _id, const QString &pointName, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: Q_DISABLE_COPY(VModelingPointOfIntersection) + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogPointOfIntersection + */ QSharedPointer dialogPointOfIntersection; }; diff --git a/tools/modelingTools/vmodelingshoulderpoint.h b/tools/modelingTools/vmodelingshoulderpoint.h index 7b9d27027..5fe6f796e 100644 --- a/tools/modelingTools/vmodelingshoulderpoint.h +++ b/tools/modelingTools/vmodelingshoulderpoint.h @@ -32,33 +32,105 @@ #include "vmodelinglinepoint.h" #include "../../dialogs/dialogshoulderpoint.h" +/** + * @brief The VModelingShoulderPoint class + */ class VModelingShoulderPoint : public VModelingLinePoint { Q_OBJECT public: + /** + * @brief VModelingShoulderPoint + * @param doc dom document container + * @param data + * @param id + * @param typeLine + * @param formula + * @param p1Line + * @param p2Line + * @param pShoulder + * @param typeCreation + * @param parent + */ VModelingShoulderPoint(VDomDocument *doc, VContainer *data, const qint64 &id, const QString &typeLine, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingShoulderPoint* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param formula + * @param p1Line + * @param p2Line + * @param pShoulder + * @param typeLine + * @param pointName + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingShoulderPoint* Create(const qint64 _id, const QString &formula, const qint64 &p1Line, const qint64 &p2Line, const qint64 &pShoulder, const QString &typeLine, const QString &pointName, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief p2Line + */ qint64 p2Line; + /** + * @brief pShoulder + */ qint64 pShoulder; + /** + * @brief dialogShoulderPoint + */ QSharedPointer dialogShoulderPoint; }; diff --git a/tools/modelingTools/vmodelingspline.h b/tools/modelingTools/vmodelingspline.h index 7173fc501..b55dbb005 100644 --- a/tools/modelingTools/vmodelingspline.h +++ b/tools/modelingTools/vmodelingspline.h @@ -35,39 +35,137 @@ #include "../../widgets/vcontrolpointspline.h" #include "../../geometry/vsplinepath.h" +/** + * @brief The VModelingSpline class + */ class VModelingSpline:public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VModelingSpline + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VModelingSpline (VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingSpline* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param p1 + * @param p4 + * @param kAsm1 + * @param kAsm2 + * @param angle1 + * @param angle2 + * @param kCurve + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingSpline* Create(const qint64 _id, const qint64 &p1, const qint64 &p4, const qreal &kAsm1, const qreal kAsm2, const qreal &angle1, const qreal &angle2, const qreal &kCurve, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; signals: + /** + * @brief RefreshLine + * @param indexSpline + * @param position + * @param controlPoint + * @param splinePoint + */ void RefreshLine (const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint ); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint ( bool enable ); public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile (); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui ( int result ); + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition (const qint32 &indexSpline, SplinePoint::Position position, const QPointF &pos); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile (); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogSpline + */ QSharedPointer dialogSpline; + /** + * @brief controlPoints + */ QVector controlPoints; + /** + * @brief RefreshGeometry + */ void RefreshGeometry (); }; diff --git a/tools/modelingTools/vmodelingsplinepath.h b/tools/modelingTools/vmodelingsplinepath.h index 09d77d2ff..3a7ebc519 100644 --- a/tools/modelingTools/vmodelingsplinepath.h +++ b/tools/modelingTools/vmodelingsplinepath.h @@ -34,41 +34,149 @@ #include "../../dialogs/dialogsplinepath.h" #include "../../widgets/vcontrolpointspline.h" +/** + * @brief The VModelingSplinePath class + */ class VModelingSplinePath:public VModelingTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VModelingSplinePath + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param parent + */ VModelingSplinePath(VDomDocument *doc, VContainer *data, qint64 id, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingSplinePath* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param path + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingSplinePath* Create(const qint64 _id, const VSplinePath &path, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; signals: + /** + * @brief RefreshLine + * @param indexSpline + * @param pos + * @param controlPoint + * @param splinePoint + */ void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos, const QPointF &controlPoint, const QPointF &splinePoint); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint(bool enable); public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &pos); protected: + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: + /** + * @brief dialogSplinePath + */ QSharedPointer dialogSplinePath; + /** + * @brief controlPoints + */ QVector controlPoints; + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); + /** + * @brief AddPathPoint + * @param domElement + * @param splPoint + */ void AddPathPoint(QDomElement &domElement, const VSplinePoint &splPoint); + /** + * @brief UpdatePathPoint + * @param node + * @param path + */ void UpdatePathPoint(QDomNode& node, VSplinePath &path); + /** + * @brief CorectControlPoints + * @param spl + * @param splPath + * @param indexSpline + */ void CorectControlPoints(const VSpline &spl, VSplinePath &splPath, const qint32 &indexSpline); }; diff --git a/tools/modelingTools/vmodelingtool.h b/tools/modelingTools/vmodelingtool.h index 53c57236c..2387104c0 100644 --- a/tools/modelingTools/vmodelingtool.h +++ b/tools/modelingTools/vmodelingtool.h @@ -32,22 +32,63 @@ #include "../vabstracttool.h" #include +/** + * @brief The VModelingTool class + */ class VModelingTool: public VAbstractTool { Q_OBJECT public: + /** + * @brief VModelingTool + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VModelingTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VModelingTool(){} + /** + * @brief setDialog + */ virtual void setDialog(){} + /** + * @brief ignoreContextMenu + * @param enable + */ inline void ignoreContextMenu(bool enable) {ignoreContextMenuEvent = enable;} public slots: + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result)=0; protected: + /** + * @brief ignoreContextMenuEvent + */ bool ignoreContextMenuEvent; + /** + * @brief ignoreFullUpdate + */ bool ignoreFullUpdate; + /** + * @brief AddToModeling + * @param domElement + */ void AddToModeling(const QDomElement &domElement); + /** + * @brief decrementReferens + */ virtual void decrementReferens(); template + /** + * @brief ContextMenu + * @param dialog + * @param tool + * @param event + * @param showRemove + */ void ContextMenu(QSharedPointer &dialog, Tool *tool, QGraphicsSceneContextMenuEvent *event, bool showRemove = true) { diff --git a/tools/modelingTools/vmodelingtriangle.h b/tools/modelingTools/vmodelingtriangle.h index 09dfdfb21..62ad4e844 100644 --- a/tools/modelingTools/vmodelingtriangle.h +++ b/tools/modelingTools/vmodelingtriangle.h @@ -33,33 +33,109 @@ #include "../drawTools/vtooltriangle.h" #include "../../dialogs/dialogtriangle.h" +/** + * @brief The VModelingTriangle class + */ class VModelingTriangle : public VModelingPoint { Q_OBJECT public: + /** + * @brief VModelingTriangle + * @param doc dom document container + * @param data + * @param id + * @param axisP1Id + * @param axisP2Id + * @param firstPointId + * @param secondPointId + * @param typeCreation + * @param parent + */ VModelingTriangle(VDomDocument *doc, VContainer *data, const qint64 &id, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param doc dom document container + * @param data + * @return + */ static VModelingTriangle* Create(QSharedPointer &dialog, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param pointName + * @param axisP1Id + * @param axisP2Id + * @param firstPointId + * @param secondPointId + * @param mx + * @param my + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + * @return + */ static VModelingTriangle* Create(const qint64 _id, const QString &pointName, const qint64 &axisP1Id, const qint64 &axisP2Id, const qint64 &firstPointId, const qint64 &secondPointId, const qreal &mx, const qreal &my, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); protected: + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief AddToFile + */ virtual void AddToFile(); private: Q_DISABLE_COPY(VModelingTriangle) + /** + * @brief axisP1Id + */ qint64 axisP1Id; + /** + * @brief axisP2Id + */ qint64 axisP2Id; + /** + * @brief firstPointId + */ qint64 firstPointId; + /** + * @brief secondPointId + */ qint64 secondPointId; + /** + * @brief dialogTriangle + */ QSharedPointer dialogTriangle; }; diff --git a/tools/nodeDetails/vabstractnode.h b/tools/nodeDetails/vabstractnode.h index 7fff53e9e..b2190c760 100644 --- a/tools/nodeDetails/vabstractnode.h +++ b/tools/nodeDetails/vabstractnode.h @@ -31,21 +31,58 @@ #include "../vabstracttool.h" +/** + * @brief The VAbstractNode class + */ class VAbstractNode : public VAbstractTool { Q_OBJECT public: + /** + * @brief VAbstractNode + * @param doc dom document container + * @param data + * @param id + * @param idNode + * @param typeobject + * @param parent + */ VAbstractNode(VDomDocument *doc, VContainer *data, qint64 id, qint64 idNode, Draw::Draws typeobject, QObject *parent = 0 ); virtual ~VAbstractNode() {} + /** + * @brief AttrIdObject + */ static const QString AttrIdObject; + /** + * @brief AttrTypeObject + */ static const QString AttrTypeObject; + /** + * @brief TypeObjectCalculation + */ static const QString TypeObjectCalculation; + /** + * @brief TypeObjectModeling + */ static const QString TypeObjectModeling; protected: + /** + * @brief idNode + */ qint64 idNode; + /** + * @brief typeobject + */ Draw::Draws typeobject; + /** + * @brief AddToModeling + * @param domElement + */ void AddToModeling(const QDomElement &domElement); + /** + * @brief decrementReferens + */ virtual void decrementReferens(); }; diff --git a/tools/nodeDetails/vnodearc.h b/tools/nodeDetails/vnodearc.h index f71096694..b99abd458 100644 --- a/tools/nodeDetails/vnodearc.h +++ b/tools/nodeDetails/vnodearc.h @@ -32,24 +32,74 @@ #include "vabstractnode.h" #include +/** + * @brief The VNodeArc class + */ class VNodeArc :public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VNodeArc + * @param doc dom document container + * @param data + * @param id + * @param idArc + * @param typeobject + * @param typeCreation + * @param parent + */ VNodeArc(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief Create + * @param doc dom document container + * @param data + * @param id + * @param idArc + * @param typeobject + * @param parse + * @param typeCreation + */ static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idArc, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); protected: + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); private: + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/nodeDetails/vnodepoint.h b/tools/nodeDetails/vnodepoint.h index 7874715c6..fcc63b362 100644 --- a/tools/nodeDetails/vnodepoint.h +++ b/tools/nodeDetails/vnodepoint.h @@ -32,29 +32,101 @@ #include "vabstractnode.h" #include "../../widgets/vgraphicssimpletextitem.h" +/** + * @brief The VNodePoint class + */ class VNodePoint: public VAbstractNode, public QGraphicsEllipseItem { Q_OBJECT public: + /** + * @brief VNodePoint + * @param doc dom document container + * @param data + * @param id + * @param idPoint + * @param typeobject + * @param typeCreation + * @param parent + */ VNodePoint(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0 ); + /** + * @brief Create + * @param doc dom document container + * @param data + * @param id + * @param idPoint + * @param typeobject + * @param parse + * @param typeCreation + */ static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idPoint, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); + /** + * @brief NameChangePosition + * @param pos + */ void NameChangePosition(const QPointF &pos); protected: + /** + * @brief radius + */ qreal radius; + /** + * @brief namePoint + */ VGraphicsSimpleTextItem *namePoint; + /** + * @brief lineName + */ QGraphicsLineItem *lineName; + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief UpdateNamePosition + * @param mx + * @param my + */ virtual void UpdateNamePosition(qreal mx, qreal my); + /** + * @brief RefreshPointGeometry + * @param point + */ virtual void RefreshPointGeometry(const VPointF &point); + /** + * @brief RefreshLine + */ void RefreshLine(); private: Q_DISABLE_COPY(VNodePoint) diff --git a/tools/nodeDetails/vnodespline.h b/tools/nodeDetails/vnodespline.h index fc8dcb202..016992a35 100644 --- a/tools/nodeDetails/vnodespline.h +++ b/tools/nodeDetails/vnodespline.h @@ -32,25 +32,76 @@ #include "vabstractnode.h" #include +/** + * @brief The VNodeSpline class + */ class VNodeSpline:public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VNodeSpline + * @param doc dom document container + * @param data + * @param id + * @param idSpline + * @param typeobject + * @param typeCreation + * @param parent + */ VNodeSpline(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief Create + * @param doc dom document container + * @param data + * @param id + * @param idSpline + * @param typeobject + * @param parse + * @param typeCreation + * @return + */ static VNodeSpline *Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile (); protected: + /** + * @brief AddToFile + */ virtual void AddToFile (); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); private: + /** + * @brief RefreshGeometry + */ void RefreshGeometry (); }; diff --git a/tools/nodeDetails/vnodesplinepath.h b/tools/nodeDetails/vnodesplinepath.h index f5b0c9cba..831e9860d 100644 --- a/tools/nodeDetails/vnodesplinepath.h +++ b/tools/nodeDetails/vnodesplinepath.h @@ -32,24 +32,74 @@ #include "vabstractnode.h" #include +/** + * @brief The VNodeSplinePath class + */ class VNodeSplinePath : public VAbstractNode, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VNodeSplinePath + * @param doc dom document container + * @param data + * @param id + * @param idSpline + * @param typeobject + * @param typeCreation + * @param parent + */ VNodeSplinePath(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, Draw::Draws typeobject, const Tool::Sources &typeCreation, QGraphicsItem * parent = 0); + /** + * @brief Create + * @param doc dom document container + * @param data + * @param id + * @param idSpline + * @param typeobject + * @param parse + * @param typeCreation + */ static void Create(VDomDocument *doc, VContainer *data, qint64 id, qint64 idSpline, const Draw::Draws &typeobject, const Document::Documents &parse, const Tool::Sources &typeCreation); + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief ToolType + */ static const QString ToolType; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile(); protected: + /** + * @brief AddToFile + */ virtual void AddToFile(); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); private: + /** + * @brief RefreshGeometry + */ void RefreshGeometry(); }; diff --git a/tools/vabstracttool.h b/tools/vabstracttool.h index f3a2ea372..038b3e2d4 100644 --- a/tools/vabstracttool.h +++ b/tools/vabstracttool.h @@ -32,72 +32,280 @@ #include "vdatatool.h" #include "../xml/vdomdocument.h" +/** + * @brief The VAbstractTool class + */ class VAbstractTool: public VDataTool { Q_OBJECT public: + /** + * @brief VAbstractTool + * @param doc dom document container + * @param data + * @param id + * @param parent + */ VAbstractTool(VDomDocument *doc, VContainer *data, qint64 id, QObject *parent = 0); virtual ~VAbstractTool() {} + /** + * @brief LineIntersectRect + * @param rec + * @param line + * @return + */ static QPointF LineIntersectRect(QRectF rec, QLineF line); + /** + * @brief LineIntersectCircle + * @param center + * @param radius + * @param line + * @param p1 + * @param p2 + * @return + */ static qint32 LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2); + /** + * @brief ClosestPoint + * @param line + * @param p + * @return + */ static QPointF ClosestPoint(const QLineF &line, const QPointF &p); + /** + * @brief addVector + * @param p + * @param p1 + * @param p2 + * @param k + * @return + */ static QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k); + /** + * @brief getId + * @return + */ inline qint64 getId() const {return id;} + /** + * @brief LineCoefficients + * @param line + * @param a + * @param b + * @param c + */ static void LineCoefficients(const QLineF &line, qreal *a, qreal *b, qreal *c); + /** + * @brief AttrId + */ static const QString AttrId; + /** + * @brief AttrType + */ static const QString AttrType; + /** + * @brief AttrMx + */ static const QString AttrMx; + /** + * @brief AttrMy + */ static const QString AttrMy; + /** + * @brief AttrName + */ static const QString AttrName; + /** + * @brief AttrX + */ static const QString AttrX; + /** + * @brief AttrY + */ static const QString AttrY; + /** + * @brief AttrTypeLine + */ static const QString AttrTypeLine; + /** + * @brief AttrLength + */ static const QString AttrLength; + /** + * @brief AttrBasePoint + */ static const QString AttrBasePoint; + /** + * @brief AttrFirstPoint + */ static const QString AttrFirstPoint; + /** + * @brief AttrSecondPoint + */ static const QString AttrSecondPoint; + /** + * @brief AttrThirdPoint + */ static const QString AttrThirdPoint; + /** + * @brief AttrCenter + */ static const QString AttrCenter; + /** + * @brief AttrRadius + */ static const QString AttrRadius; + /** + * @brief AttrAngle + */ static const QString AttrAngle; + /** + * @brief AttrAngle1 + */ static const QString AttrAngle1; + /** + * @brief AttrAngle2 + */ static const QString AttrAngle2; + /** + * @brief AttrP1Line + */ static const QString AttrP1Line; + /** + * @brief AttrP2Line + */ static const QString AttrP2Line; + /** + * @brief AttrP1Line1 + */ static const QString AttrP1Line1; + /** + * @brief AttrP2Line1 + */ static const QString AttrP2Line1; + /** + * @brief AttrP1Line2 + */ static const QString AttrP1Line2; + /** + * @brief AttrP2Line2 + */ static const QString AttrP2Line2; + /** + * @brief AttrPShoulder + */ static const QString AttrPShoulder; + /** + * @brief AttrPoint1 + */ static const QString AttrPoint1; + /** + * @brief AttrPoint4 + */ static const QString AttrPoint4; + /** + * @brief AttrKAsm1 + */ static const QString AttrKAsm1; + /** + * @brief AttrKAsm2 + */ static const QString AttrKAsm2; + /** + * @brief AttrKCurve + */ static const QString AttrKCurve; + /** + * @brief AttrPathPoint + */ static const QString AttrPathPoint; + /** + * @brief AttrPSpline + */ static const QString AttrPSpline; + /** + * @brief AttrAxisP1 + */ static const QString AttrAxisP1; + /** + * @brief AttrAxisP2 + */ static const QString AttrAxisP2; + /** + * @brief TypeLineNone + */ static const QString TypeLineNone; + /** + * @brief TypeLineLine + */ static const QString TypeLineLine; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile()=0; signals: + /** + * @brief toolhaveChange + */ void toolhaveChange(); + /** + * @brief ChoosedTool + * @param id + * @param type + */ void ChoosedTool(qint64 id, Scene::Scenes type); + /** + * @brief FullUpdateTree + */ void FullUpdateTree(); + /** + * @brief RemoveTool + * @param tool + */ void RemoveTool(QGraphicsItem *tool); protected: + /** + * @brief doc dom document container + */ VDomDocument *doc; + /** + * @brief id + */ const qint64 id; + /** + * @brief baseColor + */ const Qt::GlobalColor baseColor; + /** + * @brief currentColor + */ Qt::GlobalColor currentColor; + /** + * @brief AddToFile + */ virtual void AddToFile()=0; + /** + * @brief getData + * @return + */ inline const VContainer *getData() const {return &data;} + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(){} + /** + * @brief RemoveAllChild + * @param domElement + */ void RemoveAllChild(QDomElement &domElement); template + /** + * @brief AddAttribute + * @param domElement + * @param name + * @param value + */ void AddAttribute(QDomElement &domElement, const QString &name, const T &value) { QDomAttr domAttr = doc->createAttribute(name); diff --git a/tools/vdatatool.h b/tools/vdatatool.h index 86d0b2927..a7b0cfcf5 100644 --- a/tools/vdatatool.h +++ b/tools/vdatatool.h @@ -32,20 +32,57 @@ #include "../container/vcontainer.h" //We need QObject class because we use qobject_cast. +/** + * @brief The VDataTool class + */ class VDataTool : public QObject { Q_OBJECT public: + /** + * @brief VDataTool + * @param data + * @param parent + */ VDataTool(VContainer *data, QObject *parent = 0): QObject(parent), data(*data), _referens(1){} virtual ~VDataTool(){} + /** + * @brief operator = + * @param tool + * @return + */ VDataTool &operator= (const VDataTool &tool); + /** + * @brief getData + * @return + */ inline VContainer getData() const { return data; } + /** + * @brief setData + * @param value + */ inline void setData(const VContainer *value) {data = *value;} + /** + * @brief referens + * @return + */ virtual inline qint64 referens() const {return _referens;} + /** + * @brief incrementReferens + */ virtual inline void incrementReferens(){++_referens;} + /** + * @brief decrementReferens + */ virtual void decrementReferens(); protected: + /** + * @brief data container with data + */ VContainer data; + /** + * @brief _referens + */ qint64 _referens; }; diff --git a/tools/vtooldetail.h b/tools/vtooldetail.h index b0079d5b8..571d13c05 100644 --- a/tools/vtooldetail.h +++ b/tools/vtooldetail.h @@ -33,20 +33,58 @@ #include #include "../dialogs/dialogdetail.h" +/** + * @brief The VToolDetail class + */ class VToolDetail: public VAbstractTool, public QGraphicsPathItem { Q_OBJECT public: + /** + * @brief VToolDetail + * @param doc dom document container + * @param data + * @param id + * @param typeCreation + * @param scene + * @param parent + */ VToolDetail(VDomDocument *doc, VContainer *data, const qint64 &id, const Tool::Sources &typeCreation, VMainGraphicsScene *scene, QGraphicsItem * parent = 0); + /** + * @brief setDialog + */ virtual void setDialog(); + /** + * @brief Create + * @param dialog + * @param scene + * @param doc dom document container + * @param data + */ static void Create(QSharedPointer &dialog, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data); + /** + * @brief Create + * @param _id + * @param newDetail + * @param scene + * @param doc dom document container + * @param data + * @param parse + * @param typeCreation + */ static void Create(const qint64 _id, VDetail &newDetail, VMainGraphicsScene *scene, VDomDocument *doc, VContainer *data, const Document::Documents &parse, const Tool::Sources &typeCreation); template + /** + * @brief AddTool + * @param tool + * @param id + * @param typeTool + */ void AddTool(T *tool, const qint64 &id, Tool::Tools typeTool) { tool->setParentItem(this); @@ -61,33 +99,110 @@ public: AddNode(domElement, node); } } + /** + * @brief TagName + */ static const QString TagName; + /** + * @brief TagNode + */ static const QString TagNode; + /** + * @brief AttrSupplement + */ static const QString AttrSupplement; + /** + * @brief AttrClosed + */ static const QString AttrClosed; + /** + * @brief AttrWidth + */ static const QString AttrWidth; + /** + * @brief AttrIdObject + */ static const QString AttrIdObject; + /** + * @brief AttrNodeType + */ static const QString AttrNodeType; + /** + * @brief NodeTypeContour + */ static const QString NodeTypeContour; + /** + * @brief NodeTypeModeling + */ static const QString NodeTypeModeling; public slots: + /** + * @brief FullUpdateFromFile + */ virtual void FullUpdateFromFile (); + /** + * @brief FullUpdateFromGui + * @param result + */ virtual void FullUpdateFromGui(int result); signals: + /** + * @brief RemoveTool + * @param tool + */ void RemoveTool(QGraphicsItem *tool); protected: + /** + * @brief AddToFile + */ virtual void AddToFile (); + /** + * @brief itemChange + * @param change + * @param value + * @return + */ QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); + /** + * @brief mouseReleaseEvent + * @param event + */ virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); + /** + * @brief contextMenuEvent + * @param event + */ virtual void contextMenuEvent ( QGraphicsSceneContextMenuEvent * event ); + /** + * @brief RemoveReferens + */ virtual void RemoveReferens(); private: Q_DISABLE_COPY(VToolDetail) + /** + * @brief dialogDetail + */ QSharedPointer dialogDetail; + /** + * @brief sceneDetails + */ VMainGraphicsScene *sceneDetails; + /** + * @brief RefreshGeometry + */ void RefreshGeometry (); + /** + * @brief AddNode + * @param domElement + * @param node + */ void AddNode(QDomElement &domElement, VNodeDetail &node); template + /** + * @brief InitTool + * @param scene + * @param node + */ void InitTool(VMainGraphicsScene *scene, const VNodeDetail &node); }; diff --git a/widgets/doubledelegate.h b/widgets/doubledelegate.h index c4bc8ac49..c69a53e29 100644 --- a/widgets/doubledelegate.h +++ b/widgets/doubledelegate.h @@ -31,14 +31,45 @@ #include +/** + * @brief The DoubleSpinBoxDelegate class + */ class DoubleSpinBoxDelegate : public QItemDelegate { Q_OBJECT public: + /** + * @brief DoubleSpinBoxDelegate + * @param parent + */ DoubleSpinBoxDelegate(QObject *parent = 0): QItemDelegate(parent){} + /** + * @brief createEditor + * @param parent + * @param option + * @param index + * @return + */ QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const; + /** + * @brief setEditorData + * @param editor + * @param index + */ void setEditorData(QWidget *editor, const QModelIndex &index) const; + /** + * @brief setModelData + * @param editor + * @param model + * @param index + */ void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const; + /** + * @brief updateEditorGeometry + * @param editor + * @param option + * @param index + */ void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const; }; diff --git a/widgets/vapplication.h b/widgets/vapplication.h index 359dd1806..03a099690 100644 --- a/widgets/vapplication.h +++ b/widgets/vapplication.h @@ -31,12 +31,26 @@ #include +/** + * @brief The VApplication class + */ class VApplication : public QApplication { Q_OBJECT public: + /** + * @brief VApplication + * @param argc + * @param argv + */ VApplication(int &argc, char ** argv): QApplication(argc, argv){} virtual ~VApplication() {} + /** + * @brief notify + * @param receiver + * @param event + * @return + */ virtual bool notify(QObject * receiver, QEvent * event); }; diff --git a/widgets/vcontrolpointspline.h b/widgets/vcontrolpointspline.h index fddc4ccec..6b34f77a9 100644 --- a/widgets/vcontrolpointspline.h +++ b/widgets/vcontrolpointspline.h @@ -33,33 +33,110 @@ #include #include "../geometry/vsplinepath.h" +/** + * @brief The VControlPointSpline class + */ class VControlPointSpline : public QObject, public QGraphicsEllipseItem { Q_OBJECT public: + /** + * @brief VControlPointSpline + * @param indexSpline + * @param position + * @param controlPoint + * @param splinePoint + * @param parent + */ VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint, QGraphicsItem * parent = 0); signals: + /** + * @brief ControlPointChangePosition + * @param indexSpline + * @param position + * @param pos + */ void ControlPointChangePosition(const qint32 &indexSpline, SplinePoint::Position position, const QPointF pos); public slots: + /** + * @brief RefreshLine + * @param indexSpline + * @param pos + * @param controlPoint + * @param splinePoint + */ void RefreshLine(const qint32 &indexSpline, SplinePoint::Position pos, const QPointF &controlPoint, const QPointF &splinePoint); + /** + * @brief setEnabledPoint + * @param enable + */ void setEnabledPoint(bool enable); protected: + /** + * @brief radius + */ qreal radius; + /** + * @brief controlLine + */ QGraphicsLineItem *controlLine; + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief itemChange + * @param change + * @param value + * @return + */ QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); private: Q_DISABLE_COPY(VControlPointSpline) + /** + * @brief indexSpline + */ qint32 indexSpline; + /** + * @brief position + */ SplinePoint::Position position; + /** + * @brief LineIntersectCircle + * @param center + * @param radius + * @param line + * @param p1 + * @param p2 + * @return + */ qint32 LineIntersectCircle(const QPointF ¢er, qreal radius, const QLineF &line, QPointF &p1, QPointF &p2) const; + /** + * @brief ClosestPoint + * @param line + * @param p + * @return + */ QPointF ClosestPoint(const QLineF &line, const QPointF &p) const; + /** + * @brief addVector + * @param p + * @param p1 + * @param p2 + * @param k + * @return + */ QPointF addVector (const QPointF &p, const QPointF &p1, const QPointF &p2, qreal k) const; }; diff --git a/widgets/vgraphicssimpletextitem.h b/widgets/vgraphicssimpletextitem.h index 3f3b2a2a8..753a68497 100644 --- a/widgets/vgraphicssimpletextitem.h +++ b/widgets/vgraphicssimpletextitem.h @@ -31,20 +31,57 @@ #include +/** + * @brief The VGraphicsSimpleTextItem class + */ class VGraphicsSimpleTextItem : public QObject, public QGraphicsSimpleTextItem { Q_OBJECT public: + /** + * @brief VGraphicsSimpleTextItem + * @param parent + */ VGraphicsSimpleTextItem(QGraphicsItem * parent = 0); + /** + * @brief VGraphicsSimpleTextItem + * @param text + * @param parent + */ VGraphicsSimpleTextItem( const QString & text, QGraphicsItem * parent = 0 ); + /** + * @brief FontSize + * @return + */ qint32 FontSize()const {return fontSize;} signals: + /** + * @brief NameChangePosition + * @param pos + */ void NameChangePosition(const QPointF pos); protected: + /** + * @brief itemChange + * @param change + * @param value + * @return + */ QVariant itemChange ( GraphicsItemChange change, const QVariant &value ); + /** + * @brief hoverMoveEvent + * @param event + */ virtual void hoverMoveEvent ( QGraphicsSceneHoverEvent * event ); + /** + * @brief hoverLeaveEvent + * @param event + */ virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event ); private: + /** + * @brief fontSize + */ qint32 fontSize; }; diff --git a/widgets/vitem.h b/widgets/vitem.h index 750b41305..6d1f01254 100644 --- a/widgets/vitem.h +++ b/widgets/vitem.h @@ -65,7 +65,15 @@ public: * @param angle кут в градусах на який повертається деталь. */ void Rotate ( qreal angle ); + /** + * @brief getPaper + * @return + */ QGraphicsRectItem *getPaper() const {return paper;} + /** + * @brief setPaper + * @param value + */ void setPaper(QGraphicsRectItem *value) {paper = value;} public slots: /** @@ -98,6 +106,9 @@ private: *номер. */ qint32 numInOutList; + /** + * @brief paper + */ QGraphicsRectItem* paper; signals: /** diff --git a/widgets/vmaingraphicsscene.h b/widgets/vmaingraphicsscene.h index 8d605d64d..ef8b99769 100644 --- a/widgets/vmaingraphicsscene.h +++ b/widgets/vmaingraphicsscene.h @@ -31,31 +31,105 @@ #include +/** + * @brief The VMainGraphicsScene class + */ class VMainGraphicsScene : public QGraphicsScene { Q_OBJECT public: + /** + * @brief VMainGraphicsScene + */ VMainGraphicsScene(); + /** + * @brief VMainGraphicsScene + * @param sceneRect + * @param parent + */ VMainGraphicsScene(const QRectF & sceneRect, QObject * parent = 0); + /** + * @brief getHorScrollBar + * @return + */ inline qint32 getHorScrollBar() const {return horScrollBar;} + /** + * @brief setHorScrollBar + * @param value + */ inline void setHorScrollBar(const qint32 &value) {horScrollBar = value;} + /** + * @brief getVerScrollBar + * @return + */ inline qint32 getVerScrollBar() const {return verScrollBar;} + /** + * @brief setVerScrollBar + * @param value + */ inline void setVerScrollBar(const qint32 &value) {verScrollBar = value;} public slots: + /** + * @brief ChoosedItem + * @param id + * @param type + */ void ChoosedItem(qint64 id, const Scene::Scenes &type); + /** + * @brief RemoveTool + * @param tool + */ inline void RemoveTool(QGraphicsItem *tool) {this->removeItem(tool);} + /** + * @brief SetFactor + * @param factor + */ void SetFactor(qreal factor); protected: + /** + * @brief mouseMoveEvent + * @param event + */ void mouseMoveEvent(QGraphicsSceneMouseEvent* event); + /** + * @brief mousePressEvent + * @param event + */ void mousePressEvent(QGraphicsSceneMouseEvent *event); signals: + /** + * @brief mouseMove + * @param scenePos + */ void mouseMove(QPointF scenePos); + /** + * @brief mousePress + * @param scenePos + */ void mousePress(QPointF scenePos); + /** + * @brief ChoosedObject + * @param id + * @param type + */ void ChoosedObject(qint64 id, Scene::Scenes type); + /** + * @brief NewFactor + * @param factor + */ void NewFactor(qreal factor); private: + /** + * @brief horScrollBar + */ qint32 horScrollBar; + /** + * @brief verScrollBar + */ qint32 verScrollBar; + /** + * @brief scaleFactor + */ qreal scaleFactor; }; diff --git a/widgets/vmaingraphicsview.h b/widgets/vmaingraphicsview.h index c4bb43956..a42d53967 100644 --- a/widgets/vmaingraphicsview.h +++ b/widgets/vmaingraphicsview.h @@ -31,15 +31,33 @@ #include +/** + * @brief The VMainGraphicsView class + */ class VMainGraphicsView : public QGraphicsView { Q_OBJECT public: + /** + * @brief VMainGraphicsView + * @param parent + */ explicit VMainGraphicsView(QWidget *parent = 0); signals: + /** + * @brief NewFactor + * @param factor + */ void NewFactor(qreal factor); public slots: + /** + * @brief scalingTime + * @param x + */ void scalingTime(qreal x); + /** + * @brief animFinished + */ void animFinished(); protected: /** @@ -47,9 +65,20 @@ protected: * @param event передається подія. */ void wheelEvent ( QWheelEvent * event ); + /** + * @brief mousePressEvent + * @param mousePress + */ void mousePressEvent(QMouseEvent *mousePress); + /** + * @brief mouseReleaseEvent + * @param event + */ void mouseReleaseEvent(QMouseEvent *event); private: + /** + * @brief _numScheduledScalings + */ qint32 _numScheduledScalings; }; diff --git a/widgets/vtablegraphicsview.h b/widgets/vtablegraphicsview.h index da6f9a5fa..fc93206b9 100644 --- a/widgets/vtablegraphicsview.h +++ b/widgets/vtablegraphicsview.h @@ -31,10 +31,16 @@ #include +/** + * @brief The VTableGraphicsView class + */ class VTableGraphicsView : public QGraphicsView { Q_OBJECT public: + /** + * @brief The typeMove_e enum + */ enum typeMove_e { Left, Right, Up, Down }; VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent = 0); signals: diff --git a/xml/vdomdocument.h b/xml/vdomdocument.h index 1042beb9a..b13cf58c0 100644 --- a/xml/vdomdocument.h +++ b/xml/vdomdocument.h @@ -37,6 +37,9 @@ namespace Document { + /** + * @brief The Document enum + */ enum Document { LiteParse, FullParse}; Q_DECLARE_FLAGS(Documents, Document) } @@ -46,83 +49,372 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Document::Documents) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Weffc++" #endif + +/** + * @brief The VDomDocument class + */ class VDomDocument : public QObject, public QDomDocument { Q_OBJECT public: + /** + * @brief VDomDocument + * @param data + * @param comboBoxDraws + * @param mode + */ VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); + /** + * @brief VDomDocument + * @param name + * @param data + * @param comboBoxDraws + * @param mode + */ VDomDocument(const QString& name, VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); + /** + * @brief VDomDocument + * @param doc dom document containertype + * @param data + * @param comboBoxDraws + * @param mode + */ VDomDocument(const QDomDocumentType& doctype, VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode); ~VDomDocument(){} + /** + * @brief elementById + * @param id + * @return + */ QDomElement elementById(const QString& id); + /** + * @brief CreateEmptyFile + */ void CreateEmptyFile(); + /** + * @brief ChangeActivDraw + * @param name + * @param parse + */ void ChangeActivDraw(const QString& name, const Document::Documents &parse = Document::FullParse); + /** + * @brief GetNameActivDraw + * @return + */ inline QString GetNameActivDraw() const {return nameActivDraw;} + /** + * @brief GetActivDrawElement + * @param element + * @return + */ bool GetActivDrawElement(QDomElement &element); + /** + * @brief GetActivCalculationElement + * @param element + * @return + */ bool GetActivCalculationElement(QDomElement &element); + /** + * @brief GetActivModelingElement + * @param element + * @return + */ bool GetActivModelingElement(QDomElement &element); + /** + * @brief GetActivDetailsElement + * @param element + * @return + */ bool GetActivDetailsElement(QDomElement &element); + /** + * @brief appendDraw + * @param name + * @return + */ bool appendDraw(const QString& name); + /** + * @brief SetNameDraw + * @param name + * @return + */ bool SetNameDraw(const QString& name); + /** + * @brief Parse + * @param parse + * @param sceneDraw + * @param sceneDetail + */ void Parse(const Document::Documents &parse, VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail); + /** + * @brief getTools + * @return + */ inline QHash* getTools() {return &tools;} + /** + * @brief getHistory + * @return + */ inline QVector *getHistory() {return &history;} + /** + * @brief getCursor + * @return + */ inline qint64 getCursor() const {return cursor;} + /** + * @brief setCursor + * @param value + */ void setCursor(const qint64 &value); + /** + * @brief setCurrentData + */ void setCurrentData(); + /** + * @brief AddTool + * @param id + * @param tool + */ void AddTool(const qint64 &id, VDataTool *tool); + /** + * @brief UpdateToolData + * @param id + * @param data + */ void UpdateToolData(const qint64 &id, VContainer *data); + /** + * @brief IncrementReferens + * @param id + */ void IncrementReferens(qint64 id) const; + /** + * @brief DecrementReferens + * @param id + */ void DecrementReferens(qint64 id) const; + /** + * @brief TestUniqueId + */ void TestUniqueId() const; signals: + /** + * @brief ChangedActivDraw + * @param newName + */ void ChangedActivDraw(const QString &newName); + /** + * @brief ChangedNameDraw + * @param oldName + * @param newName + */ void ChangedNameDraw(const QString oldName, const QString newName); + /** + * @brief FullUpdateFromFile + */ void FullUpdateFromFile(); + /** + * @brief haveChange + */ void haveChange(); + /** + * @brief ShowTool + * @param id + * @param color + * @param enable + */ void ShowTool(qint64 id, Qt::GlobalColor color, bool enable); + /** + * @brief ChangedCursor + * @param id + */ void ChangedCursor(qint64 id); public slots: + /** + * @brief FullUpdateTree + */ void FullUpdateTree(); + /** + * @brief haveLiteChange + */ void haveLiteChange(); + /** + * @brief ShowHistoryTool + * @param id + * @param color + * @param enable + */ void ShowHistoryTool(qint64 id, Qt::GlobalColor color, bool enable); private: Q_DISABLE_COPY(VDomDocument) + /** + * @brief map + */ QHash map; + /** + * @brief nameActivDraw + */ QString nameActivDraw; + /** + * @brief data container with data + */ VContainer *data; + /** + * @brief tools + */ QHash tools; + /** + * @brief history + */ QVector history; + /** + * @brief cursor + */ qint64 cursor; + /** + * @brief comboBoxDraws + */ QComboBox *comboBoxDraws; + /** + * @brief mode + */ Draw::Draws *mode; + /** + * @brief find + * @param node + * @param id + * @return + */ bool find(const QDomElement &node, const QString& id); + /** + * @brief CheckNameDraw + * @param name + * @return + */ bool CheckNameDraw(const QString& name) const; + /** + * @brief SetActivDraw + * @param name + */ void SetActivDraw(const QString& name); + /** + * @brief GetActivNodeElement + * @param name + * @param element + * @return + */ bool GetActivNodeElement(const QString& name, QDomElement& element); + /** + * @brief ParseDrawElement + * @param sceneDraw + * @param sceneDetail + * @param node + * @param parse + */ void ParseDrawElement(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, const QDomNode& node, const Document::Documents &parse); + /** + * @brief ParseDrawMode + * @param sceneDraw + * @param sceneDetail + * @param node + * @param parse + * @param mode + */ void ParseDrawMode(VMainGraphicsScene *sceneDraw, VMainGraphicsScene *sceneDetail, const QDomNode& node, const Document::Documents &parse, const Draw::Draws &mode); + /** + * @brief ParseDetailElement + * @param sceneDetail + * @param domElement + * @param parse + */ void ParseDetailElement(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, const Document::Documents &parse); + /** + * @brief ParseDetails + * @param sceneDetail + * @param domElement + * @param parse + */ void ParseDetails(VMainGraphicsScene *sceneDetail, const QDomElement &domElement, const Document::Documents &parse); + /** + * @brief ParsePointElement + * @param scene + * @param domElement + * @param parse + * @param type + * @param mode + */ void ParsePointElement(VMainGraphicsScene *scene, const QDomElement& domElement, const Document::Documents &parse, const QString &type, const Draw::Draws &mode); + /** + * @brief ParseLineElement + * @param scene + * @param domElement + * @param parse + * @param mode + */ void ParseLineElement(VMainGraphicsScene *scene, const QDomElement& domElement, const Document::Documents &parse, const Draw::Draws &mode); + /** + * @brief ParseSplineElement + * @param scene + * @param domElement + * @param parse + * @param type + * @param mode + */ void ParseSplineElement(VMainGraphicsScene *scene, const QDomElement& domElement, const Document::Documents &parse, const QString& type, const Draw::Draws &mode); + /** + * @brief ParseArcElement + * @param scene + * @param domElement + * @param parse + * @param type + * @param mode + */ void ParseArcElement(VMainGraphicsScene *scene, const QDomElement& domElement, const Document::Documents &parse, const QString& type, const Draw::Draws &mode); + /** + * @brief ParseIncrementsElement + * @param node + */ void ParseIncrementsElement(const QDomNode& node); + /** + * @brief GetParametrId + * @param domElement + * @return + */ qint64 GetParametrId(const QDomElement& domElement) const; + /** + * @brief GetParametrLongLong + * @param domElement + * @param name + * @return + */ qint64 GetParametrLongLong(const QDomElement& domElement, const QString &name) const; + /** + * @brief GetParametrString + * @param domElement + * @param name + * @return + */ QString GetParametrString(const QDomElement& domElement, const QString &name) const; + /** + * @brief GetParametrDouble + * @param domElement + * @param name + * @return + */ qreal GetParametrDouble(const QDomElement& domElement, const QString &name) const; + /** + * @brief CollectId + * @param node + * @param vector + */ void CollectId(const QDomElement &node, QVector &vector)const; }; diff --git a/xml/vtoolrecord.h b/xml/vtoolrecord.h index a2f964970..77ed466f3 100644 --- a/xml/vtoolrecord.h +++ b/xml/vtoolrecord.h @@ -29,20 +29,65 @@ #ifndef VTOOLRECORD_H #define VTOOLRECORD_H +/** + * @brief The VToolRecord class + */ class VToolRecord { public: + /** + * @brief VToolRecord + */ VToolRecord(); + /** + * @brief VToolRecord + * @param id + * @param typeTool + * @param nameDraw + */ VToolRecord(const qint64 &id, const Tool::Tools &typeTool, const QString &nameDraw); + /** + * @brief getId + * @return + */ inline qint64 getId() const {return id;} + /** + * @brief setId + * @param value + */ inline void setId(const qint64 &value) {id = value;} + /** + * @brief getTypeTool + * @return + */ inline Tool::Tools getTypeTool() const {return typeTool;} + /** + * @brief setTypeTool + * @param value + */ inline void setTypeTool(const Tool::Tools &value) {typeTool = value;} + /** + * @brief getNameDraw + * @return + */ inline QString getNameDraw() const {return nameDraw;} + /** + * @brief setNameDraw + * @param value + */ inline void setNameDraw(const QString &value) {nameDraw = value;} private: + /** + * @brief id + */ qint64 id; + /** + * @brief typeTool + */ Tool::Tools typeTool; + /** + * @brief nameDraw + */ QString nameDraw; }; From 092417e6d84b784acd08cef17269e5a13646f82f Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 20 Nov 2013 13:27:21 +0200 Subject: [PATCH 32/56] Documentation for exceptions. --HG-- branch : feature --- exception/vexception.h | 30 ++++++++-------- exception/vexceptionbadid.h | 34 +++++++++--------- exception/vexceptionconversionerror.h | 22 ++++++------ exception/vexceptionemptyparameter.h | 46 ++++++++++++------------ exception/vexceptionobjecterror.h | 48 +++++++++++++------------- exception/vexceptionuniqueid.h | 38 ++++++++++---------- exception/vexceptionwrongparameterid.h | 38 ++++++++++---------- 7 files changed, 128 insertions(+), 128 deletions(-) diff --git a/exception/vexception.h b/exception/vexception.h index 1e8e355b6..50be5067e 100644 --- a/exception/vexception.h +++ b/exception/vexception.h @@ -33,49 +33,49 @@ #include /** - * @brief The VException class + * @brief The VException class parent for all exception. Could be use for abstract exception */ class VException : public QException { public: /** - * @brief VException - * @param what + * @brief VException constructor exception + * @param what string with error */ VException(const QString &what); /** - * @brief VException - * @param e + * @brief VException copy constructor + * @param e exception */ VException(const VException &e):what(e.What()){} virtual ~VException() Q_DECL_NOEXCEPT_EXPR(true){} /** - * @brief raise + * @brief raise method raise for exception */ inline void raise() const { throw *this; } /** - * @brief clone - * @return + * @brief clone clone exception + * @return new exception */ inline VException *clone() const { return new VException(*this); } /** - * @brief ErrorMessage - * @return + * @brief ErrorMessage return main error message + * @return error message */ virtual QString ErrorMessage() const; /** - * @brief DetailedInformation - * @return + * @brief DetailedInformation return detailed information about error + * @return detailed information */ virtual QString DetailedInformation() const { return QString(); } /** - * @brief What - * @return + * @brief What return string with error + * @return string with error */ inline QString What() const {return what;} protected: /** - * @brief what + * @brief what string with error */ QString what; }; diff --git a/exception/vexceptionbadid.h b/exception/vexceptionbadid.h index 356ca02f3..7facb2bc6 100644 --- a/exception/vexceptionbadid.h +++ b/exception/vexceptionbadid.h @@ -32,54 +32,54 @@ #include "vexception.h" /** - * @brief The VExceptionBadId class + * @brief The VExceptionBadId class for exception bad id */ class VExceptionBadId : public VException { public: /** - * @brief VExceptionBadId - * @param what - * @param id + * @brief VExceptionBadId exception bad id + * @param what string with error + * @param id id */ VExceptionBadId(const QString &what, const qint64 &id) :VException(what), id(id), key(QString()){} /** - * @brief VExceptionBadId - * @param what - * @param key + * @brief VExceptionBadId exception bad id + * @param what string with error + * @param key string key */ VExceptionBadId(const QString &what, const QString &key) :VException(what), id(0), key(key){} /** - * @brief VExceptionBadId - * @param e + * @brief VExceptionBadId copy constructor + * @param e exception */ VExceptionBadId(const VExceptionBadId &e) :VException(e), id(e.BadId()), key(e.BadKey()){} virtual ~VExceptionBadId() Q_DECL_NOEXCEPT_EXPR(true){} /** - * @brief ErrorMessage - * @return + * @brief ErrorMessage return main error message + * @return main error message */ virtual QString ErrorMessage() const; /** - * @brief BadId - * @return + * @brief BadId return bad id + * @return id */ inline qint64 BadId() const {return id; } /** - * @brief BadKey - * @return + * @brief BadKey return bad key + * @return key */ inline QString BadKey() const {return key; } protected: /** - * @brief id + * @brief id id */ qint64 id; /** - * @brief key + * @brief key key */ QString key; }; diff --git a/exception/vexceptionconversionerror.h b/exception/vexceptionconversionerror.h index 53678f4c1..6af726bf1 100644 --- a/exception/vexceptionconversionerror.h +++ b/exception/vexceptionconversionerror.h @@ -32,37 +32,37 @@ #include "vexception.h" /** - * @brief The VExceptionConversionError class + * @brief The VExceptionConversionError class for exception of conversion error */ class VExceptionConversionError : public VException { public: /** - * @brief VExceptionConversionError - * @param what - * @param str + * @brief VExceptionConversionError exception conversion error + * @param what string with error + * @param str string, where happend error */ VExceptionConversionError(const QString &what, const QString &str); /** - * @brief VExceptionConversionError - * @param e + * @brief VExceptionConversionError copy constructor + * @param e exception */ VExceptionConversionError(const VExceptionConversionError &e) :VException(e), str(e.String()){} virtual ~VExceptionConversionError() Q_DECL_NOEXCEPT_EXPR(true) {} /** - * @brief ErrorMessage - * @return + * @brief ErrorMessage return main error message + * @return main error message */ virtual QString ErrorMessage() const; /** - * @brief String - * @return + * @brief String return string, where happend error + * @return string */ inline QString String() const {return str;} protected: /** - * @brief str + * @brief str string, where happend error */ QString str; }; diff --git a/exception/vexceptionemptyparameter.h b/exception/vexceptionemptyparameter.h index bcdb5b296..042c89e40 100644 --- a/exception/vexceptionemptyparameter.h +++ b/exception/vexceptionemptyparameter.h @@ -32,71 +32,71 @@ #include "vexception.h" /** - * @brief The VExceptionEmptyParameter class + * @brief The VExceptionEmptyParameter class for exception empty parameter */ class VExceptionEmptyParameter : public VException { public: /** - * @brief VExceptionEmptyParameter - * @param what - * @param name - * @param domElement + * @brief VExceptionEmptyParameter exception empty parameter + * @param what string with error + * @param name name of attribute where error + * @param domElement dom element */ VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement); /** - * @brief VExceptionEmptyParameter - * @param e + * @brief VExceptionEmptyParameter copy constructor + * @param e exception */ VExceptionEmptyParameter(const VExceptionEmptyParameter &e) :VException(e), name(e.Name()), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionEmptyParameter() Q_DECL_NOEXCEPT_EXPR(true) {} /** - * @brief ErrorMessage - * @return + * @brief ErrorMessage return main error message + * @return main error message */ virtual QString ErrorMessage() const; /** - * @brief DetailedInformation - * @return + * @brief DetailedInformation return detailed information about error + * @return detailed information */ virtual QString DetailedInformation() const; /** - * @brief Name - * @return + * @brief Name return name of attribute where error + * @return name */ inline QString Name() const {return name;} /** - * @brief TagText - * @return + * @brief TagText return tag text + * @return tag text */ inline QString TagText() const {return tagText;} /** - * @brief TagName - * @return + * @brief TagName return tag name + * @return tag name */ inline QString TagName() const {return tagName;} /** - * @brief LineNumber - * @return + * @brief LineNumber return line number of tag + * @return line number */ inline qint32 LineNumber() const {return lineNumber;} protected: /** - * @brief name + * @brief name name attribute */ QString name; /** - * @brief tagText + * @brief tagText tag text */ QString tagText; /** - * @brief tagName + * @brief tagName tag name */ QString tagName; /** - * @brief lineNumber + * @brief lineNumber line number */ qint32 lineNumber; }; diff --git a/exception/vexceptionobjecterror.h b/exception/vexceptionobjecterror.h index 620f4d189..d1315596e 100644 --- a/exception/vexceptionobjecterror.h +++ b/exception/vexceptionobjecterror.h @@ -32,75 +32,75 @@ #include "vexception.h" /** - * @brief The VExceptionObjectError class + * @brief The VExceptionObjectError class for exception object error */ class VExceptionObjectError : public VException { public: /** - * @brief VExceptionObjectError - * @param what - * @param domElement + * @brief VExceptionObjectError exception object error + * @param what string with error + * @param domElement dom element */ VExceptionObjectError(const QString &what, const QDomElement &domElement); /** - * @brief VExceptionObjectError - * @param e + * @brief VExceptionObjectError copy constructor + * @param e exception */ VExceptionObjectError(const VExceptionObjectError &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()), moreInfo(e.MoreInformation()){} virtual ~VExceptionObjectError() Q_DECL_NOEXCEPT_EXPR(true) {} /** - * @brief ErrorMessage - * @return + * @brief ErrorMessage return main error message + * @return main error message */ virtual QString ErrorMessage() const; /** - * @brief DetailedInformation - * @return + * @brief DetailedInformation return detailed information about error + * @return detailed information */ virtual QString DetailedInformation() const; /** - * @brief TagText - * @return + * @brief TagText return tag text + * @return tag text */ inline QString TagText() const {return tagText;} /** - * @brief TagName - * @return + * @brief TagName return tag name + * @return tag name */ inline QString TagName() const {return tagName;} /** - * @brief LineNumber - * @return + * @brief LineNumber return line number in file + * @return line number */ inline qint32 LineNumber() const {return lineNumber;} /** - * @brief AddMoreInformation - * @param info + * @brief AddMoreInformation add more information for error + * @param info information */ void AddMoreInformation(const QString &info); /** - * @brief MoreInformation - * @return + * @brief MoreInformation return more information for error + * @return information */ inline QString MoreInformation() const {return moreInfo;} protected: /** - * @brief tagText + * @brief tagText tag text */ QString tagText; /** - * @brief tagName + * @brief tagName tag name */ QString tagName; /** - * @brief lineNumber + * @brief lineNumber line number */ qint32 lineNumber; /** - * @brief moreInfo + * @brief moreInfo more information about error */ QString moreInfo; }; diff --git a/exception/vexceptionuniqueid.h b/exception/vexceptionuniqueid.h index 397935954..a1bb053ce 100644 --- a/exception/vexceptionuniqueid.h +++ b/exception/vexceptionuniqueid.h @@ -32,60 +32,60 @@ #include "vexception.h" /** - * @brief The VExceptionUniqueId class + * @brief The VExceptionUniqueId class for exception unique id */ class VExceptionUniqueId : public VException { public: /** - * @brief VExceptionUniqueId - * @param what - * @param domElement + * @brief VExceptionUniqueId exception unique id + * @param what string with error + * @param domElement dom element */ VExceptionUniqueId(const QString &what, const QDomElement &domElement); /** - * @brief VExceptionUniqueId - * @param e + * @brief VExceptionUniqueId copy constructor + * @param e exception */ VExceptionUniqueId(const VExceptionUniqueId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionUniqueId() Q_DECL_NOEXCEPT_EXPR(true){} /** - * @brief ErrorMessage - * @return + * @brief ErrorMessage return main error message + * @return main error message */ virtual QString ErrorMessage() const; /** - * @brief DetailedInformation - * @return + * @brief DetailedInformation return detailed information about error + * @return detailed information */ virtual QString DetailedInformation() const; /** - * @brief TagText - * @return + * @brief TagText return tag text + * @return tag text */ inline QString TagText() const {return tagText;} /** - * @brief TagName - * @return + * @brief TagName return tag name + * @return tag name */ inline QString TagName() const {return tagName;} /** - * @brief LineNumber - * @return + * @brief LineNumber return line number in file + * @return line number */ inline qint32 LineNumber() const {return lineNumber;} protected: /** - * @brief tagText + * @brief tagText tag text */ QString tagText; /** - * @brief tagName + * @brief tagName tag name */ QString tagName; /** - * @brief lineNumber + * @brief lineNumber line number */ qint32 lineNumber; }; diff --git a/exception/vexceptionwrongparameterid.h b/exception/vexceptionwrongparameterid.h index 726785a56..0f9d55383 100644 --- a/exception/vexceptionwrongparameterid.h +++ b/exception/vexceptionwrongparameterid.h @@ -32,60 +32,60 @@ #include "vexception.h" /** - * @brief The VExceptionWrongParameterId class + * @brief The VExceptionWrongParameterId class for exception wrong parameter id */ class VExceptionWrongParameterId : public VException { public: /** - * @brief VExceptionWrongParameterId - * @param what - * @param domElement + * @brief VExceptionWrongParameterId exception wrong parameter id + * @param what string with error + * @param domElement som element */ VExceptionWrongParameterId(const QString &what, const QDomElement &domElement); /** - * @brief VExceptionWrongParameterId - * @param e + * @brief VExceptionWrongParameterId copy constructor + * @param e exception */ VExceptionWrongParameterId(const VExceptionWrongParameterId &e) :VException(e), tagText(e.TagText()), tagName(e.TagName()), lineNumber(e.LineNumber()){} virtual ~VExceptionWrongParameterId() Q_DECL_NOEXCEPT_EXPR(true){} /** - * @brief ErrorMessage - * @return + * @brief ErrorMessage return main error message + * @return main error message */ virtual QString ErrorMessage() const; /** - * @brief DetailedInformation - * @return + * @brief DetailedInformation return detailed information about error + * @return detailed information */ virtual QString DetailedInformation() const; /** - * @brief TagText - * @return + * @brief TagText return tag text + * @return tag text */ inline QString TagText() const {return tagText;} /** - * @brief TagName - * @return + * @brief TagName return tag name + * @return tag name */ inline QString TagName() const {return tagName;} /** - * @brief LineNumber - * @return + * @brief LineNumber return line number in file + * @return line number */ inline qint32 LineNumber() const {return lineNumber;} protected: /** - * @brief tagText + * @brief tagText tag text */ QString tagText; /** - * @brief tagName + * @brief tagName tag name */ QString tagName; /** - * @brief lineNumber + * @brief lineNumber line number */ qint32 lineNumber; }; From cb851f4426eebc0af135b780f93b8351cac78372 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 20 Nov 2013 14:43:48 +0200 Subject: [PATCH 33/56] New structure. --HG-- branch : feature --- Valentina.pro | 50 +++++----- container/container.pri | 13 --- dialogs/dialogs.pri | 62 ------------ {docs => doc/doxygen}/Doxyfile | 0 exception/exception.pri | 17 ---- geometry/geometry.pri | 15 --- cursor.qrc => share/resources/cursor.qrc | 0 .../resources/cursor}/alongline_cursor.png | Bin .../resources/cursor}/arc_cursor.png | Bin .../resources/cursor}/bisector_cursor.png | Bin .../resources/cursor}/endline_cursor.png | Bin .../resources/cursor}/height_cursor.png | Bin .../resources/cursor}/intersect_cursor.png | Bin .../resources/cursor}/line_cursor.png | Bin .../resources/cursor}/new_detail_cursor.png | Bin .../resources/cursor}/normal_cursor.png | Bin .../resources/cursor}/pointcontact_cursor.png | Bin .../cursor}/pointofintersect_cursor.png | Bin .../resources/cursor}/shoulder_cursor.png | Bin .../resources/cursor}/spline_cursor.png | Bin .../resources/cursor}/splinepath_cursor.png | Bin .../resources/cursor}/triangle_cursor.png | Bin icon.qrc => share/resources/icon.qrc | 0 .../resources/icon}/16x16/mirror.png | Bin .../resources/icon}/24x24/arrowDown.png | Bin .../resources/icon}/24x24/arrowLeft.png | Bin .../resources/icon}/24x24/arrowLeftDown.png | Bin .../resources/icon}/24x24/arrowLeftUp.png | Bin .../resources/icon}/24x24/arrowRight.png | Bin .../resources/icon}/24x24/arrowRightDown.png | Bin .../resources/icon}/24x24/arrowRightUp.png | Bin .../resources/icon}/24x24/arrowUp.png | Bin .../resources/icon}/24x24/equal.png | Bin .../resources/icon}/24x24/putHere.png | Bin .../resources/icon}/24x24/putHereLeft.png | Bin .../resources/icon}/32x32/along_line.png | Bin {icon => share/resources/icon}/32x32/arc.png | Bin .../resources/icon}/32x32/arrow_cursor.png | Bin .../resources/icon}/32x32/bisector.png | Bin {icon => share/resources/icon}/32x32/draw.png | Bin .../resources/icon}/32x32/height.png | Bin .../resources/icon}/32x32/history.png | Bin .../resources/icon}/32x32/intersect.png | Bin .../resources/icon}/32x32/kontur.png | Bin .../resources/icon}/32x32/layout.png | Bin {icon => share/resources/icon}/32x32/line.png | Bin .../resources/icon}/32x32/new_detail.png | Bin .../resources/icon}/32x32/new_draw.png | Bin .../resources/icon}/32x32/normal.png | Bin .../resources/icon}/32x32/option_draw.png | Bin .../icon}/32x32/point_of_contact.png | Bin .../icon}/32x32/point_of_intersection.png | Bin .../resources/icon}/32x32/put_after.png | Bin .../resources/icon}/32x32/segment.png | Bin .../resources/icon}/32x32/shoulder.png | Bin .../resources/icon}/32x32/spline.png | Bin .../resources/icon}/32x32/splinePath.png | Bin .../resources/icon}/32x32/table.png | Bin .../resources/icon}/32x32/triangle.png | Bin .../resources/icon}/64x64/icon64x64.png | Bin .../translations}/valentina_ru.ts | 0 .../translations}/valentina_uk.ts | 0 {container => src/container}/calculator.cpp | 0 {container => src/container}/calculator.h | 0 src/container/container.pri | 13 +++ {container => src/container}/vcontainer.cpp | 0 {container => src/container}/vcontainer.h | 0 .../container}/vincrementtablerow.cpp | 0 .../container}/vincrementtablerow.h | 0 {container => src/container}/vpointf.cpp | 0 {container => src/container}/vpointf.h | 0 .../container}/vstandarttablerow.cpp | 0 .../container}/vstandarttablerow.h | 0 {dialogs => src/dialogs}/dialogalongline.cpp | 0 {dialogs => src/dialogs}/dialogalongline.h | 0 {dialogs => src/dialogs}/dialogalongline.ui | 0 {dialogs => src/dialogs}/dialogarc.cpp | 0 {dialogs => src/dialogs}/dialogarc.h | 0 {dialogs => src/dialogs}/dialogarc.ui | 0 {dialogs => src/dialogs}/dialogbisector.cpp | 0 {dialogs => src/dialogs}/dialogbisector.h | 0 {dialogs => src/dialogs}/dialogbisector.ui | 0 {dialogs => src/dialogs}/dialogdetail.cpp | 0 {dialogs => src/dialogs}/dialogdetail.h | 0 {dialogs => src/dialogs}/dialogdetail.ui | 0 {dialogs => src/dialogs}/dialogendline.cpp | 0 {dialogs => src/dialogs}/dialogendline.h | 0 {dialogs => src/dialogs}/dialogendline.ui | 0 {dialogs => src/dialogs}/dialogheight.cpp | 0 {dialogs => src/dialogs}/dialogheight.h | 0 {dialogs => src/dialogs}/dialogheight.ui | 0 {dialogs => src/dialogs}/dialoghistory.cpp | 0 {dialogs => src/dialogs}/dialoghistory.h | 0 {dialogs => src/dialogs}/dialoghistory.ui | 0 {dialogs => src/dialogs}/dialogincrements.cpp | 0 {dialogs => src/dialogs}/dialogincrements.h | 0 {dialogs => src/dialogs}/dialogincrements.ui | 0 {dialogs => src/dialogs}/dialogline.cpp | 0 {dialogs => src/dialogs}/dialogline.h | 0 {dialogs => src/dialogs}/dialogline.ui | 0 .../dialogs}/dialoglineintersect.cpp | 0 .../dialogs}/dialoglineintersect.h | 0 .../dialogs}/dialoglineintersect.ui | 0 {dialogs => src/dialogs}/dialognormal.cpp | 0 {dialogs => src/dialogs}/dialognormal.h | 0 {dialogs => src/dialogs}/dialognormal.ui | 0 .../dialogs}/dialogpointofcontact.cpp | 0 .../dialogs}/dialogpointofcontact.h | 0 .../dialogs}/dialogpointofcontact.ui | 0 .../dialogs}/dialogpointofintersection.cpp | 0 .../dialogs}/dialogpointofintersection.h | 0 .../dialogs}/dialogpointofintersection.ui | 0 {dialogs => src/dialogs}/dialogs.h | 0 src/dialogs/dialogs.pri | 62 ++++++++++++ .../dialogs}/dialogshoulderpoint.cpp | 0 .../dialogs}/dialogshoulderpoint.h | 0 .../dialogs}/dialogshoulderpoint.ui | 0 .../dialogs}/dialogsinglepoint.cpp | 0 {dialogs => src/dialogs}/dialogsinglepoint.h | 0 {dialogs => src/dialogs}/dialogsinglepoint.ui | 0 {dialogs => src/dialogs}/dialogspline.cpp | 0 {dialogs => src/dialogs}/dialogspline.h | 0 {dialogs => src/dialogs}/dialogspline.ui | 0 {dialogs => src/dialogs}/dialogsplinepath.cpp | 0 {dialogs => src/dialogs}/dialogsplinepath.h | 0 {dialogs => src/dialogs}/dialogsplinepath.ui | 0 {dialogs => src/dialogs}/dialogtool.cpp | 0 {dialogs => src/dialogs}/dialogtool.h | 0 {dialogs => src/dialogs}/dialogtriangle.cpp | 0 {dialogs => src/dialogs}/dialogtriangle.h | 0 {dialogs => src/dialogs}/dialogtriangle.ui | 0 src/exception/exception.pri | 17 ++++ {exception => src/exception}/vexception.cpp | 0 {exception => src/exception}/vexception.h | 0 .../exception}/vexceptionbadid.cpp | 0 .../exception}/vexceptionbadid.h | 0 .../exception}/vexceptionconversionerror.cpp | 0 .../exception}/vexceptionconversionerror.h | 0 .../exception}/vexceptionemptyparameter.cpp | 0 .../exception}/vexceptionemptyparameter.h | 0 .../exception}/vexceptionobjecterror.cpp | 0 .../exception}/vexceptionobjecterror.h | 0 .../exception}/vexceptionuniqueid.cpp | 0 .../exception}/vexceptionuniqueid.h | 0 .../exception}/vexceptionwrongparameterid.cpp | 0 .../exception}/vexceptionwrongparameterid.h | 0 src/geometry/geometry.pri | 15 +++ {geometry => src/geometry}/varc.cpp | 0 {geometry => src/geometry}/varc.h | 0 {geometry => src/geometry}/vdetail.cpp | 0 {geometry => src/geometry}/vdetail.h | 0 {geometry => src/geometry}/vnodedetail.cpp | 0 {geometry => src/geometry}/vnodedetail.h | 0 {geometry => src/geometry}/vspline.cpp | 0 {geometry => src/geometry}/vspline.h | 0 {geometry => src/geometry}/vsplinepath.cpp | 0 {geometry => src/geometry}/vsplinepath.h | 0 {geometry => src/geometry}/vsplinepoint.cpp | 0 {geometry => src/geometry}/vsplinepoint.h | 0 main.cpp => src/main.cpp | 0 mainwindow.cpp => src/mainwindow.cpp | 0 mainwindow.h => src/mainwindow.h | 0 mainwindow.ui => src/mainwindow.ui | 0 options.h => src/options.h | 0 stable.cpp => src/stable.cpp | 0 stable.h => src/stable.h | 0 tablewindow.cpp => src/tablewindow.cpp | 0 tablewindow.h => src/tablewindow.h | 0 tablewindow.ui => src/tablewindow.ui | 0 {tools => src/tools}/drawTools/drawtools.h | 0 {tools => src/tools}/drawTools/vdrawtool.cpp | 0 {tools => src/tools}/drawTools/vdrawtool.h | 0 .../tools}/drawTools/vtoolalongline.cpp | 0 .../tools}/drawTools/vtoolalongline.h | 0 {tools => src/tools}/drawTools/vtoolarc.cpp | 0 {tools => src/tools}/drawTools/vtoolarc.h | 0 .../tools}/drawTools/vtoolbisector.cpp | 0 .../tools}/drawTools/vtoolbisector.h | 0 .../tools}/drawTools/vtoolendline.cpp | 0 {tools => src/tools}/drawTools/vtoolendline.h | 0 .../tools}/drawTools/vtoolheight.cpp | 0 {tools => src/tools}/drawTools/vtoolheight.h | 0 {tools => src/tools}/drawTools/vtoolline.cpp | 0 {tools => src/tools}/drawTools/vtoolline.h | 0 .../tools}/drawTools/vtoollineintersect.cpp | 0 .../tools}/drawTools/vtoollineintersect.h | 0 .../tools}/drawTools/vtoollinepoint.cpp | 0 .../tools}/drawTools/vtoollinepoint.h | 0 .../tools}/drawTools/vtoolnormal.cpp | 0 {tools => src/tools}/drawTools/vtoolnormal.h | 0 {tools => src/tools}/drawTools/vtoolpoint.cpp | 0 {tools => src/tools}/drawTools/vtoolpoint.h | 0 .../tools}/drawTools/vtoolpointofcontact.cpp | 0 .../tools}/drawTools/vtoolpointofcontact.h | 0 .../drawTools/vtoolpointofintersection.cpp | 0 .../drawTools/vtoolpointofintersection.h | 0 .../tools}/drawTools/vtoolshoulderpoint.cpp | 0 .../tools}/drawTools/vtoolshoulderpoint.h | 0 .../tools}/drawTools/vtoolsinglepoint.cpp | 0 .../tools}/drawTools/vtoolsinglepoint.h | 0 .../tools}/drawTools/vtoolspline.cpp | 0 {tools => src/tools}/drawTools/vtoolspline.h | 0 .../tools}/drawTools/vtoolsplinepath.cpp | 0 .../tools}/drawTools/vtoolsplinepath.h | 0 .../tools}/drawTools/vtooltriangle.cpp | 0 .../tools}/drawTools/vtooltriangle.h | 0 .../tools}/modelingTools/modelingtools.h | 0 .../modelingTools/vmodelingalongline.cpp | 0 .../tools}/modelingTools/vmodelingalongline.h | 0 .../tools}/modelingTools/vmodelingarc.cpp | 0 .../tools}/modelingTools/vmodelingarc.h | 0 .../modelingTools/vmodelingbisector.cpp | 0 .../tools}/modelingTools/vmodelingbisector.h | 0 .../tools}/modelingTools/vmodelingendline.cpp | 0 .../tools}/modelingTools/vmodelingendline.h | 0 .../tools}/modelingTools/vmodelingheight.cpp | 0 .../tools}/modelingTools/vmodelingheight.h | 0 .../tools}/modelingTools/vmodelingline.cpp | 0 .../tools}/modelingTools/vmodelingline.h | 0 .../modelingTools/vmodelinglineintersect.cpp | 0 .../modelingTools/vmodelinglineintersect.h | 0 .../modelingTools/vmodelinglinepoint.cpp | 0 .../tools}/modelingTools/vmodelinglinepoint.h | 0 .../tools}/modelingTools/vmodelingnormal.cpp | 0 .../tools}/modelingTools/vmodelingnormal.h | 0 .../tools}/modelingTools/vmodelingpoint.cpp | 0 .../tools}/modelingTools/vmodelingpoint.h | 0 .../modelingTools/vmodelingpointofcontact.cpp | 0 .../modelingTools/vmodelingpointofcontact.h | 0 .../vmodelingpointofintersection.cpp | 0 .../vmodelingpointofintersection.h | 0 .../modelingTools/vmodelingshoulderpoint.cpp | 0 .../modelingTools/vmodelingshoulderpoint.h | 0 .../tools}/modelingTools/vmodelingspline.cpp | 0 .../tools}/modelingTools/vmodelingspline.h | 0 .../modelingTools/vmodelingsplinepath.cpp | 0 .../modelingTools/vmodelingsplinepath.h | 0 .../tools}/modelingTools/vmodelingtool.cpp | 0 .../tools}/modelingTools/vmodelingtool.h | 0 .../modelingTools/vmodelingtriangle.cpp | 0 .../tools}/modelingTools/vmodelingtriangle.h | 0 .../tools}/nodeDetails/nodedetails.h | 0 .../tools}/nodeDetails/vabstractnode.cpp | 0 .../tools}/nodeDetails/vabstractnode.h | 0 {tools => src/tools}/nodeDetails/vnodearc.cpp | 0 {tools => src/tools}/nodeDetails/vnodearc.h | 0 .../tools}/nodeDetails/vnodepoint.cpp | 0 {tools => src/tools}/nodeDetails/vnodepoint.h | 0 .../tools}/nodeDetails/vnodespline.cpp | 0 .../tools}/nodeDetails/vnodespline.h | 0 .../tools}/nodeDetails/vnodesplinepath.cpp | 0 .../tools}/nodeDetails/vnodesplinepath.h | 0 {tools => src/tools}/tools.h | 0 src/tools/tools.pri | 93 ++++++++++++++++++ {tools => src/tools}/vabstracttool.cpp | 0 {tools => src/tools}/vabstracttool.h | 0 {tools => src/tools}/vdatatool.cpp | 0 {tools => src/tools}/vdatatool.h | 0 {tools => src/tools}/vtooldetail.cpp | 0 {tools => src/tools}/vtooldetail.h | 0 version.h => src/version.h | 0 {widgets => src/widgets}/doubledelegate.cpp | 0 {widgets => src/widgets}/doubledelegate.h | 0 {widgets => src/widgets}/vapplication.cpp | 0 {widgets => src/widgets}/vapplication.h | 0 .../widgets}/vcontrolpointspline.cpp | 0 .../widgets}/vcontrolpointspline.h | 0 .../widgets}/vgraphicssimpletextitem.cpp | 0 .../widgets}/vgraphicssimpletextitem.h | 0 {widgets => src/widgets}/vitem.cpp | 0 {widgets => src/widgets}/vitem.h | 0 .../widgets}/vmaingraphicsscene.cpp | 0 {widgets => src/widgets}/vmaingraphicsscene.h | 0 .../widgets}/vmaingraphicsview.cpp | 0 {widgets => src/widgets}/vmaingraphicsview.h | 0 .../widgets}/vtablegraphicsview.cpp | 0 {widgets => src/widgets}/vtablegraphicsview.h | 0 src/widgets/widgets.pri | 19 ++++ {xml => src/xml}/vdomdocument.cpp | 0 {xml => src/xml}/vdomdocument.h | 0 {xml => src/xml}/vtoolrecord.cpp | 0 {xml => src/xml}/vtoolrecord.h | 0 src/xml/xml.pri | 7 ++ tools/tools.pri | 93 ------------------ widgets/widgets.pri | 19 ---- xml/xml.pri | 7 -- 286 files changed, 251 insertions(+), 251 deletions(-) delete mode 100644 container/container.pri delete mode 100644 dialogs/dialogs.pri rename {docs => doc/doxygen}/Doxyfile (100%) delete mode 100644 exception/exception.pri delete mode 100644 geometry/geometry.pri rename cursor.qrc => share/resources/cursor.qrc (100%) rename {cursor => share/resources/cursor}/alongline_cursor.png (100%) rename {cursor => share/resources/cursor}/arc_cursor.png (100%) rename {cursor => share/resources/cursor}/bisector_cursor.png (100%) rename {cursor => share/resources/cursor}/endline_cursor.png (100%) rename {cursor => share/resources/cursor}/height_cursor.png (100%) rename {cursor => share/resources/cursor}/intersect_cursor.png (100%) rename {cursor => share/resources/cursor}/line_cursor.png (100%) rename {cursor => share/resources/cursor}/new_detail_cursor.png (100%) rename {cursor => share/resources/cursor}/normal_cursor.png (100%) rename {cursor => share/resources/cursor}/pointcontact_cursor.png (100%) rename {cursor => share/resources/cursor}/pointofintersect_cursor.png (100%) rename {cursor => share/resources/cursor}/shoulder_cursor.png (100%) rename {cursor => share/resources/cursor}/spline_cursor.png (100%) rename {cursor => share/resources/cursor}/splinepath_cursor.png (100%) rename {cursor => share/resources/cursor}/triangle_cursor.png (100%) rename icon.qrc => share/resources/icon.qrc (100%) rename {icon => share/resources/icon}/16x16/mirror.png (100%) rename {icon => share/resources/icon}/24x24/arrowDown.png (100%) rename {icon => share/resources/icon}/24x24/arrowLeft.png (100%) rename {icon => share/resources/icon}/24x24/arrowLeftDown.png (100%) rename {icon => share/resources/icon}/24x24/arrowLeftUp.png (100%) rename {icon => share/resources/icon}/24x24/arrowRight.png (100%) rename {icon => share/resources/icon}/24x24/arrowRightDown.png (100%) rename {icon => share/resources/icon}/24x24/arrowRightUp.png (100%) rename {icon => share/resources/icon}/24x24/arrowUp.png (100%) rename {icon => share/resources/icon}/24x24/equal.png (100%) rename {icon => share/resources/icon}/24x24/putHere.png (100%) rename {icon => share/resources/icon}/24x24/putHereLeft.png (100%) rename {icon => share/resources/icon}/32x32/along_line.png (100%) rename {icon => share/resources/icon}/32x32/arc.png (100%) rename {icon => share/resources/icon}/32x32/arrow_cursor.png (100%) rename {icon => share/resources/icon}/32x32/bisector.png (100%) rename {icon => share/resources/icon}/32x32/draw.png (100%) rename {icon => share/resources/icon}/32x32/height.png (100%) rename {icon => share/resources/icon}/32x32/history.png (100%) rename {icon => share/resources/icon}/32x32/intersect.png (100%) rename {icon => share/resources/icon}/32x32/kontur.png (100%) rename {icon => share/resources/icon}/32x32/layout.png (100%) rename {icon => share/resources/icon}/32x32/line.png (100%) rename {icon => share/resources/icon}/32x32/new_detail.png (100%) rename {icon => share/resources/icon}/32x32/new_draw.png (100%) rename {icon => share/resources/icon}/32x32/normal.png (100%) rename {icon => share/resources/icon}/32x32/option_draw.png (100%) rename {icon => share/resources/icon}/32x32/point_of_contact.png (100%) rename {icon => share/resources/icon}/32x32/point_of_intersection.png (100%) rename {icon => share/resources/icon}/32x32/put_after.png (100%) rename {icon => share/resources/icon}/32x32/segment.png (100%) rename {icon => share/resources/icon}/32x32/shoulder.png (100%) rename {icon => share/resources/icon}/32x32/spline.png (100%) rename {icon => share/resources/icon}/32x32/splinePath.png (100%) rename {icon => share/resources/icon}/32x32/table.png (100%) rename {icon => share/resources/icon}/32x32/triangle.png (100%) rename {icon => share/resources/icon}/64x64/icon64x64.png (100%) rename {translations => share/translations}/valentina_ru.ts (100%) rename {translations => share/translations}/valentina_uk.ts (100%) rename {container => src/container}/calculator.cpp (100%) rename {container => src/container}/calculator.h (100%) create mode 100644 src/container/container.pri rename {container => src/container}/vcontainer.cpp (100%) rename {container => src/container}/vcontainer.h (100%) rename {container => src/container}/vincrementtablerow.cpp (100%) rename {container => src/container}/vincrementtablerow.h (100%) rename {container => src/container}/vpointf.cpp (100%) rename {container => src/container}/vpointf.h (100%) rename {container => src/container}/vstandarttablerow.cpp (100%) rename {container => src/container}/vstandarttablerow.h (100%) rename {dialogs => src/dialogs}/dialogalongline.cpp (100%) rename {dialogs => src/dialogs}/dialogalongline.h (100%) rename {dialogs => src/dialogs}/dialogalongline.ui (100%) rename {dialogs => src/dialogs}/dialogarc.cpp (100%) rename {dialogs => src/dialogs}/dialogarc.h (100%) rename {dialogs => src/dialogs}/dialogarc.ui (100%) rename {dialogs => src/dialogs}/dialogbisector.cpp (100%) rename {dialogs => src/dialogs}/dialogbisector.h (100%) rename {dialogs => src/dialogs}/dialogbisector.ui (100%) rename {dialogs => src/dialogs}/dialogdetail.cpp (100%) rename {dialogs => src/dialogs}/dialogdetail.h (100%) rename {dialogs => src/dialogs}/dialogdetail.ui (100%) rename {dialogs => src/dialogs}/dialogendline.cpp (100%) rename {dialogs => src/dialogs}/dialogendline.h (100%) rename {dialogs => src/dialogs}/dialogendline.ui (100%) rename {dialogs => src/dialogs}/dialogheight.cpp (100%) rename {dialogs => src/dialogs}/dialogheight.h (100%) rename {dialogs => src/dialogs}/dialogheight.ui (100%) rename {dialogs => src/dialogs}/dialoghistory.cpp (100%) rename {dialogs => src/dialogs}/dialoghistory.h (100%) rename {dialogs => src/dialogs}/dialoghistory.ui (100%) rename {dialogs => src/dialogs}/dialogincrements.cpp (100%) rename {dialogs => src/dialogs}/dialogincrements.h (100%) rename {dialogs => src/dialogs}/dialogincrements.ui (100%) rename {dialogs => src/dialogs}/dialogline.cpp (100%) rename {dialogs => src/dialogs}/dialogline.h (100%) rename {dialogs => src/dialogs}/dialogline.ui (100%) rename {dialogs => src/dialogs}/dialoglineintersect.cpp (100%) rename {dialogs => src/dialogs}/dialoglineintersect.h (100%) rename {dialogs => src/dialogs}/dialoglineintersect.ui (100%) rename {dialogs => src/dialogs}/dialognormal.cpp (100%) rename {dialogs => src/dialogs}/dialognormal.h (100%) rename {dialogs => src/dialogs}/dialognormal.ui (100%) rename {dialogs => src/dialogs}/dialogpointofcontact.cpp (100%) rename {dialogs => src/dialogs}/dialogpointofcontact.h (100%) rename {dialogs => src/dialogs}/dialogpointofcontact.ui (100%) rename {dialogs => src/dialogs}/dialogpointofintersection.cpp (100%) rename {dialogs => src/dialogs}/dialogpointofintersection.h (100%) rename {dialogs => src/dialogs}/dialogpointofintersection.ui (100%) rename {dialogs => src/dialogs}/dialogs.h (100%) create mode 100644 src/dialogs/dialogs.pri rename {dialogs => src/dialogs}/dialogshoulderpoint.cpp (100%) rename {dialogs => src/dialogs}/dialogshoulderpoint.h (100%) rename {dialogs => src/dialogs}/dialogshoulderpoint.ui (100%) rename {dialogs => src/dialogs}/dialogsinglepoint.cpp (100%) rename {dialogs => src/dialogs}/dialogsinglepoint.h (100%) rename {dialogs => src/dialogs}/dialogsinglepoint.ui (100%) rename {dialogs => src/dialogs}/dialogspline.cpp (100%) rename {dialogs => src/dialogs}/dialogspline.h (100%) rename {dialogs => src/dialogs}/dialogspline.ui (100%) rename {dialogs => src/dialogs}/dialogsplinepath.cpp (100%) rename {dialogs => src/dialogs}/dialogsplinepath.h (100%) rename {dialogs => src/dialogs}/dialogsplinepath.ui (100%) rename {dialogs => src/dialogs}/dialogtool.cpp (100%) rename {dialogs => src/dialogs}/dialogtool.h (100%) rename {dialogs => src/dialogs}/dialogtriangle.cpp (100%) rename {dialogs => src/dialogs}/dialogtriangle.h (100%) rename {dialogs => src/dialogs}/dialogtriangle.ui (100%) create mode 100644 src/exception/exception.pri rename {exception => src/exception}/vexception.cpp (100%) rename {exception => src/exception}/vexception.h (100%) rename {exception => src/exception}/vexceptionbadid.cpp (100%) rename {exception => src/exception}/vexceptionbadid.h (100%) rename {exception => src/exception}/vexceptionconversionerror.cpp (100%) rename {exception => src/exception}/vexceptionconversionerror.h (100%) rename {exception => src/exception}/vexceptionemptyparameter.cpp (100%) rename {exception => src/exception}/vexceptionemptyparameter.h (100%) rename {exception => src/exception}/vexceptionobjecterror.cpp (100%) rename {exception => src/exception}/vexceptionobjecterror.h (100%) rename {exception => src/exception}/vexceptionuniqueid.cpp (100%) rename {exception => src/exception}/vexceptionuniqueid.h (100%) rename {exception => src/exception}/vexceptionwrongparameterid.cpp (100%) rename {exception => src/exception}/vexceptionwrongparameterid.h (100%) create mode 100644 src/geometry/geometry.pri rename {geometry => src/geometry}/varc.cpp (100%) rename {geometry => src/geometry}/varc.h (100%) rename {geometry => src/geometry}/vdetail.cpp (100%) rename {geometry => src/geometry}/vdetail.h (100%) rename {geometry => src/geometry}/vnodedetail.cpp (100%) rename {geometry => src/geometry}/vnodedetail.h (100%) rename {geometry => src/geometry}/vspline.cpp (100%) rename {geometry => src/geometry}/vspline.h (100%) rename {geometry => src/geometry}/vsplinepath.cpp (100%) rename {geometry => src/geometry}/vsplinepath.h (100%) rename {geometry => src/geometry}/vsplinepoint.cpp (100%) rename {geometry => src/geometry}/vsplinepoint.h (100%) rename main.cpp => src/main.cpp (100%) rename mainwindow.cpp => src/mainwindow.cpp (100%) rename mainwindow.h => src/mainwindow.h (100%) rename mainwindow.ui => src/mainwindow.ui (100%) rename options.h => src/options.h (100%) rename stable.cpp => src/stable.cpp (100%) rename stable.h => src/stable.h (100%) rename tablewindow.cpp => src/tablewindow.cpp (100%) rename tablewindow.h => src/tablewindow.h (100%) rename tablewindow.ui => src/tablewindow.ui (100%) rename {tools => src/tools}/drawTools/drawtools.h (100%) rename {tools => src/tools}/drawTools/vdrawtool.cpp (100%) rename {tools => src/tools}/drawTools/vdrawtool.h (100%) rename {tools => src/tools}/drawTools/vtoolalongline.cpp (100%) rename {tools => src/tools}/drawTools/vtoolalongline.h (100%) rename {tools => src/tools}/drawTools/vtoolarc.cpp (100%) rename {tools => src/tools}/drawTools/vtoolarc.h (100%) rename {tools => src/tools}/drawTools/vtoolbisector.cpp (100%) rename {tools => src/tools}/drawTools/vtoolbisector.h (100%) rename {tools => src/tools}/drawTools/vtoolendline.cpp (100%) rename {tools => src/tools}/drawTools/vtoolendline.h (100%) rename {tools => src/tools}/drawTools/vtoolheight.cpp (100%) rename {tools => src/tools}/drawTools/vtoolheight.h (100%) rename {tools => src/tools}/drawTools/vtoolline.cpp (100%) rename {tools => src/tools}/drawTools/vtoolline.h (100%) rename {tools => src/tools}/drawTools/vtoollineintersect.cpp (100%) rename {tools => src/tools}/drawTools/vtoollineintersect.h (100%) rename {tools => src/tools}/drawTools/vtoollinepoint.cpp (100%) rename {tools => src/tools}/drawTools/vtoollinepoint.h (100%) rename {tools => src/tools}/drawTools/vtoolnormal.cpp (100%) rename {tools => src/tools}/drawTools/vtoolnormal.h (100%) rename {tools => src/tools}/drawTools/vtoolpoint.cpp (100%) rename {tools => src/tools}/drawTools/vtoolpoint.h (100%) rename {tools => src/tools}/drawTools/vtoolpointofcontact.cpp (100%) rename {tools => src/tools}/drawTools/vtoolpointofcontact.h (100%) rename {tools => src/tools}/drawTools/vtoolpointofintersection.cpp (100%) rename {tools => src/tools}/drawTools/vtoolpointofintersection.h (100%) rename {tools => src/tools}/drawTools/vtoolshoulderpoint.cpp (100%) rename {tools => src/tools}/drawTools/vtoolshoulderpoint.h (100%) rename {tools => src/tools}/drawTools/vtoolsinglepoint.cpp (100%) rename {tools => src/tools}/drawTools/vtoolsinglepoint.h (100%) rename {tools => src/tools}/drawTools/vtoolspline.cpp (100%) rename {tools => src/tools}/drawTools/vtoolspline.h (100%) rename {tools => src/tools}/drawTools/vtoolsplinepath.cpp (100%) rename {tools => src/tools}/drawTools/vtoolsplinepath.h (100%) rename {tools => src/tools}/drawTools/vtooltriangle.cpp (100%) rename {tools => src/tools}/drawTools/vtooltriangle.h (100%) rename {tools => src/tools}/modelingTools/modelingtools.h (100%) rename {tools => src/tools}/modelingTools/vmodelingalongline.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingalongline.h (100%) rename {tools => src/tools}/modelingTools/vmodelingarc.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingarc.h (100%) rename {tools => src/tools}/modelingTools/vmodelingbisector.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingbisector.h (100%) rename {tools => src/tools}/modelingTools/vmodelingendline.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingendline.h (100%) rename {tools => src/tools}/modelingTools/vmodelingheight.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingheight.h (100%) rename {tools => src/tools}/modelingTools/vmodelingline.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingline.h (100%) rename {tools => src/tools}/modelingTools/vmodelinglineintersect.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelinglineintersect.h (100%) rename {tools => src/tools}/modelingTools/vmodelinglinepoint.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelinglinepoint.h (100%) rename {tools => src/tools}/modelingTools/vmodelingnormal.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingnormal.h (100%) rename {tools => src/tools}/modelingTools/vmodelingpoint.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingpoint.h (100%) rename {tools => src/tools}/modelingTools/vmodelingpointofcontact.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingpointofcontact.h (100%) rename {tools => src/tools}/modelingTools/vmodelingpointofintersection.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingpointofintersection.h (100%) rename {tools => src/tools}/modelingTools/vmodelingshoulderpoint.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingshoulderpoint.h (100%) rename {tools => src/tools}/modelingTools/vmodelingspline.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingspline.h (100%) rename {tools => src/tools}/modelingTools/vmodelingsplinepath.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingsplinepath.h (100%) rename {tools => src/tools}/modelingTools/vmodelingtool.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingtool.h (100%) rename {tools => src/tools}/modelingTools/vmodelingtriangle.cpp (100%) rename {tools => src/tools}/modelingTools/vmodelingtriangle.h (100%) rename {tools => src/tools}/nodeDetails/nodedetails.h (100%) rename {tools => src/tools}/nodeDetails/vabstractnode.cpp (100%) rename {tools => src/tools}/nodeDetails/vabstractnode.h (100%) rename {tools => src/tools}/nodeDetails/vnodearc.cpp (100%) rename {tools => src/tools}/nodeDetails/vnodearc.h (100%) rename {tools => src/tools}/nodeDetails/vnodepoint.cpp (100%) rename {tools => src/tools}/nodeDetails/vnodepoint.h (100%) rename {tools => src/tools}/nodeDetails/vnodespline.cpp (100%) rename {tools => src/tools}/nodeDetails/vnodespline.h (100%) rename {tools => src/tools}/nodeDetails/vnodesplinepath.cpp (100%) rename {tools => src/tools}/nodeDetails/vnodesplinepath.h (100%) rename {tools => src/tools}/tools.h (100%) create mode 100644 src/tools/tools.pri rename {tools => src/tools}/vabstracttool.cpp (100%) rename {tools => src/tools}/vabstracttool.h (100%) rename {tools => src/tools}/vdatatool.cpp (100%) rename {tools => src/tools}/vdatatool.h (100%) rename {tools => src/tools}/vtooldetail.cpp (100%) rename {tools => src/tools}/vtooldetail.h (100%) rename version.h => src/version.h (100%) rename {widgets => src/widgets}/doubledelegate.cpp (100%) rename {widgets => src/widgets}/doubledelegate.h (100%) rename {widgets => src/widgets}/vapplication.cpp (100%) rename {widgets => src/widgets}/vapplication.h (100%) rename {widgets => src/widgets}/vcontrolpointspline.cpp (100%) rename {widgets => src/widgets}/vcontrolpointspline.h (100%) rename {widgets => src/widgets}/vgraphicssimpletextitem.cpp (100%) rename {widgets => src/widgets}/vgraphicssimpletextitem.h (100%) rename {widgets => src/widgets}/vitem.cpp (100%) rename {widgets => src/widgets}/vitem.h (100%) rename {widgets => src/widgets}/vmaingraphicsscene.cpp (100%) rename {widgets => src/widgets}/vmaingraphicsscene.h (100%) rename {widgets => src/widgets}/vmaingraphicsview.cpp (100%) rename {widgets => src/widgets}/vmaingraphicsview.h (100%) rename {widgets => src/widgets}/vtablegraphicsview.cpp (100%) rename {widgets => src/widgets}/vtablegraphicsview.h (100%) create mode 100644 src/widgets/widgets.pri rename {xml => src/xml}/vdomdocument.cpp (100%) rename {xml => src/xml}/vdomdocument.h (100%) rename {xml => src/xml}/vtoolrecord.cpp (100%) rename {xml => src/xml}/vtoolrecord.h (100%) create mode 100644 src/xml/xml.pri delete mode 100644 tools/tools.pri delete mode 100644 widgets/widgets.pri delete mode 100644 xml/xml.pri diff --git a/Valentina.pro b/Valentina.pro index 15171136b..a12136129 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -19,9 +19,9 @@ CONFIG += c++11 precompile_header #DEFINES += ... # Precompiled headers (PCH) -PRECOMPILED_HEADER = stable.h +PRECOMPILED_HEADER = src/stable.h win32-msvc* { - PRECOMPILED_SOURCE = stable.cpp + PRECOMPILED_SOURCE = src/stable.cpp } # directory for executable file @@ -39,34 +39,34 @@ RCC_DIR = rcc # files created uic UI_DIR = uic -include(container/container.pri) -include(dialogs/dialogs.pri) -include(exception/exception.pri) -include(geometry/geometry.pri) -include(tools/tools.pri) -include(widgets/widgets.pri) -include(xml/xml.pri) +include(src/container/container.pri) +include(src/dialogs/dialogs.pri) +include(src/exception/exception.pri) +include(src/geometry/geometry.pri) +include(src/tools/tools.pri) +include(src/widgets/widgets.pri) +include(src/xml/xml.pri) -SOURCES += main.cpp\ - mainwindow.cpp \ - tablewindow.cpp \ - stable.cpp +SOURCES += src/main.cpp \ + src/mainwindow.cpp \ + src/tablewindow.cpp \ + src/stable.cpp -HEADERS += mainwindow.h \ - options.h \ - tablewindow.h \ - stable.h \ - version.h +HEADERS += src/mainwindow.h \ + src/options.h \ + src/tablewindow.h \ + src/stable.h \ + src/version.h -FORMS += mainwindow.ui \ - tablewindow.ui +FORMS += src/mainwindow.ui \ + src/tablewindow.ui RESOURCES += \ - icon.qrc \ - cursor.qrc + share/resources/icon.qrc \ + share/resources/cursor.qrc -TRANSLATIONS += translations/valentina_ru.ts \ - translations/valentina_uk.ts +TRANSLATIONS += share/translations/valentina_ru.ts \ + share/translations/valentina_uk.ts CONFIG(debug, debug|release){ # Debug @@ -80,7 +80,7 @@ CONFIG(debug, debug|release){ -Og -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \ -Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self \ -Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \ - -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k\ + -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k \ -Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-format-attribute \ -Wmissing-include-dirs -Wpacked -Wredundant-decls \ -Wswitch-default -Wswitch-enum -Wuninitialized -Wunused-parameter -Wvariadic-macros \ diff --git a/container/container.pri b/container/container.pri deleted file mode 100644 index 9cf0c82f3..000000000 --- a/container/container.pri +++ /dev/null @@ -1,13 +0,0 @@ -SOURCES += \ - container/vpointf.cpp \ - container/vincrementtablerow.cpp \ - container/vcontainer.cpp \ - container/calculator.cpp \ - container/vstandarttablerow.cpp - -HEADERS += \ - container/vpointf.h \ - container/vincrementtablerow.h \ - container/vcontainer.h \ - container/calculator.h \ - container/vstandarttablerow.h diff --git a/dialogs/dialogs.pri b/dialogs/dialogs.pri deleted file mode 100644 index 86876c1d2..000000000 --- a/dialogs/dialogs.pri +++ /dev/null @@ -1,62 +0,0 @@ -HEADERS += \ - dialogs/dialogtriangle.h \ - dialogs/dialogtool.h \ - dialogs/dialogsplinepath.h \ - dialogs/dialogspline.h \ - dialogs/dialogsinglepoint.h \ - dialogs/dialogshoulderpoint.h \ - dialogs/dialogs.h \ - dialogs/dialogpointofintersection.h \ - dialogs/dialogpointofcontact.h \ - dialogs/dialognormal.h \ - dialogs/dialoglineintersect.h \ - dialogs/dialogline.h \ - dialogs/dialogincrements.h \ - dialogs/dialoghistory.h \ - dialogs/dialogheight.h \ - dialogs/dialogendline.h \ - dialogs/dialogdetail.h \ - dialogs/dialogbisector.h \ - dialogs/dialogarc.h \ - dialogs/dialogalongline.h - -SOURCES += \ - dialogs/dialogtriangle.cpp \ - dialogs/dialogtool.cpp \ - dialogs/dialogsplinepath.cpp \ - dialogs/dialogspline.cpp \ - dialogs/dialogsinglepoint.cpp \ - dialogs/dialogshoulderpoint.cpp \ - dialogs/dialogpointofintersection.cpp \ - dialogs/dialogpointofcontact.cpp \ - dialogs/dialognormal.cpp \ - dialogs/dialoglineintersect.cpp \ - dialogs/dialogline.cpp \ - dialogs/dialogincrements.cpp \ - dialogs/dialoghistory.cpp \ - dialogs/dialogheight.cpp \ - dialogs/dialogendline.cpp \ - dialogs/dialogdetail.cpp \ - dialogs/dialogbisector.cpp \ - dialogs/dialogarc.cpp \ - dialogs/dialogalongline.cpp - -FORMS += \ - dialogs/dialogtriangle.ui \ - dialogs/dialogsplinepath.ui \ - dialogs/dialogspline.ui \ - dialogs/dialogsinglepoint.ui \ - dialogs/dialogshoulderpoint.ui \ - dialogs/dialogpointofintersection.ui \ - dialogs/dialogpointofcontact.ui \ - dialogs/dialognormal.ui \ - dialogs/dialoglineintersect.ui \ - dialogs/dialogline.ui \ - dialogs/dialogincrements.ui \ - dialogs/dialoghistory.ui \ - dialogs/dialogheight.ui \ - dialogs/dialogendline.ui \ - dialogs/dialogdetail.ui \ - dialogs/dialogbisector.ui \ - dialogs/dialogarc.ui \ - dialogs/dialogalongline.ui diff --git a/docs/Doxyfile b/doc/doxygen/Doxyfile similarity index 100% rename from docs/Doxyfile rename to doc/doxygen/Doxyfile diff --git a/exception/exception.pri b/exception/exception.pri deleted file mode 100644 index 4293f086b..000000000 --- a/exception/exception.pri +++ /dev/null @@ -1,17 +0,0 @@ -HEADERS += \ - exception/vexceptionwrongparameterid.h \ - exception/vexceptionuniqueid.h \ - exception/vexceptionobjecterror.h \ - exception/vexceptionemptyparameter.h \ - exception/vexceptionconversionerror.h \ - exception/vexceptionbadid.h \ - exception/vexception.h - -SOURCES += \ - exception/vexceptionwrongparameterid.cpp \ - exception/vexceptionuniqueid.cpp \ - exception/vexceptionobjecterror.cpp \ - exception/vexceptionemptyparameter.cpp \ - exception/vexceptionconversionerror.cpp \ - exception/vexceptionbadid.cpp \ - exception/vexception.cpp diff --git a/geometry/geometry.pri b/geometry/geometry.pri deleted file mode 100644 index 37d5100cc..000000000 --- a/geometry/geometry.pri +++ /dev/null @@ -1,15 +0,0 @@ -HEADERS += \ - geometry/vsplinepoint.h \ - geometry/vsplinepath.h \ - geometry/vspline.h \ - geometry/vnodedetail.h \ - geometry/vdetail.h \ - geometry/varc.h - -SOURCES += \ - geometry/vsplinepoint.cpp \ - geometry/vsplinepath.cpp \ - geometry/vspline.cpp \ - geometry/vnodedetail.cpp \ - geometry/vdetail.cpp \ - geometry/varc.cpp diff --git a/cursor.qrc b/share/resources/cursor.qrc similarity index 100% rename from cursor.qrc rename to share/resources/cursor.qrc diff --git a/cursor/alongline_cursor.png b/share/resources/cursor/alongline_cursor.png similarity index 100% rename from cursor/alongline_cursor.png rename to share/resources/cursor/alongline_cursor.png diff --git a/cursor/arc_cursor.png b/share/resources/cursor/arc_cursor.png similarity index 100% rename from cursor/arc_cursor.png rename to share/resources/cursor/arc_cursor.png diff --git a/cursor/bisector_cursor.png b/share/resources/cursor/bisector_cursor.png similarity index 100% rename from cursor/bisector_cursor.png rename to share/resources/cursor/bisector_cursor.png diff --git a/cursor/endline_cursor.png b/share/resources/cursor/endline_cursor.png similarity index 100% rename from cursor/endline_cursor.png rename to share/resources/cursor/endline_cursor.png diff --git a/cursor/height_cursor.png b/share/resources/cursor/height_cursor.png similarity index 100% rename from cursor/height_cursor.png rename to share/resources/cursor/height_cursor.png diff --git a/cursor/intersect_cursor.png b/share/resources/cursor/intersect_cursor.png similarity index 100% rename from cursor/intersect_cursor.png rename to share/resources/cursor/intersect_cursor.png diff --git a/cursor/line_cursor.png b/share/resources/cursor/line_cursor.png similarity index 100% rename from cursor/line_cursor.png rename to share/resources/cursor/line_cursor.png diff --git a/cursor/new_detail_cursor.png b/share/resources/cursor/new_detail_cursor.png similarity index 100% rename from cursor/new_detail_cursor.png rename to share/resources/cursor/new_detail_cursor.png diff --git a/cursor/normal_cursor.png b/share/resources/cursor/normal_cursor.png similarity index 100% rename from cursor/normal_cursor.png rename to share/resources/cursor/normal_cursor.png diff --git a/cursor/pointcontact_cursor.png b/share/resources/cursor/pointcontact_cursor.png similarity index 100% rename from cursor/pointcontact_cursor.png rename to share/resources/cursor/pointcontact_cursor.png diff --git a/cursor/pointofintersect_cursor.png b/share/resources/cursor/pointofintersect_cursor.png similarity index 100% rename from cursor/pointofintersect_cursor.png rename to share/resources/cursor/pointofintersect_cursor.png diff --git a/cursor/shoulder_cursor.png b/share/resources/cursor/shoulder_cursor.png similarity index 100% rename from cursor/shoulder_cursor.png rename to share/resources/cursor/shoulder_cursor.png diff --git a/cursor/spline_cursor.png b/share/resources/cursor/spline_cursor.png similarity index 100% rename from cursor/spline_cursor.png rename to share/resources/cursor/spline_cursor.png diff --git a/cursor/splinepath_cursor.png b/share/resources/cursor/splinepath_cursor.png similarity index 100% rename from cursor/splinepath_cursor.png rename to share/resources/cursor/splinepath_cursor.png diff --git a/cursor/triangle_cursor.png b/share/resources/cursor/triangle_cursor.png similarity index 100% rename from cursor/triangle_cursor.png rename to share/resources/cursor/triangle_cursor.png diff --git a/icon.qrc b/share/resources/icon.qrc similarity index 100% rename from icon.qrc rename to share/resources/icon.qrc diff --git a/icon/16x16/mirror.png b/share/resources/icon/16x16/mirror.png similarity index 100% rename from icon/16x16/mirror.png rename to share/resources/icon/16x16/mirror.png diff --git a/icon/24x24/arrowDown.png b/share/resources/icon/24x24/arrowDown.png similarity index 100% rename from icon/24x24/arrowDown.png rename to share/resources/icon/24x24/arrowDown.png diff --git a/icon/24x24/arrowLeft.png b/share/resources/icon/24x24/arrowLeft.png similarity index 100% rename from icon/24x24/arrowLeft.png rename to share/resources/icon/24x24/arrowLeft.png diff --git a/icon/24x24/arrowLeftDown.png b/share/resources/icon/24x24/arrowLeftDown.png similarity index 100% rename from icon/24x24/arrowLeftDown.png rename to share/resources/icon/24x24/arrowLeftDown.png diff --git a/icon/24x24/arrowLeftUp.png b/share/resources/icon/24x24/arrowLeftUp.png similarity index 100% rename from icon/24x24/arrowLeftUp.png rename to share/resources/icon/24x24/arrowLeftUp.png diff --git a/icon/24x24/arrowRight.png b/share/resources/icon/24x24/arrowRight.png similarity index 100% rename from icon/24x24/arrowRight.png rename to share/resources/icon/24x24/arrowRight.png diff --git a/icon/24x24/arrowRightDown.png b/share/resources/icon/24x24/arrowRightDown.png similarity index 100% rename from icon/24x24/arrowRightDown.png rename to share/resources/icon/24x24/arrowRightDown.png diff --git a/icon/24x24/arrowRightUp.png b/share/resources/icon/24x24/arrowRightUp.png similarity index 100% rename from icon/24x24/arrowRightUp.png rename to share/resources/icon/24x24/arrowRightUp.png diff --git a/icon/24x24/arrowUp.png b/share/resources/icon/24x24/arrowUp.png similarity index 100% rename from icon/24x24/arrowUp.png rename to share/resources/icon/24x24/arrowUp.png diff --git a/icon/24x24/equal.png b/share/resources/icon/24x24/equal.png similarity index 100% rename from icon/24x24/equal.png rename to share/resources/icon/24x24/equal.png diff --git a/icon/24x24/putHere.png b/share/resources/icon/24x24/putHere.png similarity index 100% rename from icon/24x24/putHere.png rename to share/resources/icon/24x24/putHere.png diff --git a/icon/24x24/putHereLeft.png b/share/resources/icon/24x24/putHereLeft.png similarity index 100% rename from icon/24x24/putHereLeft.png rename to share/resources/icon/24x24/putHereLeft.png diff --git a/icon/32x32/along_line.png b/share/resources/icon/32x32/along_line.png similarity index 100% rename from icon/32x32/along_line.png rename to share/resources/icon/32x32/along_line.png diff --git a/icon/32x32/arc.png b/share/resources/icon/32x32/arc.png similarity index 100% rename from icon/32x32/arc.png rename to share/resources/icon/32x32/arc.png diff --git a/icon/32x32/arrow_cursor.png b/share/resources/icon/32x32/arrow_cursor.png similarity index 100% rename from icon/32x32/arrow_cursor.png rename to share/resources/icon/32x32/arrow_cursor.png diff --git a/icon/32x32/bisector.png b/share/resources/icon/32x32/bisector.png similarity index 100% rename from icon/32x32/bisector.png rename to share/resources/icon/32x32/bisector.png diff --git a/icon/32x32/draw.png b/share/resources/icon/32x32/draw.png similarity index 100% rename from icon/32x32/draw.png rename to share/resources/icon/32x32/draw.png diff --git a/icon/32x32/height.png b/share/resources/icon/32x32/height.png similarity index 100% rename from icon/32x32/height.png rename to share/resources/icon/32x32/height.png diff --git a/icon/32x32/history.png b/share/resources/icon/32x32/history.png similarity index 100% rename from icon/32x32/history.png rename to share/resources/icon/32x32/history.png diff --git a/icon/32x32/intersect.png b/share/resources/icon/32x32/intersect.png similarity index 100% rename from icon/32x32/intersect.png rename to share/resources/icon/32x32/intersect.png diff --git a/icon/32x32/kontur.png b/share/resources/icon/32x32/kontur.png similarity index 100% rename from icon/32x32/kontur.png rename to share/resources/icon/32x32/kontur.png diff --git a/icon/32x32/layout.png b/share/resources/icon/32x32/layout.png similarity index 100% rename from icon/32x32/layout.png rename to share/resources/icon/32x32/layout.png diff --git a/icon/32x32/line.png b/share/resources/icon/32x32/line.png similarity index 100% rename from icon/32x32/line.png rename to share/resources/icon/32x32/line.png diff --git a/icon/32x32/new_detail.png b/share/resources/icon/32x32/new_detail.png similarity index 100% rename from icon/32x32/new_detail.png rename to share/resources/icon/32x32/new_detail.png diff --git a/icon/32x32/new_draw.png b/share/resources/icon/32x32/new_draw.png similarity index 100% rename from icon/32x32/new_draw.png rename to share/resources/icon/32x32/new_draw.png diff --git a/icon/32x32/normal.png b/share/resources/icon/32x32/normal.png similarity index 100% rename from icon/32x32/normal.png rename to share/resources/icon/32x32/normal.png diff --git a/icon/32x32/option_draw.png b/share/resources/icon/32x32/option_draw.png similarity index 100% rename from icon/32x32/option_draw.png rename to share/resources/icon/32x32/option_draw.png diff --git a/icon/32x32/point_of_contact.png b/share/resources/icon/32x32/point_of_contact.png similarity index 100% rename from icon/32x32/point_of_contact.png rename to share/resources/icon/32x32/point_of_contact.png diff --git a/icon/32x32/point_of_intersection.png b/share/resources/icon/32x32/point_of_intersection.png similarity index 100% rename from icon/32x32/point_of_intersection.png rename to share/resources/icon/32x32/point_of_intersection.png diff --git a/icon/32x32/put_after.png b/share/resources/icon/32x32/put_after.png similarity index 100% rename from icon/32x32/put_after.png rename to share/resources/icon/32x32/put_after.png diff --git a/icon/32x32/segment.png b/share/resources/icon/32x32/segment.png similarity index 100% rename from icon/32x32/segment.png rename to share/resources/icon/32x32/segment.png diff --git a/icon/32x32/shoulder.png b/share/resources/icon/32x32/shoulder.png similarity index 100% rename from icon/32x32/shoulder.png rename to share/resources/icon/32x32/shoulder.png diff --git a/icon/32x32/spline.png b/share/resources/icon/32x32/spline.png similarity index 100% rename from icon/32x32/spline.png rename to share/resources/icon/32x32/spline.png diff --git a/icon/32x32/splinePath.png b/share/resources/icon/32x32/splinePath.png similarity index 100% rename from icon/32x32/splinePath.png rename to share/resources/icon/32x32/splinePath.png diff --git a/icon/32x32/table.png b/share/resources/icon/32x32/table.png similarity index 100% rename from icon/32x32/table.png rename to share/resources/icon/32x32/table.png diff --git a/icon/32x32/triangle.png b/share/resources/icon/32x32/triangle.png similarity index 100% rename from icon/32x32/triangle.png rename to share/resources/icon/32x32/triangle.png diff --git a/icon/64x64/icon64x64.png b/share/resources/icon/64x64/icon64x64.png similarity index 100% rename from icon/64x64/icon64x64.png rename to share/resources/icon/64x64/icon64x64.png diff --git a/translations/valentina_ru.ts b/share/translations/valentina_ru.ts similarity index 100% rename from translations/valentina_ru.ts rename to share/translations/valentina_ru.ts diff --git a/translations/valentina_uk.ts b/share/translations/valentina_uk.ts similarity index 100% rename from translations/valentina_uk.ts rename to share/translations/valentina_uk.ts diff --git a/container/calculator.cpp b/src/container/calculator.cpp similarity index 100% rename from container/calculator.cpp rename to src/container/calculator.cpp diff --git a/container/calculator.h b/src/container/calculator.h similarity index 100% rename from container/calculator.h rename to src/container/calculator.h diff --git a/src/container/container.pri b/src/container/container.pri new file mode 100644 index 000000000..be62d71f1 --- /dev/null +++ b/src/container/container.pri @@ -0,0 +1,13 @@ +SOURCES += \ + src/container/vpointf.cpp \ + src/container/vincrementtablerow.cpp \ + src/container/vcontainer.cpp \ + src/container/calculator.cpp \ + src/container/vstandarttablerow.cpp + +HEADERS += \ + src/container/vpointf.h \ + src/container/vincrementtablerow.h \ + src/container/vcontainer.h \ + src/container/calculator.h \ + src/container/vstandarttablerow.h diff --git a/container/vcontainer.cpp b/src/container/vcontainer.cpp similarity index 100% rename from container/vcontainer.cpp rename to src/container/vcontainer.cpp diff --git a/container/vcontainer.h b/src/container/vcontainer.h similarity index 100% rename from container/vcontainer.h rename to src/container/vcontainer.h diff --git a/container/vincrementtablerow.cpp b/src/container/vincrementtablerow.cpp similarity index 100% rename from container/vincrementtablerow.cpp rename to src/container/vincrementtablerow.cpp diff --git a/container/vincrementtablerow.h b/src/container/vincrementtablerow.h similarity index 100% rename from container/vincrementtablerow.h rename to src/container/vincrementtablerow.h diff --git a/container/vpointf.cpp b/src/container/vpointf.cpp similarity index 100% rename from container/vpointf.cpp rename to src/container/vpointf.cpp diff --git a/container/vpointf.h b/src/container/vpointf.h similarity index 100% rename from container/vpointf.h rename to src/container/vpointf.h diff --git a/container/vstandarttablerow.cpp b/src/container/vstandarttablerow.cpp similarity index 100% rename from container/vstandarttablerow.cpp rename to src/container/vstandarttablerow.cpp diff --git a/container/vstandarttablerow.h b/src/container/vstandarttablerow.h similarity index 100% rename from container/vstandarttablerow.h rename to src/container/vstandarttablerow.h diff --git a/dialogs/dialogalongline.cpp b/src/dialogs/dialogalongline.cpp similarity index 100% rename from dialogs/dialogalongline.cpp rename to src/dialogs/dialogalongline.cpp diff --git a/dialogs/dialogalongline.h b/src/dialogs/dialogalongline.h similarity index 100% rename from dialogs/dialogalongline.h rename to src/dialogs/dialogalongline.h diff --git a/dialogs/dialogalongline.ui b/src/dialogs/dialogalongline.ui similarity index 100% rename from dialogs/dialogalongline.ui rename to src/dialogs/dialogalongline.ui diff --git a/dialogs/dialogarc.cpp b/src/dialogs/dialogarc.cpp similarity index 100% rename from dialogs/dialogarc.cpp rename to src/dialogs/dialogarc.cpp diff --git a/dialogs/dialogarc.h b/src/dialogs/dialogarc.h similarity index 100% rename from dialogs/dialogarc.h rename to src/dialogs/dialogarc.h diff --git a/dialogs/dialogarc.ui b/src/dialogs/dialogarc.ui similarity index 100% rename from dialogs/dialogarc.ui rename to src/dialogs/dialogarc.ui diff --git a/dialogs/dialogbisector.cpp b/src/dialogs/dialogbisector.cpp similarity index 100% rename from dialogs/dialogbisector.cpp rename to src/dialogs/dialogbisector.cpp diff --git a/dialogs/dialogbisector.h b/src/dialogs/dialogbisector.h similarity index 100% rename from dialogs/dialogbisector.h rename to src/dialogs/dialogbisector.h diff --git a/dialogs/dialogbisector.ui b/src/dialogs/dialogbisector.ui similarity index 100% rename from dialogs/dialogbisector.ui rename to src/dialogs/dialogbisector.ui diff --git a/dialogs/dialogdetail.cpp b/src/dialogs/dialogdetail.cpp similarity index 100% rename from dialogs/dialogdetail.cpp rename to src/dialogs/dialogdetail.cpp diff --git a/dialogs/dialogdetail.h b/src/dialogs/dialogdetail.h similarity index 100% rename from dialogs/dialogdetail.h rename to src/dialogs/dialogdetail.h diff --git a/dialogs/dialogdetail.ui b/src/dialogs/dialogdetail.ui similarity index 100% rename from dialogs/dialogdetail.ui rename to src/dialogs/dialogdetail.ui diff --git a/dialogs/dialogendline.cpp b/src/dialogs/dialogendline.cpp similarity index 100% rename from dialogs/dialogendline.cpp rename to src/dialogs/dialogendline.cpp diff --git a/dialogs/dialogendline.h b/src/dialogs/dialogendline.h similarity index 100% rename from dialogs/dialogendline.h rename to src/dialogs/dialogendline.h diff --git a/dialogs/dialogendline.ui b/src/dialogs/dialogendline.ui similarity index 100% rename from dialogs/dialogendline.ui rename to src/dialogs/dialogendline.ui diff --git a/dialogs/dialogheight.cpp b/src/dialogs/dialogheight.cpp similarity index 100% rename from dialogs/dialogheight.cpp rename to src/dialogs/dialogheight.cpp diff --git a/dialogs/dialogheight.h b/src/dialogs/dialogheight.h similarity index 100% rename from dialogs/dialogheight.h rename to src/dialogs/dialogheight.h diff --git a/dialogs/dialogheight.ui b/src/dialogs/dialogheight.ui similarity index 100% rename from dialogs/dialogheight.ui rename to src/dialogs/dialogheight.ui diff --git a/dialogs/dialoghistory.cpp b/src/dialogs/dialoghistory.cpp similarity index 100% rename from dialogs/dialoghistory.cpp rename to src/dialogs/dialoghistory.cpp diff --git a/dialogs/dialoghistory.h b/src/dialogs/dialoghistory.h similarity index 100% rename from dialogs/dialoghistory.h rename to src/dialogs/dialoghistory.h diff --git a/dialogs/dialoghistory.ui b/src/dialogs/dialoghistory.ui similarity index 100% rename from dialogs/dialoghistory.ui rename to src/dialogs/dialoghistory.ui diff --git a/dialogs/dialogincrements.cpp b/src/dialogs/dialogincrements.cpp similarity index 100% rename from dialogs/dialogincrements.cpp rename to src/dialogs/dialogincrements.cpp diff --git a/dialogs/dialogincrements.h b/src/dialogs/dialogincrements.h similarity index 100% rename from dialogs/dialogincrements.h rename to src/dialogs/dialogincrements.h diff --git a/dialogs/dialogincrements.ui b/src/dialogs/dialogincrements.ui similarity index 100% rename from dialogs/dialogincrements.ui rename to src/dialogs/dialogincrements.ui diff --git a/dialogs/dialogline.cpp b/src/dialogs/dialogline.cpp similarity index 100% rename from dialogs/dialogline.cpp rename to src/dialogs/dialogline.cpp diff --git a/dialogs/dialogline.h b/src/dialogs/dialogline.h similarity index 100% rename from dialogs/dialogline.h rename to src/dialogs/dialogline.h diff --git a/dialogs/dialogline.ui b/src/dialogs/dialogline.ui similarity index 100% rename from dialogs/dialogline.ui rename to src/dialogs/dialogline.ui diff --git a/dialogs/dialoglineintersect.cpp b/src/dialogs/dialoglineintersect.cpp similarity index 100% rename from dialogs/dialoglineintersect.cpp rename to src/dialogs/dialoglineintersect.cpp diff --git a/dialogs/dialoglineintersect.h b/src/dialogs/dialoglineintersect.h similarity index 100% rename from dialogs/dialoglineintersect.h rename to src/dialogs/dialoglineintersect.h diff --git a/dialogs/dialoglineintersect.ui b/src/dialogs/dialoglineintersect.ui similarity index 100% rename from dialogs/dialoglineintersect.ui rename to src/dialogs/dialoglineintersect.ui diff --git a/dialogs/dialognormal.cpp b/src/dialogs/dialognormal.cpp similarity index 100% rename from dialogs/dialognormal.cpp rename to src/dialogs/dialognormal.cpp diff --git a/dialogs/dialognormal.h b/src/dialogs/dialognormal.h similarity index 100% rename from dialogs/dialognormal.h rename to src/dialogs/dialognormal.h diff --git a/dialogs/dialognormal.ui b/src/dialogs/dialognormal.ui similarity index 100% rename from dialogs/dialognormal.ui rename to src/dialogs/dialognormal.ui diff --git a/dialogs/dialogpointofcontact.cpp b/src/dialogs/dialogpointofcontact.cpp similarity index 100% rename from dialogs/dialogpointofcontact.cpp rename to src/dialogs/dialogpointofcontact.cpp diff --git a/dialogs/dialogpointofcontact.h b/src/dialogs/dialogpointofcontact.h similarity index 100% rename from dialogs/dialogpointofcontact.h rename to src/dialogs/dialogpointofcontact.h diff --git a/dialogs/dialogpointofcontact.ui b/src/dialogs/dialogpointofcontact.ui similarity index 100% rename from dialogs/dialogpointofcontact.ui rename to src/dialogs/dialogpointofcontact.ui diff --git a/dialogs/dialogpointofintersection.cpp b/src/dialogs/dialogpointofintersection.cpp similarity index 100% rename from dialogs/dialogpointofintersection.cpp rename to src/dialogs/dialogpointofintersection.cpp diff --git a/dialogs/dialogpointofintersection.h b/src/dialogs/dialogpointofintersection.h similarity index 100% rename from dialogs/dialogpointofintersection.h rename to src/dialogs/dialogpointofintersection.h diff --git a/dialogs/dialogpointofintersection.ui b/src/dialogs/dialogpointofintersection.ui similarity index 100% rename from dialogs/dialogpointofintersection.ui rename to src/dialogs/dialogpointofintersection.ui diff --git a/dialogs/dialogs.h b/src/dialogs/dialogs.h similarity index 100% rename from dialogs/dialogs.h rename to src/dialogs/dialogs.h diff --git a/src/dialogs/dialogs.pri b/src/dialogs/dialogs.pri new file mode 100644 index 000000000..e6898dd39 --- /dev/null +++ b/src/dialogs/dialogs.pri @@ -0,0 +1,62 @@ +HEADERS += \ + src/dialogs/dialogtriangle.h \ + src/dialogs/dialogtool.h \ + src/dialogs/dialogsplinepath.h \ + src/dialogs/dialogspline.h \ + src/dialogs/dialogsinglepoint.h \ + src/dialogs/dialogshoulderpoint.h \ + src/dialogs/dialogs.h \ + src/dialogs/dialogpointofintersection.h \ + src/dialogs/dialogpointofcontact.h \ + src/dialogs/dialognormal.h \ + src/dialogs/dialoglineintersect.h \ + src/dialogs/dialogline.h \ + src/dialogs/dialogincrements.h \ + src/dialogs/dialoghistory.h \ + src/dialogs/dialogheight.h \ + src/dialogs/dialogendline.h \ + src/dialogs/dialogdetail.h \ + src/dialogs/dialogbisector.h \ + src/dialogs/dialogarc.h \ + src/dialogs/dialogalongline.h + +SOURCES += \ + src/dialogs/dialogtriangle.cpp \ + src/dialogs/dialogtool.cpp \ + src/dialogs/dialogsplinepath.cpp \ + src/dialogs/dialogspline.cpp \ + src/dialogs/dialogsinglepoint.cpp \ + src/dialogs/dialogshoulderpoint.cpp \ + src/dialogs/dialogpointofintersection.cpp \ + src/dialogs/dialogpointofcontact.cpp \ + src/dialogs/dialognormal.cpp \ + src/dialogs/dialoglineintersect.cpp \ + src/dialogs/dialogline.cpp \ + src/dialogs/dialogincrements.cpp \ + src/dialogs/dialoghistory.cpp \ + src/dialogs/dialogheight.cpp \ + src/dialogs/dialogendline.cpp \ + src/dialogs/dialogdetail.cpp \ + src/dialogs/dialogbisector.cpp \ + src/dialogs/dialogarc.cpp \ + src/dialogs/dialogalongline.cpp + +FORMS += \ + src/dialogs/dialogtriangle.ui \ + src/dialogs/dialogsplinepath.ui \ + src/dialogs/dialogspline.ui \ + src/dialogs/dialogsinglepoint.ui \ + src/dialogs/dialogshoulderpoint.ui \ + src/dialogs/dialogpointofintersection.ui \ + src/dialogs/dialogpointofcontact.ui \ + src/dialogs/dialognormal.ui \ + src/dialogs/dialoglineintersect.ui \ + src/dialogs/dialogline.ui \ + src/dialogs/dialogincrements.ui \ + src/dialogs/dialoghistory.ui \ + src/dialogs/dialogheight.ui \ + src/dialogs/dialogendline.ui \ + src/dialogs/dialogdetail.ui \ + src/dialogs/dialogbisector.ui \ + src/dialogs/dialogarc.ui \ + src/dialogs/dialogalongline.ui diff --git a/dialogs/dialogshoulderpoint.cpp b/src/dialogs/dialogshoulderpoint.cpp similarity index 100% rename from dialogs/dialogshoulderpoint.cpp rename to src/dialogs/dialogshoulderpoint.cpp diff --git a/dialogs/dialogshoulderpoint.h b/src/dialogs/dialogshoulderpoint.h similarity index 100% rename from dialogs/dialogshoulderpoint.h rename to src/dialogs/dialogshoulderpoint.h diff --git a/dialogs/dialogshoulderpoint.ui b/src/dialogs/dialogshoulderpoint.ui similarity index 100% rename from dialogs/dialogshoulderpoint.ui rename to src/dialogs/dialogshoulderpoint.ui diff --git a/dialogs/dialogsinglepoint.cpp b/src/dialogs/dialogsinglepoint.cpp similarity index 100% rename from dialogs/dialogsinglepoint.cpp rename to src/dialogs/dialogsinglepoint.cpp diff --git a/dialogs/dialogsinglepoint.h b/src/dialogs/dialogsinglepoint.h similarity index 100% rename from dialogs/dialogsinglepoint.h rename to src/dialogs/dialogsinglepoint.h diff --git a/dialogs/dialogsinglepoint.ui b/src/dialogs/dialogsinglepoint.ui similarity index 100% rename from dialogs/dialogsinglepoint.ui rename to src/dialogs/dialogsinglepoint.ui diff --git a/dialogs/dialogspline.cpp b/src/dialogs/dialogspline.cpp similarity index 100% rename from dialogs/dialogspline.cpp rename to src/dialogs/dialogspline.cpp diff --git a/dialogs/dialogspline.h b/src/dialogs/dialogspline.h similarity index 100% rename from dialogs/dialogspline.h rename to src/dialogs/dialogspline.h diff --git a/dialogs/dialogspline.ui b/src/dialogs/dialogspline.ui similarity index 100% rename from dialogs/dialogspline.ui rename to src/dialogs/dialogspline.ui diff --git a/dialogs/dialogsplinepath.cpp b/src/dialogs/dialogsplinepath.cpp similarity index 100% rename from dialogs/dialogsplinepath.cpp rename to src/dialogs/dialogsplinepath.cpp diff --git a/dialogs/dialogsplinepath.h b/src/dialogs/dialogsplinepath.h similarity index 100% rename from dialogs/dialogsplinepath.h rename to src/dialogs/dialogsplinepath.h diff --git a/dialogs/dialogsplinepath.ui b/src/dialogs/dialogsplinepath.ui similarity index 100% rename from dialogs/dialogsplinepath.ui rename to src/dialogs/dialogsplinepath.ui diff --git a/dialogs/dialogtool.cpp b/src/dialogs/dialogtool.cpp similarity index 100% rename from dialogs/dialogtool.cpp rename to src/dialogs/dialogtool.cpp diff --git a/dialogs/dialogtool.h b/src/dialogs/dialogtool.h similarity index 100% rename from dialogs/dialogtool.h rename to src/dialogs/dialogtool.h diff --git a/dialogs/dialogtriangle.cpp b/src/dialogs/dialogtriangle.cpp similarity index 100% rename from dialogs/dialogtriangle.cpp rename to src/dialogs/dialogtriangle.cpp diff --git a/dialogs/dialogtriangle.h b/src/dialogs/dialogtriangle.h similarity index 100% rename from dialogs/dialogtriangle.h rename to src/dialogs/dialogtriangle.h diff --git a/dialogs/dialogtriangle.ui b/src/dialogs/dialogtriangle.ui similarity index 100% rename from dialogs/dialogtriangle.ui rename to src/dialogs/dialogtriangle.ui diff --git a/src/exception/exception.pri b/src/exception/exception.pri new file mode 100644 index 000000000..3e0166be0 --- /dev/null +++ b/src/exception/exception.pri @@ -0,0 +1,17 @@ +HEADERS += \ + src/exception/vexceptionwrongparameterid.h \ + src/exception/vexceptionuniqueid.h \ + src/exception/vexceptionobjecterror.h \ + src/exception/vexceptionemptyparameter.h \ + src/exception/vexceptionconversionerror.h \ + src/exception/vexceptionbadid.h \ + src/exception/vexception.h + +SOURCES += \ + src/exception/vexceptionwrongparameterid.cpp \ + src/exception/vexceptionuniqueid.cpp \ + src/exception/vexceptionobjecterror.cpp \ + src/exception/vexceptionemptyparameter.cpp \ + src/exception/vexceptionconversionerror.cpp \ + src/exception/vexceptionbadid.cpp \ + src/exception/vexception.cpp diff --git a/exception/vexception.cpp b/src/exception/vexception.cpp similarity index 100% rename from exception/vexception.cpp rename to src/exception/vexception.cpp diff --git a/exception/vexception.h b/src/exception/vexception.h similarity index 100% rename from exception/vexception.h rename to src/exception/vexception.h diff --git a/exception/vexceptionbadid.cpp b/src/exception/vexceptionbadid.cpp similarity index 100% rename from exception/vexceptionbadid.cpp rename to src/exception/vexceptionbadid.cpp diff --git a/exception/vexceptionbadid.h b/src/exception/vexceptionbadid.h similarity index 100% rename from exception/vexceptionbadid.h rename to src/exception/vexceptionbadid.h diff --git a/exception/vexceptionconversionerror.cpp b/src/exception/vexceptionconversionerror.cpp similarity index 100% rename from exception/vexceptionconversionerror.cpp rename to src/exception/vexceptionconversionerror.cpp diff --git a/exception/vexceptionconversionerror.h b/src/exception/vexceptionconversionerror.h similarity index 100% rename from exception/vexceptionconversionerror.h rename to src/exception/vexceptionconversionerror.h diff --git a/exception/vexceptionemptyparameter.cpp b/src/exception/vexceptionemptyparameter.cpp similarity index 100% rename from exception/vexceptionemptyparameter.cpp rename to src/exception/vexceptionemptyparameter.cpp diff --git a/exception/vexceptionemptyparameter.h b/src/exception/vexceptionemptyparameter.h similarity index 100% rename from exception/vexceptionemptyparameter.h rename to src/exception/vexceptionemptyparameter.h diff --git a/exception/vexceptionobjecterror.cpp b/src/exception/vexceptionobjecterror.cpp similarity index 100% rename from exception/vexceptionobjecterror.cpp rename to src/exception/vexceptionobjecterror.cpp diff --git a/exception/vexceptionobjecterror.h b/src/exception/vexceptionobjecterror.h similarity index 100% rename from exception/vexceptionobjecterror.h rename to src/exception/vexceptionobjecterror.h diff --git a/exception/vexceptionuniqueid.cpp b/src/exception/vexceptionuniqueid.cpp similarity index 100% rename from exception/vexceptionuniqueid.cpp rename to src/exception/vexceptionuniqueid.cpp diff --git a/exception/vexceptionuniqueid.h b/src/exception/vexceptionuniqueid.h similarity index 100% rename from exception/vexceptionuniqueid.h rename to src/exception/vexceptionuniqueid.h diff --git a/exception/vexceptionwrongparameterid.cpp b/src/exception/vexceptionwrongparameterid.cpp similarity index 100% rename from exception/vexceptionwrongparameterid.cpp rename to src/exception/vexceptionwrongparameterid.cpp diff --git a/exception/vexceptionwrongparameterid.h b/src/exception/vexceptionwrongparameterid.h similarity index 100% rename from exception/vexceptionwrongparameterid.h rename to src/exception/vexceptionwrongparameterid.h diff --git a/src/geometry/geometry.pri b/src/geometry/geometry.pri new file mode 100644 index 000000000..e04865bed --- /dev/null +++ b/src/geometry/geometry.pri @@ -0,0 +1,15 @@ +HEADERS += \ + src/geometry/vsplinepoint.h \ + src/geometry/vsplinepath.h \ + src/geometry/vspline.h \ + src/geometry/vnodedetail.h \ + src/geometry/vdetail.h \ + src/geometry/varc.h + +SOURCES += \ + src/geometry/vsplinepoint.cpp \ + src/geometry/vsplinepath.cpp \ + src/geometry/vspline.cpp \ + src/geometry/vnodedetail.cpp \ + src/geometry/vdetail.cpp \ + src/geometry/varc.cpp diff --git a/geometry/varc.cpp b/src/geometry/varc.cpp similarity index 100% rename from geometry/varc.cpp rename to src/geometry/varc.cpp diff --git a/geometry/varc.h b/src/geometry/varc.h similarity index 100% rename from geometry/varc.h rename to src/geometry/varc.h diff --git a/geometry/vdetail.cpp b/src/geometry/vdetail.cpp similarity index 100% rename from geometry/vdetail.cpp rename to src/geometry/vdetail.cpp diff --git a/geometry/vdetail.h b/src/geometry/vdetail.h similarity index 100% rename from geometry/vdetail.h rename to src/geometry/vdetail.h diff --git a/geometry/vnodedetail.cpp b/src/geometry/vnodedetail.cpp similarity index 100% rename from geometry/vnodedetail.cpp rename to src/geometry/vnodedetail.cpp diff --git a/geometry/vnodedetail.h b/src/geometry/vnodedetail.h similarity index 100% rename from geometry/vnodedetail.h rename to src/geometry/vnodedetail.h diff --git a/geometry/vspline.cpp b/src/geometry/vspline.cpp similarity index 100% rename from geometry/vspline.cpp rename to src/geometry/vspline.cpp diff --git a/geometry/vspline.h b/src/geometry/vspline.h similarity index 100% rename from geometry/vspline.h rename to src/geometry/vspline.h diff --git a/geometry/vsplinepath.cpp b/src/geometry/vsplinepath.cpp similarity index 100% rename from geometry/vsplinepath.cpp rename to src/geometry/vsplinepath.cpp diff --git a/geometry/vsplinepath.h b/src/geometry/vsplinepath.h similarity index 100% rename from geometry/vsplinepath.h rename to src/geometry/vsplinepath.h diff --git a/geometry/vsplinepoint.cpp b/src/geometry/vsplinepoint.cpp similarity index 100% rename from geometry/vsplinepoint.cpp rename to src/geometry/vsplinepoint.cpp diff --git a/geometry/vsplinepoint.h b/src/geometry/vsplinepoint.h similarity index 100% rename from geometry/vsplinepoint.h rename to src/geometry/vsplinepoint.h diff --git a/main.cpp b/src/main.cpp similarity index 100% rename from main.cpp rename to src/main.cpp diff --git a/mainwindow.cpp b/src/mainwindow.cpp similarity index 100% rename from mainwindow.cpp rename to src/mainwindow.cpp diff --git a/mainwindow.h b/src/mainwindow.h similarity index 100% rename from mainwindow.h rename to src/mainwindow.h diff --git a/mainwindow.ui b/src/mainwindow.ui similarity index 100% rename from mainwindow.ui rename to src/mainwindow.ui diff --git a/options.h b/src/options.h similarity index 100% rename from options.h rename to src/options.h diff --git a/stable.cpp b/src/stable.cpp similarity index 100% rename from stable.cpp rename to src/stable.cpp diff --git a/stable.h b/src/stable.h similarity index 100% rename from stable.h rename to src/stable.h diff --git a/tablewindow.cpp b/src/tablewindow.cpp similarity index 100% rename from tablewindow.cpp rename to src/tablewindow.cpp diff --git a/tablewindow.h b/src/tablewindow.h similarity index 100% rename from tablewindow.h rename to src/tablewindow.h diff --git a/tablewindow.ui b/src/tablewindow.ui similarity index 100% rename from tablewindow.ui rename to src/tablewindow.ui diff --git a/tools/drawTools/drawtools.h b/src/tools/drawTools/drawtools.h similarity index 100% rename from tools/drawTools/drawtools.h rename to src/tools/drawTools/drawtools.h diff --git a/tools/drawTools/vdrawtool.cpp b/src/tools/drawTools/vdrawtool.cpp similarity index 100% rename from tools/drawTools/vdrawtool.cpp rename to src/tools/drawTools/vdrawtool.cpp diff --git a/tools/drawTools/vdrawtool.h b/src/tools/drawTools/vdrawtool.h similarity index 100% rename from tools/drawTools/vdrawtool.h rename to src/tools/drawTools/vdrawtool.h diff --git a/tools/drawTools/vtoolalongline.cpp b/src/tools/drawTools/vtoolalongline.cpp similarity index 100% rename from tools/drawTools/vtoolalongline.cpp rename to src/tools/drawTools/vtoolalongline.cpp diff --git a/tools/drawTools/vtoolalongline.h b/src/tools/drawTools/vtoolalongline.h similarity index 100% rename from tools/drawTools/vtoolalongline.h rename to src/tools/drawTools/vtoolalongline.h diff --git a/tools/drawTools/vtoolarc.cpp b/src/tools/drawTools/vtoolarc.cpp similarity index 100% rename from tools/drawTools/vtoolarc.cpp rename to src/tools/drawTools/vtoolarc.cpp diff --git a/tools/drawTools/vtoolarc.h b/src/tools/drawTools/vtoolarc.h similarity index 100% rename from tools/drawTools/vtoolarc.h rename to src/tools/drawTools/vtoolarc.h diff --git a/tools/drawTools/vtoolbisector.cpp b/src/tools/drawTools/vtoolbisector.cpp similarity index 100% rename from tools/drawTools/vtoolbisector.cpp rename to src/tools/drawTools/vtoolbisector.cpp diff --git a/tools/drawTools/vtoolbisector.h b/src/tools/drawTools/vtoolbisector.h similarity index 100% rename from tools/drawTools/vtoolbisector.h rename to src/tools/drawTools/vtoolbisector.h diff --git a/tools/drawTools/vtoolendline.cpp b/src/tools/drawTools/vtoolendline.cpp similarity index 100% rename from tools/drawTools/vtoolendline.cpp rename to src/tools/drawTools/vtoolendline.cpp diff --git a/tools/drawTools/vtoolendline.h b/src/tools/drawTools/vtoolendline.h similarity index 100% rename from tools/drawTools/vtoolendline.h rename to src/tools/drawTools/vtoolendline.h diff --git a/tools/drawTools/vtoolheight.cpp b/src/tools/drawTools/vtoolheight.cpp similarity index 100% rename from tools/drawTools/vtoolheight.cpp rename to src/tools/drawTools/vtoolheight.cpp diff --git a/tools/drawTools/vtoolheight.h b/src/tools/drawTools/vtoolheight.h similarity index 100% rename from tools/drawTools/vtoolheight.h rename to src/tools/drawTools/vtoolheight.h diff --git a/tools/drawTools/vtoolline.cpp b/src/tools/drawTools/vtoolline.cpp similarity index 100% rename from tools/drawTools/vtoolline.cpp rename to src/tools/drawTools/vtoolline.cpp diff --git a/tools/drawTools/vtoolline.h b/src/tools/drawTools/vtoolline.h similarity index 100% rename from tools/drawTools/vtoolline.h rename to src/tools/drawTools/vtoolline.h diff --git a/tools/drawTools/vtoollineintersect.cpp b/src/tools/drawTools/vtoollineintersect.cpp similarity index 100% rename from tools/drawTools/vtoollineintersect.cpp rename to src/tools/drawTools/vtoollineintersect.cpp diff --git a/tools/drawTools/vtoollineintersect.h b/src/tools/drawTools/vtoollineintersect.h similarity index 100% rename from tools/drawTools/vtoollineintersect.h rename to src/tools/drawTools/vtoollineintersect.h diff --git a/tools/drawTools/vtoollinepoint.cpp b/src/tools/drawTools/vtoollinepoint.cpp similarity index 100% rename from tools/drawTools/vtoollinepoint.cpp rename to src/tools/drawTools/vtoollinepoint.cpp diff --git a/tools/drawTools/vtoollinepoint.h b/src/tools/drawTools/vtoollinepoint.h similarity index 100% rename from tools/drawTools/vtoollinepoint.h rename to src/tools/drawTools/vtoollinepoint.h diff --git a/tools/drawTools/vtoolnormal.cpp b/src/tools/drawTools/vtoolnormal.cpp similarity index 100% rename from tools/drawTools/vtoolnormal.cpp rename to src/tools/drawTools/vtoolnormal.cpp diff --git a/tools/drawTools/vtoolnormal.h b/src/tools/drawTools/vtoolnormal.h similarity index 100% rename from tools/drawTools/vtoolnormal.h rename to src/tools/drawTools/vtoolnormal.h diff --git a/tools/drawTools/vtoolpoint.cpp b/src/tools/drawTools/vtoolpoint.cpp similarity index 100% rename from tools/drawTools/vtoolpoint.cpp rename to src/tools/drawTools/vtoolpoint.cpp diff --git a/tools/drawTools/vtoolpoint.h b/src/tools/drawTools/vtoolpoint.h similarity index 100% rename from tools/drawTools/vtoolpoint.h rename to src/tools/drawTools/vtoolpoint.h diff --git a/tools/drawTools/vtoolpointofcontact.cpp b/src/tools/drawTools/vtoolpointofcontact.cpp similarity index 100% rename from tools/drawTools/vtoolpointofcontact.cpp rename to src/tools/drawTools/vtoolpointofcontact.cpp diff --git a/tools/drawTools/vtoolpointofcontact.h b/src/tools/drawTools/vtoolpointofcontact.h similarity index 100% rename from tools/drawTools/vtoolpointofcontact.h rename to src/tools/drawTools/vtoolpointofcontact.h diff --git a/tools/drawTools/vtoolpointofintersection.cpp b/src/tools/drawTools/vtoolpointofintersection.cpp similarity index 100% rename from tools/drawTools/vtoolpointofintersection.cpp rename to src/tools/drawTools/vtoolpointofintersection.cpp diff --git a/tools/drawTools/vtoolpointofintersection.h b/src/tools/drawTools/vtoolpointofintersection.h similarity index 100% rename from tools/drawTools/vtoolpointofintersection.h rename to src/tools/drawTools/vtoolpointofintersection.h diff --git a/tools/drawTools/vtoolshoulderpoint.cpp b/src/tools/drawTools/vtoolshoulderpoint.cpp similarity index 100% rename from tools/drawTools/vtoolshoulderpoint.cpp rename to src/tools/drawTools/vtoolshoulderpoint.cpp diff --git a/tools/drawTools/vtoolshoulderpoint.h b/src/tools/drawTools/vtoolshoulderpoint.h similarity index 100% rename from tools/drawTools/vtoolshoulderpoint.h rename to src/tools/drawTools/vtoolshoulderpoint.h diff --git a/tools/drawTools/vtoolsinglepoint.cpp b/src/tools/drawTools/vtoolsinglepoint.cpp similarity index 100% rename from tools/drawTools/vtoolsinglepoint.cpp rename to src/tools/drawTools/vtoolsinglepoint.cpp diff --git a/tools/drawTools/vtoolsinglepoint.h b/src/tools/drawTools/vtoolsinglepoint.h similarity index 100% rename from tools/drawTools/vtoolsinglepoint.h rename to src/tools/drawTools/vtoolsinglepoint.h diff --git a/tools/drawTools/vtoolspline.cpp b/src/tools/drawTools/vtoolspline.cpp similarity index 100% rename from tools/drawTools/vtoolspline.cpp rename to src/tools/drawTools/vtoolspline.cpp diff --git a/tools/drawTools/vtoolspline.h b/src/tools/drawTools/vtoolspline.h similarity index 100% rename from tools/drawTools/vtoolspline.h rename to src/tools/drawTools/vtoolspline.h diff --git a/tools/drawTools/vtoolsplinepath.cpp b/src/tools/drawTools/vtoolsplinepath.cpp similarity index 100% rename from tools/drawTools/vtoolsplinepath.cpp rename to src/tools/drawTools/vtoolsplinepath.cpp diff --git a/tools/drawTools/vtoolsplinepath.h b/src/tools/drawTools/vtoolsplinepath.h similarity index 100% rename from tools/drawTools/vtoolsplinepath.h rename to src/tools/drawTools/vtoolsplinepath.h diff --git a/tools/drawTools/vtooltriangle.cpp b/src/tools/drawTools/vtooltriangle.cpp similarity index 100% rename from tools/drawTools/vtooltriangle.cpp rename to src/tools/drawTools/vtooltriangle.cpp diff --git a/tools/drawTools/vtooltriangle.h b/src/tools/drawTools/vtooltriangle.h similarity index 100% rename from tools/drawTools/vtooltriangle.h rename to src/tools/drawTools/vtooltriangle.h diff --git a/tools/modelingTools/modelingtools.h b/src/tools/modelingTools/modelingtools.h similarity index 100% rename from tools/modelingTools/modelingtools.h rename to src/tools/modelingTools/modelingtools.h diff --git a/tools/modelingTools/vmodelingalongline.cpp b/src/tools/modelingTools/vmodelingalongline.cpp similarity index 100% rename from tools/modelingTools/vmodelingalongline.cpp rename to src/tools/modelingTools/vmodelingalongline.cpp diff --git a/tools/modelingTools/vmodelingalongline.h b/src/tools/modelingTools/vmodelingalongline.h similarity index 100% rename from tools/modelingTools/vmodelingalongline.h rename to src/tools/modelingTools/vmodelingalongline.h diff --git a/tools/modelingTools/vmodelingarc.cpp b/src/tools/modelingTools/vmodelingarc.cpp similarity index 100% rename from tools/modelingTools/vmodelingarc.cpp rename to src/tools/modelingTools/vmodelingarc.cpp diff --git a/tools/modelingTools/vmodelingarc.h b/src/tools/modelingTools/vmodelingarc.h similarity index 100% rename from tools/modelingTools/vmodelingarc.h rename to src/tools/modelingTools/vmodelingarc.h diff --git a/tools/modelingTools/vmodelingbisector.cpp b/src/tools/modelingTools/vmodelingbisector.cpp similarity index 100% rename from tools/modelingTools/vmodelingbisector.cpp rename to src/tools/modelingTools/vmodelingbisector.cpp diff --git a/tools/modelingTools/vmodelingbisector.h b/src/tools/modelingTools/vmodelingbisector.h similarity index 100% rename from tools/modelingTools/vmodelingbisector.h rename to src/tools/modelingTools/vmodelingbisector.h diff --git a/tools/modelingTools/vmodelingendline.cpp b/src/tools/modelingTools/vmodelingendline.cpp similarity index 100% rename from tools/modelingTools/vmodelingendline.cpp rename to src/tools/modelingTools/vmodelingendline.cpp diff --git a/tools/modelingTools/vmodelingendline.h b/src/tools/modelingTools/vmodelingendline.h similarity index 100% rename from tools/modelingTools/vmodelingendline.h rename to src/tools/modelingTools/vmodelingendline.h diff --git a/tools/modelingTools/vmodelingheight.cpp b/src/tools/modelingTools/vmodelingheight.cpp similarity index 100% rename from tools/modelingTools/vmodelingheight.cpp rename to src/tools/modelingTools/vmodelingheight.cpp diff --git a/tools/modelingTools/vmodelingheight.h b/src/tools/modelingTools/vmodelingheight.h similarity index 100% rename from tools/modelingTools/vmodelingheight.h rename to src/tools/modelingTools/vmodelingheight.h diff --git a/tools/modelingTools/vmodelingline.cpp b/src/tools/modelingTools/vmodelingline.cpp similarity index 100% rename from tools/modelingTools/vmodelingline.cpp rename to src/tools/modelingTools/vmodelingline.cpp diff --git a/tools/modelingTools/vmodelingline.h b/src/tools/modelingTools/vmodelingline.h similarity index 100% rename from tools/modelingTools/vmodelingline.h rename to src/tools/modelingTools/vmodelingline.h diff --git a/tools/modelingTools/vmodelinglineintersect.cpp b/src/tools/modelingTools/vmodelinglineintersect.cpp similarity index 100% rename from tools/modelingTools/vmodelinglineintersect.cpp rename to src/tools/modelingTools/vmodelinglineintersect.cpp diff --git a/tools/modelingTools/vmodelinglineintersect.h b/src/tools/modelingTools/vmodelinglineintersect.h similarity index 100% rename from tools/modelingTools/vmodelinglineintersect.h rename to src/tools/modelingTools/vmodelinglineintersect.h diff --git a/tools/modelingTools/vmodelinglinepoint.cpp b/src/tools/modelingTools/vmodelinglinepoint.cpp similarity index 100% rename from tools/modelingTools/vmodelinglinepoint.cpp rename to src/tools/modelingTools/vmodelinglinepoint.cpp diff --git a/tools/modelingTools/vmodelinglinepoint.h b/src/tools/modelingTools/vmodelinglinepoint.h similarity index 100% rename from tools/modelingTools/vmodelinglinepoint.h rename to src/tools/modelingTools/vmodelinglinepoint.h diff --git a/tools/modelingTools/vmodelingnormal.cpp b/src/tools/modelingTools/vmodelingnormal.cpp similarity index 100% rename from tools/modelingTools/vmodelingnormal.cpp rename to src/tools/modelingTools/vmodelingnormal.cpp diff --git a/tools/modelingTools/vmodelingnormal.h b/src/tools/modelingTools/vmodelingnormal.h similarity index 100% rename from tools/modelingTools/vmodelingnormal.h rename to src/tools/modelingTools/vmodelingnormal.h diff --git a/tools/modelingTools/vmodelingpoint.cpp b/src/tools/modelingTools/vmodelingpoint.cpp similarity index 100% rename from tools/modelingTools/vmodelingpoint.cpp rename to src/tools/modelingTools/vmodelingpoint.cpp diff --git a/tools/modelingTools/vmodelingpoint.h b/src/tools/modelingTools/vmodelingpoint.h similarity index 100% rename from tools/modelingTools/vmodelingpoint.h rename to src/tools/modelingTools/vmodelingpoint.h diff --git a/tools/modelingTools/vmodelingpointofcontact.cpp b/src/tools/modelingTools/vmodelingpointofcontact.cpp similarity index 100% rename from tools/modelingTools/vmodelingpointofcontact.cpp rename to src/tools/modelingTools/vmodelingpointofcontact.cpp diff --git a/tools/modelingTools/vmodelingpointofcontact.h b/src/tools/modelingTools/vmodelingpointofcontact.h similarity index 100% rename from tools/modelingTools/vmodelingpointofcontact.h rename to src/tools/modelingTools/vmodelingpointofcontact.h diff --git a/tools/modelingTools/vmodelingpointofintersection.cpp b/src/tools/modelingTools/vmodelingpointofintersection.cpp similarity index 100% rename from tools/modelingTools/vmodelingpointofintersection.cpp rename to src/tools/modelingTools/vmodelingpointofintersection.cpp diff --git a/tools/modelingTools/vmodelingpointofintersection.h b/src/tools/modelingTools/vmodelingpointofintersection.h similarity index 100% rename from tools/modelingTools/vmodelingpointofintersection.h rename to src/tools/modelingTools/vmodelingpointofintersection.h diff --git a/tools/modelingTools/vmodelingshoulderpoint.cpp b/src/tools/modelingTools/vmodelingshoulderpoint.cpp similarity index 100% rename from tools/modelingTools/vmodelingshoulderpoint.cpp rename to src/tools/modelingTools/vmodelingshoulderpoint.cpp diff --git a/tools/modelingTools/vmodelingshoulderpoint.h b/src/tools/modelingTools/vmodelingshoulderpoint.h similarity index 100% rename from tools/modelingTools/vmodelingshoulderpoint.h rename to src/tools/modelingTools/vmodelingshoulderpoint.h diff --git a/tools/modelingTools/vmodelingspline.cpp b/src/tools/modelingTools/vmodelingspline.cpp similarity index 100% rename from tools/modelingTools/vmodelingspline.cpp rename to src/tools/modelingTools/vmodelingspline.cpp diff --git a/tools/modelingTools/vmodelingspline.h b/src/tools/modelingTools/vmodelingspline.h similarity index 100% rename from tools/modelingTools/vmodelingspline.h rename to src/tools/modelingTools/vmodelingspline.h diff --git a/tools/modelingTools/vmodelingsplinepath.cpp b/src/tools/modelingTools/vmodelingsplinepath.cpp similarity index 100% rename from tools/modelingTools/vmodelingsplinepath.cpp rename to src/tools/modelingTools/vmodelingsplinepath.cpp diff --git a/tools/modelingTools/vmodelingsplinepath.h b/src/tools/modelingTools/vmodelingsplinepath.h similarity index 100% rename from tools/modelingTools/vmodelingsplinepath.h rename to src/tools/modelingTools/vmodelingsplinepath.h diff --git a/tools/modelingTools/vmodelingtool.cpp b/src/tools/modelingTools/vmodelingtool.cpp similarity index 100% rename from tools/modelingTools/vmodelingtool.cpp rename to src/tools/modelingTools/vmodelingtool.cpp diff --git a/tools/modelingTools/vmodelingtool.h b/src/tools/modelingTools/vmodelingtool.h similarity index 100% rename from tools/modelingTools/vmodelingtool.h rename to src/tools/modelingTools/vmodelingtool.h diff --git a/tools/modelingTools/vmodelingtriangle.cpp b/src/tools/modelingTools/vmodelingtriangle.cpp similarity index 100% rename from tools/modelingTools/vmodelingtriangle.cpp rename to src/tools/modelingTools/vmodelingtriangle.cpp diff --git a/tools/modelingTools/vmodelingtriangle.h b/src/tools/modelingTools/vmodelingtriangle.h similarity index 100% rename from tools/modelingTools/vmodelingtriangle.h rename to src/tools/modelingTools/vmodelingtriangle.h diff --git a/tools/nodeDetails/nodedetails.h b/src/tools/nodeDetails/nodedetails.h similarity index 100% rename from tools/nodeDetails/nodedetails.h rename to src/tools/nodeDetails/nodedetails.h diff --git a/tools/nodeDetails/vabstractnode.cpp b/src/tools/nodeDetails/vabstractnode.cpp similarity index 100% rename from tools/nodeDetails/vabstractnode.cpp rename to src/tools/nodeDetails/vabstractnode.cpp diff --git a/tools/nodeDetails/vabstractnode.h b/src/tools/nodeDetails/vabstractnode.h similarity index 100% rename from tools/nodeDetails/vabstractnode.h rename to src/tools/nodeDetails/vabstractnode.h diff --git a/tools/nodeDetails/vnodearc.cpp b/src/tools/nodeDetails/vnodearc.cpp similarity index 100% rename from tools/nodeDetails/vnodearc.cpp rename to src/tools/nodeDetails/vnodearc.cpp diff --git a/tools/nodeDetails/vnodearc.h b/src/tools/nodeDetails/vnodearc.h similarity index 100% rename from tools/nodeDetails/vnodearc.h rename to src/tools/nodeDetails/vnodearc.h diff --git a/tools/nodeDetails/vnodepoint.cpp b/src/tools/nodeDetails/vnodepoint.cpp similarity index 100% rename from tools/nodeDetails/vnodepoint.cpp rename to src/tools/nodeDetails/vnodepoint.cpp diff --git a/tools/nodeDetails/vnodepoint.h b/src/tools/nodeDetails/vnodepoint.h similarity index 100% rename from tools/nodeDetails/vnodepoint.h rename to src/tools/nodeDetails/vnodepoint.h diff --git a/tools/nodeDetails/vnodespline.cpp b/src/tools/nodeDetails/vnodespline.cpp similarity index 100% rename from tools/nodeDetails/vnodespline.cpp rename to src/tools/nodeDetails/vnodespline.cpp diff --git a/tools/nodeDetails/vnodespline.h b/src/tools/nodeDetails/vnodespline.h similarity index 100% rename from tools/nodeDetails/vnodespline.h rename to src/tools/nodeDetails/vnodespline.h diff --git a/tools/nodeDetails/vnodesplinepath.cpp b/src/tools/nodeDetails/vnodesplinepath.cpp similarity index 100% rename from tools/nodeDetails/vnodesplinepath.cpp rename to src/tools/nodeDetails/vnodesplinepath.cpp diff --git a/tools/nodeDetails/vnodesplinepath.h b/src/tools/nodeDetails/vnodesplinepath.h similarity index 100% rename from tools/nodeDetails/vnodesplinepath.h rename to src/tools/nodeDetails/vnodesplinepath.h diff --git a/tools/tools.h b/src/tools/tools.h similarity index 100% rename from tools/tools.h rename to src/tools/tools.h diff --git a/src/tools/tools.pri b/src/tools/tools.pri new file mode 100644 index 000000000..513853538 --- /dev/null +++ b/src/tools/tools.pri @@ -0,0 +1,93 @@ +HEADERS += \ + src/tools/vtooldetail.h \ + src/tools/vdatatool.h \ + src/tools/vabstracttool.h \ + src/tools/tools.h \ + src/tools/drawTools/vtooltriangle.h \ + src/tools/drawTools/vtoolsplinepath.h \ + src/tools/drawTools/vtoolspline.h \ + src/tools/drawTools/vtoolsinglepoint.h \ + src/tools/drawTools/vtoolshoulderpoint.h \ + src/tools/drawTools/vtoolpointofintersection.h \ + src/tools/drawTools/vtoolpointofcontact.h \ + src/tools/drawTools/vtoolpoint.h \ + src/tools/drawTools/vtoolnormal.h \ + src/tools/drawTools/vtoollinepoint.h \ + src/tools/drawTools/vtoollineintersect.h \ + src/tools/drawTools/vtoolline.h \ + src/tools/drawTools/vtoolheight.h \ + src/tools/drawTools/vtoolendline.h \ + src/tools/drawTools/vtoolbisector.h \ + src/tools/drawTools/vtoolarc.h \ + src/tools/drawTools/vtoolalongline.h \ + src/tools/drawTools/vdrawtool.h \ + src/tools/drawTools/drawtools.h \ + src/tools/modelingTools/vmodelingtriangle.h \ + src/tools/modelingTools/vmodelingtool.h \ + src/tools/modelingTools/vmodelingsplinepath.h \ + src/tools/modelingTools/vmodelingspline.h \ + src/tools/modelingTools/vmodelingshoulderpoint.h \ + src/tools/modelingTools/vmodelingpointofintersection.h \ + src/tools/modelingTools/vmodelingpointofcontact.h \ + src/tools/modelingTools/vmodelingpoint.h \ + src/tools/modelingTools/vmodelingnormal.h \ + src/tools/modelingTools/vmodelinglinepoint.h \ + src/tools/modelingTools/vmodelinglineintersect.h \ + src/tools/modelingTools/vmodelingline.h \ + src/tools/modelingTools/vmodelingheight.h \ + src/tools/modelingTools/vmodelingendline.h \ + src/tools/modelingTools/vmodelingbisector.h \ + src/tools/modelingTools/vmodelingarc.h \ + src/tools/modelingTools/vmodelingalongline.h \ + src/tools/modelingTools/modelingtools.h \ + src/tools/nodeDetails/vnodesplinepath.h \ + src/tools/nodeDetails/vnodespline.h \ + src/tools/nodeDetails/vnodepoint.h \ + src/tools/nodeDetails/vnodearc.h \ + src/tools/nodeDetails/vabstractnode.h \ + src/tools/nodeDetails/nodedetails.h + +SOURCES += \ + src/tools/vtooldetail.cpp \ + src/tools/vdatatool.cpp \ + src/tools/vabstracttool.cpp \ + src/tools/drawTools/vtooltriangle.cpp \ + src/tools/drawTools/vtoolsplinepath.cpp \ + src/tools/drawTools/vtoolspline.cpp \ + src/tools/drawTools/vtoolsinglepoint.cpp \ + src/tools/drawTools/vtoolshoulderpoint.cpp \ + src/tools/drawTools/vtoolpointofintersection.cpp \ + src/tools/drawTools/vtoolpointofcontact.cpp \ + src/tools/drawTools/vtoolpoint.cpp \ + src/tools/drawTools/vtoolnormal.cpp \ + src/tools/drawTools/vtoollinepoint.cpp \ + src/tools/drawTools/vtoollineintersect.cpp \ + src/tools/drawTools/vtoolline.cpp \ + src/tools/drawTools/vtoolheight.cpp \ + src/tools/drawTools/vtoolendline.cpp \ + src/tools/drawTools/vtoolbisector.cpp \ + src/tools/drawTools/vtoolarc.cpp \ + src/tools/drawTools/vtoolalongline.cpp \ + src/tools/drawTools/vdrawtool.cpp \ + src/tools/modelingTools/vmodelingtriangle.cpp \ + src/tools/modelingTools/vmodelingtool.cpp \ + src/tools/modelingTools/vmodelingsplinepath.cpp \ + src/tools/modelingTools/vmodelingspline.cpp \ + src/tools/modelingTools/vmodelingshoulderpoint.cpp \ + src/tools/modelingTools/vmodelingpointofintersection.cpp \ + src/tools/modelingTools/vmodelingpointofcontact.cpp \ + src/tools/modelingTools/vmodelingpoint.cpp \ + src/tools/modelingTools/vmodelingnormal.cpp \ + src/tools/modelingTools/vmodelinglinepoint.cpp \ + src/tools/modelingTools/vmodelinglineintersect.cpp \ + src/tools/modelingTools/vmodelingline.cpp \ + src/tools/modelingTools/vmodelingheight.cpp \ + src/tools/modelingTools/vmodelingendline.cpp \ + src/tools/modelingTools/vmodelingbisector.cpp \ + src/tools/modelingTools/vmodelingarc.cpp \ + src/tools/modelingTools/vmodelingalongline.cpp \ + src/tools/nodeDetails/vnodesplinepath.cpp \ + src/tools/nodeDetails/vnodespline.cpp \ + src/tools/nodeDetails/vnodepoint.cpp \ + src/tools/nodeDetails/vnodearc.cpp \ + src/tools/nodeDetails/vabstractnode.cpp diff --git a/tools/vabstracttool.cpp b/src/tools/vabstracttool.cpp similarity index 100% rename from tools/vabstracttool.cpp rename to src/tools/vabstracttool.cpp diff --git a/tools/vabstracttool.h b/src/tools/vabstracttool.h similarity index 100% rename from tools/vabstracttool.h rename to src/tools/vabstracttool.h diff --git a/tools/vdatatool.cpp b/src/tools/vdatatool.cpp similarity index 100% rename from tools/vdatatool.cpp rename to src/tools/vdatatool.cpp diff --git a/tools/vdatatool.h b/src/tools/vdatatool.h similarity index 100% rename from tools/vdatatool.h rename to src/tools/vdatatool.h diff --git a/tools/vtooldetail.cpp b/src/tools/vtooldetail.cpp similarity index 100% rename from tools/vtooldetail.cpp rename to src/tools/vtooldetail.cpp diff --git a/tools/vtooldetail.h b/src/tools/vtooldetail.h similarity index 100% rename from tools/vtooldetail.h rename to src/tools/vtooldetail.h diff --git a/version.h b/src/version.h similarity index 100% rename from version.h rename to src/version.h diff --git a/widgets/doubledelegate.cpp b/src/widgets/doubledelegate.cpp similarity index 100% rename from widgets/doubledelegate.cpp rename to src/widgets/doubledelegate.cpp diff --git a/widgets/doubledelegate.h b/src/widgets/doubledelegate.h similarity index 100% rename from widgets/doubledelegate.h rename to src/widgets/doubledelegate.h diff --git a/widgets/vapplication.cpp b/src/widgets/vapplication.cpp similarity index 100% rename from widgets/vapplication.cpp rename to src/widgets/vapplication.cpp diff --git a/widgets/vapplication.h b/src/widgets/vapplication.h similarity index 100% rename from widgets/vapplication.h rename to src/widgets/vapplication.h diff --git a/widgets/vcontrolpointspline.cpp b/src/widgets/vcontrolpointspline.cpp similarity index 100% rename from widgets/vcontrolpointspline.cpp rename to src/widgets/vcontrolpointspline.cpp diff --git a/widgets/vcontrolpointspline.h b/src/widgets/vcontrolpointspline.h similarity index 100% rename from widgets/vcontrolpointspline.h rename to src/widgets/vcontrolpointspline.h diff --git a/widgets/vgraphicssimpletextitem.cpp b/src/widgets/vgraphicssimpletextitem.cpp similarity index 100% rename from widgets/vgraphicssimpletextitem.cpp rename to src/widgets/vgraphicssimpletextitem.cpp diff --git a/widgets/vgraphicssimpletextitem.h b/src/widgets/vgraphicssimpletextitem.h similarity index 100% rename from widgets/vgraphicssimpletextitem.h rename to src/widgets/vgraphicssimpletextitem.h diff --git a/widgets/vitem.cpp b/src/widgets/vitem.cpp similarity index 100% rename from widgets/vitem.cpp rename to src/widgets/vitem.cpp diff --git a/widgets/vitem.h b/src/widgets/vitem.h similarity index 100% rename from widgets/vitem.h rename to src/widgets/vitem.h diff --git a/widgets/vmaingraphicsscene.cpp b/src/widgets/vmaingraphicsscene.cpp similarity index 100% rename from widgets/vmaingraphicsscene.cpp rename to src/widgets/vmaingraphicsscene.cpp diff --git a/widgets/vmaingraphicsscene.h b/src/widgets/vmaingraphicsscene.h similarity index 100% rename from widgets/vmaingraphicsscene.h rename to src/widgets/vmaingraphicsscene.h diff --git a/widgets/vmaingraphicsview.cpp b/src/widgets/vmaingraphicsview.cpp similarity index 100% rename from widgets/vmaingraphicsview.cpp rename to src/widgets/vmaingraphicsview.cpp diff --git a/widgets/vmaingraphicsview.h b/src/widgets/vmaingraphicsview.h similarity index 100% rename from widgets/vmaingraphicsview.h rename to src/widgets/vmaingraphicsview.h diff --git a/widgets/vtablegraphicsview.cpp b/src/widgets/vtablegraphicsview.cpp similarity index 100% rename from widgets/vtablegraphicsview.cpp rename to src/widgets/vtablegraphicsview.cpp diff --git a/widgets/vtablegraphicsview.h b/src/widgets/vtablegraphicsview.h similarity index 100% rename from widgets/vtablegraphicsview.h rename to src/widgets/vtablegraphicsview.h diff --git a/src/widgets/widgets.pri b/src/widgets/widgets.pri new file mode 100644 index 000000000..6dbdb83e2 --- /dev/null +++ b/src/widgets/widgets.pri @@ -0,0 +1,19 @@ +HEADERS += \ + src/widgets/vtablegraphicsview.h \ + src/widgets/vmaingraphicsview.h \ + src/widgets/vmaingraphicsscene.h \ + src/widgets/vitem.h \ + src/widgets/vgraphicssimpletextitem.h \ + src/widgets/vcontrolpointspline.h \ + src/widgets/vapplication.h \ + src/widgets/doubledelegate.h + +SOURCES += \ + src/widgets/vtablegraphicsview.cpp \ + src/widgets/vmaingraphicsview.cpp \ + src/widgets/vmaingraphicsscene.cpp \ + src/widgets/vitem.cpp \ + src/widgets/vgraphicssimpletextitem.cpp \ + src/widgets/vcontrolpointspline.cpp \ + src/widgets/vapplication.cpp \ + src/widgets/doubledelegate.cpp diff --git a/xml/vdomdocument.cpp b/src/xml/vdomdocument.cpp similarity index 100% rename from xml/vdomdocument.cpp rename to src/xml/vdomdocument.cpp diff --git a/xml/vdomdocument.h b/src/xml/vdomdocument.h similarity index 100% rename from xml/vdomdocument.h rename to src/xml/vdomdocument.h diff --git a/xml/vtoolrecord.cpp b/src/xml/vtoolrecord.cpp similarity index 100% rename from xml/vtoolrecord.cpp rename to src/xml/vtoolrecord.cpp diff --git a/xml/vtoolrecord.h b/src/xml/vtoolrecord.h similarity index 100% rename from xml/vtoolrecord.h rename to src/xml/vtoolrecord.h diff --git a/src/xml/xml.pri b/src/xml/xml.pri new file mode 100644 index 000000000..0214e42b5 --- /dev/null +++ b/src/xml/xml.pri @@ -0,0 +1,7 @@ +HEADERS += \ + src/xml/vtoolrecord.h \ + src/xml/vdomdocument.h + +SOURCES += \ + src/xml/vtoolrecord.cpp \ + src/xml/vdomdocument.cpp diff --git a/tools/tools.pri b/tools/tools.pri deleted file mode 100644 index 818066245..000000000 --- a/tools/tools.pri +++ /dev/null @@ -1,93 +0,0 @@ -HEADERS += \ - tools/vtooldetail.h \ - tools/vdatatool.h \ - tools/vabstracttool.h \ - tools/tools.h \ - tools/drawTools/vtooltriangle.h \ - tools/drawTools/vtoolsplinepath.h \ - tools/drawTools/vtoolspline.h \ - tools/drawTools/vtoolsinglepoint.h \ - tools/drawTools/vtoolshoulderpoint.h \ - tools/drawTools/vtoolpointofintersection.h \ - tools/drawTools/vtoolpointofcontact.h \ - tools/drawTools/vtoolpoint.h \ - tools/drawTools/vtoolnormal.h \ - tools/drawTools/vtoollinepoint.h \ - tools/drawTools/vtoollineintersect.h \ - tools/drawTools/vtoolline.h \ - tools/drawTools/vtoolheight.h \ - tools/drawTools/vtoolendline.h \ - tools/drawTools/vtoolbisector.h \ - tools/drawTools/vtoolarc.h \ - tools/drawTools/vtoolalongline.h \ - tools/drawTools/vdrawtool.h \ - tools/drawTools/drawtools.h \ - tools/modelingTools/vmodelingtriangle.h \ - tools/modelingTools/vmodelingtool.h \ - tools/modelingTools/vmodelingsplinepath.h \ - tools/modelingTools/vmodelingspline.h \ - tools/modelingTools/vmodelingshoulderpoint.h \ - tools/modelingTools/vmodelingpointofintersection.h \ - tools/modelingTools/vmodelingpointofcontact.h \ - tools/modelingTools/vmodelingpoint.h \ - tools/modelingTools/vmodelingnormal.h \ - tools/modelingTools/vmodelinglinepoint.h \ - tools/modelingTools/vmodelinglineintersect.h \ - tools/modelingTools/vmodelingline.h \ - tools/modelingTools/vmodelingheight.h \ - tools/modelingTools/vmodelingendline.h \ - tools/modelingTools/vmodelingbisector.h \ - tools/modelingTools/vmodelingarc.h \ - tools/modelingTools/vmodelingalongline.h \ - tools/modelingTools/modelingtools.h \ - tools/nodeDetails/vnodesplinepath.h \ - tools/nodeDetails/vnodespline.h \ - tools/nodeDetails/vnodepoint.h \ - tools/nodeDetails/vnodearc.h \ - tools/nodeDetails/vabstractnode.h \ - tools/nodeDetails/nodedetails.h - -SOURCES += \ - tools/vtooldetail.cpp \ - tools/vdatatool.cpp \ - tools/vabstracttool.cpp \ - tools/drawTools/vtooltriangle.cpp \ - tools/drawTools/vtoolsplinepath.cpp \ - tools/drawTools/vtoolspline.cpp \ - tools/drawTools/vtoolsinglepoint.cpp \ - tools/drawTools/vtoolshoulderpoint.cpp \ - tools/drawTools/vtoolpointofintersection.cpp \ - tools/drawTools/vtoolpointofcontact.cpp \ - tools/drawTools/vtoolpoint.cpp \ - tools/drawTools/vtoolnormal.cpp \ - tools/drawTools/vtoollinepoint.cpp \ - tools/drawTools/vtoollineintersect.cpp \ - tools/drawTools/vtoolline.cpp \ - tools/drawTools/vtoolheight.cpp \ - tools/drawTools/vtoolendline.cpp \ - tools/drawTools/vtoolbisector.cpp \ - tools/drawTools/vtoolarc.cpp \ - tools/drawTools/vtoolalongline.cpp \ - tools/drawTools/vdrawtool.cpp \ - tools/modelingTools/vmodelingtriangle.cpp \ - tools/modelingTools/vmodelingtool.cpp \ - tools/modelingTools/vmodelingsplinepath.cpp \ - tools/modelingTools/vmodelingspline.cpp \ - tools/modelingTools/vmodelingshoulderpoint.cpp \ - tools/modelingTools/vmodelingpointofintersection.cpp \ - tools/modelingTools/vmodelingpointofcontact.cpp \ - tools/modelingTools/vmodelingpoint.cpp \ - tools/modelingTools/vmodelingnormal.cpp \ - tools/modelingTools/vmodelinglinepoint.cpp \ - tools/modelingTools/vmodelinglineintersect.cpp \ - tools/modelingTools/vmodelingline.cpp \ - tools/modelingTools/vmodelingheight.cpp \ - tools/modelingTools/vmodelingendline.cpp \ - tools/modelingTools/vmodelingbisector.cpp \ - tools/modelingTools/vmodelingarc.cpp \ - tools/modelingTools/vmodelingalongline.cpp \ - tools/nodeDetails/vnodesplinepath.cpp \ - tools/nodeDetails/vnodespline.cpp \ - tools/nodeDetails/vnodepoint.cpp \ - tools/nodeDetails/vnodearc.cpp \ - tools/nodeDetails/vabstractnode.cpp diff --git a/widgets/widgets.pri b/widgets/widgets.pri deleted file mode 100644 index 4b908b906..000000000 --- a/widgets/widgets.pri +++ /dev/null @@ -1,19 +0,0 @@ -HEADERS += \ - widgets/vtablegraphicsview.h \ - widgets/vmaingraphicsview.h \ - widgets/vmaingraphicsscene.h \ - widgets/vitem.h \ - widgets/vgraphicssimpletextitem.h \ - widgets/vcontrolpointspline.h \ - widgets/vapplication.h \ - widgets/doubledelegate.h - -SOURCES += \ - widgets/vtablegraphicsview.cpp \ - widgets/vmaingraphicsview.cpp \ - widgets/vmaingraphicsscene.cpp \ - widgets/vitem.cpp \ - widgets/vgraphicssimpletextitem.cpp \ - widgets/vcontrolpointspline.cpp \ - widgets/vapplication.cpp \ - widgets/doubledelegate.cpp diff --git a/xml/xml.pri b/xml/xml.pri deleted file mode 100644 index 71489d606..000000000 --- a/xml/xml.pri +++ /dev/null @@ -1,7 +0,0 @@ -HEADERS += \ - xml/vtoolrecord.h \ - xml/vdomdocument.h - -SOURCES += \ - xml/vtoolrecord.cpp \ - xml/vdomdocument.cpp From e592c8f072318a212a4919b3b7556dc7ffb0baa7 Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 20 Nov 2013 16:05:34 +0200 Subject: [PATCH 34/56] Updated translation. --HG-- branch : develop --- share/translations/valentina_ru.ts | 1562 ++++++++++++++-------------- share/translations/valentina_uk.ts | 1294 +++++++++++------------ src/version.h | 4 +- 3 files changed, 1430 insertions(+), 1430 deletions(-) diff --git a/share/translations/valentina_ru.ts b/share/translations/valentina_ru.ts index 72d64a1ff..b7e13a511 100644 --- a/share/translations/valentina_ru.ts +++ b/share/translations/valentina_ru.ts @@ -4,1349 +4,1349 @@ DialogAlongLine - + Point along line Точка вдоль линии - + Length Длина - + Formula calculation of length of line - + Формула разчета длины линии - + Calculate formula - + Расчитать формулу - - + + ... - + Value of length - + Значение длины - + _ - + Name new point Имя новой точки - + Put variable into formula - + Поместить переменную в формулу - + First point Первая точка - + First point of line - + Первая точка линии - + Second point Вторая точка - + Second point of line - + Вторая точка линии - + Type line Тип линии - + Show line from first point to our point - + Показать линию с первой точки к нашей - + Input data Входные данные - + Size and growth Размер и рост - + Standart table Стандартная таблица - + Increments Прибавки - + Length of lines Длина линий - + Length of arcs Длина дуг - + Length of curves Длина кривых - + Variables. Click twice to select. - + Переменые. Нажмите дважды для вставки. - + Select second point of line - + Выберить вторую точку линии DialogArc - + Arc Дуга - + Radius Радиус - + Formula calculation of radius of arc - + Формула расчета радиуса дуги - - - + + + Put variable into formula - + Вставить переменную в формулу - - - - - - + + + + + + ... - - - + + + Calculate formula - + Расчитать формулу - + Value of radius - + Значение радиуса - - - + + + _ - + First angle degree Первый угол градусы - + First angle of arc counterclockwise - + Первый угол дуги против часовой стрелки - + Value of first angle - + Значение первого угла - + Second angle degree Второй угол градусы - + Second angle of arc counterclockwise - + Второй угол дуги против часвой стрелки - + Value of second angle - + Значение второго угла - + Center point Центральная точка - + Select point of center of arc - + Выберите точку центра дуги - + Input data Входные данные - + Size and growth Размер и рост - + Standart table Стандартная таблица - + Increments Прибавки - + Length of lines Длина линий - + Length of arcs Длина дуг - + Length of curves - Длина кривых + Длина кривых - + Angle of lines Уголы линий - + Variables - + Переменные - + Value angle of line. - + Значение угла линии. DialogBisector - + Bisector Бисектриса - + Length Длина - + Formula calculation of length of bisector - + Формула расчета длины бисектрисы - + Calculate formula - + Расчитать формулу - - + + ... - + Value of length - + Значение длины - + _ - + Name new point Имя новой точки - + Put variable into formula - + Поместить переменную в формулу - + First point Первая точка - + First point of angle - + Первая точка угла - + Second point Вторая точка - + Second point of angle - + Вторая точка угла - + Third point Треться точка - + Third point of angle - + Третья точка угла - + Type line Тип линии - + Show line from second point to our point - + Показать линию с второй точки к нашей - + Input data Входные данные - + Size and growth Размер и рост - + Standart table Стандартная таблица - + Increments Прибавки - + Length of lines Длина линий - + Length of arcs Длина дуг - + Length of curves Длина кривых - + Variables. Click twice to select. - + Переменые. Нажмите дважды для вставки. - + Select second point of angle - + Выберить вторую точку угла - + Select third point of angle - + Выберить третью точку угла DialogDetail - + Detail Деталь - + Bias X - + Смещение по Х - + Bias Y - + Смещение по Y - + Option - + Параметры - + Name of detail - + Имя детали - + Supplement for seams - + Прибавка на швы - + Width - + Ширина Name detail Имя детали - + Closed Замкнутая - + Get wrong scene object. Ignore. - + Получено не правильный объект сцены. Игнорируем. - + Get wrong tools. Ignore. - + Получено неправильный инструмент. Игнорируем. DialogEndLine - + Point in the end of line Точка на конце линии - + Length Длина - + Formula calculation of length of line - + Формула расчета длины линии - + Calculate formula - + Расчитать формулу - - - - - - - - - - + + + + + + + + + + ... - + Value of length - + Значение длины - + _ - + Base point Базовая точка - + First point of line - + Первая точка линии - + Name new point Имя новой точки - + Angle degree Угол градусы - + Angle of line - + Угол линии - + Type line Тип линии - + Show line from first point to our point - + Показать линию с первой точки к нашей - + Input data Входные данные - + Size and growth Размер и рост - + Standart table Стандартная таблица - + Increments Прибавки - + Length of lines Длина линий - + Length of arcs Длина дуг - + Length of curves Длина кривых - + Variables. Click twice to select. - + Переменые. Нажмите дважды для вставки. DialogHeight - + Dialog - + Диалог - + Name new point - Имя новой точки + Имя новой точки - + Base point - Базовая точка + Базовая точка - - - - + + + + First point of line - + Первая точка линии - + Second point of line - + Вторая точка линии - + Type line - Тип линии + Тип линии - + Show line from first point to our point - + Показать линию с первой точки к нашей - + Select first point of line - + Выберить первую точку линии - + Select second point of line - + Выберить вторую точку линии DialogHistory - + History История - - + + Tool Инструмент - + %1 - Base point - + %1 - Базовая точка - - + + %1_%2 - Line from point %1 to point %2 - + %1_%2 - Линия с точки %1 к точке %2 - + %3 - Point along line %1_%2 - + %3 - Точка вдоль линии %1_%2 - + %1 - Point of soulder - + %1 - Точка плеча - + %3 - Normal to line %1_%2 - + %3 - Перпендикуляр к линии %1_%2 - + %4 - Bisector of angle %1_%2_%3 - + %4 - Бисектриса угла %1_%2_%3 - + %5 - Point of intersection lines %1_%2 and %3_%4 - + %5 - Точка пересичения линий %1_%2 и %3_%4 - + Curve %1_%2 - + Кривая %1_%2 - + Arc with center in point %1 - + Дуга з центром в точке %1 - + Curve point %1 - + Точка кривой %1 - + %4 - Point of contact arc with center in point %1 and line %2_%3 - + %4 - Точка касания дуги с центром в точке %1 и линии %2_%3 - + Point of perpendical from point %1 to line %2_%3 - + Точка перпендикуляра с точки %1 к линии %2_%3 - + Triangle: axis %1_%2, points %3 and %4 - + Триугольник: ось %1_%2, точки %3 и %4 - + Get wrong tool type. Ignore. - + Получено неправилый тип инструмента. Игнорируется. DialogIncrements - - + + Increments Прибавки - + Table sizes Таблица размеров - - - - + + + + Denotation Обозначение - - + + The calculated value Расчитаное значение - - - - + + + + Base value Базовое значение - + In sizes В размерах - + In growths В ростах - - - - - - + + + + + + Description Опис - - - + + + In size В размерах - - - + + + In growth В ростах - - + + ... - + Lines Линии - - + + Line Линия - + Length of the line Длина линии - + Curves Кривые - - + + Curve Кривая - + Length of the curve Длина кривой - + Arcs Дуги - - + + Arc Дуга - + Length of arc Длина дуги - + Denotation %1 - + Обозначение %1 - + Can't convert toDouble value. - + Не могу конвертировать к toDouble значение. - - + + Calculated value - + Расчитаное значение - - - + + + Length - Длина + Длина DialogLine - + Line Линия - + First point Первая точка - + Second point Вторая точка - + Select second point - + Выберить вторую точку DialogLineIntersect - + Point of line intersection Точка пересичения линий - + Name new point Имя новой точки - + First line Первая линия - - + + First point Первая точка - - + + Second point Вторая точка - + Second line Вторая линия - + Select second point of first line - + Выберить вторую точку первой линии - + Select first point of second line - + Выберить первую точку второй линии - + Select second point of second line - + Выберить вторую точку второй линии DialogNormal - + Normal Перпендикуляр - + Length Длина - + Formula calculation of length of normal - + Формула расчета длины перпендикуляра - + Calculate formula - + Расчитать формулу - - - - - - - - - - + + + + + + + + + + ... - + Value of length - + Значение длины - + _ - + Name new point Имя новой точки - + Put variable into formula - + Поместить переменную в формулу - + First point Первая точка - + Second point Вторая точка - + Additional angle degrees Дополнительные угол градусы - + Type line Тип линии - + Show line from first point to our point - + Показать линию с первой точки к нашей - + Input data Входные данные - + Size and growth Размер и рост - + Standart table Стандартная таблица - + Increments Прибавки - + Length of lines Длина линий - + Length of arcs Длина дуг - + Length of curves Длина кривых - + Variables. Click twice to select. - + Переменые. Нажмите дважды для вставки. - + Select second point of line - + Выберить вторую точку линии DialogPointOfContact - + Point of contact Точка касания - + Radius Радиус - + Formula calculation of radius of arc - + Формула расчета радиуса дуги - + Calculate formula - + Расчитать формулу - - + + ... - + Value of radius - + Значение радиуса - + _ - + Name new point Имя новой точки - + Put variable into formula - + Поместить переменную в формулу - + Center of arc Центр дуги - + Slect point of center of arc - + Выберите точку центра дуги - + Top of the line Начало линии - + End of the line Конец линии - + Input data Входные данные - + Size and growth Размер и рост - + Standart table Стандартная таблица - + Increments Прибавки - + Length of lines Длина линий - + Length of arcs Длина дуг - + Length of curves Длина кривых - + Variables. Click twice to select. - + Переменые. Нажмите дважды для вставки. - + Select second point of line - + Выберить вторую точку линии - + Select point of center of arc - + Выберите точку центра дуги DialogPointOfIntersection - + Dialog - + Диалог - + Name new point - Имя новой точки + Имя новой точки - + Point vertically - + Точка по вертикали - + First point of angle - + Первая точка угла - + Point horizontally - + Точка по горизонтали - + Second point of angle - + Вторая точка угла - + Select point horizontally - + Выберить точку по горозинтали DialogShoulderPoint - - + + Point of shoulder Точка плеча - + Length Длина - + Formula calculation of length of line - + Формула расчета длины линии - + Calculate formula - + Расчитать формулу - - + + ... - + Value of length - + Значение длины - + _ - + Name new point Имя новой точки - + Put variable into formula - + Поместить переменную в формулу - + First point Первая точка - + Second point Вторая точка - + Type of line Тип линии - + Show line from first point to our point - + Показать линию с первой точки к нашей - + Input data Входные данные - + Size and growth Размер и рост - + Standart table Стандартная таблица - + Increments Прибавки - - + + Length of lines Длина линий - + Length of curves Длина кривых - + Variables. Click twice to select. - + Переменые. Нажмите дважды для вставки. - + Select second point of line - + Выберить вторую точку линии - + Select point of shoulder - + Выберить точку плеча DialogSinglePoint - + Single point Одиночная точка @@ -1355,27 +1355,27 @@ Координаты - + Coordinates on the sheet - + Координаты на листе - + Coordinates - + Координаты - + Y coordinate Y координата - + X coordinate Х координата - + Point name Имя точки @@ -1383,748 +1383,748 @@ DialogSpline - + Curve Кривая - + First point Первая точка - + Length ratio of the first control point Коефициент длины первой контрольной точки - + The angle of the first control point Угол первой контрольной точки - + Second point Вторая точка - + Length ratio of the second control point Коефициент длины второй контрольной точки - + The angle of the second control point Угол второй контрольной точки - + Coefficient of curvature of the curve Коефициент кривизные кривой - + Select last point of curve - + Выберить последнюю точку кривой DialogSplinePath - + Curve path Сложная кривая - + Point of curve Точка кривой - + Length ratio of the first control point Коефициент длины первой контрольной точки - + The angle of the first control point Угол первой контрольной точки - + Length ratio of the second control point Коефициент длины второй контрольной точки - + The angle of the second control point Угол второй контрольной точки - + List of points - + Список точок - + Coefficient of curvature of the curve Коефициент кривизные кривой - + Select point of curve path - + Выберить точку сложной кривой DialogTool - + Wrong details id. - + Неправильный id детали. - - - + + + Line - Линия + Линия - - + + No line - + Без линии - + Can't find point by name - + Не могу найти точку за именем - + Error - + Ошибка - + Growth - + Рост - + Size - + Размер - + Line length - + Длина линии - + Arc length - + Длина дуги - + Curve length - + Длина кривой DialogTriangle - + Dialog - + Диалог - + Name new point - Имя новой точки + Имя новой точки - + First point of axis - + Первая точка оси - - - - + + + + First point of line - + Первая точка линии - + Second point of axis - + Вторая точка оси - + First point - Первая точка + Первая точка - + Second point - Вторая точка + Вторая точка - + Select second point of axis - + Выберить вторую точку оси - + Select first point - + Выберить первую точку - + Select second point - + Выберить вторую точку MainWindow - + Valentina Valentina - + Tools for creating points. - + Инструменты для создания точок. - + Point Точка - + Tool point of normal. - + Инструмент точка перпендикуляра. - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + ... - + Tool point of shoulder. - + Инструмент точка плеча. - + Tool point on the end line. - + Инструмент точка на конце отрезка. - + Tool point along line. - + Инструмент точка вдоль линии. - + Tool point of bisector. - + Инструмент точка бисектрисы. - + Tool point of contact. - + Инструмент точка касания. - + Tool point of height. - + Инструмент точка высоты. - + Tool triangle. - + Инструмент угольник. - + Tools for creating lines. - + Инструменты создания линий. - + Line Линия - + Tool line. - + Инструмент линия. - + Tool point of line intersection. - + Инструмент точка пересичения линий. - + Tools for creating curves. - + Инструменты создания кривых. - + Curve Кривая - + Tool curve. - + Инструмент кривая. - + Tool path curve. - + Инструмент сложная кривая. - + Tools for creating arcs. - + Инструменты создания дуг. - + Arc Дуга - + Tool arc. - + Инструмент дуга. - + Tools for creating details. - + Инструменты создания деталей. - + Detail Деталь - + Tool new detail. - + Инструмент новая деталь. - + File - + Файл - + Help - + Помощь - + Drawing - + Чертеж - + toolBar - + toolBar_2 - + toolBar_3 - + New Новое - + Create a new pattern Создать новое лекало - + Open Открыть - + Open file with pattern Открыть файл с лекалом - + Save Сохранить - + Save pattern Сохранить лекало - - + + Save as Сохранить как - + Save not yet saved pattern Сохранить еще не сохраненное лекало - + Draw Рисование - + Draw mode Режим рисования - + Details Детали - + Deatils mode Режим деталей - - + + Tools pointer Инструмент указатель - + New drawing Новый чертеж - + Add new drawing Добавить новый чертеж - - + + Change the name of drawing Изменить имя чертежа - + Table of variables Таблица переменных - + Tables of variables Таблици переменных - + History История - + Layout Роскладка - + Create layout Создать раскладку - - + + About Qt - + Про Qt - - + + About Valentina - + Про Valentina - + Exit - + Выход - + Drawing %1 Чертеж %1 - - + + Drawing: Чертеж: - + Enter a name for the drawing. Введите имя чертежа. - - + + Error. Drawing of same name already exists. Ошибка. Чертеж с таким именем уже существует. - + Error creating drawing with the name Ошибка создания чертежа с именем - + Enter a new name for the drawing. Введите новое имя для чертежа. - + Error saving change!!! - + Пошибка сохранение изменений!!! - + Can't save new name of drawing - + Не могу сохранить новое имя чертежа - - + + Select point - + Выберить точку - + Select first point - + Выберить первую точку - - - + + + Select first point of line - + Выберить первую точку линии - + Select first point of angle - + Выберить первую точку угла - + Select first point of first line - + Выберить первую точку первой линии - + Select first point curve - + Выберить первую точку кривой - + Select point of center of arc - + Выберить точку центра дуги - + Select point of curve path - + Выберить точку сложной кривой - + The pattern has been modified. - + Лекало было изменено. - + Do you want to save your changes? - + Вы хочете сохранить изменения? - + Growth: Рост: - + Size: Размер: - + Drawing: Чертеж: - + Lekalo files (*.xml);;All files (*.*) - + Файлы лекала (*.xml);;Все файлы (*.*) - - + + Lekalo files (*.xml) Файл лекала (*.xml) - + Error saving file. Can't save file. - + Ошибка сохранения файла. Не могу сохранить файл. - + Open file Открыть файл - + Got empty file name. - + Получено пустое имя файла. - + Could not copy temp file to pattern file - + Не могу скопировать временный файл у файл лекала - + Could not remove pattern file - + Не смог удалить файл лекала - + Can't open pattern file. File name empty Не могу открыть файл лекала. Пустое имя файла - - - - - - - - + + + + + + + + Error! Ошибка! - + Create new drawing for start working. - + Создайте новый чертеж для начала роботы. - + Select points, arcs, curves clockwise. - + Выберить точки, дуги, кривые за часовой стрелкой. - + Select base point - + Выберить базовую точку - + Select first point of axis - + Выберить первую тчоку оси - + Select point vertically - + Выберить точку по вертикали - + Based on Qt %2 (32 bit) - + Базируется на Qt %2 (32 bit) - + Built on %3 at %4 - + Создано %3 в %4 - + <h1>%1</h1> %2 <br/><br/> %3 <br/><br/> %4 - + - + Error parsing file. Ошибка парсинга файла. - + Error can't convert value. Ошибка, не могу конвертовать значение. - + Error empty parameter. Ошибка, пустой параметр. - + Error wrong id. Ошибка, неправильный id. - - + + Error don't unique id. - + Ошибка не уникальный id. - + Error parsing pattern file. Ошибка парсинга файла лекала. - + Error in line %1 column %2 Ошибка в линии %1 столбец %2 @@ -2132,101 +2132,101 @@ TableWindow - + Create a layout Создать раскладку - + toolBar toolBar - + Save Сохранить - - + + Save layout Создать раскладку - + Next Следующая - + Next detail Следующая деталь - + Turn Перевернуть - + Turn the detail 180 degrees Перевернуть детальна на 180 градусов - + Stop laying Прекратить укладку - + Enlarge letter Увеличить лист - + Enlarge the length of sheet Увеличить длину листа - + Reduce sheet Уменьшить лист - + Reduce the length of the sheet Уменьшить длину листа - - + + Mirroring Отражение - - + + Zoom In Увеличить - - + + Zoom Out Уменьшить - + Stop Стоп - + SVG Generator Example Drawing SVG Generator Example Drawing - + An SVG drawing created by the SVG Generator Example provided with Qt. An SVG drawing created by the SVG Generator Example provided with Qt. @@ -2234,76 +2234,76 @@ VAbstractNode - + Can't find tag Modeling - + Не могу найти тег Modeling VApplication - - - - - - + + + + + + Error! Ошибка! - + Error parsing file. Program will be terminated. Ошибка парсинга файла. Програма будет закрыта. - + Error bad id. Program will be terminated. Ошибка, неправильный id. Програма будет закрыта. - + Error can't convert value. Program will be terminated. Ошибка не могу конвертировать значение. Програма будет закрыта. - + Error empty parameter. Program will be terminated. Ошибка пустой параметр. Програма будет закрыта. - + Error wrong id. Program will be terminated. Ошибка неправельный id. Програма будет закрыта. - + Something wrong!! - + Что то не так!!! VArc - + Can't find id = %1 in table. - + Не могу найти id = %1 в таблице. - + Angle of arc can't be 0 degree. - + Угол дуги не может быть 0 градусов. - + Arc have not this number of part. - + Дуга не имеет ету часть. VContainer - + Can't find object Не могу найти объект @@ -2311,139 +2311,139 @@ VDomDocument - + Got wrong parameter id. Need only id > 0. Получен неправельный параметр id. Допустимы только id > 0. - + Can't convert toLongLong parameter Не могу конвертировать toLongLong параметр - + Got empty parameter Получен пустой параметр - + Can't convert toDouble parameter Не могу конвертировать toDouble параметр - + This id is not unique. - + Этот id не уникальный. - + Error creating or updating detail Ошибка создания или обновления детали - + Error creating or updating single point Ошибка создания или обновления базовой точки - + Error creating or updating point of end line Ошибка создания или обновления точки на конце линии - + Error creating or updating point along line Ошибка создания или обновления точки вдоль линии - + Error creating or updating point of shoulder Ошибка создания или обновления точки плеча - + Error creating or updating point of normal Ошибка создания или обновления точки нормали - + Error creating or updating point of bisector Ошибка создания или обновления точки бисектрисы - + Error creating or updating point of lineintersection Ошибка создания или обновления точки пересичения линий - + Error creating or updating point of contact Ошибка создания или обновления точки прикосновения - + Error creating or updating modeling point Ошибка создания или обновления точки - + Error creating or updating height - + Ошибка создания или обновления высоты - + Error creating or updating triangle - + Ошибка создания или обновления треугольника - + Error creating or updating point of intersection - + Ошибка создания или обновления точки пересичения - + Error creating or updating line Ошибка создания или обновления линии - + Error creating or updating simple curve Ошибка создания или обновления кривой - + Error creating or updating curve path Ошибка создания или обновления сложной кривой - + Error creating or updating modeling simple curve Ошибка создания или обновления модельной кривой - + Error creating or updating modeling curve path Ошибка создания или обновления сложной модельной кривой - + Error creating or updating simple arc Ошибка создания или обновления дуги - + Error creating or updating modeling arc Ошибка создания или обновления модельной дуги - + Error! - Ошибка! + Ошибка! - + Error parsing file. - Ошибка парсинга файла. + Ошибка парсинга файла. Can't get parent for object id = %1 @@ -2453,50 +2453,50 @@ VDrawTool - + Options Параметры - + Delete Удалить - + Can not find the element after which you want to insert. - + Не могу найти елемент после которого вы хочете вставить. - + Can't find tag Calculation - + Не могу найти тег Calculation VModelingTool - + Option - + Параметры - + Delete - Удалить + Удалить VSplinePath - + Not enough points to create the spline. Не достаточно точок для создания кривой. - - - + + + This spline is not exist. Такой кривой не существует. @@ -2504,25 +2504,25 @@ VTableGraphicsView - + detail don't find - + деталь не найдена - + detail find - + деталь найдена VToolDetail - + Options - Параметры + Параметры - + Delete Удалить @@ -2530,9 +2530,9 @@ VToolTriangle - + Can't find point. - + Не могу найти точку. diff --git a/share/translations/valentina_uk.ts b/share/translations/valentina_uk.ts index 6d8446548..c92eb87c6 100644 --- a/share/translations/valentina_uk.ts +++ b/share/translations/valentina_uk.ts @@ -4,123 +4,123 @@ DialogAlongLine - + Point along line Точка вздовж лінії - + Length Довжина - + Formula calculation of length of line Формула розрахунку довжини лінії - + Calculate formula Розрахувати формулу - - + + ... - + Value of length Значення довжини - + _ - + Name new point Ім'я нової точки - + Put variable into formula Вставити змінну в формулу - + First point Перша точка - + First point of line Перша точка лінії - + Second point Друга точка - + Second point of line Друга точка лінії - + Type line Тип лінії - + Show line from first point to our point Показати лінію від першої точки до нашої точки - + Input data Вхідні данні - + Size and growth Розмір і зріст - + Standart table Стандартна таблиця - + Increments Прибавки - + Length of lines Довжина ліній - + Length of arcs Довжина дуг - + Length of curves Довжина кривих - + Variables. Click twice to select. Змінні. Подвійний клік для вибору. - + Select second point of line Виберіть другу точку лінії @@ -128,143 +128,143 @@ DialogArc - + Arc Дуга - + Radius Радіус - + Formula calculation of radius of arc Формула калькуляції радіуса дуги - - - + + + Put variable into formula Вставити змінну в формулу - - - - - - + + + + + + ... - - - + + + Calculate formula Розрахувати формулу - + Value of radius Значення радіусу - - - + + + _ - + First angle degree Перший кут градуси - + First angle of arc counterclockwise Перший кут дуги проти годинникової стрілки - + Value of first angle Значення першого кута - + Second angle degree Другий кут градуси - + Second angle of arc counterclockwise Другий кут дуги проти годинникової стрілки - + Value of second angle Значення другого кута - + Center point Точка центру - + Select point of center of arc Виберіть точку центра дуги - + Input data Вхідні данні - + Size and growth Розмір і зріст - + Standart table Стандартна таблиця - + Increments Прибавки - + Length of lines Довжина ліній - + Length of arcs Довжина дуг - + Length of curves - + Довжина кривих - + Angle of lines Кут ліній - + Variables Змінні - + Value angle of line. Значення дуги лінії. @@ -272,138 +272,138 @@ DialogBisector - + Bisector Бісектриса - + Length Довжина - + Formula calculation of length of bisector Формула калькуляції довжини бісектриси - + Calculate formula Розрахувати формулу - - + + ... - + Value of length Значення довжини - + _ - + Name new point Ім'я нової точки - + Put variable into formula Вставити змінну в формулу - + First point Перша точка - + First point of angle Перша точка кута - + Second point Друга точка - + Second point of angle Друга точка кута - + Third point Третя точка - + Third point of angle Третя точка кута - + Type line Тип лінії - + Show line from second point to our point Показати лінію з другої точки кута до нашої точки - + Input data Вхідні данні - + Size and growth Розмір і зріст - + Standart table Стандартна таблиця - + Increments Прибавки - + Length of lines Довжина ліній - + Length of arcs Довжина дуг - + Length of curves Довжина кривих - + Variables. Click twice to select. Змінні. Подвійний клік для вибору. - + Select second point of angle Виберіть другу точку кута - + Select third point of angle Виберіть третю точку кута @@ -411,56 +411,56 @@ DialogDetail - + Detail Деталь - + Bias X - + Зміщення по Х - + Bias Y - + Зміщення по Y - + Option - + Параметри - + Name of detail - + Ім'я деталі - + Supplement for seams - + Прибавка на шви - + Width - + Ширина Name detail Ім'я деталі - + Closed Замкнена - + Get wrong scene object. Ignore. Отримано непаравильний об'єкт сцени. Ігноровано. - + Get wrong tools. Ignore. Отримано неправильний інструмент. Ігноровано. @@ -468,121 +468,121 @@ DialogEndLine - + Point in the end of line Точка на кінці відрізку - + Length Довжина - + Formula calculation of length of line Формула розрахунку довжини лінії - + Calculate formula Розрахувати формулу - - - - - - - - - - + + + + + + + + + + ... - + Value of length Значення довжини - + _ - + Base point Базова точка - + First point of line Перша точка лінії - + Name new point Ім'я нової точки - + Angle degree Кут градуси - + Angle of line Кут лінії - + Type line Тип лінії - + Show line from first point to our point Показати лінію від першої точки до нашої точки - + Input data Вхідні данні - + Size and growth Розмір і зріст - + Standart table Стандартна таблиця - + Increments Прибавки - + Length of lines Довжина ліній - + Length of arcs Довжина дуг - + Length of curves Довжина кривих - + Variables. Click twice to select. Змінні. Подвійний клік для вибору. @@ -590,135 +590,135 @@ DialogHeight - + Dialog - + Діалог - + Name new point - Ім'я нової точки + Ім'я нової точки - + Base point - Базова точка + Базова точка - - - - + + + + First point of line - Перша точка лінії + Перша точка лінії - + Second point of line - Друга точка лінії + Друга точка лінії - + Type line - Тип лінії + Тип лінії - + Show line from first point to our point - Показати лінію від першої точки до нашої точки + Показати лінію від першої точки до нашої точки - + Select first point of line - Виберість першу точку лінії + Виберість першу точку лінії - + Select second point of line - Виберіть другу точку лінії + Виберіть другу точку лінії DialogHistory - + History Історія - - + + Tool Інструмент - + %1 - Base point %1 - Базова точка - - + + %1_%2 - Line from point %1 to point %2 %1_%2 - Лінія від точки %1 до точки %2 - + %3 - Point along line %1_%2 %3 - Точка вздовж лінії %1_%2 - + %1 - Point of soulder %1 - Точка плеча - + %3 - Normal to line %1_%2 %3 - Перпедикуляр до лінії %1_%2 - + %4 - Bisector of angle %1_%2_%3 %4 - Бісектриса кута %1_%2_%3 - + %5 - Point of intersection lines %1_%2 and %3_%4 %5 - Точка перетину лінії %1_%2 і %3_%4 - + Curve %1_%2 Крива %1_%2 - + Arc with center in point %1 Дуга з центром в точці %1 - + Curve point %1 Точка кривої %1 - + %4 - Point of contact arc with center in point %1 and line %2_%3 %4 - Точка дотику дуги з центром в точці %1 і лінії %2_%3 - + Point of perpendical from point %1 to line %2_%3 - + Точка перпендикуляра з точки %1 до лінії %2_%3 - + Triangle: axis %1_%2, points %3 and %4 - + Трикутник: вісь %1_%2, точки %3 і %4 - + Get wrong tool type. Ignore. Отримано неправильний тип інструменту. Ігноруємо. @@ -726,146 +726,146 @@ DialogIncrements - - + + Increments Прибавки - + Table sizes Таблиця розмірів - - - - + + + + Denotation Позначення - - + + The calculated value Розраховане значення - - - - + + + + Base value Базове значення - + In sizes В розмірах - + In growths В ростах - - - - - - + + + + + + Description Опис - - - + + + In size В розмірах - - - + + + In growth В ростах - - + + ... - + Lines Лінії - - + + Line Лінія - + Length of the line Довжина лінії - + Curves Криві - - + + Curve Крива - + Length of the curve Довжина кривої - + Arcs Дуги - - + + Arc Дуга - + Length of arc Довжина дуги - + Denotation %1 Позначення %1 - + Can't convert toDouble value. - + Не можу конвертувати toDouble значення. - - + + Calculated value Розраховане значення - - - + + + Length Довжина @@ -873,22 +873,22 @@ DialogLine - + Line Лінія - + First point Перша точка - + Second point Друга точка - + Select second point Виберіть другу точку @@ -896,49 +896,49 @@ DialogLineIntersect - + Point of line intersection Точка перетину ліній - + Name new point Ім'я нової точки - + First line Перша лінія - - + + First point Перша точка - - + + Second point Друга точка - + Second line Друга лінія - + Select second point of first line Виберіть другу точка першої лінії - + Select first point of second line Виберіть першу точку другої лінії - + Select second point of second line Виберіть другу точку другої лінії @@ -946,126 +946,126 @@ DialogNormal - + Normal Перпендикуляр - + Length Довжина - + Formula calculation of length of normal Формула розрахунку довжини перпендикуляра - + Calculate formula Розрахувати формулу - - - - - - - - - - + + + + + + + + + + ... - + Value of length Значення довжини - + _ - + Name new point Ім'я нової точки - + Put variable into formula Вставити змінну в формулу - + First point Перша точка - + Second point Друга точка - + Additional angle degrees Додатковий кут градуси - + Type line Тип лінії - + Show line from first point to our point Показати лінію від першої точки до нашої точки - + Input data Вхідні данні - + Size and growth Розмір і зріст - + Standart table Стандартна таблиця - + Increments Прибавки - + Length of lines Довжини ліній - + Length of arcs Довжини дуг - + Length of curves Довжини кривих - + Variables. Click twice to select. Змінні. Подвійний клік для вибору. - + Select second point of line Виберіть другу точку лінії @@ -1073,118 +1073,118 @@ DialogPointOfContact - + Point of contact Точка дотику - + Radius Радіус - + Formula calculation of radius of arc Формула розрахунку радіуса дуги - + Calculate formula Розрахувати формулу - - + + ... - + Value of radius Значення радіусу - + _ - + Name new point Ім'я нової точки - + Put variable into formula Вставити змінну в формулу - + Center of arc Центер дуги - + Slect point of center of arc Виберіть точку центру дуги - + Top of the line Початок лінії - + End of the line Кінець лінії - + Input data Вхідні данні - + Size and growth Розмір і зріст - + Standart table Стандартна таблиця - + Increments Прибавки - + Length of lines Довжини ліній - + Length of arcs Довжини дуг - + Length of curves Довжини кривих - + Variables. Click twice to select. Змінні. Подвійний клік для вибору. - + Select second point of line Виберіть другу точку лінії - + Select point of center of arc Виберіть точку центру дуги @@ -1192,153 +1192,153 @@ DialogPointOfIntersection - + Dialog - + Діалог - + Name new point - Ім'я нової точки + Ім'я нової точки - + Point vertically - + Точка по вертикалі - + First point of angle - Перша точка кута + Перша точка кута - + Point horizontally - + Точка по горизонталі - + Second point of angle - Друга точка кута + Друга точка кута - + Select point horizontally - + Виберіть точку горизонталі DialogShoulderPoint - - + + Point of shoulder Точка плеча - + Length Довжина - + Formula calculation of length of line Формула розрахунку довжини лінії - + Calculate formula Розрахувати формулу - - + + ... - + Value of length Значення довжини - + _ - + Name new point Ім'я нової точки - + Put variable into formula Вставити змінну в формулу - + First point Перша точка - + Second point Друга точка - + Type of line Тип лінії - + Show line from first point to our point Показати лінію від першої точки до нашої точки - + Input data Вхідні данні - + Size and growth Розмір і зріст - + Standart table Стандартна таблиця - + Increments Прибавки - - + + Length of lines Довжини лінії - + Length of curves Довжни кривих - + Variables. Click twice to select. Змінні. Подвійний клік для вибору. - + Select second point of line Виберіть другу точку лінії - + Select point of shoulder Виберіть точку плеча @@ -1346,7 +1346,7 @@ DialogSinglePoint - + Single point Точка @@ -1355,27 +1355,27 @@ Координати - + Coordinates on the sheet Координати на листі - + Coordinates Координати - + Y coordinate Y координата - + X coordinate Х координата - + Point name Ім'я точки @@ -1383,47 +1383,47 @@ DialogSpline - + Curve Крива - + First point Перша точка - + Length ratio of the first control point Коефіцієнт довжини першої контрольної точки - + The angle of the first control point Кут першої контрольної точки - + Second point Друга точка - + Length ratio of the second control point Коефіцієнт довжини другої контрольної точки - + The angle of the second control point Кут другої контрольної точки - + Coefficient of curvature of the curve Коефіцієнт кривизни кривої - + Select last point of curve Виберість останню точку кривої @@ -1431,47 +1431,47 @@ DialogSplinePath - + Curve path Складна крива - + Point of curve Точка кривої - + Length ratio of the first control point Коефіцієнт довжини першої контрольної точки - + The angle of the first control point Кут першої контрольної точки - + Length ratio of the second control point Коефіцієнт довжини другої контрольної точки - + The angle of the second control point Кут другої контрольної точки - + List of points Список точок - + Coefficient of curvature of the curve Коефіцієнт кривизни кривої - + Select point of curve path Виберіть точку складної кривої @@ -1479,498 +1479,498 @@ DialogTool - + Wrong details id. Неправильний id деталі. - - - + + + Line Лінія - - + + No line Без лінії - + Can't find point by name - + Не можу знайти точку за ім'ям - + Error Помилка - + Growth - + Зріст - + Size - + Розмір - + Line length Довжина лінії - + Arc length - + Довжина дуги - + Curve length - + Довжина кривої DialogTriangle - + Dialog - + Діалог - + Name new point - Ім'я нової точки + Ім'я нової точки - + First point of axis - + Перша точка вісі - - - - + + + + First point of line - Перша точка лінії + Перша точка лінії - + Second point of axis - + Друга точка вісі - + First point - Перша точка + Перша точка - + Second point - Друга точка + Друга точка - + Select second point of axis - + Виберіть другу точку вісі - + Select first point - Виберість першу точку + Виберість першу точку - + Select second point - Виберіть другу точку + Виберіть другу точку MainWindow - + Valentina Valentina - + Tools for creating points. Інструмент створення точок. - + Point Точка - + Tool point of normal. Інструмент точка перпендикуляра. - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + ... - + Tool point of shoulder. Інструмент точка плеча. - + Tool point on the end line. Інструмент точка на кінці лінії. - + Tool point along line. Інструмент точка вздовж лінії. - + Tool point of bisector. Інструмент точка бісектриси кута. - + Tool point of contact. Інструмент точка дотику. - + Tool point of height. - + Інструмент точка висоти. - + Tool triangle. - + Інструмент трикутник. - + Tools for creating lines. Інструменти для створення ліній. - + Line Лінія - + Tool line. Інструмент лінія. - + Tool point of line intersection. Інструмент точка перетину ліній. - + Tools for creating curves. Інструменти для створення кривих. - + Curve Крива - + Tool curve. Інструмент крива. - + Tool path curve. Інструмент складна крива. - + Tools for creating arcs. Інструменти для створення дуг. - + Arc Дуга - + Tool arc. Інструмент дуга. - + Tools for creating details. Інструменти для створення деталей. - + Detail Деталь - + Tool new detail. Інструмент нова деталь. - + File Файл - + Help Допомога - + Drawing Креслення - + toolBar - + toolBar_2 - + toolBar_3 - + New Новий - + Create a new pattern Створити нове лекало - + Open Відкрити - + Open file with pattern Відкрити файл з лекалами - + Save Зберегти - + Save pattern Зберегти лекало - - + + Save as Зберегти як - + Save not yet saved pattern Зберегти ще не збережене лекало - + Draw Малювання - + Draw mode Режим малювання - + Details Деталь - + Deatils mode Режим деталей - - + + Tools pointer Інструмент вказівник - + New drawing Нове креслення - + Add new drawing Додати нове креслення - - + + Change the name of drawing Змінити ім'я креслення - + Table of variables Таблиця змінних - + Tables of variables Таблиці змінних - + History Історія - + Layout Розкладки - + Create layout Створити розкладку - - + + About Qt Про Qt - - + + About Valentina Про Valentina - + Exit Вихід - + Drawing %1 Креслення %1 - - + + Drawing: Креслення: - + Enter a name for the drawing. Введіть ім'я креслення. - - + + Error. Drawing of same name already exists. Помилка. Креслення з таким ім'ям вже існує. - + Error creating drawing with the name Помилка створення креслення з ім'ям - + Enter a new name for the drawing. Введіть нове ім'я креслення. - + Error saving change!!! - + Помилка збереження змін!!! - + Can't save new name of drawing - + Не можу зберегти нове ім'я креслення - - + + Select point Виберість точку - + Select first point Виберість першу точку - - - + + + Select first point of line Виберість першу точку лінії - + Select first point of angle Виберіть першу точку кута - + Select first point of first line Виберіть першу точку першої лінії - + Select first point curve Виберіть першу точку кривої - + Select point of center of arc Виберіть точку центру дуги - + Select point of curve path Виберіть точку складної кривої @@ -1983,156 +1983,156 @@ Valentina v.0.1.0 - + The pattern has been modified. Лекало було зміненно. - + Do you want to save your changes? Ви хочете зберегти зміни? - + Growth: Зріст: - + Size: Розмір: - + Drawing: Креслення: - + Lekalo files (*.xml);;All files (*.*) Файли лекала (*.xml);;Всі файли (*.*) - - + + Lekalo files (*.xml) Файл лекала (*.xml) - + Error saving file. Can't save file. Помилка збереження файлу. Не можу зберегти файл. - + Open file Відкрити файл - + Got empty file name. Отримано пусте імя файлу. - + Could not copy temp file to pattern file Не можу копіювати тимчасовий файл до файлу лекала - + Could not remove pattern file Не можу видалити файл лекала - + Can't open pattern file. File name empty Не можу відкрити файл лекала. Пусте ім'я файлу - - - - - - - - + + + + + + + + Error! Помилка! - + Create new drawing for start working. Створіть нове креслення для початку роботи. - + Select points, arcs, curves clockwise. Виберіть точки, дуги, криві загодинниковою стрілкою. - + Select base point - + Виберіть базову точку - + Select first point of axis - + Виберіть першу точку вісі - + Select point vertically - + Виберіть точку по вертикалі - + Based on Qt %2 (32 bit) - + Базується на Qt %2 (32 bit) - + Built on %3 at %4 - + Зібрано %3 в %4 - + <h1>%1</h1> %2 <br/><br/> %3 <br/><br/> %4 - + - + Error parsing file. Помилка парсингу файла. - + Error can't convert value. Помилка, не можу конвертувати значення. - + Error empty parameter. Помилка, пустий параметр. - + Error wrong id. Помикла, неправильний id. - - + + Error don't unique id. Помилка, не унікальний id. - + Error parsing pattern file. Помилка парсінгу файлу лекала. - + Error in line %1 column %2 Помилка в лінії %1 стовпчик %2 @@ -2140,101 +2140,101 @@ TableWindow - + Create a layout Створити розкладку - + toolBar - + Save Зберегти - - + + Save layout Зберегти розкладку - + Next Наступний - + Next detail Наступна деталь - + Turn Повернути - + Turn the detail 180 degrees Повернути деталь на 180 градусів - + Stop laying Припинити укладання - + Enlarge letter Збільшити аркуш - + Enlarge the length of sheet Збільшити довжину аркушу - + Reduce sheet Зменшити аркуш - + Reduce the length of the sheet Зменшити довжину аркушу - - + + Mirroring Дзеркальне відображення - - + + Zoom In Збільшити - - + + Zoom Out Зменшити - + Stop Зупинити - + SVG Generator Example Drawing - + An SVG drawing created by the SVG Generator Example provided with Qt. @@ -2242,76 +2242,76 @@ VAbstractNode - + Can't find tag Modeling - + Не можу знайти тег Modeling VApplication - - - - - - + + + + + + Error! Помилка! - + Error parsing file. Program will be terminated. Помилка парсінгу файла. Програма буде закрита. - + Error bad id. Program will be terminated. Помилка неправильний id. Програма буде закрита. - + Error can't convert value. Program will be terminated. Помилка конвертації значення. Програма буде закрита. - + Error empty parameter. Program will be terminated. Помилка пустий параметр. Програма буде закрита. - + Error wrong id. Program will be terminated. Помилка неправильний id. Програма буде закрита. - + Something wrong!! - + Щось не так!! VArc - + Can't find id = %1 in table. - + Не можу знайти id = %1 в таблиці. - + Angle of arc can't be 0 degree. - + Кут дуги не може бути 0 градусів. - + Arc have not this number of part. - + Дуга не має цієї частини. VContainer - + Can't find object Не можу знайти об'єкт @@ -2319,139 +2319,139 @@ VDomDocument - + Got wrong parameter id. Need only id > 0. Отримано неправильний id. Допускаються тільки id > 0. - + Can't convert toLongLong parameter Не можу конвертувати toLongLong параметру - + Got empty parameter Отримано пустий параметр - + Can't convert toDouble parameter Не можу конвертувати toDouble параметру - + This id is not unique. Цей id не унікальний. - + Error creating or updating detail Помилка створення чи оновлення деталі - + Error creating or updating single point Помилка створення чи оновлення простої точки - + Error creating or updating point of end line Помилка створення чи оновлення точки кінця відрізку - + Error creating or updating point along line Помилка створення чи оновлення точки вздовж лінії - + Error creating or updating point of shoulder Помилка створення чи оновлення точки плеча - + Error creating or updating point of normal Помилка створення чи оновлення точки нормалі - + Error creating or updating point of bisector Помилка створення чи оновлення точки бісектриси - + Error creating or updating point of lineintersection Помилка створення чи оновлення точки перетину ліній - + Error creating or updating point of contact Помилка створення чи оновлення точки дотику - + Error creating or updating modeling point Помилка створення чи оновлення модельної точки - + Error creating or updating height - + Помилка створення чи оновлення висоти - + Error creating or updating triangle - + Помилка створення чи оновлення трикутника - + Error creating or updating point of intersection - + Помилка створення чи оновлення точки перетину - + Error creating or updating line Помилка створення чи оновлення лінії - + Error creating or updating simple curve Помилка створення чи оновлення кривої - + Error creating or updating curve path Помилка створення чи оновлення шляху кривих - + Error creating or updating modeling simple curve Помилка створення чи оновлення модельної кривої - + Error creating or updating modeling curve path Помилка створення чи оновлення модельного шляху кривих - + Error creating or updating simple arc Помилка створення чи оновлення дуги - + Error creating or updating modeling arc Помилка створення чи оновлення модельної дуги - + Error! - Помилка! + Помилка! - + Error parsing file. - Помилка парсингу файла. + Помилка парсингу файла. Can't get parent for object id = %1 @@ -2461,50 +2461,50 @@ VDrawTool - + Options Параметри - + Delete Видалити - + Can not find the element after which you want to insert. - + Не можу знайти елемент після якого ви хочете вставити. - + Can't find tag Calculation - + Не можу знайти тег Calculation VModelingTool - + Option - + Параметри - + Delete - Видалити + Видалити VSplinePath - + Not enough points to create the spline. Не достатньо точок для створення кривої. - - - + + + This spline is not exist. Такий сплайн не існує. @@ -2512,25 +2512,25 @@ VTableGraphicsView - + detail don't find - + деталь не знайдено - + detail find - + деталь знайдено VToolDetail - + Options - Параметри + Параметри - + Delete Видалити @@ -2538,9 +2538,9 @@ VToolTriangle - + Can't find point. - + Не можу знайти точку. diff --git a/src/version.h b/src/version.h index fb95d4e3b..7444ffed9 100644 --- a/src/version.h +++ b/src/version.h @@ -36,6 +36,6 @@ extern const int MINOR_VERSION = 2; extern const int DEBUG_VERSION = 0; extern const QString APP_VERSION(QStringLiteral("%1.%2.%3").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION)); -extern const QString WARRANTY(QT_TR_NOOP("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE " - "WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.")); +extern const QString WARRANTY("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE " + "WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE."); #endif // VERSION_H From 4f5c7b96b9beba47e21bc38e0ae63d8f35cf7983 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 21 Nov 2013 10:33:11 +0200 Subject: [PATCH 35/56] Change in Doxyfile. --HG-- branch : develop --- Valentina.pro | 20 ++++++-------------- doc/doxygen/Doxyfile | 10 +++++----- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index a12136129..69b157700 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -39,6 +39,7 @@ RCC_DIR = rcc # files created uic UI_DIR = uic +include(src/src.pri) include(src/container/container.pri) include(src/dialogs/dialogs.pri) include(src/exception/exception.pri) @@ -47,24 +48,13 @@ include(src/tools/tools.pri) include(src/widgets/widgets.pri) include(src/xml/xml.pri) -SOURCES += src/main.cpp \ - src/mainwindow.cpp \ - src/tablewindow.cpp \ - src/stable.cpp - -HEADERS += src/mainwindow.h \ - src/options.h \ - src/tablewindow.h \ - src/stable.h \ - src/version.h - -FORMS += src/mainwindow.ui \ - src/tablewindow.ui - RESOURCES += \ share/resources/icon.qrc \ share/resources/cursor.qrc +OTHER_FILES += share/resources/valentina.rc \ + share/resources/icon/64x64/icon64x64.ico + TRANSLATIONS += share/translations/valentina_ru.ts \ share/translations/valentina_uk.ts @@ -113,3 +103,5 @@ message(Data files: $$[QT_INSTALL_DATA]) message(Translation files: $$[QT_INSTALL_TRANSLATIONS]) message(Settings: $$[QT_INSTALL_SETTINGS]) message(Examples: $$[QT_INSTALL_EXAMPLES]) + +win32:RC_FILE = share/resources/valentina.rc diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index f17ebac22..8f5c380a7 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -34,27 +34,27 @@ PROJECT_NAME = "Valentina" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = 0.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = +PROJECT_BRIEF = "Pattern making program." # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = doc/doxygen/logo.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = doc/ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -63,7 +63,7 @@ OUTPUT_DIRECTORY = # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. -CREATE_SUBDIRS = NO +CREATE_SUBDIRS = YES # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this From 0d3a578d1d9f338cc8fc258fd2e6aa25a55d9171 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 21 Nov 2013 10:37:36 +0200 Subject: [PATCH 36/56] Change in Doxyfile. --HG-- branch : develop --- Valentina.pro | 20 ++++++-------------- doc/doxygen/Doxyfile | 10 +++++----- doc/doxygen/logo.png | Bin 0 -> 4660 bytes scripts/makedoc.sh | 5 +++++ share/resources/icon/64x64/icon64x64.ico | Bin 0 -> 16958 bytes share/resources/valentina.rc | 1 + src/src.pri | 13 +++++++++++++ 7 files changed, 30 insertions(+), 19 deletions(-) create mode 100644 doc/doxygen/logo.png create mode 100755 scripts/makedoc.sh create mode 100644 share/resources/icon/64x64/icon64x64.ico create mode 100644 share/resources/valentina.rc create mode 100644 src/src.pri diff --git a/Valentina.pro b/Valentina.pro index a12136129..69b157700 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -39,6 +39,7 @@ RCC_DIR = rcc # files created uic UI_DIR = uic +include(src/src.pri) include(src/container/container.pri) include(src/dialogs/dialogs.pri) include(src/exception/exception.pri) @@ -47,24 +48,13 @@ include(src/tools/tools.pri) include(src/widgets/widgets.pri) include(src/xml/xml.pri) -SOURCES += src/main.cpp \ - src/mainwindow.cpp \ - src/tablewindow.cpp \ - src/stable.cpp - -HEADERS += src/mainwindow.h \ - src/options.h \ - src/tablewindow.h \ - src/stable.h \ - src/version.h - -FORMS += src/mainwindow.ui \ - src/tablewindow.ui - RESOURCES += \ share/resources/icon.qrc \ share/resources/cursor.qrc +OTHER_FILES += share/resources/valentina.rc \ + share/resources/icon/64x64/icon64x64.ico + TRANSLATIONS += share/translations/valentina_ru.ts \ share/translations/valentina_uk.ts @@ -113,3 +103,5 @@ message(Data files: $$[QT_INSTALL_DATA]) message(Translation files: $$[QT_INSTALL_TRANSLATIONS]) message(Settings: $$[QT_INSTALL_SETTINGS]) message(Examples: $$[QT_INSTALL_EXAMPLES]) + +win32:RC_FILE = share/resources/valentina.rc diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile index f17ebac22..8f5c380a7 100644 --- a/doc/doxygen/Doxyfile +++ b/doc/doxygen/Doxyfile @@ -34,27 +34,27 @@ PROJECT_NAME = "Valentina" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = 0.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = +PROJECT_BRIEF = "Pattern making program." # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = doc/doxygen/logo.png # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = +OUTPUT_DIRECTORY = doc/ # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -63,7 +63,7 @@ OUTPUT_DIRECTORY = # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. -CREATE_SUBDIRS = NO +CREATE_SUBDIRS = YES # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this diff --git a/doc/doxygen/logo.png b/doc/doxygen/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..7614a27ea0e48a9e297b18ace40839928dc77651 GIT binary patch literal 4660 zcmV-463gw0P)Lw9bV$;vs!qTKk*GjIwkBa%GDMw`Q53-?IwD7i>?9CY zSu_Z;MF;^xL?a@&k0`_F5#=ZlNz&N_kyTVkS9fRct(Ncm-n;WhB{6`^Icf*=oVov0 zeRb--_kMNneed4;O85tp3lGb4?PEQ=pHH7$w6P$xgYRevuous2l6yDg+Ir()-*PH5QqQqgIG{1mrYL~K zOWYjk#>R|1vaPH?sd@ACmmlkT3E;G;6Mge zM)U(^Z;y(7eVJL~sd+;tP^>^p22j{iGh~f!Fy1fjj)VKYvF@eq^E$?}F^%6?xCJxX zx&GH(033htxVPtU3r2*@&RN|zK}gl0s^p9kd)S@``{aa?8Aug24S{-PL17(F6P9ufRCxq!Df zMc~vhP=iQR^Epp0R0dLm7}zHZqq3gZdkkK478(O(b436pYaFAq?n23M$m<$&OWxDQ zeOpKI^EFQau<*#j$35IMl$tTsRMmha9#StVqJ&0MRoN6-eK@f4Y@BHSTUxcDw_^4m zjG3aazbH}SL{cCWMMOai4G}-G!bgJF3+|_z$MExYPqOSog@7f>Pst1D_(27vnP*z&yd=?M5L`jyhNem6pZmSM>0KQ$?bK^T{)}3 zl@Hao_=W#EeqT{{!?rRfD3G;^)wkRcQBOmiJegy`u^vLr)+| z*&9@3gZFyz?Q2Ru-Sz!*rjF$1&h319Qc;$#FX^Olt-%rb><7Kb2`XkbN^2yZ)Wf#e z(2#-AIfx8wEkh;o2kq4j{9SA%xaQ2?hFNNEAd!_qyd49+e;0 z81dYWs>u$-U-yO4IGR#q@tP9zI|?jXS$E}m9mVrix!5Tqt0|%g zEuoUL9w&x!0vQYWCe>{fBb5|FRUi~xj2iJfkYJ*QNij;p0QVQhnc zdLR+0I8_14PF`?cw+#Dk`T1Ezu6U@#qIVZs;>15%8nP1<)S^;ORaFtM(mNukO$X@z z#nb#Usq5Y`tA)7_^>FcFW1F1nf<)y!bxPF>p+Q572)bgs3rT6L$Tc4Qw`pg`Z`#H^#n%5VJIg$_qx?vcbqe&jeC+m z>p!x&1psTzywGrYW1z$sK(OKk)n7%SJMpfyFFk+il=j_vhmOya5%;-_Q9#!8slEHE z)tj6hF0gsi+qwGD5_cb8414>zXlqr@N>Vjht0Jllq!vX`uRq9z{)W!dV7jU_v|Ing zcNX~8Z%dqUXyMqva7)ceFyt(vXhWdllr;lMaKf#f-KF^*d6umHb7|AvKgc0tTB?Jo z8JQZnZdqs7?*N9)a^u_TufOYI+F*_O3N8~x)Sc-$GD5}z$ zfvoYwUOv~BZirl)oG<I0WA=utWL zFVDSnZRustx2`Vjy<+u@srjPw<|I{fVPv)0iWe0D&n-7^D4#>JLtm+L@}%N%p~zi< z&}^)VHA?D)C}6P-^`h$^?ymf`>loJEa{knMMsjOsPig7e($%rk&l{XXLH+O!EY&^1 z=1nWqe~ig(&4`)r(H3jGSW%1!8LL|(qu;vz;qJ=$GYh<-aEm(Yf&P(+W0}}~Aj^N# zwWyq$KlUXCYatiX__g=vckj?ixNG|GJz4RS8Um;|VK5a^6|9x}%AWNAH|){)c|+iK z$#*vNa@srUpjFR0BT6n5j4=N9+ZnmL##_s;WcA+)s_YTMrN5%Xau85Uri?V)y%lvZrqW#L$SFbG)&6` zs>TXIU??^!qqF`6@yYi9F8i1K-hsRQ*f!?At3LR}5B2cHqx1Po|E0Ke!HmKg*ZsO% zPnr1giPwL$8Gx^?FEQuf;*q1XOlXO`mQ%rsj*pBS0C47^ZDR*x^Roc`c+PqatVr1# zBI6mI^OXQydf6{GSFfAZ#==K>{wBEpbGKZ4OrEoUULSbbF|ENLtGV|XBlp%E4c_Yy zZ+xu#LjWgD8q3$$_i|ZBfrUG>`Oh8EHligk8>-&CsgjCTQRyk`1!)vO{5eoTMN{?u$hL3GsN)#GA@S z4E6(j_@J@j2j13tcw)@0{jr?b9~;wPRRSPYAyy-*O4dTvqaH+zkP8F^Hdl;VQ_a-&ZIXSPGkS3BWc=nKNSv}y=rKm9?93G-JP2%$g&+{d``?h*#K$|R3H+iF;J{gw#Sx{8Bbsh{WWl^lvCM}ByPXE9`ETN zjw5OJZh78e?U2^NE}YSR->9t4cTNKJO4cePBTuYQP82IbbKq&pc!stc6dbWMRVa2bH$+-^<#74K*5J5?tP)iLWGN|Hdu&!ZCRZL4pXbwFYQ8ETLRV>aq z92U@fx5vRJ@7}P{1Ke_SYxsP*LBc?22|O*Kvb|;)j6oF{Oof_b`L|z8{BXgUYi74| z`h%P68N++?r;g0}6H8@FUo4U}iWMbs3_9h0ynebh&{Ht-!{!JYBWTSiRVS3n2Jh=J ziF3>5WJ;g9d&5S5(Sh~CnNo1^ zPK#ZCO#U5xu{n2ZO>#!+8AW82iZ{evTvA0ZrnDo-=V`v`R3Qs?Wv67Dr6TAwW$_5e08He+bAiZkLy^B_FtnTW74O`6V z#gPm+^X}e?Oz5j9NvhzLZLt}wc$v4fvkrD%)-Sr~{F@t$fT45bDzD;mT-51^6`o8=6^c@K?l zAE?Nj#DTB(Ikf7cdJC`Ry#M{p`62&tEW(7GRAx2n4j;Fiu!!wYAPjy0lFngXRY z^dyK3B=Y;EYd0?3RmR`4>Lu!>M;8|yIWCjJjI32!BB3!-ZtCoQPhj{Fz?oBu+_^_} ztV*jYpYmSGS!fL%RS(q^JajI4tots2bEg&=84UADI^i=fp~zQ#4g@YEcyx z=*t+r7U0~D0ylMb4=-F}s9|I{Jate_l-LOwBaFzp2LZnS+j^F;cx5-|cI0#I8Go7x zzW}A0D3t^ZeCw41e`aT2aZAO#vz*FBIK??6P9gSaC`e0pc@MZUYKEVsSM-kSYlOe%o{*p`km&ki7?hA+K zx%|fDxl zlQ%je5^fS0F%*lcs(?X^k};|S&Mf-Mny&K!zH{6dK62k?_O=MX1=9;-qmcWXvNCnB z1_KF%Qg4Bmoeb=V<*N;r2fWuO2;8>RnHVv@g*~sZ1Ja0Epl6DiPuAR7pqqsRXn+ta%W#vBo}xhl-LV3HK>QkXzx&} z&s4nhwdN#j4K;5K2X3oM7F8N;{qnuy3?9({FV;wZ)ybJl*LK|vuwZ79>sP!!U;uW` zL3y6oG{`OQ9`(dSFS_y7R40X?VvN+hMMbcpgyNgTnEi~%+nY1&A6dz7ubH5dK$ZT1!=O0jTG0qk6%OYkPVCK5&!$AL2oHn&EDn64J`z=`-ca-4 z5~bz^QA&vXDS-#JRg)#(|LvweG|vT7;JP;u>@_>ibEg!zW9Nn7`P1|JwKmEL8S(pX z9JDR53Znw2s#@+#%$ADdf4;iD`;lF`pPE?Ut_|J%(@F8bapswKW2PSPm;W<%@}%~E qKB&_txBkV?zxN*_`G0wXXhra;6)+I!ErE35bg7{k8btKHS=VY_jf)NTM91W4%pej*7FyAlX6 z4?{dOv0Fdd8K;vbGnr1)S5mi?r*Y#r9oNBWn>KN*IBD&AOrzMi#zx%R@Bgo~2qBqJ zkdSAxj5z1sJ@50M|Ns8)KdUHn@Gp^2@c(ZrYm$m$Qxs(l{_sjkK00W&26?&_bM&WcI)!beC<=06u^VJu5se4Pt2Efrr{2`Pb-%>(SA=uBZ>%BBw`(jrt5e~r=J91mdKb$LrGG756_{JSsRp}EHF3Zc zfmTxn+e{g1H$};#rc53*Ww;aX+f5nif?PD2(p_Z;N4cq^t`=x{Li6let|%tAYYPp` z+WG6gdLEnVX;>`1H809QGwrKkcUKrX=B0)AK;HLYzPn64h`rA5HAT^3Q|Ea%n>Zh) z?!%ezV-5WEhIH*Tq`#5m;XgG`>u1L%u7~!GWoKQgM-DHLu5GUg$97YA8Vwm}Gwt4b z)9!D;JZf;x+pwqDYs^vi)#5y0EfQ%{4|kb%Uj^;GDV#{X_}<@wcl9V+hv#}j^>sY0 zhW5>)N!uOUXVu(gs8zAw^VmE+*7H}A#*DqAbFBq-VI6R$dHz@rANJYTY6{4Wd**bN`fk83CE6M;36q0VzM z(ix(*gui8~CTHxu?kOt~B&T8Mb*zDwJYtGi8al4W5YTs;zolFe-{kS!_SwUijcZl$ z=FB_ks+^}qyVrAv`z>-Ugh3T0{6r4yuQxuWkcX%(?H$O#K^?(E=S$ z3QrC8x(9oXb%5^I5(iCDd>l5utNUukq{S}kcM)hgDFSWpO6Ug2zM*?-afZk?mcwR} zj%fZc=W~C;I6)6}TunFEt*mX$1M?uC-_}WQ<@cL<2y&0JuVW3M4_;in>1FOq3;yaD z1~xD=KFC#6ggVa>X22Q3-orMyw)0t#z9v)6ANYk9?O#t7R(cO*>djO}I;)rH{>FdR z1C5YTV4V=`dZ-KI1LpHLHm$g;X40XkzUE2akAHc8nI$@QUzsMoRj&!?0L&S7q>1gS zPPP&2t_FMmE+^2xWPIJ3%4?qbm5|FJvT@Q28Su5i#$oTB!uq6-c`ysHRA-q@v*hV|>k@S#Ew4>kFmu$Y~MXI|kQ-3Bh=r;@V z{SoGG=$>k_Pmoh!KUc+h?AKkBjX?{xEs~Mld(_bGvuxuD7rS=;t?t+)sl0vdMSVEF zzV5BKUjQp<5!e~hfrK$hCqO6idGj{)QTf~%)CIP1&jMTF$(Mz{4K^N_&OM6b{H^Cz zPrYmW_{Z`h*yLt>K>lB(4|W|m(F0$>UGau}?Sr?g`RTEunbhvL&Jpn70m9HIV~9{U zY$Nc2rxNQ|!E&eh+8@YNnxPEF|A)d|4crDjjd9pX4m`CZYM}iyQw_oH*>a}{w+|6c z1QvpggWYgflKh;Qs*c225TVv(dbs6hA_Uv$0A36tMc-AB)0z2=qSJF_i2PdYKl!t? zm+*IVXW1Lt-M`D2FV}7P#uLY(M>~ono&RVL&NJ|0p!MCcGT7U(>}4tZ$A6-EOUMuP zOIR6L$&w*Y^@s?zETc-oUw2vE>3D%Te4Y2v2U#S1;%$bVYQ$NnVW(Y>PVKM2PaG!Q zVU53<*6&&1n?f2V+PGx6YB$XZ!~nA2jJ&tFR3`q4urTo*WUsNeujd9D8LLx2xp!UUc~yVw9rjqSsmJ#6UebPo6Erk%M$$tv zQQ@6zZ1dN2&jDxjie3Q!GJ-WA8vvcCg?iv`uzvuX*m^*CdKA?=IR=}o-T%)!>;qTJ zDgI(q79W8QfLsCxlOL?b4;jR9+I_Vbz+-gD)m6-GQU%EP5^y1>WwhJWN=_JP$MSyz z_3Ss=62}Njd;{`5Cp%>IF@Aio0gp=XiK6%@=H3aefa(DsBaRH`C?~Kxb7*pWU74YSOZq(gD^nCcVluCc{ik(jpEI}%HnoY)#9pd! zha;A$HyxRr`<~%u^-%i)a2(&#icXla;DEtCG4wj?c;*Caf!%8?`$$}vqZBxX#tqDz zzt_}a{iarU4Ci4F)(vY${!Xy@g77y!HgVi)c=tNy8Ka%xOHe)uIVjkV^FZs4b4Pa7 zUw>9Ow=ickvHo;D-#TBpNssglGRIqRz_N>Mk$^=28{`-~{0vp{=+@dXH@l(UZ3*^h-U9{|S-3@gIm zjEL``c@U0(Ub92~nM=dDmOfy7=tJTI;b)u!PI?!5^{nvYY|-9>Ya<^_pbp7^op^TI z|3EY9Rh-tGrSorF|4?R}GnLT`(*59g&*}L+koyV)m=$;zI2Bwl&4qk8=qby04s?GA zz3}hSvH4&0Q0p04kTPK#v3}6!-~feV2jL3K_kmp{Zji91Mr(lf;6nii0z;!O;#9#u z;Tc%Oxx>^PmA^%EhQBf+Q^&q#`jN>41@K6x|$C~_!wm0La?jw`^Z-69>N)zJK+omcv276APB!0 zc+y@#_JqoSR}Xf+o*B>#X0l_J-O`F4lZbbGm+cgt>BufajqEds>xSKWRdwxHOvBRL zjfxhz$YqIOuh5Df{Yy#vN#~q+AYg12yfSzf>~EF9*pKuIupjtPJ~Pal$Mzw{0(%S& zmT`rshx4#8Gz(&<=?gkb9@7Kuhg8yJZ)>szUw;&%8 z_zGv~_o%Eao|0yuuc!SZW2sCZ;IuOND`kKOek_ywiCe}Qg5L8tev|5~^mgFBKowU9 zMmP>1gmfja6|g167s(dpL+2J9HEqcw_AB)>+rAfL{FigvS0!PF1neU4B5>2B4nAXX71Bah*@tMmP#`veSQ=vo;wqtY{%fjwH~PI^a8WlRo^lK9 zTnV_4=fI@_??8Tu=fXZpU>(FA@0e`7;0^dSVi2|LH+aCwke@-=3tTbb0}<({n5^z> zc&8Wc&lBNJ@Z)VC*drb13HR9v^E%6zUzFh1=#GT;=|A}G$;K-jRu};O|6JUu_z$}a zz60)-5JygTDYO`LN1*ll*|B4bY)K2BP1eqhdq8=g0CJpbN=w z(gIztOe{ayGw@{QHF&&Ce!4Q?Pq=Adoree~>n`xh?i%uX6)c`niAL-9IKy6r2w82WotP z2@lZGs%6RW%0+k4V)`Kcz`puIN!mAK0vI-L2(nrOUV={*xYS z9mMDzE3Au0O&&c*ciNzXULGqq-Kog8=C2h$x*Yw#N?bqgJ~3yC`=;=7=-vhFf~V$; z&D*>xvG!hNnd|a9QMRz9Q*7S$b+9S#NyMp{H^JK3y<{7C4MxBxOd51Utl=fX9RfTH z#b#807q9np&wpb3YVpZetb4QIL}9~;QzDL(?*X{0UsG<{GG}6)v1ePLm$R6^6SnUy z=E~`wCC3fv-X(M*`wXq$(xN>voQqq)zk9$(|3D_esYbv@19P$86=?XIY-j6~eU0^b zz0&OBFL6^^!NEJh4SyiP5d#xg@n(v-`Vns=IdJXxQ}wpQTq-QQm%B!`=;(R!Hr#@B z`+Md|z#GADW*!N)kz?vOE8q@x{V&#leQ1IB48>Zk_3j{E`E}i2yW)Dy?`qnSh5c@D zyzg@S6Z!x;3AhOU4c!eQnQ&J>13qxdvE{DYq+o8`rF4}INO#Tqge6FZU>6KKct+vJ znu2Q-VesS@?kNhWQ&WfHSIBJv;e4Ox4%z zqhDmNuUrgWdJ_8K9q7}KB<}POudF+^LN>sw)7?JA7ZH0V-|H>#&|<1Kr~AD&${*S8 zIh7@f4*e0|harv!oSzn>_$N4Dk^_pjICs9R`rEcG_ch-%Hm*C9m*N-OIQ)AHVkKh3 z!x7kscWD0XZ}D9N;%(tK6$}{So|8k6g;~QPAa1xDKJ7;`42%#$+zY%q*>t*xL%1Jj zfS%8Q59=2Gh85t2=4jy#1$th|akt~{@qPt&(G^krMMZU0EY-YCPt#p4+{=Pqg>8i1 zr{5@$?@aMU$iR29Km8Qn#~)kM88Q;*X<6xe;@iAa}FIjT#~ND;R;a^Z{0;I19i5wKvU zzuA(3JZFXiZg{Eg+;WJ1kArwQ)&O^B3Gb0kr@chHNFzIs-=s*#!_e=orah6uI$#aL zzyppg;7sT)7cd26iR@x-u=&fX_wzG``!bWc$_!%dnHpll7ANAZ&tk6c5PwKKsOA4c z_URdCn}4f@STV&G5np0iAS{J@J6H?g{@|_;k+;BOrsdh6k!$YdK`!!~0@vG>ofA7+ zj(e)F@fome1Lg*Oj`%XgNiClOHWYVibYOnEm!gN-zKY-DteRKw4Q?wpI5YPuulwr0 zVrH7e*|h=pRsb7(1;43y33Bmou%AB!r~U)Tzzd?_z>}in=tJ50$Ci&(!ri2?>?b#k z{@Guu5k9+J(RbTs3{3dyER-pGXym<4t-=&Oiz`W9DFwZKX%;R(fKjx&*IYmiP zI;<#plnyCM7N-l-3n?AU8|DgwsgXJKoHh-vm_{~*=ROpPTj@|9rAFQ`HPAPbWu?Z# zbJWnFxp0IU8Z-}CX==Yg4GyLHtTdkHhKKW%ebmA5d?iIG#+OGU#CWqPHE7atd@+^| z=2;^jil=!7=Td__gOSwG4jPD&8gAj4n8V$pDGvZ$7}ipZr9&pq5JSYIs3%O8(-fzs zk{V3Wi*$--Y^LKw@i*~27$4628PcJ=b6Nj@bU15d9<^|8p`lQV=#Ep&bC7#b%wbN` lah|$4lx3~$u#({Sm@|(IbG1f1mRd8TMTw(be7HF0{tvbVW<~%2 literal 0 HcmV?d00001 diff --git a/share/resources/valentina.rc b/share/resources/valentina.rc new file mode 100644 index 000000000..2ab63e289 --- /dev/null +++ b/share/resources/valentina.rc @@ -0,0 +1 @@ +IDI_ICON1 ICON DISCARDABLE "icon/64x64/icon64x64.ico" diff --git a/src/src.pri b/src/src.pri new file mode 100644 index 000000000..68200a263 --- /dev/null +++ b/src/src.pri @@ -0,0 +1,13 @@ +SOURCES += src/main.cpp \ + src/mainwindow.cpp \ + src/tablewindow.cpp \ + src/stable.cpp + +HEADERS += src/mainwindow.h \ + src/options.h \ + src/tablewindow.h \ + src/stable.h \ + src/version.h + +FORMS += src/mainwindow.ui \ + src/tablewindow.ui From 3f03400f3d1d88274648b8a097a70a68a982b521 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 21 Nov 2013 12:03:25 +0200 Subject: [PATCH 37/56] Precompiled headers only for debug version. --HG-- branch : develop --- Valentina.pro | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index 69b157700..27381354d 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -14,16 +14,10 @@ DEBUG_TARGET = Valentinad RELEASE_TARGET = Valentina CONFIG -= debug_and_release debug_and_release_target -CONFIG += c++11 precompile_header +CONFIG += c++11 #DEFINES += ... -# Precompiled headers (PCH) -PRECOMPILED_HEADER = src/stable.h -win32-msvc* { - PRECOMPILED_SOURCE = src/stable.cpp -} - # directory for executable file DESTDIR = bin @@ -63,6 +57,13 @@ CONFIG(debug, debug|release){ QMAKE_CXX = ccache g++ TARGET = $$DEBUG_TARGET + CONFIG += precompile_header + # Precompiled headers (PCH) + PRECOMPILED_HEADER = src/stable.h + win32-msvc* { + PRECOMPILED_SOURCE = src/stable.cpp + } + QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \ -isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \ -isystem "/usr/include/qt5/QtCore" -isystem "$$OUT_PWD/uic" -isystem "$$OUT_PWD/moc/" \ From 08e644a8871e29eb6ea7e77b40d34db86845a0bc Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 21 Nov 2013 14:05:26 +0200 Subject: [PATCH 38/56] Fixed bugs compiling without Qt Creator. --HG-- branch : develop --- src/container/vcontainer.cpp | 2 ++ src/container/vincrementtablerow.h | 2 ++ src/container/vpointf.h | 4 ++++ src/container/vstandarttablerow.h | 2 ++ src/dialogs/dialogalongline.cpp | 2 ++ src/dialogs/dialogarc.cpp | 3 +++ src/dialogs/dialogbisector.cpp | 2 ++ src/dialogs/dialogdetail.cpp | 3 +++ src/dialogs/dialogendline.cpp | 2 ++ src/dialogs/dialogheight.cpp | 2 ++ src/dialogs/dialoghistory.cpp | 1 + src/dialogs/dialogincrements.cpp | 2 ++ src/dialogs/dialogline.cpp | 2 ++ src/dialogs/dialoglineintersect.cpp | 2 ++ src/dialogs/dialognormal.cpp | 2 ++ src/dialogs/dialogpointofcontact.cpp | 2 ++ src/dialogs/dialogpointofintersection.cpp | 2 ++ src/dialogs/dialogshoulderpoint.cpp | 2 ++ src/dialogs/dialogsinglepoint.cpp | 2 ++ src/dialogs/dialogspline.cpp | 2 ++ src/dialogs/dialogsplinepath.cpp | 2 ++ src/dialogs/dialogtool.cpp | 2 ++ src/dialogs/dialogtool.h | 5 +++++ src/dialogs/dialogtriangle.cpp | 2 ++ src/exception/vexception.h | 1 + src/exception/vexceptionemptyparameter.cpp | 2 ++ src/exception/vexceptionemptyparameter.h | 2 ++ src/exception/vexceptionobjecterror.h | 2 ++ src/exception/vexceptionuniqueid.cpp | 2 ++ src/exception/vexceptionuniqueid.h | 2 ++ src/exception/vexceptionwrongparameterid.h | 2 ++ src/geometry/varc.h | 2 ++ src/geometry/vdetail.h | 3 +++ src/geometry/vspline.cpp | 2 ++ src/geometry/vspline.h | 4 ++++ src/main.cpp | 1 + src/mainwindow.cpp | 8 ++++++++ src/tablewindow.h | 1 + src/tools/drawTools/vdrawtool.h | 3 +++ src/tools/modelingTools/vmodelingtool.h | 1 + src/tools/nodeDetails/vnodearc.cpp | 2 ++ src/tools/nodeDetails/vnodepoint.cpp | 2 ++ src/tools/nodeDetails/vnodespline.cpp | 2 ++ src/tools/nodeDetails/vnodesplinepath.cpp | 2 ++ src/widgets/doubledelegate.cpp | 2 ++ src/widgets/vapplication.cpp | 3 +++ src/widgets/vcontrolpointspline.cpp | 2 ++ src/widgets/vgraphicssimpletextitem.cpp | 2 ++ src/widgets/vitem.cpp | 3 +++ src/widgets/vmaingraphicsscene.cpp | 2 ++ src/widgets/vmaingraphicsscene.h | 1 + src/widgets/vmaingraphicsview.cpp | 5 +++++ src/widgets/vtablegraphicsview.cpp | 4 ++++ src/xml/vdomdocument.cpp | 2 ++ src/xml/vdomdocument.h | 5 ++++- src/xml/vtoolrecord.h | 4 ++++ 56 files changed, 134 insertions(+), 1 deletion(-) diff --git a/src/container/vcontainer.cpp b/src/container/vcontainer.cpp index 0aa373568..108909dc7 100644 --- a/src/container/vcontainer.cpp +++ b/src/container/vcontainer.cpp @@ -29,6 +29,8 @@ #include "vcontainer.h" #include "../exception/vexceptionbadid.h" +#include + qint64 VContainer::_id = 0; VContainer::VContainer() diff --git a/src/container/vincrementtablerow.h b/src/container/vincrementtablerow.h index 9b805ed2c..493967569 100644 --- a/src/container/vincrementtablerow.h +++ b/src/container/vincrementtablerow.h @@ -29,6 +29,8 @@ #ifndef VINCREMENTTABLEROW_H #define VINCREMENTTABLEROW_H +#include + /** * @brief The VIncrementTableRow class keep data row of increment table */ diff --git a/src/container/vpointf.h b/src/container/vpointf.h index ae9188a43..17260a385 100644 --- a/src/container/vpointf.h +++ b/src/container/vpointf.h @@ -29,6 +29,10 @@ #ifndef VPOINTF_H #define VPOINTF_H +#include +#include +#include "../options.h" + /** * @brief The VPointF class keep data of point. */ diff --git a/src/container/vstandarttablerow.h b/src/container/vstandarttablerow.h index 0a2dd2231..4a56dad47 100644 --- a/src/container/vstandarttablerow.h +++ b/src/container/vstandarttablerow.h @@ -29,6 +29,8 @@ #ifndef VSTANDARTTABLEROW_H #define VSTANDARTTABLEROW_H +#include + /** * @brief The VStandartTableRow class keep data row of standart table */ diff --git a/src/dialogs/dialogalongline.cpp b/src/dialogs/dialogalongline.cpp index a6d29a2f8..3cbe693c0 100644 --- a/src/dialogs/dialogalongline.cpp +++ b/src/dialogs/dialogalongline.cpp @@ -29,6 +29,8 @@ #include "dialogalongline.h" #include "ui_dialogalongline.h" +#include + DialogAlongLine::DialogAlongLine(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogAlongLine), number(0), pointName(QString()), typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0) diff --git a/src/dialogs/dialogarc.cpp b/src/dialogs/dialogarc.cpp index 8ef73f743..d9429dd36 100644 --- a/src/dialogs/dialogarc.cpp +++ b/src/dialogs/dialogarc.cpp @@ -29,6 +29,9 @@ #include "dialogarc.h" #include "ui_dialogarc.h" +#include +#include + DialogArc::DialogArc(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogArc), flagRadius(false), flagF1(false), flagF2(false), timerRadius(0), timerF1(0), timerF2(0), center(0), radius(QString()), f1(QString()), f2(QString()) diff --git a/src/dialogs/dialogbisector.cpp b/src/dialogs/dialogbisector.cpp index c9c3ec23a..1809dec13 100644 --- a/src/dialogs/dialogbisector.cpp +++ b/src/dialogs/dialogbisector.cpp @@ -29,6 +29,8 @@ #include "dialogbisector.h" #include "ui_dialogbisector.h" +#include + DialogBisector::DialogBisector(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogBisector), number(0), pointName(QString()), typeLine(QString()), formula(QString()), firstPointId(0), secondPointId(0), thirdPointId(0) diff --git a/src/dialogs/dialogdetail.cpp b/src/dialogs/dialogdetail.cpp index 83aab4f27..6b1b7ab9b 100644 --- a/src/dialogs/dialogdetail.cpp +++ b/src/dialogs/dialogdetail.cpp @@ -28,6 +28,9 @@ #include "dialogdetail.h" +#include +#include + DialogDetail::DialogDetail(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(), details(VDetail()), supplement(true), closed(true) { diff --git a/src/dialogs/dialogendline.cpp b/src/dialogs/dialogendline.cpp index 809dd4456..b00834019 100644 --- a/src/dialogs/dialogendline.cpp +++ b/src/dialogs/dialogendline.cpp @@ -29,6 +29,8 @@ #include "dialogendline.h" #include "ui_dialogendline.h" +#include + DialogEndLine::DialogEndLine(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogEndLine), pointName(QString()), typeLine(QString()), formula(QString()), angle(0), basePointId(0) diff --git a/src/dialogs/dialogheight.cpp b/src/dialogs/dialogheight.cpp index 9c3bfb8e7..1592c40bd 100644 --- a/src/dialogs/dialogheight.cpp +++ b/src/dialogs/dialogheight.cpp @@ -29,6 +29,8 @@ #include "dialogheight.h" #include "ui_dialogheight.h" +#include + DialogHeight::DialogHeight(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogHeight), number(0), pointName(QString()), typeLine(QString()), basePointId(0), p1LineId(0), p2LineId(0) diff --git a/src/dialogs/dialoghistory.cpp b/src/dialogs/dialoghistory.cpp index fb2dcb0ca..95c29a52e 100644 --- a/src/dialogs/dialoghistory.cpp +++ b/src/dialogs/dialoghistory.cpp @@ -32,6 +32,7 @@ #include "../geometry/vspline.h" #include "../geometry/vsplinepath.h" #include +#include DialogHistory::DialogHistory(VContainer *data, VDomDocument *doc, QWidget *parent) :DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogHistory), doc(doc), cursorRow(0), diff --git a/src/dialogs/dialogincrements.cpp b/src/dialogs/dialogincrements.cpp index f22ac2614..5a26b7848 100644 --- a/src/dialogs/dialogincrements.cpp +++ b/src/dialogs/dialogincrements.cpp @@ -31,6 +31,8 @@ #include "../widgets/doubledelegate.h" #include "../exception/vexception.h" +#include + DialogIncrements::DialogIncrements(VContainer *data, VDomDocument *doc, QWidget *parent) :DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogIncrements), data(data), doc(doc), row(0), column(0) { diff --git a/src/dialogs/dialogline.cpp b/src/dialogs/dialogline.cpp index 8a829db8a..bfb438486 100644 --- a/src/dialogs/dialogline.cpp +++ b/src/dialogs/dialogline.cpp @@ -29,6 +29,8 @@ #include "dialogline.h" #include "ui_dialogline.h" +#include + DialogLine::DialogLine(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogLine), number(0), firstPoint(0), secondPoint(0) { diff --git a/src/dialogs/dialoglineintersect.cpp b/src/dialogs/dialoglineintersect.cpp index 2c291b9e4..1a96777c5 100644 --- a/src/dialogs/dialoglineintersect.cpp +++ b/src/dialogs/dialoglineintersect.cpp @@ -29,6 +29,8 @@ #include "dialoglineintersect.h" #include "ui_dialoglineintersect.h" +#include + DialogLineIntersect::DialogLineIntersect(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogLineIntersect), number(0), pointName(QString()), p1Line1(0), p2Line1(0), p1Line2(0), p2Line2(0), flagPoint(true) diff --git a/src/dialogs/dialognormal.cpp b/src/dialogs/dialognormal.cpp index 289459d98..84e10f4eb 100644 --- a/src/dialogs/dialognormal.cpp +++ b/src/dialogs/dialognormal.cpp @@ -29,6 +29,8 @@ #include "dialognormal.h" #include "ui_dialognormal.h" +#include + DialogNormal::DialogNormal(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogNormal), number(0), pointName(QString()), typeLine(QString()), formula(QString()), angle(0), firstPointId(0), secondPointId(0) diff --git a/src/dialogs/dialogpointofcontact.cpp b/src/dialogs/dialogpointofcontact.cpp index 66443ed3f..864f727e7 100644 --- a/src/dialogs/dialogpointofcontact.cpp +++ b/src/dialogs/dialogpointofcontact.cpp @@ -28,6 +28,8 @@ #include "dialogpointofcontact.h" +#include + DialogPointOfContact::DialogPointOfContact(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(), number(0), pointName(QString()), radius(QString()), center(0), firstPoint(0), secondPoint(0) diff --git a/src/dialogs/dialogpointofintersection.cpp b/src/dialogs/dialogpointofintersection.cpp index 391912f67..3d14e2f3a 100644 --- a/src/dialogs/dialogpointofintersection.cpp +++ b/src/dialogs/dialogpointofintersection.cpp @@ -29,6 +29,8 @@ #include "dialogpointofintersection.h" #include "ui_dialogpointofintersection.h" +#include + DialogPointOfIntersection::DialogPointOfIntersection(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogPointOfIntersection), number(0), pointName(QString()), firstPointId(0), secondPointId(0) diff --git a/src/dialogs/dialogshoulderpoint.cpp b/src/dialogs/dialogshoulderpoint.cpp index a182dd88e..8b7bea2a1 100644 --- a/src/dialogs/dialogshoulderpoint.cpp +++ b/src/dialogs/dialogshoulderpoint.cpp @@ -29,6 +29,8 @@ #include "dialogshoulderpoint.h" #include "ui_dialogshoulderpoint.h" +#include + DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogShoulderPoint), number(0), pointName(QString()), typeLine(QString()), formula(QString()), p1Line(0), p2Line(0), pShoulder(0) diff --git a/src/dialogs/dialogsinglepoint.cpp b/src/dialogs/dialogsinglepoint.cpp index 752d0b141..01858fa6d 100644 --- a/src/dialogs/dialogsinglepoint.cpp +++ b/src/dialogs/dialogsinglepoint.cpp @@ -29,6 +29,8 @@ #include "dialogsinglepoint.h" #include "ui_dialogsinglepoint.h" +#include + DialogSinglePoint::DialogSinglePoint(const VContainer *data, QWidget *parent) :DialogTool(data, Draw::Calculation, parent), ui(new Ui::DialogSinglePoint), name(QString()), point(QPointF()) diff --git a/src/dialogs/dialogspline.cpp b/src/dialogs/dialogspline.cpp index 9e8849ae4..208e9f2d3 100644 --- a/src/dialogs/dialogspline.cpp +++ b/src/dialogs/dialogspline.cpp @@ -29,6 +29,8 @@ #include "dialogspline.h" #include "ui_dialogspline.h" +#include + DialogSpline::DialogSpline(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogSpline), number(0), p1(0), p4(0), angle1(0), angle2(0), kAsm1(1), kAsm2(1), kCurve(1) diff --git a/src/dialogs/dialogsplinepath.cpp b/src/dialogs/dialogsplinepath.cpp index f5984ed0c..17117e9ee 100644 --- a/src/dialogs/dialogsplinepath.cpp +++ b/src/dialogs/dialogsplinepath.cpp @@ -30,6 +30,8 @@ #include "ui_dialogsplinepath.h" #include "../geometry/vsplinepoint.h" +#include + DialogSplinePath::DialogSplinePath(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogSplinePath), path(VSplinePath()) { diff --git a/src/dialogs/dialogtool.cpp b/src/dialogs/dialogtool.cpp index 6484785c1..5ec5f3343 100644 --- a/src/dialogs/dialogtool.cpp +++ b/src/dialogs/dialogtool.cpp @@ -29,6 +29,8 @@ #include "dialogtool.h" #include "../container/calculator.h" +#include + DialogTool::DialogTool(const VContainer *data, Draw::Draws mode, QWidget *parent) :QDialog(parent), data(data), isInitialized(false), flagName(true), flagFormula(true), timerFormula(0), bOk(0), spinBoxAngle(0), lineEditFormula(0), listWidget(0), labelResultCalculation(0), labelDescription(0), diff --git a/src/dialogs/dialogtool.h b/src/dialogs/dialogtool.h index 074570314..ca3bff440 100644 --- a/src/dialogs/dialogtool.h +++ b/src/dialogs/dialogtool.h @@ -29,7 +29,12 @@ #ifndef DIALOGTOOL_H #define DIALOGTOOL_H +#include #include +#include +#include +#include +#include #include "../container/vcontainer.h" /** diff --git a/src/dialogs/dialogtriangle.cpp b/src/dialogs/dialogtriangle.cpp index 1580251ae..5c0625b4d 100644 --- a/src/dialogs/dialogtriangle.cpp +++ b/src/dialogs/dialogtriangle.cpp @@ -29,6 +29,8 @@ #include "dialogtriangle.h" #include "ui_dialogtriangle.h" +#include + DialogTriangle::DialogTriangle(const VContainer *data, Draw::Draws mode, QWidget *parent) :DialogTool(data, mode, parent), ui(new Ui::DialogTriangle), number(0), pointName(QString()), axisP1Id(0), axisP2Id(0), firstPointId(0), secondPointId(0) diff --git a/src/exception/vexception.h b/src/exception/vexception.h index 50be5067e..e0624d7e0 100644 --- a/src/exception/vexception.h +++ b/src/exception/vexception.h @@ -31,6 +31,7 @@ #define VEXCEPTION_H #include +#include /** * @brief The VException class parent for all exception. Could be use for abstract exception diff --git a/src/exception/vexceptionemptyparameter.cpp b/src/exception/vexceptionemptyparameter.cpp index af84d8ebd..c3fdf6b7a 100644 --- a/src/exception/vexceptionemptyparameter.cpp +++ b/src/exception/vexceptionemptyparameter.cpp @@ -28,6 +28,8 @@ #include "vexceptionemptyparameter.h" +#include + VExceptionEmptyParameter::VExceptionEmptyParameter(const QString &what, const QString &name, const QDomElement &domElement) : VException(what), name(name), tagText(QString()), tagName(QString()), lineNumber(-1) diff --git a/src/exception/vexceptionemptyparameter.h b/src/exception/vexceptionemptyparameter.h index 042c89e40..5dae4b74b 100644 --- a/src/exception/vexceptionemptyparameter.h +++ b/src/exception/vexceptionemptyparameter.h @@ -31,6 +31,8 @@ #include "vexception.h" +#include + /** * @brief The VExceptionEmptyParameter class for exception empty parameter */ diff --git a/src/exception/vexceptionobjecterror.h b/src/exception/vexceptionobjecterror.h index d1315596e..888fd4cd2 100644 --- a/src/exception/vexceptionobjecterror.h +++ b/src/exception/vexceptionobjecterror.h @@ -31,6 +31,8 @@ #include "vexception.h" +#include + /** * @brief The VExceptionObjectError class for exception object error */ diff --git a/src/exception/vexceptionuniqueid.cpp b/src/exception/vexceptionuniqueid.cpp index 10a3136ca..9232d0ca7 100644 --- a/src/exception/vexceptionuniqueid.cpp +++ b/src/exception/vexceptionuniqueid.cpp @@ -28,6 +28,8 @@ #include "vexceptionuniqueid.h" +#include + VExceptionUniqueId::VExceptionUniqueId(const QString &what, const QDomElement &domElement) :VException(what), tagText(QString()), tagName(QString()), lineNumber(-1) { diff --git a/src/exception/vexceptionuniqueid.h b/src/exception/vexceptionuniqueid.h index a1bb053ce..9b24fab35 100644 --- a/src/exception/vexceptionuniqueid.h +++ b/src/exception/vexceptionuniqueid.h @@ -31,6 +31,8 @@ #include "vexception.h" +#include + /** * @brief The VExceptionUniqueId class for exception unique id */ diff --git a/src/exception/vexceptionwrongparameterid.h b/src/exception/vexceptionwrongparameterid.h index 0f9d55383..65304c3f8 100644 --- a/src/exception/vexceptionwrongparameterid.h +++ b/src/exception/vexceptionwrongparameterid.h @@ -31,6 +31,8 @@ #include "vexception.h" +#include + /** * @brief The VExceptionWrongParameterId class for exception wrong parameter id */ diff --git a/src/geometry/varc.h b/src/geometry/varc.h index caab908cf..890e2db80 100644 --- a/src/geometry/varc.h +++ b/src/geometry/varc.h @@ -30,6 +30,8 @@ #define VARC_H #include "vspline.h" +#include +#include "../options.h" class QString; class QLineF; class QPainterPath; diff --git a/src/geometry/vdetail.h b/src/geometry/vdetail.h index f80289efa..958c8f421 100644 --- a/src/geometry/vdetail.h +++ b/src/geometry/vdetail.h @@ -31,6 +31,9 @@ #include "vnodedetail.h" +#include +#include + namespace Detail { /** diff --git a/src/geometry/vspline.cpp b/src/geometry/vspline.cpp index 572ce9342..54e5026a0 100644 --- a/src/geometry/vspline.cpp +++ b/src/geometry/vspline.cpp @@ -28,6 +28,8 @@ #include "vspline.h" +#include + VSpline::VSpline() :p1(0), p2(QPointF()), p3(QPointF()), p4(0), angle1(0), angle2(0), kAsm1(1), kAsm2(1), kCurve(1), points(QHash()), mode(Draw::Calculation), idObject(0), _name(QString()){} diff --git a/src/geometry/vspline.h b/src/geometry/vspline.h index 9d0db6340..5fc34cc7a 100644 --- a/src/geometry/vspline.h +++ b/src/geometry/vspline.h @@ -31,6 +31,10 @@ #include "../container/vpointf.h" +#include +#include +#include + class QString; #define M_2PI 6.28318530717958647692528676655900576 diff --git a/src/main.cpp b/src/main.cpp index 8a2cf8320..52f4bd901 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ #include "mainwindow.h" #include "widgets/vapplication.h" #include +#include #include "tablewindow.h" void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index f8f742463..abd97ea9c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -36,6 +36,14 @@ #include "exception/vexceptionuniqueid.h" #include "version.h" +#include +#include +#include +#include +#include +#include +#include + MainWindow::MainWindow(QWidget *parent) :QMainWindow(parent), ui(new Ui::MainWindow), tool(Tool::ArrowTool), currentScene(0), sceneDraw(0), sceneDetails(0), mouseCoordinate(0), helpLabel(0), view(0), isInitialized(false), dialogTable(0), diff --git a/src/tablewindow.h b/src/tablewindow.h index d82380015..82ed71a95 100644 --- a/src/tablewindow.h +++ b/src/tablewindow.h @@ -29,6 +29,7 @@ #ifndef TABLEWINDOW_H #define TABLEWINDOW_H +#include #include #include "widgets/vitem.h" diff --git a/src/tools/drawTools/vdrawtool.h b/src/tools/drawTools/vdrawtool.h index fc0f1bea9..71e80bfa5 100644 --- a/src/tools/drawTools/vdrawtool.h +++ b/src/tools/drawTools/vdrawtool.h @@ -31,6 +31,9 @@ #include "../vabstracttool.h" +#include +#include + /** * @brief The VDrawTool class */ diff --git a/src/tools/modelingTools/vmodelingtool.h b/src/tools/modelingTools/vmodelingtool.h index 2387104c0..09c9b17b1 100644 --- a/src/tools/modelingTools/vmodelingtool.h +++ b/src/tools/modelingTools/vmodelingtool.h @@ -30,6 +30,7 @@ #define VMODELINGTOOL_H #include "../vabstracttool.h" +#include #include /** diff --git a/src/tools/nodeDetails/vnodearc.cpp b/src/tools/nodeDetails/vnodearc.cpp index 3ebf3808c..27ebfdea5 100644 --- a/src/tools/nodeDetails/vnodearc.cpp +++ b/src/tools/nodeDetails/vnodearc.cpp @@ -28,6 +28,8 @@ #include "vnodearc.h" +#include + const QString VNodeArc::TagName = QStringLiteral("arc"); const QString VNodeArc::ToolType = QStringLiteral("modeling"); diff --git a/src/tools/nodeDetails/vnodepoint.cpp b/src/tools/nodeDetails/vnodepoint.cpp index b4bdfeb85..f1ed87dc3 100644 --- a/src/tools/nodeDetails/vnodepoint.cpp +++ b/src/tools/nodeDetails/vnodepoint.cpp @@ -28,6 +28,8 @@ #include "vnodepoint.h" +#include + const QString VNodePoint::TagName = QStringLiteral("point"); const QString VNodePoint::ToolType = QStringLiteral("modeling"); diff --git a/src/tools/nodeDetails/vnodespline.cpp b/src/tools/nodeDetails/vnodespline.cpp index 56ed8fc25..ac89eaac7 100644 --- a/src/tools/nodeDetails/vnodespline.cpp +++ b/src/tools/nodeDetails/vnodespline.cpp @@ -28,6 +28,8 @@ #include "vnodespline.h" +#include + const QString VNodeSpline::TagName = QStringLiteral("spline"); const QString VNodeSpline::ToolType = QStringLiteral("modelingSpline"); diff --git a/src/tools/nodeDetails/vnodesplinepath.cpp b/src/tools/nodeDetails/vnodesplinepath.cpp index ebd70564f..250581c2d 100644 --- a/src/tools/nodeDetails/vnodesplinepath.cpp +++ b/src/tools/nodeDetails/vnodesplinepath.cpp @@ -28,6 +28,8 @@ #include "vnodesplinepath.h" +#include + const QString VNodeSplinePath::TagName = QStringLiteral("spline"); const QString VNodeSplinePath::ToolType = QStringLiteral("modelingPath"); diff --git a/src/widgets/doubledelegate.cpp b/src/widgets/doubledelegate.cpp index 7e5529553..36e865905 100644 --- a/src/widgets/doubledelegate.cpp +++ b/src/widgets/doubledelegate.cpp @@ -35,6 +35,8 @@ #include "doubledelegate.h" +#include + QWidget *DoubleSpinBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const { diff --git a/src/widgets/vapplication.cpp b/src/widgets/vapplication.cpp index 34327663f..e3e40bab9 100644 --- a/src/widgets/vapplication.cpp +++ b/src/widgets/vapplication.cpp @@ -33,6 +33,9 @@ #include "../exception/vexceptionemptyparameter.h" #include "../exception/vexceptionwrongparameterid.h" +#include +#include + // reimplemented from QApplication so we can throw exceptions in slots bool VApplication::notify(QObject *receiver, QEvent *event) { diff --git a/src/widgets/vcontrolpointspline.cpp b/src/widgets/vcontrolpointspline.cpp index 8a81c7f0e..acd40cb39 100644 --- a/src/widgets/vcontrolpointspline.cpp +++ b/src/widgets/vcontrolpointspline.cpp @@ -28,6 +28,8 @@ #include "vcontrolpointspline.h" +#include + VControlPointSpline::VControlPointSpline(const qint32 &indexSpline, SplinePoint::Position position, const QPointF &controlPoint, const QPointF &splinePoint, QGraphicsItem *parent) diff --git a/src/widgets/vgraphicssimpletextitem.cpp b/src/widgets/vgraphicssimpletextitem.cpp index 5e34555ce..80a908fbb 100644 --- a/src/widgets/vgraphicssimpletextitem.cpp +++ b/src/widgets/vgraphicssimpletextitem.cpp @@ -28,6 +28,8 @@ #include "vgraphicssimpletextitem.h" +#include + VGraphicsSimpleTextItem::VGraphicsSimpleTextItem(QGraphicsItem * parent) :QGraphicsSimpleTextItem(parent), fontSize(0) { diff --git a/src/widgets/vitem.cpp b/src/widgets/vitem.cpp index 37c6614cc..9eea52f22 100644 --- a/src/widgets/vitem.cpp +++ b/src/widgets/vitem.cpp @@ -27,7 +27,10 @@ *************************************************************************/ #include "vitem.h" +#include "../options.h" + #include +#include VItem::VItem (const QPainterPath & path, int numInList, QGraphicsItem * parent ) :QGraphicsPathItem ( path, parent ), numInOutList(numInList), paper(0) diff --git a/src/widgets/vmaingraphicsscene.cpp b/src/widgets/vmaingraphicsscene.cpp index 6b5299fb9..95c1a41b2 100644 --- a/src/widgets/vmaingraphicsscene.cpp +++ b/src/widgets/vmaingraphicsscene.cpp @@ -28,6 +28,8 @@ #include "vmaingraphicsscene.h" +#include + VMainGraphicsScene::VMainGraphicsScene() :QGraphicsScene(), horScrollBar(0), verScrollBar(0), scaleFactor(1){} diff --git a/src/widgets/vmaingraphicsscene.h b/src/widgets/vmaingraphicsscene.h index ef8b99769..fccc36ead 100644 --- a/src/widgets/vmaingraphicsscene.h +++ b/src/widgets/vmaingraphicsscene.h @@ -30,6 +30,7 @@ #define VMAINGRAPHICSSCENE_H #include +#include "../options.h" /** * @brief The VMainGraphicsScene class diff --git a/src/widgets/vmaingraphicsview.cpp b/src/widgets/vmaingraphicsview.cpp index 8fc8fe703..162e2fc00 100644 --- a/src/widgets/vmaingraphicsview.cpp +++ b/src/widgets/vmaingraphicsview.cpp @@ -28,6 +28,11 @@ #include "vmaingraphicsview.h" +#include +#include +#include +#include + VMainGraphicsView::VMainGraphicsView(QWidget *parent) :QGraphicsView(parent), _numScheduledScalings(0) { diff --git a/src/widgets/vtablegraphicsview.cpp b/src/widgets/vtablegraphicsview.cpp index a60b22567..5b6b3c01c 100644 --- a/src/widgets/vtablegraphicsview.cpp +++ b/src/widgets/vtablegraphicsview.cpp @@ -28,6 +28,10 @@ #include "vtablegraphicsview.h" +#include +#include +#include + VTableGraphicsView::VTableGraphicsView(QGraphicsScene* pScene, QWidget *parent) :QGraphicsView(pScene, parent) { diff --git a/src/xml/vdomdocument.cpp b/src/xml/vdomdocument.cpp index a61dceb0d..fe556678f 100644 --- a/src/xml/vdomdocument.cpp +++ b/src/xml/vdomdocument.cpp @@ -41,6 +41,8 @@ #include "../tools/nodeDetails/vnodesplinepath.h" #include "../tools/nodeDetails/vnodearc.h" +#include + VDomDocument::VDomDocument(VContainer *data, QComboBox *comboBoxDraws, Draw::Draws *mode) : QDomDocument(), map(QHash()), nameActivDraw(QString()), data(data), tools(QHash()), history(QVector()), cursor(0), diff --git a/src/xml/vdomdocument.h b/src/xml/vdomdocument.h index b13cf58c0..866421445 100644 --- a/src/xml/vdomdocument.h +++ b/src/xml/vdomdocument.h @@ -29,12 +29,15 @@ #ifndef VDOMDOCUMENT_H #define VDOMDOCUMENT_H -#include #include "../container/vcontainer.h" #include "../widgets/vmaingraphicsscene.h" #include "../tools/vdatatool.h" #include "vtoolrecord.h" +#include +#include +#include + namespace Document { /** diff --git a/src/xml/vtoolrecord.h b/src/xml/vtoolrecord.h index 77ed466f3..bbd3d72e1 100644 --- a/src/xml/vtoolrecord.h +++ b/src/xml/vtoolrecord.h @@ -29,6 +29,10 @@ #ifndef VTOOLRECORD_H #define VTOOLRECORD_H +#include "../options.h" + +#include + /** * @brief The VToolRecord class */ From e4a4261fb52dda55464284122aafaadb3beadc72 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 21 Nov 2013 14:14:25 +0200 Subject: [PATCH 39/56] Use ccache only on unix system. --HG-- branch : develop --- Valentina.pro | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Valentina.pro b/Valentina.pro index 27381354d..cbecf8c36 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -52,9 +52,10 @@ OTHER_FILES += share/resources/valentina.rc \ TRANSLATIONS += share/translations/valentina_ru.ts \ share/translations/valentina_uk.ts +unix:QMAKE_CXX = ccache g++ + CONFIG(debug, debug|release){ # Debug - QMAKE_CXX = ccache g++ TARGET = $$DEBUG_TARGET CONFIG += precompile_header From c98608967f1c7e07af05bd36527ce40c970a269d Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 21 Nov 2013 15:06:23 +0200 Subject: [PATCH 40/56] Make install in qmake. Path to translation in release build. --HG-- branch : develop --- Valentina.pro | 15 +++++++++++++++ src/main.cpp | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/Valentina.pro b/Valentina.pro index cbecf8c36..6ea590d3b 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -107,3 +107,18 @@ message(Settings: $$[QT_INSTALL_SETTINGS]) message(Examples: $$[QT_INSTALL_EXAMPLES]) win32:RC_FILE = share/resources/valentina.rc + +unix { +#VARIABLES +isEmpty(PREFIX) { + PREFIX = /usr +} +BINDIR = $$PREFIX/bin +DATADIR =$$PREFIX/share +DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" +#MAKE INSTALL +target.path = /usr/bin +translations.path = /usr/share/valentina/translations +translations.files = bin/*.qm +INSTALLS += target translations +} diff --git a/src/main.cpp b/src/main.cpp index 52f4bd901..adae5182d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,7 +69,11 @@ int main(int argc, char *argv[]) app.installTranslator(&qtTranslator); QTranslator appTranslator; +#ifdef QT_DEBUG appTranslator.load("valentina_" + QLocale::system().name(), "."); +#else + appTranslator.load("valentina_" + QLocale::system().name(), "/usr/share/valentina/translations"); +#endif app.installTranslator(&appTranslator); MainWindow w; From 1378a1640efbc49c8bf034ab69892f5d2c699819 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 21 Nov 2013 18:29:21 +0200 Subject: [PATCH 41/56] QMAKE_DISTCLEAN --HG-- branch : develop --- Valentina.pro | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index 6ea590d3b..1eaa3c756 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -67,8 +67,8 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \ -isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \ - -isystem "/usr/include/qt5/QtCore" -isystem "$$OUT_PWD/uic" -isystem "$$OUT_PWD/moc/" \ - -isystem "$$OUT_PWD/rcc/" \ + -isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" \ + -isystem "$${RCC_DIR}" \ -Og -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \ -Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self \ -Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \ @@ -89,7 +89,7 @@ CONFIG(debug, debug|release){ QMAKE_EXTRA_COMPILERS += lrelease lrelease.input = TRANSLATIONS lrelease.output = ${QMAKE_FILE_BASE}.qm - lrelease.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN} -qm "bin/"${QMAKE_FILE_BASE}.qm + lrelease.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN} -qm "$${DESTDIR}/"${QMAKE_FILE_BASE}.qm lrelease.CONFIG += no_link target_predeps } @@ -119,6 +119,13 @@ DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" #MAKE INSTALL target.path = /usr/bin translations.path = /usr/share/valentina/translations -translations.files = bin/*.qm +translations.files = $${DESTDIR}/*.qm INSTALLS += target translations } + +# Remove generated files at cleaning +QMAKE_DISTCLEAN += $${DESTDIR}/* \ + $${OBJECTS_DIR}/* \ + $${UI_DIR}/* \ + $${MOC_DIR}/* \ + $${RCC_DIR}/* From 6a4846001458ff3354248b1bd76c41364428241a Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 22 Nov 2013 12:18:35 +0200 Subject: [PATCH 42/56] Name of arc in formula. --HG-- branch : develop --- src/geometry/varc.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/geometry/varc.cpp b/src/geometry/varc.cpp index 771f59b1f..2dfd52a70 100644 --- a/src/geometry/varc.cpp +++ b/src/geometry/varc.cpp @@ -40,7 +40,10 @@ VArc::VArc (const QHash *points, qint64 center, qreal radius, Q : f1(f1), formulaF1(formulaF1), f2(f2), formulaF2(formulaF2), radius(radius), formulaRadius(formulaRadius), center(center), points(*points), mode(mode), idObject(idObject), _name(QString()) { - _name = QString ("Arc_%1_%2").arg(this->GetCenterVPoint().name()).arg(radius); + /** + * @todo Change name of arc in formula. Name now not unique. + */ + _name = QString ("Arc_%1").arg(this->GetCenterVPoint().name()); } VArc::VArc(const VArc &arc) From a71481b18ad027ea9e1ab1e5bc0a593a0ee48537 Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 22 Nov 2013 12:37:44 +0200 Subject: [PATCH 43/56] Change in README file. --HG-- branch : develop --- README | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/README b/README index ccf3d0cc9..ae3363403 100644 --- a/README +++ b/README @@ -1,8 +1,11 @@ +Pattern making program +Copyright (C) 2013 Roman Telezhinsky +https://dismine@bitbucket.org/dismine/valentina + Valentina ========== Open source project of creating a pattern making program, whose allow create and modeling patterns of clothing. -Published under GNU GPL v3 license. Supported Platforms =================== @@ -16,7 +19,11 @@ Building the sources requires Qt 5.0.0 or later. Compiling Valentina ==================== Prerequisites: - * Qt 5.0.0 or later + * Qt 5.0.0 or later (On Unix development packages needed) + * mercurial + * On Unix: + - ccache + - g++ (at least GCC 4.6 is needed and GCC 4.8 is recommended) * On Windows: - MinGW or Visual Studio @@ -28,8 +35,6 @@ You can build Valentina with qmake -r make (or mingw32-make or nmake or jom, depending on your platform) -Installation ("make install") is not needed. - Note:In order to build and use Valentina, the PATH environment variable needs to be extended: @@ -42,3 +47,17 @@ Control Panel|System|Advanced|Environment variables menu. You may also need to ensure that the locations of your compiler and other build tools are listed in the PATH variable. This will depend on your choice of software development environment. + +LICENSING +========== +Valentina is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +Valentina is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +See LICENSE file for further information From f91335d4cdc4fc9223a8dc29678ee530aa35497f Mon Sep 17 00:00:00 2001 From: dismine Date: Fri, 22 Nov 2013 13:27:46 +0200 Subject: [PATCH 44/56] Change in pro file. --HG-- branch : develop --- Valentina.pro | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index 1eaa3c756..2042c136a 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -10,8 +10,8 @@ QT += core gui widgets xml svg TEMPLATE = app -DEBUG_TARGET = Valentinad -RELEASE_TARGET = Valentina +DEBUG_TARGET = valentinad +RELEASE_TARGET = valentina CONFIG -= debug_and_release debug_and_release_target CONFIG += c++11 @@ -117,10 +117,11 @@ BINDIR = $$PREFIX/bin DATADIR =$$PREFIX/share DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" #MAKE INSTALL -target.path = /usr/bin -translations.path = /usr/share/valentina/translations -translations.files = $${DESTDIR}/*.qm -INSTALLS += target translations +target.path = $$BINDIR +translations.path = $$DATADIR/$${TARGET}/translations +translations.files += $${DESTDIR}/*.qm +INSTALLS += target \ + translations } # Remove generated files at cleaning From db004d45212cefa52df44a50fff62b73b6e0938c Mon Sep 17 00:00:00 2001 From: dismine Date: Mon, 25 Nov 2013 11:17:47 +0200 Subject: [PATCH 45/56] Make install for translations. --HG-- branch : develop --- Valentina.pro | 4 +- share/translations/valentina_ru.ts | 370 ++++++++++++++--------------- share/translations/valentina_uk.ts | 370 ++++++++++++++--------------- 3 files changed, 372 insertions(+), 372 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index 2042c136a..047f02113 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -113,13 +113,13 @@ unix { isEmpty(PREFIX) { PREFIX = /usr } -BINDIR = $$PREFIX/bin +BINDIR = $$PREFIX/local/bin DATADIR =$$PREFIX/share DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" #MAKE INSTALL target.path = $$BINDIR translations.path = $$DATADIR/$${TARGET}/translations -translations.files += $${DESTDIR}/*.qm +translations.files = bin/valentina_ru.qm bin/valentina_uk.qm INSTALLS += target \ translations } diff --git a/share/translations/valentina_ru.ts b/share/translations/valentina_ru.ts index b7e13a511..08f500b2c 100644 --- a/share/translations/valentina_ru.ts +++ b/share/translations/valentina_ru.ts @@ -120,7 +120,7 @@ Переменые. Нажмите дважды для вставки. - + Select second point of line Выберить вторую точку линии @@ -264,7 +264,7 @@ Переменные - + Value angle of line. Значение угла линии. @@ -398,12 +398,12 @@ Переменые. Нажмите дважды для вставки. - + Select second point of angle Выберить вторую точку угла - + Select third point of angle Выберить третью точку угла @@ -455,12 +455,12 @@ Замкнутая - + Get wrong scene object. Ignore. Получено не правильный объект сцены. Игнорируем. - + Get wrong tools. Ignore. Получено неправильный инструмент. Игнорируем. @@ -628,12 +628,12 @@ Показать линию с первой точки к нашей - + Select first point of line Выберить первую точку линии - + Select second point of line Выберить вторую точку линии @@ -647,78 +647,78 @@ - + Tool Инструмент - + %1 - Base point %1 - Базовая точка - - + + %1_%2 - Line from point %1 to point %2 %1_%2 - Линия с точки %1 к точке %2 - + %3 - Point along line %1_%2 %3 - Точка вдоль линии %1_%2 - + %1 - Point of soulder %1 - Точка плеча - + %3 - Normal to line %1_%2 %3 - Перпендикуляр к линии %1_%2 - + %4 - Bisector of angle %1_%2_%3 %4 - Бисектриса угла %1_%2_%3 - + %5 - Point of intersection lines %1_%2 and %3_%4 %5 - Точка пересичения линий %1_%2 и %3_%4 - + Curve %1_%2 Кривая %1_%2 - + Arc with center in point %1 Дуга з центром в точке %1 - + Curve point %1 Точка кривой %1 - + %4 - Point of contact arc with center in point %1 and line %2_%3 %4 - Точка касания дуги с центром в точке %1 и линии %2_%3 - + Point of perpendical from point %1 to line %2_%3 Точка перпендикуляра с точки %1 к линии %2_%3 - + Triangle: axis %1_%2, points %3 and %4 Триугольник: ось %1_%2, точки %3 и %4 - + Get wrong tool type. Ignore. Получено неправилый тип инструмента. Игнорируется. @@ -739,8 +739,8 @@ - - + + Denotation Обозначение @@ -753,8 +753,8 @@ - - + + Base value Базовое значение @@ -771,24 +771,24 @@ - - - - + + + + Description Опис - - + + In size В размерах - - + + In growth В ростах @@ -805,7 +805,7 @@ - + Line Линия @@ -821,7 +821,7 @@ - + Curve Кривая @@ -837,7 +837,7 @@ - + Arc Дуга @@ -847,25 +847,25 @@ Длина дуги - + Denotation %1 Обозначение %1 - + Can't convert toDouble value. Не могу конвертировать к toDouble значение. - - + + Calculated value Расчитаное значение - - - + + + Length Длина @@ -888,7 +888,7 @@ Вторая точка - + Select second point Выберить вторую точку @@ -928,17 +928,17 @@ Вторая линия - + Select second point of first line Выберить вторую точку первой линии - + Select first point of second line Выберить первую точку второй линии - + Select second point of second line Выберить вторую точку второй линии @@ -1065,7 +1065,7 @@ Переменые. Нажмите дважды для вставки. - + Select second point of line Выберить вторую точку линии @@ -1179,12 +1179,12 @@ Переменые. Нажмите дважды для вставки. - + Select second point of line Выберить вторую точку линии - + Select point of center of arc Выберите точку центра дуги @@ -1222,7 +1222,7 @@ Вторая точка угла - + Select point horizontally Выберить точку по горозинтали @@ -1333,12 +1333,12 @@ Переменые. Нажмите дважды для вставки. - + Select second point of line Выберить вторую точку линии - + Select point of shoulder Выберить точку плеча @@ -1423,7 +1423,7 @@ Коефициент кривизные кривой - + Select last point of curve Выберить последнюю точку кривой @@ -1471,7 +1471,7 @@ Коефициент кривизные кривой - + Select point of curve path Выберить точку сложной кривой @@ -1479,55 +1479,55 @@ DialogTool - + Wrong details id. Неправильный id детали. - - - + + + Line Линия - - + + No line Без линии - + Can't find point by name Не могу найти точку за именем - + Error Ошибка - + Growth Рост - + Size Размер - + Line length Длина линии - + Arc length Длина дуги - + Curve length Длина кривой @@ -1573,17 +1573,17 @@ Вторая точка - + Select second point of axis Выберить вторую точку оси - + Select first point Выберить первую точку - + Select second point Выберить вторую точку @@ -1796,7 +1796,7 @@ - + Save as Сохранить как @@ -1874,13 +1874,13 @@ - + About Qt Про Qt - + About Valentina Про Valentina @@ -1890,241 +1890,241 @@ Выход - + Drawing %1 Чертеж %1 - - + + Drawing: Чертеж: - + Enter a name for the drawing. Введите имя чертежа. - - + + Error. Drawing of same name already exists. Ошибка. Чертеж с таким именем уже существует. - + Error creating drawing with the name Ошибка создания чертежа с именем - + Enter a new name for the drawing. Введите новое имя для чертежа. - + Error saving change!!! Пошибка сохранение изменений!!! - + Can't save new name of drawing Не могу сохранить новое имя чертежа - - + + Select point Выберить точку - + Select first point Выберить первую точку - - - + + + Select first point of line Выберить первую точку линии - + Select first point of angle Выберить первую точку угла - + Select first point of first line Выберить первую точку первой линии - + Select first point curve Выберить первую точку кривой - + Select point of center of arc Выберить точку центра дуги - + Select point of curve path Выберить точку сложной кривой - + The pattern has been modified. Лекало было изменено. - + Do you want to save your changes? Вы хочете сохранить изменения? - + Growth: Рост: - + Size: Размер: - + Drawing: Чертеж: - + Lekalo files (*.xml);;All files (*.*) Файлы лекала (*.xml);;Все файлы (*.*) - - + + Lekalo files (*.xml) Файл лекала (*.xml) - + Error saving file. Can't save file. Ошибка сохранения файла. Не могу сохранить файл. - + Open file Открыть файл - + Got empty file name. Получено пустое имя файла. - + Could not copy temp file to pattern file Не могу скопировать временный файл у файл лекала - + Could not remove pattern file Не смог удалить файл лекала - + Can't open pattern file. File name empty Не могу открыть файл лекала. Пустое имя файла - - - - - - - - + + + + + + + + Error! Ошибка! - + Create new drawing for start working. Создайте новый чертеж для начала роботы. - + Select points, arcs, curves clockwise. Выберить точки, дуги, кривые за часовой стрелкой. - + Select base point Выберить базовую точку - + Select first point of axis Выберить первую тчоку оси - + Select point vertically Выберить точку по вертикали - + Based on Qt %2 (32 bit) Базируется на Qt %2 (32 bit) - + Built on %3 at %4 Создано %3 в %4 - + <h1>%1</h1> %2 <br/><br/> %3 <br/><br/> %4 - + Error parsing file. Ошибка парсинга файла. - + Error can't convert value. Ошибка, не могу конвертовать значение. - + Error empty parameter. Ошибка, пустой параметр. - + Error wrong id. Ошибка, неправильный id. - - + + Error don't unique id. Ошибка не уникальный id. - + Error parsing pattern file. Ошибка парсинга файла лекала. - + Error in line %1 column %2 Ошибка в линии %1 столбец %2 @@ -2242,42 +2242,42 @@ VApplication - - - - - - + + + + + + Error! Ошибка! - + Error parsing file. Program will be terminated. Ошибка парсинга файла. Програма будет закрыта. - + Error bad id. Program will be terminated. Ошибка, неправильный id. Програма будет закрыта. - + Error can't convert value. Program will be terminated. Ошибка не могу конвертировать значение. Програма будет закрыта. - + Error empty parameter. Program will be terminated. Ошибка пустой параметр. Програма будет закрыта. - + Error wrong id. Program will be terminated. Ошибка неправельный id. Програма будет закрыта. - + Something wrong!! Что то не так!!! @@ -2285,17 +2285,17 @@ VArc - + Can't find id = %1 in table. Не могу найти id = %1 в таблице. - + Angle of arc can't be 0 degree. Угол дуги не может быть 0 градусов. - + Arc have not this number of part. Дуга не имеет ету часть. @@ -2303,7 +2303,7 @@ VContainer - + Can't find object Не могу найти объект @@ -2311,137 +2311,137 @@ VDomDocument - + Got wrong parameter id. Need only id > 0. Получен неправельный параметр id. Допустимы только id > 0. - + Can't convert toLongLong parameter Не могу конвертировать toLongLong параметр - + Got empty parameter Получен пустой параметр - + Can't convert toDouble parameter Не могу конвертировать toDouble параметр - + This id is not unique. Этот id не уникальный. - + Error creating or updating detail Ошибка создания или обновления детали - + Error creating or updating single point Ошибка создания или обновления базовой точки - + Error creating or updating point of end line Ошибка создания или обновления точки на конце линии - + Error creating or updating point along line Ошибка создания или обновления точки вдоль линии - + Error creating or updating point of shoulder Ошибка создания или обновления точки плеча - + Error creating or updating point of normal Ошибка создания или обновления точки нормали - + Error creating or updating point of bisector Ошибка создания или обновления точки бисектрисы - + Error creating or updating point of lineintersection Ошибка создания или обновления точки пересичения линий - + Error creating or updating point of contact Ошибка создания или обновления точки прикосновения - + Error creating or updating modeling point Ошибка создания или обновления точки - + Error creating or updating height Ошибка создания или обновления высоты - + Error creating or updating triangle Ошибка создания или обновления треугольника - + Error creating or updating point of intersection Ошибка создания или обновления точки пересичения - + Error creating or updating line Ошибка создания или обновления линии - + Error creating or updating simple curve Ошибка создания или обновления кривой - + Error creating or updating curve path Ошибка создания или обновления сложной кривой - + Error creating or updating modeling simple curve Ошибка создания или обновления модельной кривой - + Error creating or updating modeling curve path Ошибка создания или обновления сложной модельной кривой - + Error creating or updating simple arc Ошибка создания или обновления дуги - + Error creating or updating modeling arc Ошибка создания или обновления модельной дуги - + Error! Ошибка! - + Error parsing file. Ошибка парсинга файла. @@ -2453,12 +2453,12 @@ VDrawTool - + Options Параметры - + Delete Удалить @@ -2476,12 +2476,12 @@ VModelingTool - + Option Параметры - + Delete Удалить @@ -2504,12 +2504,12 @@ VTableGraphicsView - + detail don't find деталь не найдена - + detail find деталь найдена diff --git a/share/translations/valentina_uk.ts b/share/translations/valentina_uk.ts index c92eb87c6..c0f158af8 100644 --- a/share/translations/valentina_uk.ts +++ b/share/translations/valentina_uk.ts @@ -120,7 +120,7 @@ Змінні. Подвійний клік для вибору. - + Select second point of line Виберіть другу точку лінії @@ -264,7 +264,7 @@ Змінні - + Value angle of line. Значення дуги лінії. @@ -398,12 +398,12 @@ Змінні. Подвійний клік для вибору. - + Select second point of angle Виберіть другу точку кута - + Select third point of angle Виберіть третю точку кута @@ -455,12 +455,12 @@ Замкнена - + Get wrong scene object. Ignore. Отримано непаравильний об'єкт сцени. Ігноровано. - + Get wrong tools. Ignore. Отримано неправильний інструмент. Ігноровано. @@ -628,12 +628,12 @@ Показати лінію від першої точки до нашої точки - + Select first point of line Виберість першу точку лінії - + Select second point of line Виберіть другу точку лінії @@ -647,78 +647,78 @@ - + Tool Інструмент - + %1 - Base point %1 - Базова точка - - + + %1_%2 - Line from point %1 to point %2 %1_%2 - Лінія від точки %1 до точки %2 - + %3 - Point along line %1_%2 %3 - Точка вздовж лінії %1_%2 - + %1 - Point of soulder %1 - Точка плеча - + %3 - Normal to line %1_%2 %3 - Перпедикуляр до лінії %1_%2 - + %4 - Bisector of angle %1_%2_%3 %4 - Бісектриса кута %1_%2_%3 - + %5 - Point of intersection lines %1_%2 and %3_%4 %5 - Точка перетину лінії %1_%2 і %3_%4 - + Curve %1_%2 Крива %1_%2 - + Arc with center in point %1 Дуга з центром в точці %1 - + Curve point %1 Точка кривої %1 - + %4 - Point of contact arc with center in point %1 and line %2_%3 %4 - Точка дотику дуги з центром в точці %1 і лінії %2_%3 - + Point of perpendical from point %1 to line %2_%3 Точка перпендикуляра з точки %1 до лінії %2_%3 - + Triangle: axis %1_%2, points %3 and %4 Трикутник: вісь %1_%2, точки %3 і %4 - + Get wrong tool type. Ignore. Отримано неправильний тип інструменту. Ігноруємо. @@ -739,8 +739,8 @@ - - + + Denotation Позначення @@ -753,8 +753,8 @@ - - + + Base value Базове значення @@ -771,24 +771,24 @@ - - - - + + + + Description Опис - - + + In size В розмірах - - + + In growth В ростах @@ -805,7 +805,7 @@ - + Line Лінія @@ -821,7 +821,7 @@ - + Curve Крива @@ -837,7 +837,7 @@ - + Arc Дуга @@ -847,25 +847,25 @@ Довжина дуги - + Denotation %1 Позначення %1 - + Can't convert toDouble value. Не можу конвертувати toDouble значення. - - + + Calculated value Розраховане значення - - - + + + Length Довжина @@ -888,7 +888,7 @@ Друга точка - + Select second point Виберіть другу точку @@ -928,17 +928,17 @@ Друга лінія - + Select second point of first line Виберіть другу точка першої лінії - + Select first point of second line Виберіть першу точку другої лінії - + Select second point of second line Виберіть другу точку другої лінії @@ -1065,7 +1065,7 @@ Змінні. Подвійний клік для вибору. - + Select second point of line Виберіть другу точку лінії @@ -1179,12 +1179,12 @@ Змінні. Подвійний клік для вибору. - + Select second point of line Виберіть другу точку лінії - + Select point of center of arc Виберіть точку центру дуги @@ -1222,7 +1222,7 @@ Друга точка кута - + Select point horizontally Виберіть точку горизонталі @@ -1333,12 +1333,12 @@ Змінні. Подвійний клік для вибору. - + Select second point of line Виберіть другу точку лінії - + Select point of shoulder Виберіть точку плеча @@ -1423,7 +1423,7 @@ Коефіцієнт кривизни кривої - + Select last point of curve Виберість останню точку кривої @@ -1471,7 +1471,7 @@ Коефіцієнт кривизни кривої - + Select point of curve path Виберіть точку складної кривої @@ -1479,55 +1479,55 @@ DialogTool - + Wrong details id. Неправильний id деталі. - - - + + + Line Лінія - - + + No line Без лінії - + Can't find point by name Не можу знайти точку за ім'ям - + Error Помилка - + Growth Зріст - + Size Розмір - + Line length Довжина лінії - + Arc length Довжина дуги - + Curve length Довжина кривої @@ -1573,17 +1573,17 @@ Друга точка - + Select second point of axis Виберіть другу точку вісі - + Select first point Виберість першу точку - + Select second point Виберіть другу точку @@ -1796,7 +1796,7 @@ - + Save as Зберегти як @@ -1874,13 +1874,13 @@ - + About Qt Про Qt - + About Valentina Про Valentina @@ -1890,87 +1890,87 @@ Вихід - + Drawing %1 Креслення %1 - - + + Drawing: Креслення: - + Enter a name for the drawing. Введіть ім'я креслення. - - + + Error. Drawing of same name already exists. Помилка. Креслення з таким ім'ям вже існує. - + Error creating drawing with the name Помилка створення креслення з ім'ям - + Enter a new name for the drawing. Введіть нове ім'я креслення. - + Error saving change!!! Помилка збереження змін!!! - + Can't save new name of drawing Не можу зберегти нове ім'я креслення - - + + Select point Виберість точку - + Select first point Виберість першу точку - - - + + + Select first point of line Виберість першу точку лінії - + Select first point of angle Виберіть першу точку кута - + Select first point of first line Виберіть першу точку першої лінії - + Select first point curve Виберіть першу точку кривої - + Select point of center of arc Виберіть точку центру дуги - + Select point of curve path Виберіть точку складної кривої @@ -1983,156 +1983,156 @@ Valentina v.0.1.0 - + The pattern has been modified. Лекало було зміненно. - + Do you want to save your changes? Ви хочете зберегти зміни? - + Growth: Зріст: - + Size: Розмір: - + Drawing: Креслення: - + Lekalo files (*.xml);;All files (*.*) Файли лекала (*.xml);;Всі файли (*.*) - - + + Lekalo files (*.xml) Файл лекала (*.xml) - + Error saving file. Can't save file. Помилка збереження файлу. Не можу зберегти файл. - + Open file Відкрити файл - + Got empty file name. Отримано пусте імя файлу. - + Could not copy temp file to pattern file Не можу копіювати тимчасовий файл до файлу лекала - + Could not remove pattern file Не можу видалити файл лекала - + Can't open pattern file. File name empty Не можу відкрити файл лекала. Пусте ім'я файлу - - - - - - - - + + + + + + + + Error! Помилка! - + Create new drawing for start working. Створіть нове креслення для початку роботи. - + Select points, arcs, curves clockwise. Виберіть точки, дуги, криві загодинниковою стрілкою. - + Select base point Виберіть базову точку - + Select first point of axis Виберіть першу точку вісі - + Select point vertically Виберіть точку по вертикалі - + Based on Qt %2 (32 bit) Базується на Qt %2 (32 bit) - + Built on %3 at %4 Зібрано %3 в %4 - + <h1>%1</h1> %2 <br/><br/> %3 <br/><br/> %4 - + Error parsing file. Помилка парсингу файла. - + Error can't convert value. Помилка, не можу конвертувати значення. - + Error empty parameter. Помилка, пустий параметр. - + Error wrong id. Помикла, неправильний id. - - + + Error don't unique id. Помилка, не унікальний id. - + Error parsing pattern file. Помилка парсінгу файлу лекала. - + Error in line %1 column %2 Помилка в лінії %1 стовпчик %2 @@ -2250,42 +2250,42 @@ VApplication - - - - - - + + + + + + Error! Помилка! - + Error parsing file. Program will be terminated. Помилка парсінгу файла. Програма буде закрита. - + Error bad id. Program will be terminated. Помилка неправильний id. Програма буде закрита. - + Error can't convert value. Program will be terminated. Помилка конвертації значення. Програма буде закрита. - + Error empty parameter. Program will be terminated. Помилка пустий параметр. Програма буде закрита. - + Error wrong id. Program will be terminated. Помилка неправильний id. Програма буде закрита. - + Something wrong!! Щось не так!! @@ -2293,17 +2293,17 @@ VArc - + Can't find id = %1 in table. Не можу знайти id = %1 в таблиці. - + Angle of arc can't be 0 degree. Кут дуги не може бути 0 градусів. - + Arc have not this number of part. Дуга не має цієї частини. @@ -2311,7 +2311,7 @@ VContainer - + Can't find object Не можу знайти об'єкт @@ -2319,137 +2319,137 @@ VDomDocument - + Got wrong parameter id. Need only id > 0. Отримано неправильний id. Допускаються тільки id > 0. - + Can't convert toLongLong parameter Не можу конвертувати toLongLong параметру - + Got empty parameter Отримано пустий параметр - + Can't convert toDouble parameter Не можу конвертувати toDouble параметру - + This id is not unique. Цей id не унікальний. - + Error creating or updating detail Помилка створення чи оновлення деталі - + Error creating or updating single point Помилка створення чи оновлення простої точки - + Error creating or updating point of end line Помилка створення чи оновлення точки кінця відрізку - + Error creating or updating point along line Помилка створення чи оновлення точки вздовж лінії - + Error creating or updating point of shoulder Помилка створення чи оновлення точки плеча - + Error creating or updating point of normal Помилка створення чи оновлення точки нормалі - + Error creating or updating point of bisector Помилка створення чи оновлення точки бісектриси - + Error creating or updating point of lineintersection Помилка створення чи оновлення точки перетину ліній - + Error creating or updating point of contact Помилка створення чи оновлення точки дотику - + Error creating or updating modeling point Помилка створення чи оновлення модельної точки - + Error creating or updating height Помилка створення чи оновлення висоти - + Error creating or updating triangle Помилка створення чи оновлення трикутника - + Error creating or updating point of intersection Помилка створення чи оновлення точки перетину - + Error creating or updating line Помилка створення чи оновлення лінії - + Error creating or updating simple curve Помилка створення чи оновлення кривої - + Error creating or updating curve path Помилка створення чи оновлення шляху кривих - + Error creating or updating modeling simple curve Помилка створення чи оновлення модельної кривої - + Error creating or updating modeling curve path Помилка створення чи оновлення модельного шляху кривих - + Error creating or updating simple arc Помилка створення чи оновлення дуги - + Error creating or updating modeling arc Помилка створення чи оновлення модельної дуги - + Error! Помилка! - + Error parsing file. Помилка парсингу файла. @@ -2461,12 +2461,12 @@ VDrawTool - + Options Параметри - + Delete Видалити @@ -2484,12 +2484,12 @@ VModelingTool - + Option Параметри - + Delete Видалити @@ -2512,12 +2512,12 @@ VTableGraphicsView - + detail don't find деталь не знайдено - + detail find деталь знайдено From 66e6f111042ac374557cec9f843a3546dd209057 Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 26 Nov 2013 18:42:58 +0200 Subject: [PATCH 46/56] Added path to translations. --HG-- branch : develop --- src/main.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index adae5182d..6bc343bc2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,10 +69,14 @@ int main(int argc, char *argv[]) app.installTranslator(&qtTranslator); QTranslator appTranslator; -#ifdef QT_DEBUG +#ifdef Q_OS_WIN32 appTranslator.load("valentina_" + QLocale::system().name(), "."); #else - appTranslator.load("valentina_" + QLocale::system().name(), "/usr/share/valentina/translations"); + #ifdef QT_DEBUG + appTranslator.load("valentina_" + QLocale::system().name(), "."); + #else + appTranslator.load("valentina_" + QLocale::system().name(), "/usr/share/valentina/translations"); + #endif #endif app.installTranslator(&appTranslator); From 1582bd0ef82e6a92b632f0549c3bf96a6545e0d0 Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 26 Nov 2013 18:43:26 +0200 Subject: [PATCH 47/56] Change in pro file for debian package. --HG-- branch : develop --- Valentina.pro | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index 047f02113..eec2ff26e 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -85,12 +85,6 @@ CONFIG(debug, debug|release){ QMAKE_CXXFLAGS += -O1 DEFINES += QT_NO_DEBUG_OUTPUT - - QMAKE_EXTRA_COMPILERS += lrelease - lrelease.input = TRANSLATIONS - lrelease.output = ${QMAKE_FILE_BASE}.qm - lrelease.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN} -qm "$${DESTDIR}/"${QMAKE_FILE_BASE}.qm - lrelease.CONFIG += no_link target_predeps } message(Qt version: $$[QT_VERSION]) @@ -108,25 +102,33 @@ message(Examples: $$[QT_INSTALL_EXAMPLES]) win32:RC_FILE = share/resources/valentina.rc -unix { -#VARIABLES -isEmpty(PREFIX) { - PREFIX = /usr -} -BINDIR = $$PREFIX/local/bin -DATADIR =$$PREFIX/share -DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" -#MAKE INSTALL -target.path = $$BINDIR -translations.path = $$DATADIR/$${TARGET}/translations -translations.files = bin/valentina_ru.qm bin/valentina_uk.qm -INSTALLS += target \ - translations -} - # Remove generated files at cleaning QMAKE_DISTCLEAN += $${DESTDIR}/* \ $${OBJECTS_DIR}/* \ $${UI_DIR}/* \ $${MOC_DIR}/* \ $${RCC_DIR}/* + +unix { +#VARIABLES +isEmpty(PREFIX) { + PREFIX = /usr +} +BINDIR = $$PREFIX/bin +DATADIR =$$PREFIX/share +DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\" +#MAKE INSTALL +target.path = $$BINDIR +desktop.path = $$DATADIR/applications/ +desktop.files += dist/$${TARGET}.desktop +pixmaps.path = $$DATADIR/pixmaps/ +pixmaps.files += dist/$${TARGET}.png +INSTALL_TRANSLATIONS += share/translations/valentina_ru.qm \ + share/translations/valentina_uk.qm +translations.path = $$DATADIR/$${TARGET}/translations/ +translations.files = $$INSTALL_TRANSLATIONS +INSTALLS += target \ + desktop \ + pixmaps \ + translations +} From 5692a2b0e32a2358590faf7d99bfe44559b11c8d Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 26 Nov 2013 18:44:44 +0200 Subject: [PATCH 48/56] debian folder. --HG-- branch : develop --- dist/debian/changelog | 5 +++ dist/debian/control | 14 +++++++++ dist/debian/copyright | 28 +++++++++++++++++ dist/debian/docs | 2 ++ dist/debian/menu | 2 ++ dist/debian/postinst | 43 +++++++++++++++++++++++++ dist/debian/rules | 49 +++++++++++++++++++++++++++++ dist/debian/source/format | 1 + dist/debian/source/include-binaries | 4 +++ dist/debian/valentina.1 | 13 ++++++++ dist/debian/valentina.manpages | 1 + 11 files changed, 162 insertions(+) create mode 100644 dist/debian/changelog create mode 100644 dist/debian/control create mode 100644 dist/debian/copyright create mode 100644 dist/debian/docs create mode 100644 dist/debian/menu create mode 100644 dist/debian/postinst create mode 100755 dist/debian/rules create mode 100644 dist/debian/source/format create mode 100644 dist/debian/source/include-binaries create mode 100644 dist/debian/valentina.1 create mode 100644 dist/debian/valentina.manpages diff --git a/dist/debian/changelog b/dist/debian/changelog new file mode 100644 index 000000000..761e49c2d --- /dev/null +++ b/dist/debian/changelog @@ -0,0 +1,5 @@ +valentina (0.2+1hg20131125-ppa1-1) unstable; urgency=low + + * First test package + + -- Roman Telezhinsky Mon, 25 Nov 2013 13:05:58 +0200 diff --git a/dist/debian/control b/dist/debian/control new file mode 100644 index 000000000..f0b1ebfdc --- /dev/null +++ b/dist/debian/control @@ -0,0 +1,14 @@ +Source: valentina +Section: Universe +Priority: optional +Maintainer: Roman Telezhinsky +Build-Depends: debhelper (>= 8.0.0), qtbase5-dev (>= 5.0.0), libqt5svg5-dev (>= 5.0.0), ccache (>= 3.1.9), g++ (>= 4.6.0) +Standards-Version: 3.9.4 +Homepage: https://bitbucket.org/dismine/valentina + +Package: valentina +Architecture: i386 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Pattern making program. + Open source project of creating a pattern making program, whose allow + create and modeling patterns of clothing. diff --git a/dist/debian/copyright b/dist/debian/copyright new file mode 100644 index 000000000..3a6e44e72 --- /dev/null +++ b/dist/debian/copyright @@ -0,0 +1,28 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: valentina +Source: https://bitbucket.org/dismine/valentina + +Files: * +Copyright: 2013 Roman Telezhinsky +License: GPL-3.0+ + +Files: debian/* +Copyright: 2013 Roman Telezhinsky +License: GPL-3.0+ + +License: GPL-3.0+ + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + along with this program. If not, see . + . + On Debian systems, the complete text of the GNU General + Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". diff --git a/dist/debian/docs b/dist/debian/docs new file mode 100644 index 000000000..724e08449 --- /dev/null +++ b/dist/debian/docs @@ -0,0 +1,2 @@ +README +TODO diff --git a/dist/debian/menu b/dist/debian/menu new file mode 100644 index 000000000..b532336ea --- /dev/null +++ b/dist/debian/menu @@ -0,0 +1,2 @@ +?package(valentina):needs="X11|text|vc|wm" section="Applications/Graphics"\ + title="valentina" command="/usr/bin/valentina" diff --git a/dist/debian/postinst b/dist/debian/postinst new file mode 100644 index 000000000..a3d3eb81d --- /dev/null +++ b/dist/debian/postinst @@ -0,0 +1,43 @@ +#!/bin/sh +# postinst script for valentina +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + + if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ] ; then + update-menus + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/dist/debian/rules b/dist/debian/rules new file mode 100755 index 000000000..9ac5a2f02 --- /dev/null +++ b/dist/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + APPNAME := valentina + builddir: + mkdir -p builddir + + builddir/Makefile: builddir + lrelease src/src.pro + cd builddir && qmake PREFIX=/usr ../$(APPNAME).pro -r + build: build-stamp + build-stamp: builddir/Makefile + dh_testdir + # Add here commands to compile the package. + cd builddir && $(MAKE) + touch $@ + clean: + dh_testdir + dh_testroot + rm -f build-stamp + # Add here commands to clean up after the build process. + rm -rf builddir + dh_clean + install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + # Add here commands to install the package into debian/your_appname + cd builddir && $(MAKE) INSTALL_ROOT=$(CURDIR)/debian/tmp install + # Build architecture-independent files here. + binary-indep: build install + # We have nothing to do by default. + # Build architecture-dependent files here. + binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installexamples + dh_installman + dh_installmenu + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + binary: binary-indep binary-arch + .PHONY: build clean binary-indep binary-arch binary install configure diff --git a/dist/debian/source/format b/dist/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/dist/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/dist/debian/source/include-binaries b/dist/debian/source/include-binaries new file mode 100644 index 000000000..bb85f001a --- /dev/null +++ b/dist/debian/source/include-binaries @@ -0,0 +1,4 @@ +debian/usr/share/pixmaps/valentina.png +debian/valentina/usr/bin/valentina +debian/valentina/usr/share/valentina/translations/valentina_ru.qm +debian/valentina/usr/share/valentina/translations/valentina_uk.qm diff --git a/dist/debian/valentina.1 b/dist/debian/valentina.1 new file mode 100644 index 000000000..488473b7f --- /dev/null +++ b/dist/debian/valentina.1 @@ -0,0 +1,13 @@ +.\" Manpage for valentina. +.\" Contact dismine@gmail.com.in to correct errors. +.TH man 1 "25 Nov 2013" "1.0" "valentina man page" +.SH NAME +valentina \- Pattern making program. +.SH SYNOPSIS +valentina +.SH DESCRIPTION +Open source project of creating a pattern making program, whose allow create and modeling patterns of clothing. +.SH OPTIONS +The valentina does not take any options. +.SH AUTHOR +Roman Telezhinsky (dismine@gmail.com) \ No newline at end of file diff --git a/dist/debian/valentina.manpages b/dist/debian/valentina.manpages new file mode 100644 index 000000000..c8bb0f8e5 --- /dev/null +++ b/dist/debian/valentina.manpages @@ -0,0 +1 @@ +debian/valentina.1 From d0786c92a98cd029d28c670763388d42049abd5f Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 26 Nov 2013 18:45:23 +0200 Subject: [PATCH 49/56] Pixmap and descktop files. --HG-- branch : develop --- dist/valentina.desktop | 10 ++++++++++ dist/valentina.png | Bin 0 -> 5572 bytes 2 files changed, 10 insertions(+) create mode 100644 dist/valentina.desktop create mode 100644 dist/valentina.png diff --git a/dist/valentina.desktop b/dist/valentina.desktop new file mode 100644 index 000000000..b752430eb --- /dev/null +++ b/dist/valentina.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=Valentina +GenericName=Pattern making program +Comment=Open source project of creating a pattern making program, whose allow create and modeling patterns of clothing +Icon=valentina +Exec=valentina +Categories=Qt;Graphics; +Version=0.2 +Name[uk]=valentina diff --git a/dist/valentina.png b/dist/valentina.png new file mode 100644 index 0000000000000000000000000000000000000000..d6cc04903f539377c7f862ebd11eeee447dac67b GIT binary patch literal 5572 zcmV;#6+7yQP)&s!4MVZ@TxMv-8Kp0!(4t z9ZHB^*=yBW@720{pZ)Fn_Bs3PeM|U|$v@79Q-1OG-~IK3aY0*@))^Ev;`5Zt*RJjN zZ+&L*oGeRLRo-DwK1|?sGswi+=lN3$t*Mh!63>YWhcrdLAqqqiFR3;3H)ZsNOvqzW zP99nG)0AKjU5}hQ~Ij*>lL+!lvBls&=h*g z&S*oVR8k}`LQBq(s%3i_Ec~e6_)Dfn+h6(9CmaiAjOX?>TMz62%%9%D^0nOneEz7y z#Dns>C~#*Cn<3?;}mf)P>?nj*+Y0t!P_NL9&NP=rhX#S~FQMdYYf%d4xm4Q`%4wQ%4uVA)A+^}DO~ zzf}_bkEutaK&Yfh?1XZn)CFi=fPAFh@!F6fQPIdkLkKN7FFi#=DfU=n)G6Y;0 z1A|0XrRs&UlPw7UlnLY!m+H?7_4?HAig~%55XVkNs}QM26KBL)!2lVn^v9y9T4}A9 zVD;;Rj~*}#STd*m@?t7i$4DrOTCb8Q45oq+QBjdx;C6?WZ7WT7eW6k~MISt&aZubY}8cdOI*f!o&aNdUe&_v5U5{MY;JeesA^?tOkc z0H;m-NZ@=jJr~GBS<4uM5(R=&L4lS!ulb1A`(rct182ZhCyd)tjr|e3t42pfo>07$ z6DVV`s4pfg5aaH;XJem#cPobizu}A{$L515yuL2v)KX#^b5?^`k-f1{7eYRSj8W<{ z!rqehWyK$D_BY_`PwW8T>bZs1tB&hfA3Hr_d&Ouq@lvX)lwzTx1_Q5)=a}zq>Rw?r z^k10N_BK0zb@-d#|K_NnL(iYmzPv6Q4v8`6C*F<;jRpoURuzllwHAO}B$N^uNTlgs zhNR&GVZf4k9h1cKzxpfE5PLNCNI8L~P}LZuoXEYQ)r*#|@7_I}{^t%K&q2+en^t#m z`q3TNXM_uKA-S>>0;z4Djm8mJP=Wr$&=e{8NZ4C}SRr+~!>CT&Zw$EWq_F_pa6=Wr;hn*o-O7W%+)AnHKeBK}#}iEv zmxlp$g9%!3AOcN+qb^dMG38<^)CWpiUe$XAAcJaiq(yH`Wxq4v)|1*cmz>Ji24&PX!lrQ#=EIV`)GTQ}`}o1Mk8T3Pbcb}pLIdbkF5%|I;mje#l7$+cs=}<*gz+a=nSb7 z-T;p=dd6?TpEtR-*^>E9&5MQCt77Vn=ruL4NZcX#L6z4;Z@gqeF{Q7ZZg zb6D^IqrZ=@s+?*?Prh?q_w!$!(!q*nw~q`17SC>H$uD|YIK8tewEAMnNqaeg#KGv$ zqee)*0jsFf-(*5Jk-gR8vKRIaYwxp%7mgmAWo;BlkT?-zAXTUnPbm8A(zU%4-^-^n zCwFl7#@aRe+$kNb*iidCA`Dpai(UW%%ReSw+9OeIj9^s8lZY^s2&pO=l+K)6x9sV@ zVZncC@^}CWIsP&V2#Tptaf$$~8K=2WofEmRRtgt>uTQ@P59|X!VgUfSc3$T};13df z#aQEvD6zMcl3G1pZ&khbv^L0t!|DIUgaY5)xRnJ{3dX~K-Wyv{=Oq+Fh{G79n948P zqvYwE=eBb1^F9Aheg-2`-*dy;va{$oD>CL|Iio5@B(jcDYSdMcAkaG&t=d`sxA;2Zr@*p#qgnXar}*5&$Adh< z(@l|^5(a|zH6{cmZD0D-_P*hC&z{oW68qp4)aP?n2`yMFq)v$}JxibJ>G-$$H{zx6 z!pC+45AfjTzI1v^aZcHpN~%H(DBv}4zpHc6^jbc9Z{~yM^C5}|WiM15s2F0Eivcd0 z*?wRL;LTF(XwG_cZ#j0laYsd{3xuXDG}q}LzxA;*rnYg*+8!28E7V6u<~Lf8QI&xN zN(p$3=0pE#ec&GkxaH~I4@UsL`b5pq6zOh`luQ7L69%gs`PS#Yv%Z!M-pD_s=xBp# z#wtxA7$cewRie=R)3s0b?z;B4F??VtaMheQ)9;d5h4*}ZUbmfJ8nt5nb#b8HGzOJU<`%4N=w#LM{*;;mH&I!{tv)6=GL6d27c@n zb2^q@Jge}%rBD4~N6?p!?)bA&8UCm#@>)s_pc)yOaKWt3)|)r%A|h=&V^YVD0^!0? zoz{gaAX4^1WIUrY9*f?2@#EXKEjy{>ePQPR)iHSW>{c#&yql|z>o~sR_`BFM-qkLy zr~lp}+dsCtos)FMV0Z9Vx= zbuckygI-rFn=9{20RA8b-26rxtF4*Lk~wXQ2CDkRo~n$;D;YdzOl+SE@cDyB4XZ!3 zsU(HGEbgz;vZI6+6BVl-b)LphDW>*;qGzS3w$z1?3u-?`U~HXIA9~$3Xk{?bpLLaF z`xVpL`Pvh^-ezL15(^3^etD418PDM&;pD!lqjC(ir z70;X0PNoiSUR~StuAEUQjH=gr22*qLo(fp00c#M)jwGP!(ZnImp^}1HRKys(ho-Dj zA1S-bq7^4njoqj2dZzcE-_OnYT?4RiMkmYGbOCVP+>R3*=JA2DvZsnRM=DwIRGm;# zqgjJgQ++H@cToT@cU8rY&YRIq5z|5=_j;jzZwXBm867$dusablfgw#GvYuFlff&M| zHpQtAlx%3&Q&vg|G==`vZ?5S%`29Ye-Zce&3;ya8I+vtg9cGQQE z4TMVS8Au^^p1ox~7vQp4t&AuGzHsz7?%TAD1=9-I#;n|x5A};XOGZGArxrLLXsMW5+(MER}?Q2S*SRw3b8eqy!d=31VtH0ETb}>C=m9P z4XJtrw3y2CRp%z9E}uTI zYI&;F6rA#ks9w=%^?EO|Wo%t-?mjA`G-s6934LWlDN%A^Z9JXVc>W#hdKLg&GPPyj z;#DV~$c8XB?j*{RRp7o#e?@)uQ&c+b5H-A2_GAg65Rk?b9{lz9_!`KlUin% zyuET))sTWX2dx>ekwD2?wZf$o_0YREc3r=0ea{tv>MZBkVlC1Xc`c^Gpfi-5k};}H z)?^ht`+rq?$!OuUwvW|k z!(S`PP+T*b6Q^F0{=|^L)W6->z2SEkzVxs_bWH1}d?XV}v9hZojEZW1`HHIrJZHHf zoBAvEh-c-7zL5(6z}3eWCYPMqu)T;H=Oq^k8KYWNk<{~ND>rsO^y)32W$6Q}xogAQ zH>1VJb!^*PmCnAR(j2PR2S}>mR6e+ zJ*NU(Jfpx(Yr5ZFT0gaq%JZEnL9KgCppLRPs3Jyi3iAQZnO5M=bv+}?fcu7;zMx)7 z6?GmG6%r2t{wK3XhwPh|G4k32nRVk+CHGp%EZsDdi z!#jS>@rBc>%4AeErH0n2MO73a6us`&H9dP5Oz#*`@cS5`$Z@4aX$ZaSjSbcqB2kyi zxSwCJYU?|ce)83>?&8RYzq+ir%8g*1n>wxcb<(cecc)jbp{yZmLceMd-L(;I)ubDLR7} zA#o}h>j==Z?_Srvi~S^~l9;+z25du2?Ft$hs0&~)F;u*%4o@3>q0Vpx>Wh6DnsIugi^}Rn{G;{oZ z>($D+liSC5u^X-7An{5l9)~cP;1bUX_dnP3liEsSgPdR^DVfNU-{iY%0kh-w;x^90eB&r&y(w=pD!$8hoymrUXH>QkX ze~bC?i`!k+xEB-eDf`-+*4{%~og*7C{lTuLO95_L^M?%}7SCzt_BW2M3#J!twZi{Y zk-S&bd6A)5us~DbMey;VWBex<|Dt!xqM4mswqe))4*1S`W{%`!uAHBoKe>v&RPF2sKv6s$nKWx#g!qbuE{Gn9p(?qqJs8}Eq zpiQA?z?uF8Gxc--uw(t-p4`ICPj~S_$iBP4*Jc!+%Vp%qri`+uRC`AkAZt~#sP0V6 zwXWiBxa+yTcsN7fJ1tM&*7`r`E!(qG_;e_0#^tKV<}E?Ft)NVK9arCA2a0 zk~K==Ayz|Z1m{&V#!KSOs@+vi`Tmyf{)ICNEL+pV2Q6=Fir#okXY{L*z93!?X$;UX z5UDzY7)ZU6GY%0*)R3sqkf{wY$}#Lp1mis3E4e^0Mo3gp@rXz3#NC?zDrXVjguY-8_30E=gKvg8BW@P2PUV8!|_&YE0c`NqCtOD3MT zyUfqLSILMp z<>9LHx7@e6XFb5hQ`@;|eJ=;13_BWIFlj8eKeH2n(n&NsqeI^Ge|J-t|MH{`?s=x016kg4IQpfD1-`ra&E5K($;}yW zbK{zA>SJ$YW@~llU;d9h18>zi@9;M6_+=meU&+c(zIUB|+7bM_{JVU} Date: Tue, 26 Nov 2013 19:08:37 +0200 Subject: [PATCH 50/56] dh_installchangelogs in rules. --HG-- branch : develop --- dist/debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/dist/debian/rules b/dist/debian/rules index 9ac5a2f02..e9c14f409 100755 --- a/dist/debian/rules +++ b/dist/debian/rules @@ -34,6 +34,7 @@ dh_testdir dh_testroot dh_installdocs + dh_installchangelogs dh_installexamples dh_installman dh_installmenu From 53a00e0737a18d3f8a1dcf8d9caf89c2a6857aa3 Mon Sep 17 00:00:00 2001 From: dismine Date: Tue, 26 Nov 2013 20:15:36 +0200 Subject: [PATCH 51/56] Fix in control and change log files. --HG-- branch : develop --- dist/debian/changelog | 2 +- dist/debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/debian/changelog b/dist/debian/changelog index 761e49c2d..1b77e8c79 100644 --- a/dist/debian/changelog +++ b/dist/debian/changelog @@ -1,4 +1,4 @@ -valentina (0.2+1hg20131125-ppa1-1) unstable; urgency=low +valentina (0.2+1hg20131126-ppa1-1) saucy; urgency=low * First test package diff --git a/dist/debian/control b/dist/debian/control index f0b1ebfdc..ecb854773 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -1,5 +1,5 @@ Source: valentina -Section: Universe +Section: graphics Priority: optional Maintainer: Roman Telezhinsky Build-Depends: debhelper (>= 8.0.0), qtbase5-dev (>= 5.0.0), libqt5svg5-dev (>= 5.0.0), ccache (>= 3.1.9), g++ (>= 4.6.0) From 4fe784389d8d484998bcb998af6cc503e39bdc9e Mon Sep 17 00:00:00 2001 From: dismine Date: Wed, 27 Nov 2013 12:24:10 +0200 Subject: [PATCH 52/56] Fix in control and change log files. --HG-- branch : develop --- dist/debian/changelog | 6 +++--- dist/debian/control | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/debian/changelog b/dist/debian/changelog index 1b77e8c79..dec65916b 100644 --- a/dist/debian/changelog +++ b/dist/debian/changelog @@ -1,5 +1,5 @@ -valentina (0.2+1hg20131126-ppa1-1) saucy; urgency=low +valentina (0.2+1hg20131126-ppa1-3) saucy; urgency=low - * First test package + * Add new dependions qttools5-dev-tools - -- Roman Telezhinsky Mon, 25 Nov 2013 13:05:58 +0200 + -- Roman Telezhinsky Tue, 26 Nov 2013 21:28:15 +0200 diff --git a/dist/debian/control b/dist/debian/control index ecb854773..9d80fa72d 100644 --- a/dist/debian/control +++ b/dist/debian/control @@ -2,7 +2,7 @@ Source: valentina Section: graphics Priority: optional Maintainer: Roman Telezhinsky -Build-Depends: debhelper (>= 8.0.0), qtbase5-dev (>= 5.0.0), libqt5svg5-dev (>= 5.0.0), ccache (>= 3.1.9), g++ (>= 4.6.0) +Build-Depends: debhelper (>= 8.0.0), qtbase5-dev (>= 5.0.0), libqt5svg5-dev (>= 5.0.0), ccache (>= 3.1.9), g++ (>= 4.6.0), qt5-default (>= 5.0.0), qttools5-dev-tools (>= 5.0.0) Standards-Version: 3.9.4 Homepage: https://bitbucket.org/dismine/valentina From 0837ada25eb534e4b62dfb85b9fc4063c8706c06 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 28 Nov 2013 18:28:49 +0200 Subject: [PATCH 53/56] Change in pro file for compile on Windows with MSVC. --HG-- branch : develop --- Valentina.pro | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Valentina.pro b/Valentina.pro index eec2ff26e..9a86f63ea 100644 --- a/Valentina.pro +++ b/Valentina.pro @@ -10,8 +10,7 @@ QT += core gui widgets xml svg TEMPLATE = app -DEBUG_TARGET = valentinad -RELEASE_TARGET = valentina +TARGET = valentina CONFIG -= debug_and_release debug_and_release_target CONFIG += c++11 @@ -54,17 +53,16 @@ TRANSLATIONS += share/translations/valentina_ru.ts \ unix:QMAKE_CXX = ccache g++ +CONFIG += precompile_header +# Precompiled headers (PCH) +PRECOMPILED_HEADER = src/stable.h +win32-msvc* { + PRECOMPILED_SOURCE = src/stable.cpp +} + CONFIG(debug, debug|release){ # Debug - TARGET = $$DEBUG_TARGET - - CONFIG += precompile_header - # Precompiled headers (PCH) - PRECOMPILED_HEADER = src/stable.h - win32-msvc* { - PRECOMPILED_SOURCE = src/stable.cpp - } - + *-g++{ QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \ -isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \ -isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" \ @@ -78,11 +76,12 @@ CONFIG(debug, debug|release){ -Wswitch-default -Wswitch-enum -Wuninitialized -Wunused-parameter -Wvariadic-macros \ -Wlogical-op -Wnoexcept \ -Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3 + } }else{ # Release - TARGET = $$RELEASE_TARGET - + *-g++{ QMAKE_CXXFLAGS += -O1 + } DEFINES += QT_NO_DEBUG_OUTPUT } From ada31d92945b403a4dc5476b69f837f2990670f3 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 28 Nov 2013 18:29:41 +0200 Subject: [PATCH 54/56] Use define _USE_MATH_DEFINES on Windows with MSVC. --HG-- branch : develop --- src/stable.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stable.h b/src/stable.h index bcc23a610..09cd50c93 100644 --- a/src/stable.h +++ b/src/stable.h @@ -38,6 +38,9 @@ were in use. */ #if defined __cplusplus /* Add C++ includes here */ +#ifdef Q_CC_MSVC +#define _USE_MATH_DEFINES +#endif #include #include #include From 65f1929d970d34f0676ae1c5324af06a3dac3f29 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 28 Nov 2013 19:48:27 +0200 Subject: [PATCH 55/56] Script for Nullsoft Scriptable Install System. --HG-- branch : develop --- dist/valentina.nsi | 149 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 dist/valentina.nsi diff --git a/dist/valentina.nsi b/dist/valentina.nsi new file mode 100644 index 000000000..96d91c792 --- /dev/null +++ b/dist/valentina.nsi @@ -0,0 +1,149 @@ +; ------------------------------- +; Start + + + !define MUI_PRODUCT "Valentina" + !define MUI_FILE "valentina" + !define MUI_VERSION "0.2" + !define MUI_BRANDINGTEXT "Valentina ${MUI_VERSION}" + CRCCheck On + + ; Bij deze moeten we waarschijnlijk een absoluut pad gaan gebruiken + ; dit moet effe uitgetest worden. + !include "${NSISDIR}\Contrib\Modern UI\System.nsh" + + +;-------------------------------- +;General + Name "${MUI_BRANDINGTEXT}" + Caption "${MUI_BRANDINGTEXT}" + SetCompressor bzip2 + OutFile "${MUI_FILE}-install-v.${MUI_VERSION}.exe" + + ; Request application privileges for Windows Vista + RequestExecutionLevel user + + ShowInstDetails show + ShowUninstDetails show + + !define MUI_ICON "valentina\${MUI_FILE}.ico" + !define MUI_UNICON "valentina\${MUI_FILE}.ico" + ;!define MUI_SPECIALBITMAP "Bitmap.bmp" + +;-------------------------------- +;Folder selection page + +InstallDir "$PROGRAMFILES\${MUI_PRODUCT}" + + +;-------------------------------- +;Modern UI Configuration + + InstallColors 061C79 E5F0E2 + LicenseBkColor E5F0E2 + InstProgressFlags smooth colored + + !define MUI_WELCOMEPAGE + !define MUI_LICENSEPAGE + !define MUI_DIRECTORYPAGE + !define MUI_ABORTWARNING + !define MUI_UNINSTALLER + !define MUI_UNCONFIRMPAGE + !define MUI_FINISHPAGE + + +;-------------------------------- +;Page + + !insertmacro MUI_PAGE_WELCOME + !insertmacro MUI_PAGE_LICENSE "valentina\license" + !insertmacro MUI_PAGE_COMPONENTS + !insertmacro MUI_PAGE_DIRECTORY + !insertmacro MUI_PAGE_INSTFILES + !insertmacro MUI_PAGE_FINISH + + !insertmacro MUI_UNPAGE_WELCOME + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + !insertmacro MUI_UNPAGE_FINISH + +;-------------------------------- +;Language + + !insertmacro MUI_LANGUAGE "English" + + +;-------------------------------- +;Modern UI System + + ;!insertmacro MUI_SYSTEM + !include "MUI2.nsh" + +;-------------------------------- +;Data + + LicenseData "valentina\LICENSE" + +;-------------------------------- +;Installer Sections +Section "Valentina (required)" + +;Add files + SetOutPath "$INSTDIR" + File /r "c:\pack\valentina\*.*" + +;create desktop shortcut + CreateShortCut "$DESKTOP\${MUI_PRODUCT}.lnk" "$INSTDIR\${MUI_FILE}.exe" "" + +;create start-menu items + CreateDirectory "$SMPROGRAMS\${MUI_PRODUCT}" + CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0 + CreateShortCut "$SMPROGRAMS\${MUI_PRODUCT}\${MUI_PRODUCT}.lnk" "$INSTDIR\${MUI_FILE}.exe" "" "$INSTDIR\${MUI_FILE}.exe" 0 + +;write uninstall information to the registry + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "DisplayName" "${MUI_PRODUCT} (remove only)" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" "UninstallString" "$INSTDIR\Uninstall.exe" + + WriteUninstaller "$INSTDIR\Uninstall.exe" + +SectionEnd + + +;-------------------------------- +;Uninstaller Section +Section "Uninstall" + +;Delete Files + RMDir /r "$INSTDIR\*.*" + +;Remove the installation directory + RMDir "$INSTDIR" + +;Delete Start Menu Shortcuts + Delete "$DESKTOP\${MUI_PRODUCT}.lnk" + Delete "$SMPROGRAMS\${MUI_PRODUCT}\*.*" + RmDir "$SMPROGRAMS\${MUI_PRODUCT}" + +;Delete Uninstaller And Unistall Registry Entries + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\${MUI_PRODUCT}" + DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${MUI_PRODUCT}" + +SectionEnd + + +;-------------------------------- +;MessageBox Section + + +;Function that calls a messagebox when installation finished correctly +Function .onInstSuccess + MessageBox MB_OK "You have successfully installed ${MUI_PRODUCT}. Use the desktop icon to start the program." +FunctionEnd + + +Function un.onUninstSuccess + MessageBox MB_OK "You have successfully uninstalled ${MUI_PRODUCT}." +FunctionEnd + + +;eof From 646dcb4dfd57767ff7e4e7d9d31e3dc1f79a902f Mon Sep 17 00:00:00 2001 From: dismine Date: Sun, 8 Dec 2013 10:43:06 +0200 Subject: [PATCH 56/56] Prepare for release v0.2.1. --HG-- branch : develop --- ChangeLog | 6 ++++-- src/version.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f43868e56..7e376ebce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ +# Version 0.2.1 Released December 8, 2013 +- Problem with compilation in console in Ubuntu. +- Problem with compilation on windows with msvc. + # Version 0.2.0 Released October 29, 2013 - - diff --git a/src/version.h b/src/version.h index 7444ffed9..237f0912b 100644 --- a/src/version.h +++ b/src/version.h @@ -33,7 +33,7 @@ extern const int MAJOR_VERSION = 0; extern const int MINOR_VERSION = 2; -extern const int DEBUG_VERSION = 0; +extern const int DEBUG_VERSION = 1; extern const QString APP_VERSION(QStringLiteral("%1.%2.%3").arg(MAJOR_VERSION).arg(MINOR_VERSION).arg(DEBUG_VERSION)); extern const QString WARRANTY("The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE "