From cf2aea280dfffce262d798ade28457e31af0d218 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 3 Feb 2015 12:17:04 +0200 Subject: [PATCH] Refactoring. --HG-- branch : feature --- src/app/container/calculator.h | 4 +- src/app/container/vformula.cpp | 10 +- src/app/container/vformula.h | 4 +- src/app/dialogs/tools/dialogalongline.cpp | 50 ++++---- src/app/dialogs/tools/dialogalongline.h | 22 ++-- src/app/dialogs/tools/dialogarc.cpp | 2 +- src/app/dialogs/tools/dialogbisector.cpp | 60 ++++----- src/app/dialogs/tools/dialogbisector.h | 26 ++-- .../tools/dialogcurveintersectaxis.cpp | 34 ++--- .../dialogs/tools/dialogcurveintersectaxis.h | 18 +-- src/app/dialogs/tools/dialogcutarc.cpp | 12 +- src/app/dialogs/tools/dialogcutarc.h | 6 +- src/app/dialogs/tools/dialogcutspline.cpp | 12 +- src/app/dialogs/tools/dialogcutspline.h | 6 +- src/app/dialogs/tools/dialogcutsplinepath.cpp | 12 +- src/app/dialogs/tools/dialogcutsplinepath.h | 6 +- .../dialogs/tools/dialogeditwrongformula.cpp | 4 +- .../dialogs/tools/dialogeditwrongformula.h | 4 +- src/app/dialogs/tools/dialogendline.cpp | 56 ++++----- src/app/dialogs/tools/dialogendline.h | 22 ++-- src/app/dialogs/tools/dialogheight.cpp | 52 ++++---- src/app/dialogs/tools/dialogheight.h | 22 ++-- src/app/dialogs/tools/dialogline.cpp | 38 +++--- src/app/dialogs/tools/dialogline.h | 16 +-- src/app/dialogs/tools/dialoglineintersect.cpp | 52 ++++---- src/app/dialogs/tools/dialoglineintersect.h | 18 +-- .../dialogs/tools/dialoglineintersectaxis.cpp | 46 +++---- .../dialogs/tools/dialoglineintersectaxis.h | 26 ++-- src/app/dialogs/tools/dialognormal.cpp | 62 +++++----- src/app/dialogs/tools/dialognormal.h | 26 ++-- .../dialogs/tools/dialogpointofcontact.cpp | 24 ++-- src/app/dialogs/tools/dialogpointofcontact.h | 10 +- .../tools/dialogpointofintersection.cpp | 24 ++-- .../dialogs/tools/dialogpointofintersection.h | 10 +- src/app/dialogs/tools/dialogshoulderpoint.cpp | 56 ++++----- src/app/dialogs/tools/dialogshoulderpoint.h | 26 ++-- src/app/dialogs/tools/dialogsinglepoint.cpp | 4 +- src/app/dialogs/tools/dialogsinglepoint.h | 6 +- src/app/dialogs/tools/dialogspline.cpp | 86 ++++++------- src/app/dialogs/tools/dialogspline.h | 32 ++--- src/app/dialogs/tools/dialogsplinepath.cpp | 10 +- src/app/dialogs/tools/dialogsplinepath.h | 4 +- src/app/dialogs/tools/dialogtool.cpp | 19 +-- src/app/dialogs/tools/dialogtool.h | 3 +- src/app/dialogs/tools/dialogtriangle.cpp | 44 +++---- src/app/dialogs/tools/dialogtriangle.h | 18 +-- src/app/geometry/varc.cpp | 6 +- src/app/geometry/vsplinepath.cpp | 4 +- src/app/geometry/vsplinepath.h | 12 +- src/app/tools/drawTools/vdrawtool.cpp | 4 +- src/app/tools/drawTools/vtoolalongline.cpp | 30 ++--- src/app/tools/drawTools/vtoolalongline.h | 4 +- src/app/tools/drawTools/vtoolarc.cpp | 12 +- src/app/tools/drawTools/vtoolarc.h | 12 +- src/app/tools/drawTools/vtoolbisector.cpp | 40 +++--- src/app/tools/drawTools/vtoolbisector.h | 8 +- .../drawTools/vtoolcurveintersectaxis.cpp | 30 ++--- .../tools/drawTools/vtoolcurveintersectaxis.h | 4 +- src/app/tools/drawTools/vtoolcut.cpp | 6 +- src/app/tools/drawTools/vtoolcut.h | 4 +- src/app/tools/drawTools/vtoolcutarc.cpp | 8 +- src/app/tools/drawTools/vtoolcutspline.cpp | 8 +- .../tools/drawTools/vtoolcutsplinepath.cpp | 16 +-- src/app/tools/drawTools/vtoolendline.cpp | 36 +++--- src/app/tools/drawTools/vtoolendline.h | 4 +- src/app/tools/drawTools/vtoolheight.cpp | 34 ++--- src/app/tools/drawTools/vtoolheight.h | 8 +- src/app/tools/drawTools/vtoolline.cpp | 28 ++--- src/app/tools/drawTools/vtoolline.h | 10 +- .../tools/drawTools/vtoollineintersect.cpp | 42 +++---- src/app/tools/drawTools/vtoollineintersect.h | 16 +-- .../drawTools/vtoollineintersectaxis.cpp | 50 ++++---- .../tools/drawTools/vtoollineintersectaxis.h | 12 +- src/app/tools/drawTools/vtoollinepoint.cpp | 14 +-- src/app/tools/drawTools/vtoollinepoint.h | 12 +- src/app/tools/drawTools/vtoolnormal.cpp | 40 +++--- src/app/tools/drawTools/vtoolnormal.h | 4 +- .../tools/drawTools/vtoolpointofcontact.cpp | 24 ++-- src/app/tools/drawTools/vtoolpointofcontact.h | 8 +- .../drawTools/vtoolpointofintersection.cpp | 22 ++-- .../drawTools/vtoolpointofintersection.h | 8 +- .../tools/drawTools/vtoolshoulderpoint.cpp | 36 +++--- src/app/tools/drawTools/vtoolshoulderpoint.h | 4 +- src/app/tools/drawTools/vtoolsinglepoint.cpp | 14 +-- src/app/tools/drawTools/vtoolsinglepoint.h | 2 +- src/app/tools/drawTools/vtoolspline.cpp | 58 ++++----- src/app/tools/drawTools/vtoolsplinepath.cpp | 8 +- src/app/tools/drawTools/vtooltriangle.cpp | 42 +++---- src/app/tools/drawTools/vtooltriangle.h | 16 +-- src/app/tools/vabstracttool.cpp | 2 +- src/app/tools/vabstracttool.h | 2 +- src/app/tools/vtooluniondetails.cpp | 4 +- src/app/undocommands/movesplinepath.cpp | 2 +- .../vistoolcurveintersectaxis.cpp | 2 +- .../visualization/vistoolcurveintersectaxis.h | 2 +- .../visualization/vistoolcutsplinepath.cpp | 8 +- src/app/visualization/vistoolendline.cpp | 2 +- src/app/visualization/vistoolendline.h | 2 +- .../vistoollineintersectaxis.cpp | 2 +- .../visualization/vistoollineintersectaxis.h | 2 +- src/app/visualization/vistoolnormal.cpp | 4 +- src/app/visualization/vistoolnormal.h | 4 +- src/app/visualization/vistoolspline.cpp | 10 +- src/app/visualization/vistoolspline.h | 10 +- src/app/widgets/vformulaproperty.cpp | 22 ++-- src/app/widgets/vformulaproperty.h | 4 +- src/app/widgets/vformulapropertyeditor.cpp | 8 +- src/app/widgets/vformulapropertyeditor.h | 6 +- .../widgets/vtooloptionspropertybrowser.cpp | 116 +++++++++--------- .../plugins/vcolorproperty.cpp | 10 +- .../plugins/vcolorpropertyeditor.cpp | 18 +-- .../plugins/vcolorpropertyeditor.h | 10 +- 112 files changed, 1050 insertions(+), 1066 deletions(-) diff --git a/src/app/container/calculator.h b/src/app/container/calculator.h index c00cb2360..cb2089c9f 100644 --- a/src/app/container/calculator.h +++ b/src/app/container/calculator.h @@ -40,10 +40,10 @@ class VContainer; * Note. If created to many parser for different purpes in the same time parser can work wrong. * Example: * DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data); - * dialog->setFormula(formula); + * dialog->SetFormula(formula); * if (dialog->exec() == QDialog::Accepted) * { - * formula = dialog->getFormula(); + * formula = dialog->GetFormula(); * //Need delete dialog here because parser in dialog don't allow use correct separator for parsing here. * //Don't know why. * delete dialog; diff --git a/src/app/container/vformula.cpp b/src/app/container/vformula.cpp index ed3659a20..fa345e4a5 100644 --- a/src/app/container/vformula.cpp +++ b/src/app/container/vformula.cpp @@ -56,7 +56,7 @@ VFormula &VFormula::operator=(const VFormula &formula) { return *this; } - this->formula = formula.getFormula(); + this->formula = formula.GetFormula(); this->value = formula.getStringValue(); this->checkZero = formula.getCheckZero(); this->data = formula.getData(); @@ -69,7 +69,7 @@ VFormula &VFormula::operator=(const VFormula &formula) //--------------------------------------------------------------------------------------------------------------------- VFormula::VFormula(const VFormula &formula) - :formula(formula.getFormula()), value(formula.getStringValue()), checkZero(formula.getCheckZero()), + :formula(formula.GetFormula()), value(formula.getStringValue()), checkZero(formula.getCheckZero()), data(formula.getData()), toolId(formula.getToolId()), postfix(formula.getPostfix()), _error(formula.error()), dValue(formula.getDoubleValue()) {} @@ -78,7 +78,7 @@ VFormula::VFormula(const VFormula &formula) bool VFormula::operator==(const VFormula &formula) const { bool isEqual = false; - if (this->formula == formula.getFormula() && this->value == formula.getStringValue() && + if (this->formula == formula.GetFormula() && this->value == formula.getStringValue() && this->checkZero == formula.getCheckZero() && this->data == formula.getData() && this->toolId == formula.getToolId() && this->postfix == formula.getPostfix() && this->_error == formula.error() && qFuzzyCompare(this->dValue, formula.getDoubleValue())) @@ -94,7 +94,7 @@ bool VFormula::operator!=(const VFormula &formula) const } //--------------------------------------------------------------------------------------------------------------------- -QString VFormula::getFormula(FormulaType type) const +QString VFormula::GetFormula(FormulaType type) const { if (type == FormulaType::ToUser) { @@ -107,7 +107,7 @@ QString VFormula::getFormula(FormulaType type) const } //--------------------------------------------------------------------------------------------------------------------- -void VFormula::setFormula(const QString &value, FormulaType type) +void VFormula::SetFormula(const QString &value, FormulaType type) { if (formula != value) { diff --git a/src/app/container/vformula.h b/src/app/container/vformula.h index 222845442..7599dcdac 100644 --- a/src/app/container/vformula.h +++ b/src/app/container/vformula.h @@ -46,8 +46,8 @@ public: bool operator==(const VFormula &formula) const; bool operator!=(const VFormula &formula) const; - QString getFormula(FormulaType type = FormulaType::ToUser) const; - void setFormula(const QString &value, FormulaType type = FormulaType::ToUser); + QString GetFormula(FormulaType type = FormulaType::ToUser) const; + void SetFormula(const QString &value, FormulaType type = FormulaType::ToUser); QString getStringValue() const; qreal getDoubleValue() const; diff --git a/src/app/dialogs/tools/dialogalongline.cpp b/src/app/dialogs/tools/dialogalongline.cpp index 556a9182a..46463ff6e 100644 --- a/src/app/dialogs/tools/dialogalongline.cpp +++ b/src/app/dialogs/tools/dialogalongline.cpp @@ -183,10 +183,10 @@ void DialogAlongLine::SaveData() formula = ui->plainTextEditFormula->toPlainText(); formula.replace("\n", " "); - line->setPoint1Id(getFirstPointId()); - line->setPoint2Id(getSecondPointId()); + line->setPoint1Id(GetFirstPointId()); + line->setPoint2Id(GetSecondPointId()); line->setLength(formula); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } @@ -199,10 +199,10 @@ void DialogAlongLine::closeEvent(QCloseEvent *event) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setSecondPointId set id second point of line + * @brief SetSecondPointId set id second point of line * @param value id */ -void DialogAlongLine::setSecondPointId(const quint32 &value) +void DialogAlongLine::SetSecondPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxSecondPoint, value); line->setPoint2Id(value); @@ -210,10 +210,10 @@ void DialogAlongLine::setSecondPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFirstPointId set id first point of line + * @brief SetFirstPointId set id first point of line * @param value id */ -void DialogAlongLine::setFirstPointId(const quint32 &value) +void DialogAlongLine::SetFirstPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxFirstPoint, value); line->setPoint1Id(value); @@ -221,10 +221,10 @@ void DialogAlongLine::setFirstPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFormula set string of formula + * @brief SetFormula set string of formula * @param value formula */ -void DialogAlongLine::setFormula(const QString &value) +void DialogAlongLine::SetFormula(const QString &value) { formula = qApp->FormulaToUser(value); // increase height if needed. @@ -239,33 +239,33 @@ void DialogAlongLine::setFormula(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setTypeLine set type of line + * @brief SetTypeLine set type of line * @param value type */ -void DialogAlongLine::setTypeLine(const QString &value) +void DialogAlongLine::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogAlongLine::getLineColor() const +QString DialogAlongLine::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogAlongLine::setLineColor(const QString &value) +void DialogAlongLine::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogAlongLine::setPointName(const QString &value) +void DialogAlongLine::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -273,40 +273,40 @@ void DialogAlongLine::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getTypeLine return type of line + * @brief GetTypeLine return type of line * @return type */ -QString DialogAlongLine::getTypeLine() const +QString DialogAlongLine::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFormula return string of formula + * @brief GetFormula return string of formula * @return formula */ -QString DialogAlongLine::getFormula() const +QString DialogAlongLine::GetFormula() const { return qApp->FormulaFromUser(formula); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFirstPointId return id first point of line + * @brief GetFirstPointId return id first point of line * @return id */ -quint32 DialogAlongLine::getFirstPointId() const +quint32 DialogAlongLine::GetFirstPointId() const { return getCurrentObjectId(ui->comboBoxFirstPoint); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getSecondPointId return id second point of line + * @brief GetSecondPointId return id second point of line * @return id */ -quint32 DialogAlongLine::getSecondPointId() const +quint32 DialogAlongLine::GetSecondPointId() const { return getCurrentObjectId(ui->comboBoxSecondPoint); } diff --git a/src/app/dialogs/tools/dialogalongline.h b/src/app/dialogs/tools/dialogalongline.h index 5ae9c2df3..057f7763b 100644 --- a/src/app/dialogs/tools/dialogalongline.h +++ b/src/app/dialogs/tools/dialogalongline.h @@ -48,22 +48,22 @@ public: DialogAlongLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogAlongLine(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); /** diff --git a/src/app/dialogs/tools/dialogarc.cpp b/src/app/dialogs/tools/dialogarc.cpp index cf1511104..92a78cf4d 100644 --- a/src/app/dialogs/tools/dialogarc.cpp +++ b/src/app/dialogs/tools/dialogarc.cpp @@ -157,7 +157,7 @@ void DialogArc::SetF2(const QString &value) //--------------------------------------------------------------------------------------------------------------------- QString DialogArc::GetColor() const { - return GetLineColor(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/dialogs/tools/dialogbisector.cpp b/src/app/dialogs/tools/dialogbisector.cpp index 114f75fb4..98e68ab91 100644 --- a/src/app/dialogs/tools/dialogbisector.cpp +++ b/src/app/dialogs/tools/dialogbisector.cpp @@ -200,10 +200,10 @@ void DialogBisector::ChosenObject(quint32 id, const SceneObject &type) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogBisector::setPointName(const QString &value) +void DialogBisector::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -211,10 +211,10 @@ void DialogBisector::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setTypeLine set type of line + * @brief SetTypeLine set type of line * @param value type */ -void DialogBisector::setTypeLine(const QString &value) +void DialogBisector::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); @@ -222,10 +222,10 @@ void DialogBisector::setTypeLine(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFormula set string of formula + * @brief SetFormula set string of formula * @param value formula */ -void DialogBisector::setFormula(const QString &value) +void DialogBisector::SetFormula(const QString &value) { formula = qApp->FormulaToUser(value); // increase height if needed. @@ -240,10 +240,10 @@ void DialogBisector::setFormula(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFirstPointId set id of first point + * @brief SetFirstPointId set id of first point * @param value id */ -void DialogBisector::setFirstPointId(const quint32 &value) +void DialogBisector::SetFirstPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxFirstPoint, value); line->setPoint1Id(value); @@ -251,10 +251,10 @@ void DialogBisector::setFirstPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setSecondPointId set id of second point + * @brief SetSecondPointId set id of second point * @param value id */ -void DialogBisector::setSecondPointId(const quint32 &value) +void DialogBisector::SetSecondPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxSecondPoint, value); line->setPoint2Id(value); @@ -262,23 +262,23 @@ void DialogBisector::setSecondPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setThirdPointId set id of third point + * @brief SetThirdPointId set id of third point * @param value id */ -void DialogBisector::setThirdPointId(const quint32 &value) +void DialogBisector::SetThirdPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxThirdPoint, value); line->setPoint3Id(value); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogBisector::getLineColor() const +QString DialogBisector::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogBisector::setLineColor(const QString &value) +void DialogBisector::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } @@ -291,11 +291,11 @@ void DialogBisector::SaveData() formula = ui->plainTextEditFormula->toPlainText(); formula.replace("\n", " "); - line->setPoint1Id(getFirstPointId()); - line->setPoint2Id(getSecondPointId()); - line->setPoint3Id(getThirdPointId()); + line->setPoint1Id(GetFirstPointId()); + line->setPoint2Id(GetSecondPointId()); + line->setPoint3Id(GetThirdPointId()); line->setLength(formula); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } @@ -308,50 +308,50 @@ void DialogBisector::closeEvent(QCloseEvent *event) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getTypeLine return type of line + * @brief GetTypeLine return type of line * @return type */ -QString DialogBisector::getTypeLine() const +QString DialogBisector::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFormula return string of formula + * @brief GetFormula return string of formula * @return formula */ -QString DialogBisector::getFormula() const +QString DialogBisector::GetFormula() const { return qApp->FormulaFromUser(formula); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFirstPointId return id of first point + * @brief GetFirstPointId return id of first point * @return id */ -quint32 DialogBisector::getFirstPointId() const +quint32 DialogBisector::GetFirstPointId() const { return getCurrentObjectId(ui->comboBoxFirstPoint); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getSecondPointId return id of second point + * @brief GetSecondPointId return id of second point * @return id */ -quint32 DialogBisector::getSecondPointId() const +quint32 DialogBisector::GetSecondPointId() const { return getCurrentObjectId(ui->comboBoxSecondPoint); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getThirdPointId return id of third point + * @brief GetThirdPointId return id of third point * @return id */ -quint32 DialogBisector::getThirdPointId() const +quint32 DialogBisector::GetThirdPointId() const { return getCurrentObjectId(ui->comboBoxThirdPoint); } diff --git a/src/app/dialogs/tools/dialogbisector.h b/src/app/dialogs/tools/dialogbisector.h index 39e2facda..4cadc9bb9 100644 --- a/src/app/dialogs/tools/dialogbisector.h +++ b/src/app/dialogs/tools/dialogbisector.h @@ -49,25 +49,25 @@ public: DialogBisector(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogBisector(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); - quint32 getThirdPointId() const; - void setThirdPointId(const quint32 &value); + quint32 GetThirdPointId() const; + void SetThirdPointId(const quint32 &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); /** diff --git a/src/app/dialogs/tools/dialogcurveintersectaxis.cpp b/src/app/dialogs/tools/dialogcurveintersectaxis.cpp index 72f07fc34..839fb5dc5 100644 --- a/src/app/dialogs/tools/dialogcurveintersectaxis.cpp +++ b/src/app/dialogs/tools/dialogcurveintersectaxis.cpp @@ -81,33 +81,33 @@ DialogCurveIntersectAxis::~DialogCurveIntersectAxis() } //--------------------------------------------------------------------------------------------------------------------- -void DialogCurveIntersectAxis::setPointName(const QString &value) +void DialogCurveIntersectAxis::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogCurveIntersectAxis::getTypeLine() const +QString DialogCurveIntersectAxis::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- -void DialogCurveIntersectAxis::setTypeLine(const QString &value) +void DialogCurveIntersectAxis::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogCurveIntersectAxis::getAngle() const +QString DialogCurveIntersectAxis::GetAngle() const { return qApp->FormulaFromUser(formulaAngle); } //--------------------------------------------------------------------------------------------------------------------- -void DialogCurveIntersectAxis::setAngle(const QString &value) +void DialogCurveIntersectAxis::SetAngle(const QString &value) { formulaAngle = qApp->FormulaToUser(value); // increase height if needed. TODO : see if I can get the max number of caracters in one line @@ -117,18 +117,18 @@ void DialogCurveIntersectAxis::setAngle(const QString &value) this->DeployAngleTextEdit(); } ui->plainTextEditFormula->setPlainText(formulaAngle); - line->setAngle(formulaAngle); + line->SetAngle(formulaAngle); MoveCursorToEnd(ui->plainTextEditFormula); } //--------------------------------------------------------------------------------------------------------------------- -quint32 DialogCurveIntersectAxis::getBasePointId() const +quint32 DialogCurveIntersectAxis::GetBasePointId() const { return getCurrentObjectId(ui->comboBoxAxisPoint); } //--------------------------------------------------------------------------------------------------------------------- -void DialogCurveIntersectAxis::setBasePointId(const quint32 &value) +void DialogCurveIntersectAxis::SetBasePointId(const quint32 &value) { setCurrentPointId(ui->comboBoxAxisPoint, value); line->setAxisPointId(value); @@ -148,13 +148,13 @@ void DialogCurveIntersectAxis::setCurveId(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -QString DialogCurveIntersectAxis::getLineColor() const +QString DialogCurveIntersectAxis::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogCurveIntersectAxis::setLineColor(const QString &value) +void DialogCurveIntersectAxis::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } @@ -169,7 +169,7 @@ void DialogCurveIntersectAxis::ShowDialog(bool click) /*We will ignore click if poinet is in point circle*/ VMainGraphicsScene *scene = qApp->getCurrentScene(); SCASSERT(scene != nullptr); - const QSharedPointer point = data->GeometricObject(getBasePointId()); + const QSharedPointer point = data->GeometricObject(GetBasePointId()); QLineF line = QLineF(point->toQPointF(), scene->getScenePos()); //Radius of point circle, but little bigger. Need handle with hover sizes. @@ -180,7 +180,7 @@ void DialogCurveIntersectAxis::ShowDialog(bool click) } } this->setModal(true); - this->setAngle(line->Angle());//Show in dialog angle what user choose + this->SetAngle(line->Angle());//Show in dialog angle what user choose emit ToolTip(""); timerFormula->start(); this->show(); @@ -268,9 +268,9 @@ void DialogCurveIntersectAxis::SaveData() formulaAngle.replace("\n", " "); line->setPoint1Id(getCurveId()); - line->setAxisPointId(getBasePointId()); - line->setAngle(formulaAngle); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->setAxisPointId(GetBasePointId()); + line->SetAngle(formulaAngle); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } diff --git a/src/app/dialogs/tools/dialogcurveintersectaxis.h b/src/app/dialogs/tools/dialogcurveintersectaxis.h index 1fa7fec7b..33d5262eb 100644 --- a/src/app/dialogs/tools/dialogcurveintersectaxis.h +++ b/src/app/dialogs/tools/dialogcurveintersectaxis.h @@ -45,22 +45,22 @@ public: DialogCurveIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogCurveIntersectAxis(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - QString getAngle() const; - void setAngle(const QString &value); + QString GetAngle() const; + void SetAngle(const QString &value); - quint32 getBasePointId() const; - void setBasePointId(const quint32 &value); + quint32 GetBasePointId() const; + void SetBasePointId(const quint32 &value); quint32 getCurveId() const; void setCurveId(const quint32 &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); virtual void ShowDialog(bool click); public slots: diff --git a/src/app/dialogs/tools/dialogcutarc.cpp b/src/app/dialogs/tools/dialogcutarc.cpp index 63b956a85..935642187 100644 --- a/src/app/dialogs/tools/dialogcutarc.cpp +++ b/src/app/dialogs/tools/dialogcutarc.cpp @@ -159,10 +159,10 @@ void DialogCutArc::setArcId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFormula set string with formula length + * @brief SetFormula set string with formula length * @param value string with formula */ -void DialogCutArc::setFormula(const QString &value) +void DialogCutArc::SetFormula(const QString &value) { formula = qApp->FormulaToUser(value); // increase height if needed. @@ -177,10 +177,10 @@ void DialogCutArc::setFormula(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name point on arc + * @brief SetPointName set name point on arc * @param value name */ -void DialogCutArc::setPointName(const QString &value) +void DialogCutArc::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -188,10 +188,10 @@ void DialogCutArc::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFormula return string with formula length + * @brief GetFormula return string with formula length * @return formula */ -QString DialogCutArc::getFormula() const +QString DialogCutArc::GetFormula() const { return qApp->FormulaFromUser(formula); } diff --git a/src/app/dialogs/tools/dialogcutarc.h b/src/app/dialogs/tools/dialogcutarc.h index 682161b3c..91f8dec79 100644 --- a/src/app/dialogs/tools/dialogcutarc.h +++ b/src/app/dialogs/tools/dialogcutarc.h @@ -49,10 +49,10 @@ public: DialogCutArc(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogCutArc(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); quint32 getArcId() const; void setArcId(const quint32 &value); diff --git a/src/app/dialogs/tools/dialogcutspline.cpp b/src/app/dialogs/tools/dialogcutspline.cpp index 2f5c961ad..2c386cbd3 100644 --- a/src/app/dialogs/tools/dialogcutspline.cpp +++ b/src/app/dialogs/tools/dialogcutspline.cpp @@ -80,10 +80,10 @@ DialogCutSpline::~DialogCutSpline() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogCutSpline::setPointName(const QString &value) +void DialogCutSpline::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -91,10 +91,10 @@ void DialogCutSpline::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFormula set string of formula + * @brief SetFormula set string of formula * @param value formula */ -void DialogCutSpline::setFormula(const QString &value) +void DialogCutSpline::SetFormula(const QString &value) { formula = qApp->FormulaToUser(value); // increase height if needed. TODO : see if I can get the max number of caracters in one line @@ -181,10 +181,10 @@ void DialogCutSpline::ShowVisualization() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFormula return string of formula + * @brief GetFormula return string of formula * @return formula */ -QString DialogCutSpline::getFormula() const +QString DialogCutSpline::GetFormula() const { return qApp->FormulaFromUser(formula); } diff --git a/src/app/dialogs/tools/dialogcutspline.h b/src/app/dialogs/tools/dialogcutspline.h index 4d32e5d36..886860aab 100644 --- a/src/app/dialogs/tools/dialogcutspline.h +++ b/src/app/dialogs/tools/dialogcutspline.h @@ -48,10 +48,10 @@ public: DialogCutSpline(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogCutSpline(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); quint32 getSplineId() const; void setSplineId(const quint32 &value); diff --git a/src/app/dialogs/tools/dialogcutsplinepath.cpp b/src/app/dialogs/tools/dialogcutsplinepath.cpp index 7c3972034..90178bd55 100644 --- a/src/app/dialogs/tools/dialogcutsplinepath.cpp +++ b/src/app/dialogs/tools/dialogcutsplinepath.cpp @@ -80,10 +80,10 @@ DialogCutSplinePath::~DialogCutSplinePath() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogCutSplinePath::setPointName(const QString &value) +void DialogCutSplinePath::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -91,10 +91,10 @@ void DialogCutSplinePath::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFormula set string of formula + * @brief SetFormula set string of formula * @param value formula */ -void DialogCutSplinePath::setFormula(const QString &value) +void DialogCutSplinePath::SetFormula(const QString &value) { formula = qApp->FormulaToUser(value); // increase height if needed. TODO : see if I can get the max number of caracters in one line @@ -181,10 +181,10 @@ void DialogCutSplinePath::ShowVisualization() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFormula return string of formula + * @brief GetFormula return string of formula * @return formula */ -QString DialogCutSplinePath::getFormula() const +QString DialogCutSplinePath::GetFormula() const { return qApp->FormulaFromUser(formula); } diff --git a/src/app/dialogs/tools/dialogcutsplinepath.h b/src/app/dialogs/tools/dialogcutsplinepath.h index c1fbf943d..8de2c016e 100644 --- a/src/app/dialogs/tools/dialogcutsplinepath.h +++ b/src/app/dialogs/tools/dialogcutsplinepath.h @@ -48,10 +48,10 @@ public: DialogCutSplinePath(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogCutSplinePath(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); quint32 getSplinePathId() const; void setSplinePathId(const quint32 &value); diff --git a/src/app/dialogs/tools/dialogeditwrongformula.cpp b/src/app/dialogs/tools/dialogeditwrongformula.cpp index 3987b12a7..804a78ff6 100644 --- a/src/app/dialogs/tools/dialogeditwrongformula.cpp +++ b/src/app/dialogs/tools/dialogeditwrongformula.cpp @@ -121,7 +121,7 @@ void DialogEditWrongFormula::closeEvent(QCloseEvent *event) } //--------------------------------------------------------------------------------------------------------------------- -void DialogEditWrongFormula::setFormula(const QString &value) +void DialogEditWrongFormula::SetFormula(const QString &value) { formula = qApp->FormulaToUser(value); // increase height if needed. TODO : see if I can get the max number of caracters in one line @@ -147,7 +147,7 @@ void DialogEditWrongFormula::setPostfix(const QString &value) } //--------------------------------------------------------------------------------------------------------------------- -QString DialogEditWrongFormula::getFormula() const +QString DialogEditWrongFormula::GetFormula() const { return qApp->FormulaFromUser(formula); } diff --git a/src/app/dialogs/tools/dialogeditwrongformula.h b/src/app/dialogs/tools/dialogeditwrongformula.h index a2d389baf..e163d7c21 100644 --- a/src/app/dialogs/tools/dialogeditwrongformula.h +++ b/src/app/dialogs/tools/dialogeditwrongformula.h @@ -51,8 +51,8 @@ public: explicit DialogEditWrongFormula(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogEditWrongFormula(); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); void setCheckZero(bool value); void setPostfix(const QString &value); public slots: diff --git a/src/app/dialogs/tools/dialogendline.cpp b/src/app/dialogs/tools/dialogendline.cpp index 1a40718db..3ecb0651d 100644 --- a/src/app/dialogs/tools/dialogendline.cpp +++ b/src/app/dialogs/tools/dialogendline.cpp @@ -154,10 +154,10 @@ void DialogEndLine::ChosenObject(quint32 id, const SceneObject &type) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogEndLine::setPointName(const QString &value) +void DialogEndLine::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -165,10 +165,10 @@ void DialogEndLine::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setTypeLine set type of line + * @brief SetTypeLine set type of line * @param value type */ -void DialogEndLine::setTypeLine(const QString &value) +void DialogEndLine::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); @@ -176,10 +176,10 @@ void DialogEndLine::setTypeLine(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFormula set string of formula + * @brief SetFormula set string of formula * @param value formula */ -void DialogEndLine::setFormula(const QString &value) +void DialogEndLine::SetFormula(const QString &value) { formulaLength = qApp->FormulaToUser(value); // increase height if needed. TODO : see if I can get the max number of caracters in one line @@ -195,10 +195,10 @@ void DialogEndLine::setFormula(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setAngle set angle of line + * @brief SetAngle set angle of line * @param value angle in degree */ -void DialogEndLine::setAngle(const QString &value) +void DialogEndLine::SetAngle(const QString &value) { formulaAngle = qApp->FormulaToUser(value); // increase height if needed. TODO : see if I can get the max number of caracters in one line @@ -208,29 +208,29 @@ void DialogEndLine::setAngle(const QString &value) this->DeployAngleTextEdit(); } ui->plainTextEditAngle->setPlainText(formulaAngle); - line->setAngle(formulaAngle); + line->SetAngle(formulaAngle); MoveCursorToEnd(ui->plainTextEditAngle); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setBasePointId set id base point of line + * @brief SetBasePointId set id base point of line * @param value id */ -void DialogEndLine::setBasePointId(const quint32 &value) +void DialogEndLine::SetBasePointId(const quint32 &value) { setCurrentPointId(ui->comboBoxBasePoint, value); line->setPoint1Id(value); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogEndLine::getLineColor() const +QString DialogEndLine::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogEndLine::setLineColor(const QString &value) +void DialogEndLine::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } @@ -249,7 +249,7 @@ void DialogEndLine::ShowDialog(bool click) /*We will ignore click if poinet is in point circle*/ VMainGraphicsScene *scene = qApp->getCurrentScene(); SCASSERT(scene != nullptr); - const QSharedPointer point = data->GeometricObject(getBasePointId()); + const QSharedPointer point = data->GeometricObject(GetBasePointId()); QLineF line = QLineF(point->toQPointF(), scene->getScenePos()); //Radius of point circle, but little bigger. Need handle with hover sizes. @@ -260,7 +260,7 @@ void DialogEndLine::ShowDialog(bool click) } } this->setModal(true); - this->setAngle(line->Angle());//Show in dialog angle what user choose + this->SetAngle(line->Angle());//Show in dialog angle what user choose emit ToolTip(""); timerFormula->start(); this->show(); @@ -291,10 +291,10 @@ void DialogEndLine::SaveData() formulaAngle = ui->plainTextEditAngle->toPlainText(); formulaAngle.replace("\n", " "); - line->setPoint1Id(getBasePointId()); + line->setPoint1Id(GetBasePointId()); line->setLength(formulaLength); - line->setAngle(formulaAngle); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->SetAngle(formulaAngle); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } @@ -318,40 +318,40 @@ DialogEndLine::~DialogEndLine() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getTypeLine return type of line + * @brief GetTypeLine return type of line * @return type */ -QString DialogEndLine::getTypeLine() const +QString DialogEndLine::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFormula return string of formula + * @brief GetFormula return string of formula * @return formula */ -QString DialogEndLine::getFormula() const +QString DialogEndLine::GetFormula() const { return qApp->FormulaFromUser(formulaLength); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getAngle return formula angle of line + * @brief GetAngle return formula angle of line * @return angle formula */ -QString DialogEndLine::getAngle() const +QString DialogEndLine::GetAngle() const { return qApp->FormulaFromUser(formulaAngle); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getBasePointId return id base point of line + * @brief GetBasePointId return id base point of line * @return id */ -quint32 DialogEndLine::getBasePointId() const +quint32 DialogEndLine::GetBasePointId() const { return getCurrentObjectId(ui->comboBoxBasePoint); } diff --git a/src/app/dialogs/tools/dialogendline.h b/src/app/dialogs/tools/dialogendline.h index 24bfe4b0a..d31101a12 100644 --- a/src/app/dialogs/tools/dialogendline.h +++ b/src/app/dialogs/tools/dialogendline.h @@ -48,22 +48,22 @@ public: DialogEndLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogEndLine(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); - QString getAngle() const; - void setAngle(const QString &value); + QString GetAngle() const; + void SetAngle(const QString &value); - quint32 getBasePointId() const; - void setBasePointId(const quint32 &value); + quint32 GetBasePointId() const; + void SetBasePointId(const quint32 &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); virtual void ShowDialog(bool click); public slots: diff --git a/src/app/dialogs/tools/dialogheight.cpp b/src/app/dialogs/tools/dialogheight.cpp index 9805ccbde..59ada77f2 100644 --- a/src/app/dialogs/tools/dialogheight.cpp +++ b/src/app/dialogs/tools/dialogheight.cpp @@ -79,10 +79,10 @@ DialogHeight::~DialogHeight() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogHeight::setPointName(const QString &value) +void DialogHeight::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -90,10 +90,10 @@ void DialogHeight::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setTypeLine set type of line + * @brief SetTypeLine set type of line * @param value type */ -void DialogHeight::setTypeLine(const QString &value) +void DialogHeight::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); @@ -101,10 +101,10 @@ void DialogHeight::setTypeLine(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setBasePointId set id base point of height + * @brief SetBasePointId set id base point of height * @param value id */ -void DialogHeight::setBasePointId(const quint32 &value) +void DialogHeight::SetBasePointId(const quint32 &value) { setCurrentPointId(ui->comboBoxBasePoint, value); line->setPoint1Id(value); @@ -112,10 +112,10 @@ void DialogHeight::setBasePointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP1LineId set id first point of line + * @brief SetP1LineId set id first point of line * @param value id */ -void DialogHeight::setP1LineId(const quint32 &value) +void DialogHeight::SetP1LineId(const quint32 &value) { setCurrentPointId(ui->comboBoxP1Line, value); line->setLineP1Id(value); @@ -123,23 +123,23 @@ void DialogHeight::setP1LineId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP2LineId set id second point of line + * @brief SetP2LineId set id second point of line * @param value id */ -void DialogHeight::setP2LineId(const quint32 &value) +void DialogHeight::SetP2LineId(const quint32 &value) { setCurrentPointId(ui->comboBoxP2Line, value); line->setLineP2Id(value); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogHeight::getLineColor() const +QString DialogHeight::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogHeight::setLineColor(const QString &value) +void DialogHeight::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } @@ -208,10 +208,10 @@ void DialogHeight::SaveData() { pointName = ui->lineEditNamePoint->text(); - line->setPoint1Id(getBasePointId()); - line->setLineP1Id(getP1LineId()); - line->setLineP2Id(getP2LineId()); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->setPoint1Id(GetBasePointId()); + line->setLineP1Id(GetP1LineId()); + line->setLineP2Id(GetP2LineId()); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } @@ -272,40 +272,40 @@ void DialogHeight::ShowVisualization() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getTypeLine return type of line + * @brief GetTypeLine return type of line * @return type */ -QString DialogHeight::getTypeLine() const +QString DialogHeight::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getBasePointId return id base point of height + * @brief GetBasePointId return id base point of height * @return id */ -quint32 DialogHeight::getBasePointId() const +quint32 DialogHeight::GetBasePointId() const { return getCurrentObjectId(ui->comboBoxBasePoint); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP1LineId return id first point of line + * @brief GetP1LineId return id first point of line * @return id id */ -quint32 DialogHeight::getP1LineId() const +quint32 DialogHeight::GetP1LineId() const { return getCurrentObjectId(ui->comboBoxP1Line); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP2LineId return id second point of line + * @brief GetP2LineId return id second point of line * @return id */ -quint32 DialogHeight::getP2LineId() const +quint32 DialogHeight::GetP2LineId() const { return getCurrentObjectId(ui->comboBoxP2Line); } diff --git a/src/app/dialogs/tools/dialogheight.h b/src/app/dialogs/tools/dialogheight.h index 01c13a1d7..18859f56a 100644 --- a/src/app/dialogs/tools/dialogheight.h +++ b/src/app/dialogs/tools/dialogheight.h @@ -48,22 +48,22 @@ public: DialogHeight(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogHeight(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - quint32 getBasePointId() const; - void setBasePointId(const quint32 &value); + quint32 GetBasePointId() const; + void SetBasePointId(const quint32 &value); - quint32 getP1LineId() const; - void setP1LineId(const quint32 &value); + quint32 GetP1LineId() const; + void SetP1LineId(const quint32 &value); - quint32 getP2LineId() const; - void setP2LineId(const quint32 &value); + quint32 GetP2LineId() const; + void SetP2LineId(const quint32 &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); diff --git a/src/app/dialogs/tools/dialogline.cpp b/src/app/dialogs/tools/dialogline.cpp index 6a4a9d781..b545f8c9d 100644 --- a/src/app/dialogs/tools/dialogline.cpp +++ b/src/app/dialogs/tools/dialogline.cpp @@ -78,10 +78,10 @@ DialogLine::~DialogLine() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setSecondPoint set id second point + * @brief SetSecondPoint set id second point * @param value id */ -void DialogLine::setSecondPoint(const quint32 &value) +void DialogLine::SetSecondPoint(const quint32 &value) { setCurrentPointId(ui->comboBoxSecondPoint, value); line->setPoint2Id(value); @@ -89,33 +89,33 @@ void DialogLine::setSecondPoint(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setTypeLine set type of line + * @brief SetTypeLine set type of line * @param value type */ -void DialogLine::setTypeLine(const QString &value) +void DialogLine::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogLine::getLineColor() const +QString DialogLine::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogLine::setLineColor(const QString &value) +void DialogLine::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFirstPoint set id first point + * @brief SetFirstPoint set id first point * @param value id */ -void DialogLine::setFirstPoint(const quint32 &value) +void DialogLine::SetFirstPoint(const quint32 &value) { setCurrentPointId(ui->comboBoxFirstPoint, value); line->setPoint1Id(value); @@ -164,9 +164,9 @@ void DialogLine::ShowVisualization() //--------------------------------------------------------------------------------------------------------------------- void DialogLine::SaveData() { - line->setPoint1Id(getFirstPoint()); - line->setPoint2Id(getSecondPoint()); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->setPoint1Id(GetFirstPoint()); + line->setPoint2Id(GetSecondPoint()); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } @@ -211,30 +211,30 @@ void DialogLine::ChosenObject(quint32 id, const SceneObject &type) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFirstPoint return id first point + * @brief GetFirstPoint return id first point * @return id */ -quint32 DialogLine::getFirstPoint() const +quint32 DialogLine::GetFirstPoint() const { return qvariant_cast(ui->comboBoxFirstPoint->currentData()); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getSecondPoint return id second point + * @brief GetSecondPoint return id second point * @return id */ -quint32 DialogLine::getSecondPoint() const +quint32 DialogLine::GetSecondPoint() const { return qvariant_cast(ui->comboBoxSecondPoint->currentData()); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getTypeLine return type of line + * @brief GetTypeLine return type of line * @return type */ -QString DialogLine::getTypeLine() const +QString DialogLine::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } diff --git a/src/app/dialogs/tools/dialogline.h b/src/app/dialogs/tools/dialogline.h index 4769b41f0..8c7ff5d8f 100644 --- a/src/app/dialogs/tools/dialogline.h +++ b/src/app/dialogs/tools/dialogline.h @@ -48,17 +48,17 @@ public: DialogLine(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogLine(); - quint32 getFirstPoint() const; - void setFirstPoint(const quint32 &value); + quint32 GetFirstPoint() const; + void SetFirstPoint(const quint32 &value); - quint32 getSecondPoint() const; - void setSecondPoint(const quint32 &value); + quint32 GetSecondPoint() const; + void SetSecondPoint(const quint32 &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); diff --git a/src/app/dialogs/tools/dialoglineintersect.cpp b/src/app/dialogs/tools/dialoglineintersect.cpp index ae764162b..83e38e663 100644 --- a/src/app/dialogs/tools/dialoglineintersect.cpp +++ b/src/app/dialogs/tools/dialoglineintersect.cpp @@ -165,10 +165,10 @@ void DialogLineIntersect::SaveData() { pointName = ui->lineEditNamePoint->text(); - line->setPoint1Id(getP1Line1()); - line->setLine1P2Id(getP2Line1()); - line->setLine2P1Id(getP1Line2()); - line->setLine2P2Id(getP2Line2()); + line->setPoint1Id(GetP1Line1()); + line->setLine1P2Id(GetP2Line1()); + line->setLine2P1Id(GetP1Line2()); + line->setLine2P2Id(GetP2Line2()); line->RefreshGeometry(); } @@ -263,10 +263,10 @@ void DialogLineIntersect::CheckState() */ bool DialogLineIntersect::CheckIntersecion() { - const QSharedPointer p1L1 = data->GeometricObject(getP1Line1()); - const QSharedPointer p2L1 = data->GeometricObject(getP2Line1()); - const QSharedPointer p1L2 = data->GeometricObject(getP1Line2()); - const QSharedPointer p2L2 = data->GeometricObject(getP2Line2()); + const QSharedPointer p1L1 = data->GeometricObject(GetP1Line1()); + const QSharedPointer p2L1 = data->GeometricObject(GetP2Line1()); + const QSharedPointer p1L2 = data->GeometricObject(GetP1Line2()); + const QSharedPointer p2L2 = data->GeometricObject(GetP2Line2()); QLineF line1(p1L1->toQPointF(), p2L1->toQPointF()); QLineF line2(p1L2->toQPointF(), p2L2->toQPointF()); @@ -284,10 +284,10 @@ bool DialogLineIntersect::CheckIntersecion() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP2Line2 set id second point of second line + * @brief SetP2Line2 set id second point of second line * @param value id */ -void DialogLineIntersect::setP2Line2(const quint32 &value) +void DialogLineIntersect::SetP2Line2(const quint32 &value) { setCurrentPointId(ui->comboBoxP2Line2, value); line->setLine2P2Id(value); @@ -295,10 +295,10 @@ void DialogLineIntersect::setP2Line2(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP1Line2 set id first point of second line + * @brief SetP1Line2 set id first point of second line * @param value id */ -void DialogLineIntersect::setP1Line2(const quint32 &value) +void DialogLineIntersect::SetP1Line2(const quint32 &value) { setCurrentPointId(ui->comboBoxP1Line2, value); line->setLine2P1Id(value); @@ -306,10 +306,10 @@ void DialogLineIntersect::setP1Line2(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP2Line1 set id second point of first line + * @brief SetP2Line1 set id second point of first line * @param value id */ -void DialogLineIntersect::setP2Line1(const quint32 &value) +void DialogLineIntersect::SetP2Line1(const quint32 &value) { setCurrentPointId(ui->comboBoxP2Line1, value); line->setLine1P2Id(value); @@ -317,10 +317,10 @@ void DialogLineIntersect::setP2Line1(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP1Line1 set id first point of first line + * @brief SetP1Line1 set id first point of first line * @param value id */ -void DialogLineIntersect::setP1Line1(const quint32 &value) +void DialogLineIntersect::SetP1Line1(const quint32 &value) { setCurrentPointId(ui->comboBoxP1Line1, value); line->setPoint1Id(value); @@ -328,10 +328,10 @@ void DialogLineIntersect::setP1Line1(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name of point */ -void DialogLineIntersect::setPointName(const QString &value) +void DialogLineIntersect::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -339,40 +339,40 @@ void DialogLineIntersect::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP1Line1 return id first point of first line + * @brief GetP1Line1 return id first point of first line * @return id */ -quint32 DialogLineIntersect::getP1Line1() const +quint32 DialogLineIntersect::GetP1Line1() const { return getCurrentObjectId(ui->comboBoxP1Line1); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP2Line1 return id second point of first line + * @brief GetP2Line1 return id second point of first line * @return id */ -quint32 DialogLineIntersect::getP2Line1() const +quint32 DialogLineIntersect::GetP2Line1() const { return getCurrentObjectId(ui->comboBoxP2Line1); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP1Line2 return id first point of second line + * @brief GetP1Line2 return id first point of second line * @return id */ -quint32 DialogLineIntersect::getP1Line2() const +quint32 DialogLineIntersect::GetP1Line2() const { return getCurrentObjectId(ui->comboBoxP1Line2); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP2Line2 return id second point of second line + * @brief GetP2Line2 return id second point of second line * @return id */ -quint32 DialogLineIntersect::getP2Line2() const +quint32 DialogLineIntersect::GetP2Line2() const { return getCurrentObjectId(ui->comboBoxP2Line2); } diff --git a/src/app/dialogs/tools/dialoglineintersect.h b/src/app/dialogs/tools/dialoglineintersect.h index aff7e03f0..5f7a374f1 100644 --- a/src/app/dialogs/tools/dialoglineintersect.h +++ b/src/app/dialogs/tools/dialoglineintersect.h @@ -48,19 +48,19 @@ public: DialogLineIntersect(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogLineIntersect(); - quint32 getP1Line1() const; - void setP1Line1(const quint32 &value); + quint32 GetP1Line1() const; + void SetP1Line1(const quint32 &value); - quint32 getP2Line1() const; - void setP2Line1(const quint32 &value); + quint32 GetP2Line1() const; + void SetP2Line1(const quint32 &value); - quint32 getP1Line2() const; - void setP1Line2(const quint32 &value); + quint32 GetP1Line2() const; + void SetP1Line2(const quint32 &value); - quint32 getP2Line2() const; - void setP2Line2(const quint32 &value); + quint32 GetP2Line2() const; + void SetP2Line2(const quint32 &value); - void setPointName(const QString &value); + void SetPointName(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); void PointChanged(); diff --git a/src/app/dialogs/tools/dialoglineintersectaxis.cpp b/src/app/dialogs/tools/dialoglineintersectaxis.cpp index 8544780d5..39e12c91b 100644 --- a/src/app/dialogs/tools/dialoglineintersectaxis.cpp +++ b/src/app/dialogs/tools/dialoglineintersectaxis.cpp @@ -89,33 +89,33 @@ DialogLineIntersectAxis::~DialogLineIntersectAxis() } //--------------------------------------------------------------------------------------------------------------------- -void DialogLineIntersectAxis::setPointName(const QString &value) +void DialogLineIntersectAxis::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogLineIntersectAxis::getTypeLine() const +QString DialogLineIntersectAxis::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- -void DialogLineIntersectAxis::setTypeLine(const QString &value) +void DialogLineIntersectAxis::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogLineIntersectAxis::getAngle() const +QString DialogLineIntersectAxis::GetAngle() const { return qApp->FormulaFromUser(formulaAngle); } //--------------------------------------------------------------------------------------------------------------------- -void DialogLineIntersectAxis::setAngle(const QString &value) +void DialogLineIntersectAxis::SetAngle(const QString &value) { formulaAngle = qApp->FormulaToUser(value); // increase height if needed. TODO : see if I can get the max number of caracters in one line @@ -125,57 +125,57 @@ void DialogLineIntersectAxis::setAngle(const QString &value) this->DeployAngleTextEdit(); } ui->plainTextEditFormula->setPlainText(formulaAngle); - line->setAngle(formulaAngle); + line->SetAngle(formulaAngle); MoveCursorToEnd(ui->plainTextEditFormula); } //--------------------------------------------------------------------------------------------------------------------- -quint32 DialogLineIntersectAxis::getBasePointId() const +quint32 DialogLineIntersectAxis::GetBasePointId() const { return getCurrentObjectId(ui->comboBoxAxisPoint); } //--------------------------------------------------------------------------------------------------------------------- -void DialogLineIntersectAxis::setBasePointId(const quint32 &value) +void DialogLineIntersectAxis::SetBasePointId(const quint32 &value) { setCurrentPointId(ui->comboBoxAxisPoint, value); line->setAxisPointId(value); } //--------------------------------------------------------------------------------------------------------------------- -quint32 DialogLineIntersectAxis::getFirstPointId() const +quint32 DialogLineIntersectAxis::GetFirstPointId() const { return getCurrentObjectId(ui->comboBoxFirstLinePoint); } //--------------------------------------------------------------------------------------------------------------------- -void DialogLineIntersectAxis::setFirstPointId(const quint32 &value) +void DialogLineIntersectAxis::SetFirstPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxFirstLinePoint, value); line->setPoint1Id(value); } //--------------------------------------------------------------------------------------------------------------------- -quint32 DialogLineIntersectAxis::getSecondPointId() const +quint32 DialogLineIntersectAxis::GetSecondPointId() const { return getCurrentObjectId(ui->comboBoxSecondLinePoint); } //--------------------------------------------------------------------------------------------------------------------- -void DialogLineIntersectAxis::setSecondPointId(const quint32 &value) +void DialogLineIntersectAxis::SetSecondPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxSecondLinePoint, value); line->setPoint2Id(value); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogLineIntersectAxis::getLineColor() const +QString DialogLineIntersectAxis::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogLineIntersectAxis::setLineColor(const QString &value) +void DialogLineIntersectAxis::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } @@ -190,7 +190,7 @@ void DialogLineIntersectAxis::ShowDialog(bool click) /*We will ignore click if poinet is in point circle*/ VMainGraphicsScene *scene = qApp->getCurrentScene(); SCASSERT(scene != nullptr); - const QSharedPointer point = data->GeometricObject(getBasePointId()); + const QSharedPointer point = data->GeometricObject(GetBasePointId()); QLineF line = QLineF(point->toQPointF(), scene->getScenePos()); //Radius of point circle, but little bigger. Need handle with hover sizes. @@ -201,7 +201,7 @@ void DialogLineIntersectAxis::ShowDialog(bool click) } } this->setModal(true); - this->setAngle(line->Angle());//Show in dialog angle what user choose + this->SetAngle(line->Angle());//Show in dialog angle what user choose emit ToolTip(""); timerFormula->start(); this->show(); @@ -331,11 +331,11 @@ void DialogLineIntersectAxis::SaveData() formulaAngle = ui->plainTextEditFormula->toPlainText(); formulaAngle.replace("\n", " "); - line->setPoint1Id(getFirstPointId()); - line->setPoint2Id(getSecondPointId()); - line->setAxisPointId(getBasePointId()); - line->setAngle(formulaAngle); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->setPoint1Id(GetFirstPointId()); + line->setPoint2Id(GetSecondPointId()); + line->setAxisPointId(GetBasePointId()); + line->SetAngle(formulaAngle); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } diff --git a/src/app/dialogs/tools/dialoglineintersectaxis.h b/src/app/dialogs/tools/dialoglineintersectaxis.h index 51cda1dbe..130510eb5 100644 --- a/src/app/dialogs/tools/dialoglineintersectaxis.h +++ b/src/app/dialogs/tools/dialoglineintersectaxis.h @@ -45,25 +45,25 @@ public: DialogLineIntersectAxis(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogLineIntersectAxis(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - QString getAngle() const; - void setAngle(const QString &value); + QString GetAngle() const; + void SetAngle(const QString &value); - quint32 getBasePointId() const; - void setBasePointId(const quint32 &value); + quint32 GetBasePointId() const; + void SetBasePointId(const quint32 &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); virtual void ShowDialog(bool click); public slots: diff --git a/src/app/dialogs/tools/dialognormal.cpp b/src/app/dialogs/tools/dialognormal.cpp index 0133149a3..0d6ae44a6 100644 --- a/src/app/dialogs/tools/dialognormal.cpp +++ b/src/app/dialogs/tools/dialognormal.cpp @@ -177,11 +177,11 @@ void DialogNormal::SaveData() formula.replace("\n", " "); angle = ui->doubleSpinBoxAngle->value(); - line->setPoint1Id(getFirstPointId()); - line->setPoint2Id(getSecondPointId()); + line->setPoint1Id(GetFirstPointId()); + line->setPoint2Id(GetSecondPointId()); line->setLength(formula); - line->setAngle(angle); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->SetAngle(angle); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } @@ -194,33 +194,33 @@ void DialogNormal::closeEvent(QCloseEvent *event) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setSecondPointId set id of second point + * @brief SetSecondPointId set id of second point * @param value id */ -void DialogNormal::setSecondPointId(const quint32 &value) +void DialogNormal::SetSecondPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxSecondPoint, value); line->setPoint2Id(value); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogNormal::getLineColor() const +QString DialogNormal::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogNormal::setLineColor(const QString &value) +void DialogNormal::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFirstPointId set id of first point + * @brief SetFirstPointId set id of first point * @param value id */ -void DialogNormal::setFirstPointId(const quint32 &value) +void DialogNormal::SetFirstPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxFirstPoint, value); line->setPoint1Id(value); @@ -228,22 +228,22 @@ void DialogNormal::setFirstPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setAngle set aditional angle of normal + * @brief SetAngle set aditional angle of normal * @param value angle in degree */ -void DialogNormal::setAngle(const qreal &value) +void DialogNormal::SetAngle(const qreal &value) { angle = value; ui->doubleSpinBoxAngle->setValue(angle); - line->setAngle(angle); + line->SetAngle(angle); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFormula set string of formula + * @brief SetFormula set string of formula * @param value formula */ -void DialogNormal::setFormula(const QString &value) +void DialogNormal::SetFormula(const QString &value) { formula = qApp->FormulaToUser(value); // increase height if needed. @@ -258,10 +258,10 @@ void DialogNormal::setFormula(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setTypeLine set type of line + * @brief SetTypeLine set type of line * @param value type */ -void DialogNormal::setTypeLine(const QString &value) +void DialogNormal::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); @@ -269,10 +269,10 @@ void DialogNormal::setTypeLine(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogNormal::setPointName(const QString &value) +void DialogNormal::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -280,50 +280,50 @@ void DialogNormal::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getTypeLine return type of line + * @brief GetTypeLine return type of line * @return type */ -QString DialogNormal::getTypeLine() const +QString DialogNormal::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFormula return string of formula + * @brief GetFormula return string of formula * @return formula */ -QString DialogNormal::getFormula() const +QString DialogNormal::GetFormula() const { return qApp->FormulaFromUser(formula); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getAngle return aditional angle of normal + * @brief GetAngle return aditional angle of normal * @return angle in degree */ -qreal DialogNormal::getAngle() const +qreal DialogNormal::GetAngle() const { return angle; } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFirstPointId return id of first point + * @brief GetFirstPointId return id of first point * @return id */ -quint32 DialogNormal::getFirstPointId() const +quint32 DialogNormal::GetFirstPointId() const { return getCurrentObjectId(ui->comboBoxFirstPoint); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getSecondPointId return id of second point + * @brief GetSecondPointId return id of second point * @return id */ -quint32 DialogNormal::getSecondPointId() const +quint32 DialogNormal::GetSecondPointId() const { return getCurrentObjectId(ui->comboBoxSecondPoint); } diff --git a/src/app/dialogs/tools/dialognormal.h b/src/app/dialogs/tools/dialognormal.h index 003f24f41..8fce4a01a 100644 --- a/src/app/dialogs/tools/dialognormal.h +++ b/src/app/dialogs/tools/dialognormal.h @@ -48,25 +48,25 @@ public: DialogNormal(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogNormal(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); - qreal getAngle() const; - void setAngle(const qreal &value); + qreal GetAngle() const; + void SetAngle(const qreal &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); /** diff --git a/src/app/dialogs/tools/dialogpointofcontact.cpp b/src/app/dialogs/tools/dialogpointofcontact.cpp index fe1e45c24..d01773ffb 100644 --- a/src/app/dialogs/tools/dialogpointofcontact.cpp +++ b/src/app/dialogs/tools/dialogpointofcontact.cpp @@ -218,8 +218,8 @@ void DialogPointOfContact::SaveData() radius = ui->plainTextEditFormula->toPlainText(); radius.replace("\n", " "); - line->setPoint1Id(getFirstPoint()); - line->setLineP2Id(getSecondPoint()); + line->setPoint1Id(GetFirstPoint()); + line->setLineP2Id(GetSecondPoint()); line->setRadiusId(getCenter()); line->setRadius(radius); line->RefreshGeometry(); @@ -234,10 +234,10 @@ void DialogPointOfContact::closeEvent(QCloseEvent *event) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setSecondPoint set id second point + * @brief SetSecondPoint set id second point * @param value id */ -void DialogPointOfContact::setSecondPoint(const quint32 &value) +void DialogPointOfContact::SetSecondPoint(const quint32 &value) { setCurrentPointId(ui->comboBoxSecondPoint, value); line->setLineP2Id(value); @@ -245,10 +245,10 @@ void DialogPointOfContact::setSecondPoint(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFirstPoint set id first point + * @brief SetFirstPoint set id first point * @param value id */ -void DialogPointOfContact::setFirstPoint(const quint32 &value) +void DialogPointOfContact::SetFirstPoint(const quint32 &value) { setCurrentPointId(ui->comboBoxFirstPoint, value); line->setPoint1Id(value); @@ -285,10 +285,10 @@ void DialogPointOfContact::setRadius(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogPointOfContact::setPointName(const QString &value) +void DialogPointOfContact::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -316,20 +316,20 @@ quint32 DialogPointOfContact::getCenter() const //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFirstPoint return id first point + * @brief GetFirstPoint return id first point * @return id */ -quint32 DialogPointOfContact::getFirstPoint() const +quint32 DialogPointOfContact::GetFirstPoint() const { return getCurrentObjectId(ui->comboBoxFirstPoint);; } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getSecondPoint return id second point + * @brief GetSecondPoint return id second point * @return id */ -quint32 DialogPointOfContact::getSecondPoint() const +quint32 DialogPointOfContact::GetSecondPoint() const { return getCurrentObjectId(ui->comboBoxSecondPoint); } diff --git a/src/app/dialogs/tools/dialogpointofcontact.h b/src/app/dialogs/tools/dialogpointofcontact.h index 80fe12a56..549487a2e 100644 --- a/src/app/dialogs/tools/dialogpointofcontact.h +++ b/src/app/dialogs/tools/dialogpointofcontact.h @@ -49,7 +49,7 @@ public: DialogPointOfContact(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); virtual ~DialogPointOfContact(); - void setPointName(const QString &value); + void SetPointName(const QString &value); QString getRadius() const; void setRadius(const QString &value); @@ -57,11 +57,11 @@ public: quint32 getCenter() const; void setCenter(const quint32 &value); - quint32 getFirstPoint() const; - void setFirstPoint(const quint32 &value); + quint32 GetFirstPoint() const; + void SetFirstPoint(const quint32 &value); - quint32 getSecondPoint() const; - void setSecondPoint(const quint32 &value); + quint32 GetSecondPoint() const; + void SetSecondPoint(const quint32 &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); /** diff --git a/src/app/dialogs/tools/dialogpointofintersection.cpp b/src/app/dialogs/tools/dialogpointofintersection.cpp index c380255b7..882afa5dd 100644 --- a/src/app/dialogs/tools/dialogpointofintersection.cpp +++ b/src/app/dialogs/tools/dialogpointofintersection.cpp @@ -76,10 +76,10 @@ DialogPointOfIntersection::~DialogPointOfIntersection() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setSecondPointId set id of second point + * @brief SetSecondPointId set id of second point * @param value id */ -void DialogPointOfIntersection::setSecondPointId(const quint32 &value) +void DialogPointOfIntersection::SetSecondPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxSecondPoint, value); line->setPoint2Id(value); @@ -132,8 +132,8 @@ void DialogPointOfIntersection::SaveData() { pointName = ui->lineEditNamePoint->text(); - line->setPoint1Id(getFirstPointId()); - line->setPoint2Id(getSecondPointId()); + line->setPoint1Id(GetFirstPointId()); + line->setPoint2Id(GetSecondPointId()); line->RefreshGeometry(); } @@ -178,10 +178,10 @@ void DialogPointOfIntersection::ShowVisualization() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFirstPointId set id of first point + * @brief SetFirstPointId set id of first point * @param value id */ -void DialogPointOfIntersection::setFirstPointId(const quint32 &value) +void DialogPointOfIntersection::SetFirstPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxFirstPoint, value); line->setPoint1Id(value); @@ -189,10 +189,10 @@ void DialogPointOfIntersection::setFirstPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogPointOfIntersection::setPointName(const QString &value) +void DialogPointOfIntersection::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -200,20 +200,20 @@ void DialogPointOfIntersection::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFirstPointId return id of first point + * @brief GetFirstPointId return id of first point * @return id */ -quint32 DialogPointOfIntersection::getFirstPointId() const +quint32 DialogPointOfIntersection::GetFirstPointId() const { return getCurrentObjectId(ui->comboBoxFirstPoint); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getSecondPointId return id of second point + * @brief GetSecondPointId return id of second point * @return id */ -quint32 DialogPointOfIntersection::getSecondPointId() const +quint32 DialogPointOfIntersection::GetSecondPointId() const { return getCurrentObjectId(ui->comboBoxSecondPoint); } diff --git a/src/app/dialogs/tools/dialogpointofintersection.h b/src/app/dialogs/tools/dialogpointofintersection.h index 65c70d50c..811375a8d 100644 --- a/src/app/dialogs/tools/dialogpointofintersection.h +++ b/src/app/dialogs/tools/dialogpointofintersection.h @@ -48,13 +48,13 @@ public: DialogPointOfIntersection(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogPointOfIntersection(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); diff --git a/src/app/dialogs/tools/dialogshoulderpoint.cpp b/src/app/dialogs/tools/dialogshoulderpoint.cpp index 291f51a73..ad92e20c8 100644 --- a/src/app/dialogs/tools/dialogshoulderpoint.cpp +++ b/src/app/dialogs/tools/dialogshoulderpoint.cpp @@ -204,11 +204,11 @@ void DialogShoulderPoint::SaveData() formula = ui->plainTextEditFormula->toPlainText(); formula.replace("\n", " "); - line->setPoint1Id(getP3()); - line->setLineP1Id(getP1Line()); - line->setLineP2Id(getP2Line()); + line->setPoint1Id(GetP3()); + line->setLineP1Id(GetP1Line()); + line->setLineP2Id(GetP2Line()); line->setLength(formula); - line->setLineStyle(VAbstractTool::LineStyleToPenStyle(getTypeLine())); + line->setLineStyle(VAbstractTool::LineStyleToPenStyle(GetTypeLine())); line->RefreshGeometry(); } @@ -224,30 +224,30 @@ void DialogShoulderPoint::closeEvent(QCloseEvent *event) * @brief setPShoulder set id shoulder point * @param value id */ -void DialogShoulderPoint::setP3(const quint32 &value) +void DialogShoulderPoint::SetP3(const quint32 &value) { setCurrentPointId(ui->comboBoxP3, value); line->setPoint1Id(value); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogShoulderPoint::getLineColor() const +QString DialogShoulderPoint::GetLineColor() const { - return GetLineColor(ui->comboBoxLineColor); + return GetComboBoxCurrentData(ui->comboBoxLineColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogShoulderPoint::setLineColor(const QString &value) +void DialogShoulderPoint::SetLineColor(const QString &value) { ChangeCurrentData(ui->comboBoxLineColor, value); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP2Line set id second point of line + * @brief SetP2Line set id second point of line * @param value id */ -void DialogShoulderPoint::setP2Line(const quint32 &value) +void DialogShoulderPoint::SetP2Line(const quint32 &value) { setCurrentPointId(ui->comboBoxP2Line, value); line->setLineP2Id(value); @@ -255,10 +255,10 @@ void DialogShoulderPoint::setP2Line(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP1Line set id first point of line + * @brief SetP1Line set id first point of line * @param value id */ -void DialogShoulderPoint::setP1Line(const quint32 &value) +void DialogShoulderPoint::SetP1Line(const quint32 &value) { setCurrentPointId(ui->comboBoxP1Line, value); line->setLineP1Id(value); @@ -266,10 +266,10 @@ void DialogShoulderPoint::setP1Line(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFormula set string of formula + * @brief SetFormula set string of formula * @param value formula */ -void DialogShoulderPoint::setFormula(const QString &value) +void DialogShoulderPoint::SetFormula(const QString &value) { formula = qApp->FormulaToUser(value); // increase height if needed. @@ -284,10 +284,10 @@ void DialogShoulderPoint::setFormula(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setTypeLine set type of line + * @brief SetTypeLine set type of line * @param value type */ -void DialogShoulderPoint::setTypeLine(const QString &value) +void DialogShoulderPoint::SetTypeLine(const QString &value) { ChangeCurrentData(ui->comboBoxLineType, value); line->setLineStyle(VAbstractTool::LineStyleToPenStyle(value)); @@ -295,10 +295,10 @@ void DialogShoulderPoint::setTypeLine(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogShoulderPoint::setPointName(const QString &value) +void DialogShoulderPoint::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -306,40 +306,40 @@ void DialogShoulderPoint::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getTypeLine return type of line + * @brief GetTypeLine return type of line * @return type */ -QString DialogShoulderPoint::getTypeLine() const +QString DialogShoulderPoint::GetTypeLine() const { - return GetTypeLine(ui->comboBoxLineType); + return GetComboBoxCurrentData(ui->comboBoxLineType); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFormula return string of formula + * @brief GetFormula return string of formula * @return formula */ -QString DialogShoulderPoint::getFormula() const +QString DialogShoulderPoint::GetFormula() const { return qApp->FormulaFromUser(formula); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP1Line return id first point of line + * @brief GetP1Line return id first point of line * @return id */ -quint32 DialogShoulderPoint::getP1Line() const +quint32 DialogShoulderPoint::GetP1Line() const { return getCurrentObjectId(ui->comboBoxP1Line); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP2Line return id second point of line + * @brief GetP2Line return id second point of line * @return id */ -quint32 DialogShoulderPoint::getP2Line() const +quint32 DialogShoulderPoint::GetP2Line() const { return getCurrentObjectId(ui->comboBoxP2Line); } @@ -349,7 +349,7 @@ quint32 DialogShoulderPoint::getP2Line() const * @brief getPShoulder return id shoulder point * @return id */ -quint32 DialogShoulderPoint::getP3() const +quint32 DialogShoulderPoint::GetP3() const { return getCurrentObjectId(ui->comboBoxP3); } diff --git a/src/app/dialogs/tools/dialogshoulderpoint.h b/src/app/dialogs/tools/dialogshoulderpoint.h index 9178dd726..4f5670654 100644 --- a/src/app/dialogs/tools/dialogshoulderpoint.h +++ b/src/app/dialogs/tools/dialogshoulderpoint.h @@ -48,25 +48,25 @@ public: DialogShoulderPoint(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogShoulderPoint(); - void setPointName(const QString &value); + void SetPointName(const QString &value); - QString getTypeLine() const; - void setTypeLine(const QString &value); + QString GetTypeLine() const; + void SetTypeLine(const QString &value); - QString getFormula() const; - void setFormula(const QString &value); + QString GetFormula() const; + void SetFormula(const QString &value); - quint32 getP1Line() const; - void setP1Line(const quint32 &value); + quint32 GetP1Line() const; + void SetP1Line(const quint32 &value); - quint32 getP2Line() const; - void setP2Line(const quint32 &value); + quint32 GetP2Line() const; + void SetP2Line(const quint32 &value); - quint32 getP3() const; - void setP3(const quint32 &value); + quint32 GetP3() const; + void SetP3(const quint32 &value); - QString getLineColor() const; - void setLineColor(const QString &value); + QString GetLineColor() const; + void SetLineColor(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); /** diff --git a/src/app/dialogs/tools/dialogsinglepoint.cpp b/src/app/dialogs/tools/dialogsinglepoint.cpp index ab7d0012a..f218776a4 100644 --- a/src/app/dialogs/tools/dialogsinglepoint.cpp +++ b/src/app/dialogs/tools/dialogsinglepoint.cpp @@ -92,7 +92,7 @@ void DialogSinglePoint::UpdateList() * @param name name of point * @param point data for point */ -void DialogSinglePoint::setData(const QString &name, const QPointF &point) +void DialogSinglePoint::SetData(const QString &name, const QPointF &point) { pointName = name; this->point = point; @@ -113,7 +113,7 @@ DialogSinglePoint::~DialogSinglePoint() * @brief getPoint return point * @return point */ -QPointF DialogSinglePoint::getPoint() const +QPointF DialogSinglePoint::GetPoint() const { return point; } diff --git a/src/app/dialogs/tools/dialogsinglepoint.h b/src/app/dialogs/tools/dialogsinglepoint.h index b92fe136f..0b6ef3d0b 100644 --- a/src/app/dialogs/tools/dialogsinglepoint.h +++ b/src/app/dialogs/tools/dialogsinglepoint.h @@ -45,8 +45,10 @@ class DialogSinglePoint : public DialogTool public: DialogSinglePoint(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogSinglePoint(); - void setData(const QString &name, const QPointF &point); - QPointF getPoint()const; + + void SetData(const QString &name, const QPointF &point); + QPointF GetPoint()const; + public slots: void mousePress(const QPointF &scenePos); virtual void UpdateList(); diff --git a/src/app/dialogs/tools/dialogspline.cpp b/src/app/dialogs/tools/dialogspline.cpp index 956cacaa2..496c461dd 100644 --- a/src/app/dialogs/tools/dialogspline.cpp +++ b/src/app/dialogs/tools/dialogspline.cpp @@ -71,10 +71,10 @@ DialogSpline::~DialogSpline() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP1 return id first point of spline + * @brief GetP1 return id first point of spline * @return id */ -quint32 DialogSpline::getP1() const +quint32 DialogSpline::GetP1() const { return getCurrentObjectId(ui->comboBoxP1); } @@ -147,13 +147,13 @@ void DialogSpline::SaveData() kAsm2 = ui->doubleSpinBoxKasm2->value(); kCurve = ui->doubleSpinBoxKcurve->value(); - path->setPoint1Id(getP1()); - path->setPoint4Id(getP4()); - path->setAngle1(angle1); - path->setAngle2(angle2); - path->setKAsm1(kAsm1); - path->setKAsm2(kAsm2); - path->setKCurve(kCurve); + path->setPoint1Id(GetP1()); + path->setPoint4Id(GetP4()); + path->SetAngle1(angle1); + path->SetAngle2(angle2); + path->SetKAsm1(kAsm1); + path->SetKAsm2(kAsm2); + path->SetKCurve(kCurve); path->RefreshGeometry(); } @@ -203,82 +203,82 @@ void DialogSpline::ShowVisualization() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setKCurve set coefficient curve + * @brief SetKCurve set coefficient curve * @param value value. Can be >= 0. */ -void DialogSpline::setKCurve(const qreal &value) +void DialogSpline::SetKCurve(const qreal &value) { kCurve = value; ui->doubleSpinBoxKcurve->setValue(value); - path->setKCurve(kCurve); + path->SetKCurve(kCurve); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogSpline::getColor() const +QString DialogSpline::GetColor() const { - return GetLineColor(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogSpline::setColor(const QString &value) +void DialogSpline::SetColor(const QString &value) { ChangeCurrentData(ui->comboBoxColor, value); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setKAsm2 set second coefficient asymmetry + * @brief SetKAsm2 set second coefficient asymmetry * @param value value. Can be >= 0. */ -void DialogSpline::setKAsm2(const qreal &value) +void DialogSpline::SetKAsm2(const qreal &value) { kAsm2 = value; ui->doubleSpinBoxKasm2->setValue(value); - path->setKAsm2(kAsm2); + path->SetKAsm2(kAsm2); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setKAsm1 set first coefficient asymmetry + * @brief SetKAsm1 set first coefficient asymmetry * @param value value. Can be >= 0. */ -void DialogSpline::setKAsm1(const qreal &value) +void DialogSpline::SetKAsm1(const qreal &value) { kAsm1 = value; ui->doubleSpinBoxKasm1->setValue(value); - path->setKAsm1(kAsm1); + path->SetKAsm1(kAsm1); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setAngle2 set second angle of spline + * @brief SetAngle2 set second angle of spline * @param value angle in degree */ -void DialogSpline::setAngle2(const qreal &value) +void DialogSpline::SetAngle2(const qreal &value) { angle2 = value; ui->spinBoxAngle2->setValue(static_cast(value)); - path->setAngle2(angle2); + path->SetAngle2(angle2); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setAngle1 set first angle of spline + * @brief SetAngle1 set first angle of spline * @param value angle in degree */ -void DialogSpline::setAngle1(const qreal &value) +void DialogSpline::SetAngle1(const qreal &value) { angle1 = value; ui->spinBoxAngle1->setValue(static_cast(value)); - path->setAngle1(angle1); + path->SetAngle1(angle1); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP4 set id fourth point of spline + * @brief SetP4 set id fourth point of spline * @param value id */ -void DialogSpline::setP4(const quint32 &value) +void DialogSpline::SetP4(const quint32 &value) { setCurrentPointId(ui->comboBoxP4, value); path->setPoint4Id(value); @@ -286,10 +286,10 @@ void DialogSpline::setP4(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setP1 set id first point of spline + * @brief SetP1 set id first point of spline * @param value id */ -void DialogSpline::setP1(const quint32 &value) +void DialogSpline::SetP1(const quint32 &value) { setCurrentPointId(ui->comboBoxP1, value); path->setPoint1Id(value); @@ -297,60 +297,60 @@ void DialogSpline::setP1(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getP4 return id fourth point of spline + * @brief GetP4 return id fourth point of spline * @return id */ -quint32 DialogSpline::getP4() const +quint32 DialogSpline::GetP4() const { return getCurrentObjectId(ui->comboBoxP4); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getAngle1 return first angle of spline + * @brief GetAngle1 return first angle of spline * @return angle in degree */ -qreal DialogSpline::getAngle1() const +qreal DialogSpline::GetAngle1() const { return angle1; } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getAngle2 return second angle of spline + * @brief GetAngle2 return second angle of spline * @return angle in degree */ -qreal DialogSpline::getAngle2() const +qreal DialogSpline::GetAngle2() const { return angle2; } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getKAsm1 return first coefficient asymmetry + * @brief GetKAsm1 return first coefficient asymmetry * @return value. Can be >= 0. */ -qreal DialogSpline::getKAsm1() const +qreal DialogSpline::GetKAsm1() const { return kAsm1; } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getKAsm2 return second coefficient asymmetry + * @brief GetKAsm2 return second coefficient asymmetry * @return value. Can be >= 0. */ -qreal DialogSpline::getKAsm2() const +qreal DialogSpline::GetKAsm2() const { return kAsm2; } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getKCurve return coefficient curve + * @brief GetKCurve return coefficient curve * @return value. Can be >= 0. */ -qreal DialogSpline::getKCurve() const +qreal DialogSpline::GetKCurve() const { return kCurve; } diff --git a/src/app/dialogs/tools/dialogspline.h b/src/app/dialogs/tools/dialogspline.h index 0721eb711..b2634c5f7 100644 --- a/src/app/dialogs/tools/dialogspline.h +++ b/src/app/dialogs/tools/dialogspline.h @@ -48,29 +48,29 @@ public: DialogSpline(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogSpline(); - quint32 getP1() const; - void setP1(const quint32 &value); + quint32 GetP1() const; + void SetP1(const quint32 &value); - quint32 getP4() const; - void setP4(const quint32 &value); + quint32 GetP4() const; + void SetP4(const quint32 &value); - qreal getAngle1() const; - void setAngle1(const qreal &value); + qreal GetAngle1() const; + void SetAngle1(const qreal &value); - qreal getAngle2() const; - void setAngle2(const qreal &value); + qreal GetAngle2() const; + void SetAngle2(const qreal &value); - qreal getKAsm1() const; - void setKAsm1(const qreal &value); + qreal GetKAsm1() const; + void SetKAsm1(const qreal &value); - qreal getKAsm2() const; - void setKAsm2(const qreal &value); + qreal GetKAsm2() const; + void SetKAsm2(const qreal &value); - qreal getKCurve() const; - void setKCurve(const qreal &value); + qreal GetKCurve() const; + void SetKCurve(const qreal &value); - QString getColor() const; - void setColor(const QString &value); + QString GetColor() const; + void SetColor(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); diff --git a/src/app/dialogs/tools/dialogsplinepath.cpp b/src/app/dialogs/tools/dialogsplinepath.cpp index 410739a09..fe059a403 100644 --- a/src/app/dialogs/tools/dialogsplinepath.cpp +++ b/src/app/dialogs/tools/dialogsplinepath.cpp @@ -88,20 +88,20 @@ void DialogSplinePath::SetPath(const VSplinePath &value) NewItem(path.at(i).P().id(), path.at(i).KAsm1(), path.at(i).Angle1(), path.at(i).KAsm2(), path.at(i).Angle2()); } ui->listWidget->setFocus(Qt::OtherFocusReason); - ui->doubleSpinBoxKcurve->setValue(path.getKCurve()); + ui->doubleSpinBoxKcurve->setValue(path.GetKCurve()); visPath->setPath(path); ui->listWidget->blockSignals(false); } //--------------------------------------------------------------------------------------------------------------------- -QString DialogSplinePath::getColor() const +QString DialogSplinePath::GetColor() const { - return GetLineColor(ui->comboBoxColor); + return GetComboBoxCurrentData(ui->comboBoxColor); } //--------------------------------------------------------------------------------------------------------------------- -void DialogSplinePath::setColor(const QString &value) +void DialogSplinePath::SetColor(const QString &value) { ChangeCurrentData(ui->comboBoxColor, value); } @@ -375,5 +375,5 @@ void DialogSplinePath::SavePath() QListWidgetItem *item = ui->listWidget->item(i); path.append( qvariant_cast(item->data(Qt::UserRole))); } - path.setKCurve(ui->doubleSpinBoxKcurve->value()); + path.SetKCurve(ui->doubleSpinBoxKcurve->value()); } diff --git a/src/app/dialogs/tools/dialogsplinepath.h b/src/app/dialogs/tools/dialogsplinepath.h index fe15980c5..d16cb0fd5 100644 --- a/src/app/dialogs/tools/dialogsplinepath.h +++ b/src/app/dialogs/tools/dialogsplinepath.h @@ -52,8 +52,8 @@ public: VSplinePath GetPath() const; void SetPath(const VSplinePath &value); - QString getColor() const; - void setColor(const QString &value); + QString GetColor() const; + void SetColor(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); void PointChanged(int row); diff --git a/src/app/dialogs/tools/dialogtool.cpp b/src/app/dialogs/tools/dialogtool.cpp index a37dc86d6..3a12c7f50 100644 --- a/src/app/dialogs/tools/dialogtool.cpp +++ b/src/app/dialogs/tools/dialogtool.cpp @@ -346,12 +346,7 @@ void DialogTool::FillComboBoxLineColors(QComboBox *box) const } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief getTypeLine return type of line - * @param box combobox - * @return type - */ -QString DialogTool::GetTypeLine(const QComboBox *box) const +QString DialogTool::GetComboBoxCurrentData(const QComboBox *box) const { SCASSERT(box != nullptr) QString value = box->currentData().toString(); @@ -362,18 +357,6 @@ QString DialogTool::GetTypeLine(const QComboBox *box) const return value; } -//--------------------------------------------------------------------------------------------------------------------- -QString DialogTool::GetLineColor(const QComboBox *box) const -{ - SCASSERT(box != nullptr) - QString value = box->currentData().toString(); - if (value.isEmpty()) - { - value = VAbstractTool::ColorBlack; - } - return value; -} - //--------------------------------------------------------------------------------------------------------------------- /** * @brief ChangeCurrentData select item in combobox by id diff --git a/src/app/dialogs/tools/dialogtool.h b/src/app/dialogs/tools/dialogtool.h index 8b2bdd757..8cd7cece1 100644 --- a/src/app/dialogs/tools/dialogtool.h +++ b/src/app/dialogs/tools/dialogtool.h @@ -225,8 +225,7 @@ protected: void FillComboBoxLineColors(QComboBox *box)const; virtual void CheckState(); - QString GetTypeLine(const QComboBox *box)const; - QString GetLineColor(const QComboBox *box)const; + QString GetComboBoxCurrentData(const QComboBox *box)const; template void ShowVariable(const QMap var); void ChangeCurrentData(QComboBox *box, const QVariant &value) const; diff --git a/src/app/dialogs/tools/dialogtriangle.cpp b/src/app/dialogs/tools/dialogtriangle.cpp index e5555ef2a..ce88a6b80 100644 --- a/src/app/dialogs/tools/dialogtriangle.cpp +++ b/src/app/dialogs/tools/dialogtriangle.cpp @@ -161,10 +161,10 @@ void DialogTriangle::SaveData() { pointName = ui->lineEditNamePoint->text(); - line->setPoint1Id(getAxisP1Id()); - line->setPoint2Id(getAxisP2Id()); - line->setHypotenuseP1Id(getFirstPointId()); - line->setHypotenuseP2Id(getSecondPointId()); + line->setPoint1Id(GetAxisP1Id()); + line->setPoint2Id(GetAxisP2Id()); + line->setHypotenuseP1Id(GetFirstPointId()); + line->setHypotenuseP2Id(GetSecondPointId()); line->RefreshGeometry(); } @@ -218,10 +218,10 @@ void DialogTriangle::ShowVisualization() //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setPointName set name of point + * @brief SetPointName set name of point * @param value name */ -void DialogTriangle::setPointName(const QString &value) +void DialogTriangle::SetPointName(const QString &value) { pointName = value; ui->lineEditNamePoint->setText(pointName); @@ -229,10 +229,10 @@ void DialogTriangle::setPointName(const QString &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setSecondPointId set id of second point + * @brief SetSecondPointId set id of second point * @param value id */ -void DialogTriangle::setSecondPointId(const quint32 &value) +void DialogTriangle::SetSecondPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxSecondPoint, value); line->setHypotenuseP2Id(value); @@ -240,10 +240,10 @@ void DialogTriangle::setSecondPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setFirstPointId set id of first point + * @brief SetFirstPointId set id of first point * @param value id */ -void DialogTriangle::setFirstPointId(const quint32 &value) +void DialogTriangle::SetFirstPointId(const quint32 &value) { setCurrentPointId(ui->comboBoxFirstPoint, value); line->setHypotenuseP1Id(value); @@ -251,10 +251,10 @@ void DialogTriangle::setFirstPointId(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setAxisP2Id set id second point of axis + * @brief SetAxisP2Id set id second point of axis * @param value id */ -void DialogTriangle::setAxisP2Id(const quint32 &value) +void DialogTriangle::SetAxisP2Id(const quint32 &value) { setCurrentPointId(ui->comboBoxAxisP2, value); line->setPoint2Id(value); @@ -262,10 +262,10 @@ void DialogTriangle::setAxisP2Id(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setAxisP1Id set id first point of axis + * @brief SetAxisP1Id set id first point of axis * @param value id */ -void DialogTriangle::setAxisP1Id(const quint32 &value) +void DialogTriangle::SetAxisP1Id(const quint32 &value) { setCurrentPointId(ui->comboBoxAxisP1, value); line->setPoint1Id(value); @@ -273,40 +273,40 @@ void DialogTriangle::setAxisP1Id(const quint32 &value) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getAxisP1Id return id first point of axis + * @brief GetAxisP1Id return id first point of axis * @return id */ -quint32 DialogTriangle::getAxisP1Id() const +quint32 DialogTriangle::GetAxisP1Id() const { return getCurrentObjectId(ui->comboBoxAxisP1); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getAxisP2Id return id second point of axis + * @brief GetAxisP2Id return id second point of axis * @return id */ -quint32 DialogTriangle::getAxisP2Id() const +quint32 DialogTriangle::GetAxisP2Id() const { return getCurrentObjectId(ui->comboBoxAxisP2); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getFirstPointId return id of first point + * @brief GetFirstPointId return id of first point * @return id */ -quint32 DialogTriangle::getFirstPointId() const +quint32 DialogTriangle::GetFirstPointId() const { return getCurrentObjectId(ui->comboBoxFirstPoint); } //--------------------------------------------------------------------------------------------------------------------- /** - * @brief getSecondPointId return id of second point + * @brief GetSecondPointId return id of second point * @return id */ -quint32 DialogTriangle::getSecondPointId() const +quint32 DialogTriangle::GetSecondPointId() const { return getCurrentObjectId(ui->comboBoxSecondPoint); } diff --git a/src/app/dialogs/tools/dialogtriangle.h b/src/app/dialogs/tools/dialogtriangle.h index 22774a7a0..e4d3d3236 100644 --- a/src/app/dialogs/tools/dialogtriangle.h +++ b/src/app/dialogs/tools/dialogtriangle.h @@ -48,19 +48,19 @@ public: DialogTriangle(const VContainer *data, const quint32 &toolId, QWidget *parent = nullptr); ~DialogTriangle(); - quint32 getAxisP1Id() const; - void setAxisP1Id(const quint32 &value); + quint32 GetAxisP1Id() const; + void SetAxisP1Id(const quint32 &value); - quint32 getAxisP2Id() const; - void setAxisP2Id(const quint32 &value); + quint32 GetAxisP2Id() const; + void SetAxisP2Id(const quint32 &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); - void setPointName(const QString &value); + void SetPointName(const QString &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); virtual void PointNameChanged(); diff --git a/src/app/geometry/varc.cpp b/src/app/geometry/varc.cpp index 2f9c434b8..c407012a3 100644 --- a/src/app/geometry/varc.cpp +++ b/src/app/geometry/varc.cpp @@ -255,7 +255,7 @@ QString VArc::GetFormulaF1() const //--------------------------------------------------------------------------------------------------------------------- void VArc::SetFormulaF1(const VFormula &value) { - d->formulaF1 = value.getFormula(FormulaType::FromUser); + d->formulaF1 = value.GetFormula(FormulaType::FromUser); d->f1 = value.getDoubleValue(); } @@ -282,7 +282,7 @@ QString VArc::GetFormulaF2() const //--------------------------------------------------------------------------------------------------------------------- void VArc::SetFormulaF2(const VFormula &value) { - d->formulaF2 = value.getFormula(FormulaType::FromUser); + d->formulaF2 = value.GetFormula(FormulaType::FromUser); d->f2 = value.getDoubleValue(); } @@ -309,7 +309,7 @@ QString VArc::GetFormulaRadius() const //--------------------------------------------------------------------------------------------------------------------- void VArc::SetFormulaRadius(const VFormula &value) { - d->formulaRadius = value.getFormula(FormulaType::FromUser); + d->formulaRadius = value.GetFormula(FormulaType::FromUser); d->radius = value.getDoubleValue(); } diff --git a/src/app/geometry/vsplinepath.cpp b/src/app/geometry/vsplinepath.cpp index 832b313d2..068c910cb 100644 --- a/src/app/geometry/vsplinepath.cpp +++ b/src/app/geometry/vsplinepath.cpp @@ -255,13 +255,13 @@ void VSplinePath::Clear() } //--------------------------------------------------------------------------------------------------------------------- -qreal VSplinePath::getKCurve() const +qreal VSplinePath::GetKCurve() const { return d->kCurve; } //--------------------------------------------------------------------------------------------------------------------- -void VSplinePath::setKCurve(const qreal &value) +void VSplinePath::SetKCurve(const qreal &value) { if (value > 0) { diff --git a/src/app/geometry/vsplinepath.h b/src/app/geometry/vsplinepath.h index e562be232..b3de10941 100644 --- a/src/app/geometry/vsplinepath.h +++ b/src/app/geometry/vsplinepath.h @@ -118,15 +118,15 @@ public: */ void Clear(); /** - * @brief getKCurve return coefficient of curvature spline path. + * @brief GetKCurve return coefficient of curvature spline path. * @return coefficient of curvature spline. */ - qreal getKCurve() const; + qreal GetKCurve() const; /** - * @brief setKCurve set coefficient of curvature spline path. + * @brief SetKCurve set coefficient of curvature spline path. * @param value coefficient of curvature spline path. */ - void setKCurve(const qreal &value); + void SetKCurve(const qreal &value); /** * @brief GetPoint pointer to list spline point. * @return list. @@ -160,8 +160,8 @@ public: * * VSplinePoint splP1 = splPath->at(p1); * VSplinePoint splP2 = splPath->at(p2); - * VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->getKCurve()); - * VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->getKCurve()); + * VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->GetKCurve()); + * VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->GetKCurve()); * @param length length first spline path. * @param p1 index first spline point in list. * @param p2 index second spline point in list. diff --git a/src/app/tools/drawTools/vdrawtool.cpp b/src/app/tools/drawTools/vdrawtool.cpp index 0902db7ba..1f3989b77 100644 --- a/src/app/tools/drawTools/vdrawtool.cpp +++ b/src/app/tools/drawTools/vdrawtool.cpp @@ -241,10 +241,10 @@ qreal VDrawTool::CheckFormula(const quint32 &toolId, QString &formula, VContaine { DialogEditWrongFormula *dialog = new DialogEditWrongFormula(data, toolId, qApp->getMainWindow()); dialog->setWindowTitle(tr("Edit wrong formula")); - dialog->setFormula(formula); + dialog->SetFormula(formula); if (dialog->exec() == QDialog::Accepted) { - formula = dialog->getFormula(); + formula = dialog->GetFormula(); /* Need delete dialog here because parser in dialog don't allow use correct separator for parsing * here. */ delete dialog; diff --git a/src/app/tools/drawTools/vtoolalongline.cpp b/src/app/tools/drawTools/vtoolalongline.cpp index 442e8d69a..ec04e8c46 100644 --- a/src/app/tools/drawTools/vtoolalongline.cpp +++ b/src/app/tools/drawTools/vtoolalongline.cpp @@ -144,10 +144,10 @@ void VToolAlongLine::SaveDialog(QDomElement &domElement) DialogAlongLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); - doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula()); - doc->SetAttribute(domElement, AttrFirstPoint, dialogTool->getFirstPointId()); - doc->SetAttribute(domElement, AttrSecondPoint, dialogTool->getSecondPointId()); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); + doc->SetAttribute(domElement, AttrFirstPoint, dialogTool->GetFirstPointId()); + doc->SetAttribute(domElement, AttrSecondPoint, dialogTool->GetSecondPointId()); } //--------------------------------------------------------------------------------------------------------------------- @@ -169,13 +169,13 @@ void VToolAlongLine::SaveOptions(QDomElement &tag, QSharedPointer &obj } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolAlongLine::getSecondPointId() const +quint32 VToolAlongLine::GetSecondPointId() const { return secondPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolAlongLine::setSecondPointId(const quint32 &value) +void VToolAlongLine::SetSecondPointId(const quint32 &value) { if (value != NULL_ID) { @@ -231,11 +231,11 @@ void VToolAlongLine::setDialog() DialogAlongLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setTypeLine(typeLine); - dialogTool->setFormula(formulaLength); - dialogTool->setFirstPointId(basePointId); - dialogTool->setSecondPointId(secondPointId); - dialogTool->setPointName(p->name()); + dialogTool->SetTypeLine(typeLine); + dialogTool->SetFormula(formulaLength); + dialogTool->SetFirstPointId(basePointId); + dialogTool->SetSecondPointId(secondPointId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -251,10 +251,10 @@ VToolAlongLine* VToolAlongLine::Create(DialogTool *dialog, VMainGraphicsScene *s SCASSERT(dialog != nullptr); DialogAlongLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - QString formula = dialogTool->getFormula(); - const quint32 firstPointId = dialogTool->getFirstPointId(); - const quint32 secondPointId = dialogTool->getSecondPointId(); - const QString typeLine = dialogTool->getTypeLine(); + QString formula = dialogTool->GetFormula(); + const quint32 firstPointId = dialogTool->GetFirstPointId(); + const quint32 secondPointId = dialogTool->GetSecondPointId(); + const QString typeLine = dialogTool->GetTypeLine(); const QString pointName = dialogTool->getPointName(); VToolAlongLine *point=nullptr; point = Create(0, pointName, typeLine, formula, firstPointId, secondPointId, 5, 10, scene, doc, data, diff --git a/src/app/tools/drawTools/vtoolalongline.h b/src/app/tools/drawTools/vtoolalongline.h index 09b44ef31..f83355a94 100644 --- a/src/app/tools/drawTools/vtoolalongline.h +++ b/src/app/tools/drawTools/vtoolalongline.h @@ -52,8 +52,8 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::AlongLine)}; - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); virtual void ShowVisualization(bool show); public slots: virtual void FullUpdateFromFile(); diff --git a/src/app/tools/drawTools/vtoolarc.cpp b/src/app/tools/drawTools/vtoolarc.cpp index 5e245d2e3..2e5b2eada 100644 --- a/src/app/tools/drawTools/vtoolarc.cpp +++ b/src/app/tools/drawTools/vtoolarc.cpp @@ -197,7 +197,7 @@ void VToolArc::setCenter(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -VFormula VToolArc::getFormulaRadius() const +VFormula VToolArc::GetFormulaRadius() const { QSharedPointer arc = VAbstractTool::data.GeometricObject(id); SCASSERT(arc.isNull() == false); @@ -210,7 +210,7 @@ VFormula VToolArc::getFormulaRadius() const } //--------------------------------------------------------------------------------------------------------------------- -void VToolArc::setFormulaRadius(const VFormula &value) +void VToolArc::SetFormulaRadius(const VFormula &value) { if (value.error() == false) { @@ -225,7 +225,7 @@ void VToolArc::setFormulaRadius(const VFormula &value) } //--------------------------------------------------------------------------------------------------------------------- -VFormula VToolArc::getFormulaF1() const +VFormula VToolArc::GetFormulaF1() const { QSharedPointer arc = VAbstractTool::data.GeometricObject(id); SCASSERT(arc.isNull() == false); @@ -238,7 +238,7 @@ VFormula VToolArc::getFormulaF1() const } //--------------------------------------------------------------------------------------------------------------------- -void VToolArc::setFormulaF1(const VFormula &value) +void VToolArc::SetFormulaF1(const VFormula &value) { if (value.error() == false) { @@ -254,7 +254,7 @@ void VToolArc::setFormulaF1(const VFormula &value) } //--------------------------------------------------------------------------------------------------------------------- -VFormula VToolArc::getFormulaF2() const +VFormula VToolArc::GetFormulaF2() const { QSharedPointer arc = VAbstractTool::data.GeometricObject(id); SCASSERT(arc.isNull() == false); @@ -267,7 +267,7 @@ VFormula VToolArc::getFormulaF2() const } //--------------------------------------------------------------------------------------------------------------------- -void VToolArc::setFormulaF2(const VFormula &value) +void VToolArc::SetFormulaF2(const VFormula &value) { if (value.error() == false) { diff --git a/src/app/tools/drawTools/vtoolarc.h b/src/app/tools/drawTools/vtoolarc.h index b8264694b..d142b06b6 100644 --- a/src/app/tools/drawTools/vtoolarc.h +++ b/src/app/tools/drawTools/vtoolarc.h @@ -55,14 +55,14 @@ public: quint32 getCenter() const; void setCenter(const quint32 &value); - VFormula getFormulaRadius() const; - void setFormulaRadius(const VFormula &value); + VFormula GetFormulaRadius() const; + void SetFormulaRadius(const VFormula &value); - VFormula getFormulaF1() const; - void setFormulaF1(const VFormula &value); + VFormula GetFormulaF1() const; + void SetFormulaF1(const VFormula &value); - VFormula getFormulaF2() const; - void setFormulaF2(const VFormula &value); + VFormula GetFormulaF2() const; + void SetFormulaF2(const VFormula &value); virtual void ShowVisualization(bool show); protected: diff --git a/src/app/tools/drawTools/vtoolbisector.cpp b/src/app/tools/drawTools/vtoolbisector.cpp index 96b42eadc..0052b60af 100644 --- a/src/app/tools/drawTools/vtoolbisector.cpp +++ b/src/app/tools/drawTools/vtoolbisector.cpp @@ -112,12 +112,12 @@ void VToolBisector::setDialog() DialogBisector *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setTypeLine(typeLine); - dialogTool->setFormula(formulaLength); - dialogTool->setFirstPointId(firstPointId); - dialogTool->setSecondPointId(basePointId); - dialogTool->setThirdPointId(thirdPointId); - dialogTool->setPointName(p->name()); + dialogTool->SetTypeLine(typeLine); + dialogTool->SetFormula(formulaLength); + dialogTool->SetFirstPointId(firstPointId); + dialogTool->SetSecondPointId(basePointId); + dialogTool->SetThirdPointId(thirdPointId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -134,11 +134,11 @@ VToolBisector* VToolBisector::Create(DialogTool *dialog, VMainGraphicsScene *sce SCASSERT(dialog != nullptr); DialogBisector *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - QString formula = dialogTool->getFormula(); - const quint32 firstPointId = dialogTool->getFirstPointId(); - const quint32 secondPointId = dialogTool->getSecondPointId(); - const quint32 thirdPointId = dialogTool->getThirdPointId(); - const QString typeLine = dialogTool->getTypeLine(); + QString formula = dialogTool->GetFormula(); + const quint32 firstPointId = dialogTool->GetFirstPointId(); + const quint32 secondPointId = dialogTool->GetSecondPointId(); + const quint32 thirdPointId = dialogTool->GetThirdPointId(); + const QString typeLine = dialogTool->GetTypeLine(); const QString pointName = dialogTool->getPointName(); VToolBisector *point = nullptr; point=Create(0, formula, firstPointId, secondPointId, thirdPointId, typeLine, pointName, 5, 10, scene, doc, data, @@ -296,11 +296,11 @@ void VToolBisector::SaveDialog(QDomElement &domElement) DialogBisector *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); - doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula()); - doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPointId())); - doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPointId())); - doc->SetAttribute(domElement, AttrThirdPoint, QString().setNum(dialogTool->getThirdPointId())); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); + doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); + doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId())); + doc->SetAttribute(domElement, AttrThirdPoint, QString().setNum(dialogTool->GetThirdPointId())); } //--------------------------------------------------------------------------------------------------------------------- @@ -323,13 +323,13 @@ void VToolBisector::SaveOptions(QDomElement &tag, QSharedPointer &obj) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolBisector::getThirdPointId() const +quint32 VToolBisector::GetThirdPointId() const { return thirdPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolBisector::setThirdPointId(const quint32 &value) +void VToolBisector::SetThirdPointId(const quint32 &value) { if (value != NULL_ID) { @@ -377,13 +377,13 @@ void VToolBisector::ShowVisualization(bool show) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolBisector::getFirstPointId() const +quint32 VToolBisector::GetFirstPointId() const { return firstPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolBisector::setFirstPointId(const quint32 &value) +void VToolBisector::SetFirstPointId(const quint32 &value) { if (value != NULL_ID) { diff --git a/src/app/tools/drawTools/vtoolbisector.h b/src/app/tools/drawTools/vtoolbisector.h index 42ac58091..93aa64302 100644 --- a/src/app/tools/drawTools/vtoolbisector.h +++ b/src/app/tools/drawTools/vtoolbisector.h @@ -56,11 +56,11 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::Bisector)}; - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getThirdPointId() const; - void setThirdPointId(const quint32 &value); + quint32 GetThirdPointId() const; + void SetThirdPointId(const quint32 &value); virtual void ShowVisualization(bool show); public slots: diff --git a/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp b/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp index 3aa46c33f..a33b1bca7 100644 --- a/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp +++ b/src/app/tools/drawTools/vtoolcurveintersectaxis.cpp @@ -66,11 +66,11 @@ void VToolCurveIntersectAxis::setDialog() DialogCurveIntersectAxis *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setTypeLine(typeLine); - dialogTool->setAngle(formulaAngle); - dialogTool->setBasePointId(basePointId); + dialogTool->SetTypeLine(typeLine); + dialogTool->SetAngle(formulaAngle); + dialogTool->SetBasePointId(basePointId); dialogTool->setCurveId(curveId); - dialogTool->setPointName(p->name()); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -81,9 +81,9 @@ VToolCurveIntersectAxis *VToolCurveIntersectAxis::Create(DialogTool *dialog, VMa DialogCurveIntersectAxis *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool); const QString pointName = dialogTool->getPointName(); - const QString typeLine = dialogTool->getTypeLine(); - QString formulaAngle = dialogTool->getAngle(); - const quint32 basePointId = dialogTool->getBasePointId(); + const QString typeLine = dialogTool->GetTypeLine(); + QString formulaAngle = dialogTool->GetAngle(); + const quint32 basePointId = dialogTool->GetBasePointId(); const quint32 curveId = dialogTool->getCurveId(); VToolCurveIntersectAxis *point = nullptr; @@ -173,7 +173,7 @@ QPointF VToolCurveIntersectAxis::FindPoint(const QPointF &point, qreal angle, } //--------------------------------------------------------------------------------------------------------------------- -VFormula VToolCurveIntersectAxis::getFormulaAngle() const +VFormula VToolCurveIntersectAxis::GetFormulaAngle() const { VFormula fAngle(formulaAngle, getData()); fAngle.setCheckZero(false); @@ -183,11 +183,11 @@ VFormula VToolCurveIntersectAxis::getFormulaAngle() const } //--------------------------------------------------------------------------------------------------------------------- -void VToolCurveIntersectAxis::setFormulaAngle(const VFormula &value) +void VToolCurveIntersectAxis::SetFormulaAngle(const VFormula &value) { if (value.error() == false) { - formulaAngle = value.getFormula(FormulaType::FromUser); + formulaAngle = value.GetFormula(FormulaType::FromUser); QSharedPointer obj = VAbstractTool::data.GetGObject(id); SaveOption(obj); @@ -226,7 +226,7 @@ void VToolCurveIntersectAxis::ShowVisualization(bool show) visual->setPoint1Id(curveId); visual->setAxisPointId(basePointId); - visual->setAngle(qApp->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->FormulaToUser(formulaAngle)); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); vis = visual; @@ -265,7 +265,7 @@ void VToolCurveIntersectAxis::FullUpdateFromFile() VisToolCurveIntersectAxis *visual = qobject_cast(vis); visual->setPoint1Id(curveId); visual->setAxisPointId(basePointId); - visual->setAngle(qApp->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->FormulaToUser(formulaAngle)); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } @@ -290,9 +290,9 @@ void VToolCurveIntersectAxis::SaveDialog(QDomElement &domElement) DialogCurveIntersectAxis *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); - doc->SetAttribute(domElement, AttrAngle, dialogTool->getAngle()); - doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->getBasePointId())); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); + doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); doc->SetAttribute(domElement, AttrCurve, QString().setNum(dialogTool->getCurveId())); } diff --git a/src/app/tools/drawTools/vtoolcurveintersectaxis.h b/src/app/tools/drawTools/vtoolcurveintersectaxis.h index fedd78c8b..bf583f3f5 100644 --- a/src/app/tools/drawTools/vtoolcurveintersectaxis.h +++ b/src/app/tools/drawTools/vtoolcurveintersectaxis.h @@ -54,8 +54,8 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::CurveIntersectAxis)}; - VFormula getFormulaAngle() const; - void setFormulaAngle(const VFormula &value); + VFormula GetFormulaAngle() const; + void SetFormulaAngle(const VFormula &value); quint32 getCurveId() const; void setCurveId(const quint32 &value); diff --git a/src/app/tools/drawTools/vtoolcut.cpp b/src/app/tools/drawTools/vtoolcut.cpp index ff2365dcd..606bbb09f 100644 --- a/src/app/tools/drawTools/vtoolcut.cpp +++ b/src/app/tools/drawTools/vtoolcut.cpp @@ -94,7 +94,7 @@ void VToolCut::setCurveCutId(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -VFormula VToolCut::getFormula() const +VFormula VToolCut::GetFormula() const { VFormula val(formula, getData()); val.setCheckZero(true); @@ -104,11 +104,11 @@ VFormula VToolCut::getFormula() const } //--------------------------------------------------------------------------------------------------------------------- -void VToolCut::setFormula(const VFormula &value) +void VToolCut::SetFormula(const VFormula &value) { if (value.error() == false) { - formula = value.getFormula(FormulaType::FromUser); + formula = value.GetFormula(FormulaType::FromUser); QSharedPointer obj = VAbstractTool::data.GetGObject(id); SaveOption(obj); diff --git a/src/app/tools/drawTools/vtoolcut.h b/src/app/tools/drawTools/vtoolcut.h index f99e82847..3ec1a1544 100644 --- a/src/app/tools/drawTools/vtoolcut.h +++ b/src/app/tools/drawTools/vtoolcut.h @@ -43,8 +43,8 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::Cut)}; - VFormula getFormula() const; - void setFormula(const VFormula &value); + VFormula GetFormula() const; + void SetFormula(const VFormula &value); quint32 getCurveCutId() const; void setCurveCutId(const quint32 &value); diff --git a/src/app/tools/drawTools/vtoolcutarc.cpp b/src/app/tools/drawTools/vtoolcutarc.cpp index 1bdb9d222..7e5f4a6e8 100644 --- a/src/app/tools/drawTools/vtoolcutarc.cpp +++ b/src/app/tools/drawTools/vtoolcutarc.cpp @@ -77,9 +77,9 @@ void VToolCutArc::setDialog() DialogCutArc *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer point = VAbstractTool::data.GeometricObject(id); - dialogTool->setFormula(formula); + dialogTool->SetFormula(formula); dialogTool->setArcId(curveCutId); - dialogTool->setPointName(point->name()); + dialogTool->SetPointName(point->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -96,7 +96,7 @@ VToolCutArc* VToolCutArc::Create(DialogTool *dialog, VMainGraphicsScene *scene, DialogCutArc *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QString pointName = dialogTool->getPointName(); - QString formula = dialogTool->getFormula(); + QString formula = dialogTool->GetFormula(); const quint32 arcId = dialogTool->getArcId(); VToolCutArc* point = nullptr; point=Create(0, pointName, formula, arcId, 5, 10, scene, doc, data, Document::FullParse, Source::FromGui); @@ -271,7 +271,7 @@ void VToolCutArc::SaveDialog(QDomElement &domElement) DialogCutArc *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula()); + doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrArc, QString().setNum(dialogTool->getArcId())); } diff --git a/src/app/tools/drawTools/vtoolcutspline.cpp b/src/app/tools/drawTools/vtoolcutspline.cpp index eed9eba7a..a86dafc33 100644 --- a/src/app/tools/drawTools/vtoolcutspline.cpp +++ b/src/app/tools/drawTools/vtoolcutspline.cpp @@ -76,9 +76,9 @@ void VToolCutSpline::setDialog() DialogCutSpline *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer point = VAbstractTool::data.GeometricObject(id); - dialogTool->setFormula(formula); + dialogTool->SetFormula(formula); dialogTool->setSplineId(curveCutId); - dialogTool->setPointName(point->name()); + dialogTool->SetPointName(point->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -96,7 +96,7 @@ VToolCutSpline* VToolCutSpline::Create(DialogTool *dialog, VMainGraphicsScene *s DialogCutSpline *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QString pointName = dialogTool->getPointName(); - QString formula = dialogTool->getFormula(); + QString formula = dialogTool->GetFormula(); const quint32 splineId = dialogTool->getSplineId(); VToolCutSpline* point = nullptr; point = Create(0, pointName, formula, splineId, 5, 10, scene, doc, data, Document::FullParse, Source::FromGui); @@ -282,7 +282,7 @@ void VToolCutSpline::SaveDialog(QDomElement &domElement) DialogCutSpline *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula()); + doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrSpline, QString().setNum(dialogTool->getSplineId())); } diff --git a/src/app/tools/drawTools/vtoolcutsplinepath.cpp b/src/app/tools/drawTools/vtoolcutsplinepath.cpp index 92678b185..dc088e998 100644 --- a/src/app/tools/drawTools/vtoolcutsplinepath.cpp +++ b/src/app/tools/drawTools/vtoolcutsplinepath.cpp @@ -80,9 +80,9 @@ void VToolCutSplinePath::setDialog() DialogCutSplinePath *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer point = VAbstractTool::data.GeometricObject(id); - dialogTool->setFormula(formula); + dialogTool->SetFormula(formula); dialogTool->setSplinePathId(curveCutId); - dialogTool->setPointName(point->name()); + dialogTool->SetPointName(point->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -100,7 +100,7 @@ VToolCutSplinePath* VToolCutSplinePath::Create(DialogTool *dialog, VMainGraphics DialogCutSplinePath *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QString pointName = dialogTool->getPointName(); - QString formula = dialogTool->getFormula(); + QString formula = dialogTool->GetFormula(); const quint32 splinePathId = dialogTool->getSplinePathId(); VToolCutSplinePath* point = nullptr; point = Create(0, pointName, formula, splinePathId, 5, 10, scene, doc, data, Document::FullParse, Source::FromGui); @@ -156,8 +156,8 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString VSplinePoint splP1 = splPath->at(p1); VSplinePoint splP2 = splPath->at(p2); - const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->getKCurve()); - const VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->getKCurve()); + const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, *p, splPath->GetKCurve()); + const VSpline spl2 = VSpline(*p, spl2p2, spl2p3, splP2.P(), splPath->GetKCurve()); VSplinePath *splPath1 = new VSplinePath(); VSplinePath *splPath2 = new VSplinePath(); @@ -191,8 +191,8 @@ VToolCutSplinePath* VToolCutSplinePath::Create(const quint32 _id, const QString splPath2->append(splPath->at(i)); } } - splPath1->setKCurve(splPath->getKCurve()); - splPath2->setKCurve(splPath->getKCurve()); + splPath1->SetKCurve(splPath->GetKCurve()); + splPath2->SetKCurve(splPath->GetKCurve()); splPath1->setMaxCountPoints(splPath->CountPoint()); splPath2->setMaxCountPoints(splPath->CountPoint()); @@ -331,7 +331,7 @@ void VToolCutSplinePath::SaveDialog(QDomElement &domElement) DialogCutSplinePath *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula()); + doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); doc->SetAttribute(domElement, AttrSplinePath, QString().setNum(dialogTool->getSplinePathId())); } diff --git a/src/app/tools/drawTools/vtoolendline.cpp b/src/app/tools/drawTools/vtoolendline.cpp index 3bc0fc2f8..6476e145d 100644 --- a/src/app/tools/drawTools/vtoolendline.cpp +++ b/src/app/tools/drawTools/vtoolendline.cpp @@ -79,11 +79,11 @@ void VToolEndLine::setDialog() DialogEndLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setTypeLine(typeLine); - dialogTool->setFormula(formulaLength); - dialogTool->setAngle(formulaAngle); - dialogTool->setBasePointId(basePointId); - dialogTool->setPointName(p->name()); + dialogTool->SetTypeLine(typeLine); + dialogTool->SetFormula(formulaLength); + dialogTool->SetAngle(formulaAngle); + dialogTool->SetBasePointId(basePointId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -101,10 +101,10 @@ VToolEndLine* VToolEndLine::Create(DialogTool *dialog, VMainGraphicsScene *scene DialogEndLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool); const QString pointName = dialogTool->getPointName(); - const QString typeLine = dialogTool->getTypeLine(); - QString formulaLength = dialogTool->getFormula(); - QString formulaAngle = dialogTool->getAngle(); - const quint32 basePointId = dialogTool->getBasePointId(); + const QString typeLine = dialogTool->GetTypeLine(); + QString formulaLength = dialogTool->GetFormula(); + QString formulaAngle = dialogTool->GetAngle(); + const quint32 basePointId = dialogTool->GetBasePointId(); VToolEndLine *point = nullptr; point=Create(0, pointName, typeLine, formulaLength, formulaAngle, basePointId, 5, 10, scene, doc, data, @@ -196,7 +196,7 @@ void VToolEndLine::FullUpdateFromFile() VisToolEndLine *visual = qobject_cast(vis); visual->setPoint1Id(basePointId); visual->setLength(qApp->FormulaToUser(formulaLength)); - visual->setAngle(qApp->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->FormulaToUser(formulaAngle)); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } @@ -232,10 +232,10 @@ void VToolEndLine::SaveDialog(QDomElement &domElement) DialogEndLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); - doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula()); - doc->SetAttribute(domElement, AttrAngle, dialogTool->getAngle()); - doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->getBasePointId())); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); + doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); + doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); } //--------------------------------------------------------------------------------------------------------------------- @@ -257,7 +257,7 @@ void VToolEndLine::SaveOptions(QDomElement &tag, QSharedPointer &obj) } //--------------------------------------------------------------------------------------------------------------------- -VFormula VToolEndLine::getFormulaAngle() const +VFormula VToolEndLine::GetFormulaAngle() const { VFormula fAngle(formulaAngle, getData()); fAngle.setCheckZero(false); @@ -267,11 +267,11 @@ VFormula VToolEndLine::getFormulaAngle() const } //--------------------------------------------------------------------------------------------------------------------- -void VToolEndLine::setFormulaAngle(const VFormula &value) +void VToolEndLine::SetFormulaAngle(const VFormula &value) { if (value.error() == false) { - formulaAngle = value.getFormula(FormulaType::FromUser); + formulaAngle = value.GetFormula(FormulaType::FromUser); QSharedPointer obj = VAbstractTool::data.GetGObject(id); SaveOption(obj); @@ -292,7 +292,7 @@ void VToolEndLine::ShowVisualization(bool show) visual->setPoint1Id(basePointId); visual->setLength(qApp->FormulaToUser(formulaLength)); - visual->setAngle(qApp->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->FormulaToUser(formulaAngle)); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); vis = visual; diff --git a/src/app/tools/drawTools/vtoolendline.h b/src/app/tools/drawTools/vtoolendline.h index b60014931..b92500f39 100644 --- a/src/app/tools/drawTools/vtoolendline.h +++ b/src/app/tools/drawTools/vtoolendline.h @@ -53,8 +53,8 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::EndLine)}; - VFormula getFormulaAngle() const; - void setFormulaAngle(const VFormula &value); + VFormula GetFormulaAngle() const; + void SetFormulaAngle(const VFormula &value); virtual void ShowVisualization(bool show); public slots: virtual void FullUpdateFromFile(); diff --git a/src/app/tools/drawTools/vtoolheight.cpp b/src/app/tools/drawTools/vtoolheight.cpp index fd878a4ee..6b3acfdab 100644 --- a/src/app/tools/drawTools/vtoolheight.cpp +++ b/src/app/tools/drawTools/vtoolheight.cpp @@ -72,11 +72,11 @@ void VToolHeight::setDialog() DialogHeight *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setTypeLine(typeLine); - dialogTool->setBasePointId(basePointId); - dialogTool->setP1LineId(p1LineId); - dialogTool->setP2LineId(p2LineId); - dialogTool->setPointName(p->name()); + dialogTool->SetTypeLine(typeLine); + dialogTool->SetBasePointId(basePointId); + dialogTool->SetP1LineId(p1LineId); + dialogTool->SetP2LineId(p2LineId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -95,10 +95,10 @@ VToolHeight* VToolHeight::Create(DialogTool *dialog, VMainGraphicsScene *scene, SCASSERT(dialogTool != nullptr); disconnect(doc, &VPattern::FullUpdateFromFile, dialogTool, &DialogHeight::UpdateList); const QString pointName = dialogTool->getPointName(); - const QString typeLine = dialogTool->getTypeLine(); - const quint32 basePointId = dialogTool->getBasePointId(); - const quint32 p1LineId = dialogTool->getP1LineId(); - const quint32 p2LineId = dialogTool->getP2LineId(); + const QString typeLine = dialogTool->GetTypeLine(); + const quint32 basePointId = dialogTool->GetBasePointId(); + const quint32 p1LineId = dialogTool->GetP1LineId(); + const quint32 p2LineId = dialogTool->GetP2LineId(); VToolHeight *point = nullptr; point = Create(0, pointName, typeLine, basePointId, p1LineId, p2LineId, 5, 10, scene, doc, data, @@ -244,10 +244,10 @@ void VToolHeight::SaveDialog(QDomElement &domElement) DialogHeight *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); - doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->getBasePointId())); - doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->getP1LineId())); - doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->getP2LineId())); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); + doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1LineId())); + doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2LineId())); } //--------------------------------------------------------------------------------------------------------------------- @@ -269,13 +269,13 @@ void VToolHeight::SaveOptions(QDomElement &tag, QSharedPointer &obj) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolHeight::getP2LineId() const +quint32 VToolHeight::GetP2LineId() const { return p2LineId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolHeight::setP2LineId(const quint32 &value) +void VToolHeight::SetP2LineId(const quint32 &value) { if (value != NULL_ID) { @@ -322,13 +322,13 @@ void VToolHeight::ShowVisualization(bool show) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolHeight::getP1LineId() const +quint32 VToolHeight::GetP1LineId() const { return p1LineId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolHeight::setP1LineId(const quint32 &value) +void VToolHeight::SetP1LineId(const quint32 &value) { if (value != NULL_ID) { diff --git a/src/app/tools/drawTools/vtoolheight.h b/src/app/tools/drawTools/vtoolheight.h index 79dcfe08f..9fc74299a 100644 --- a/src/app/tools/drawTools/vtoolheight.h +++ b/src/app/tools/drawTools/vtoolheight.h @@ -53,11 +53,11 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::Height)}; - quint32 getP1LineId() const; - void setP1LineId(const quint32 &value); + quint32 GetP1LineId() const; + void SetP1LineId(const quint32 &value); - quint32 getP2LineId() const; - void setP2LineId(const quint32 &value); + quint32 GetP2LineId() const; + void SetP2LineId(const quint32 &value); virtual void ShowVisualization(bool show); public slots: diff --git a/src/app/tools/drawTools/vtoolline.cpp b/src/app/tools/drawTools/vtoolline.cpp index a38daf2d5..618448867 100644 --- a/src/app/tools/drawTools/vtoolline.cpp +++ b/src/app/tools/drawTools/vtoolline.cpp @@ -82,9 +82,9 @@ void VToolLine::setDialog() SCASSERT(dialog != nullptr); DialogLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - dialogTool->setFirstPoint(firstPoint); - dialogTool->setSecondPoint(secondPoint); - dialogTool->setTypeLine(typeLine); + dialogTool->SetFirstPoint(firstPoint); + dialogTool->SetSecondPoint(secondPoint); + dialogTool->SetTypeLine(typeLine); } //--------------------------------------------------------------------------------------------------------------------- @@ -100,9 +100,9 @@ VToolLine *VToolLine::Create(DialogTool *dialog, VMainGraphicsScene *scene, VPat SCASSERT(dialog != nullptr); DialogLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - const quint32 firstPoint = dialogTool->getFirstPoint(); - const quint32 secondPoint = dialogTool->getSecondPoint(); - const QString typeLine = dialogTool->getTypeLine(); + const quint32 firstPoint = dialogTool->GetFirstPoint(); + const quint32 secondPoint = dialogTool->GetSecondPoint(); + const QString typeLine = dialogTool->GetTypeLine(); VToolLine *line = nullptr; line = Create(0, firstPoint, secondPoint, typeLine, scene, doc, data, Document::FullParse, Source::FromGui); @@ -366,9 +366,9 @@ void VToolLine::SaveDialog(QDomElement &domElement) SCASSERT(dialog != nullptr); DialogLine *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPoint())); - doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPoint())); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); + doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPoint())); + doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPoint())); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); } //--------------------------------------------------------------------------------------------------------------------- @@ -383,13 +383,13 @@ void VToolLine::SaveOptions(QDomElement &tag, QSharedPointer &obj) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLine::getSecondPoint() const +quint32 VToolLine::GetSecondPoint() const { return secondPoint; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLine::setSecondPoint(const quint32 &value) +void VToolLine::SetSecondPoint(const quint32 &value) { if (value != NULL_ID) { @@ -435,7 +435,7 @@ void VToolLine::ShowVisualization(bool show) } //--------------------------------------------------------------------------------------------------------------------- -void VToolLine::setTypeLine(const QString &value) +void VToolLine::SetTypeLine(const QString &value) { typeLine = value; @@ -444,13 +444,13 @@ void VToolLine::setTypeLine(const QString &value) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLine::getFirstPoint() const +quint32 VToolLine::GetFirstPoint() const { return firstPoint; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLine::setFirstPoint(const quint32 &value) +void VToolLine::SetFirstPoint(const quint32 &value) { if (value != NULL_ID) { diff --git a/src/app/tools/drawTools/vtoolline.h b/src/app/tools/drawTools/vtoolline.h index 1d852957a..7e2d55d17 100644 --- a/src/app/tools/drawTools/vtoolline.h +++ b/src/app/tools/drawTools/vtoolline.h @@ -51,14 +51,14 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::Line)}; virtual QString getTagName() const; - quint32 getFirstPoint() const; - void setFirstPoint(const quint32 &value); + quint32 GetFirstPoint() const; + void SetFirstPoint(const quint32 &value); - quint32 getSecondPoint() const; - void setSecondPoint(const quint32 &value); + quint32 GetSecondPoint() const; + void SetSecondPoint(const quint32 &value); virtual void ShowVisualization(bool show); - virtual void setTypeLine(const QString &value); + virtual void SetTypeLine(const QString &value); public slots: virtual void FullUpdateFromFile(); virtual void ChangedActivDraw(const QString &newName); diff --git a/src/app/tools/drawTools/vtoollineintersect.cpp b/src/app/tools/drawTools/vtoollineintersect.cpp index 973836f6a..fcb27fcde 100644 --- a/src/app/tools/drawTools/vtoollineintersect.cpp +++ b/src/app/tools/drawTools/vtoollineintersect.cpp @@ -74,11 +74,11 @@ void VToolLineIntersect::setDialog() DialogLineIntersect *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setP1Line1(p1Line1); - dialogTool->setP2Line1(p2Line1); - dialogTool->setP1Line2(p1Line2); - dialogTool->setP2Line2(p2Line2); - dialogTool->setPointName(p->name()); + dialogTool->SetP1Line1(p1Line1); + dialogTool->SetP2Line1(p2Line1); + dialogTool->SetP1Line2(p1Line2); + dialogTool->SetP2Line2(p2Line2); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -96,10 +96,10 @@ VToolLineIntersect* VToolLineIntersect::Create(DialogTool *dialog, VMainGraphics SCASSERT(dialog != nullptr); DialogLineIntersect *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - const quint32 p1Line1Id = dialogTool->getP1Line1(); - const quint32 p2Line1Id = dialogTool->getP2Line1(); - const quint32 p1Line2Id = dialogTool->getP1Line2(); - const quint32 p2Line2Id = dialogTool->getP2Line2(); + const quint32 p1Line1Id = dialogTool->GetP1Line1(); + const quint32 p2Line1Id = dialogTool->GetP2Line1(); + const quint32 p1Line2Id = dialogTool->GetP1Line2(); + const quint32 p2Line2Id = dialogTool->GetP2Line2(); const QString pointName = dialogTool->getPointName(); VToolLineIntersect* point = nullptr; point = Create(0, p1Line1Id, p2Line1Id, p1Line2Id, p2Line2Id, pointName, 5, 10, scene, doc, data, @@ -267,10 +267,10 @@ void VToolLineIntersect::SaveDialog(QDomElement &domElement) DialogLineIntersect *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrP1Line1, QString().setNum(dialogTool->getP1Line1())); - doc->SetAttribute(domElement, AttrP2Line1, QString().setNum(dialogTool->getP2Line1())); - doc->SetAttribute(domElement, AttrP1Line2, QString().setNum(dialogTool->getP1Line2())); - doc->SetAttribute(domElement, AttrP2Line2, QString().setNum(dialogTool->getP2Line2())); + doc->SetAttribute(domElement, AttrP1Line1, QString().setNum(dialogTool->GetP1Line1())); + doc->SetAttribute(domElement, AttrP2Line1, QString().setNum(dialogTool->GetP2Line1())); + doc->SetAttribute(domElement, AttrP1Line2, QString().setNum(dialogTool->GetP1Line2())); + doc->SetAttribute(domElement, AttrP2Line2, QString().setNum(dialogTool->GetP2Line2())); } //--------------------------------------------------------------------------------------------------------------------- @@ -292,13 +292,13 @@ void VToolLineIntersect::SaveOptions(QDomElement &tag, QSharedPointer } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLineIntersect::getP2Line2() const +quint32 VToolLineIntersect::GetP2Line2() const { return p2Line2; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLineIntersect::setP2Line2(const quint32 &value) +void VToolLineIntersect::SetP2Line2(const quint32 &value) { if (value != NULL_ID) { @@ -345,13 +345,13 @@ void VToolLineIntersect::ShowVisualization(bool show) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLineIntersect::getP1Line2() const +quint32 VToolLineIntersect::GetP1Line2() const { return p1Line2; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLineIntersect::setP1Line2(const quint32 &value) +void VToolLineIntersect::SetP1Line2(const quint32 &value) { if (value != NULL_ID) { @@ -363,13 +363,13 @@ void VToolLineIntersect::setP1Line2(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLineIntersect::getP2Line1() const +quint32 VToolLineIntersect::GetP2Line1() const { return p2Line1; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLineIntersect::setP2Line1(const quint32 &value) +void VToolLineIntersect::SetP2Line1(const quint32 &value) { if (value != NULL_ID) { @@ -381,13 +381,13 @@ void VToolLineIntersect::setP2Line1(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLineIntersect::getP1Line1() const +quint32 VToolLineIntersect::GetP1Line1() const { return p1Line1; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLineIntersect::setP1Line1(const quint32 &value) +void VToolLineIntersect::SetP1Line1(const quint32 &value) { if (value != NULL_ID) { diff --git a/src/app/tools/drawTools/vtoollineintersect.h b/src/app/tools/drawTools/vtoollineintersect.h index dd28d16b9..2322ed7f1 100644 --- a/src/app/tools/drawTools/vtoollineintersect.h +++ b/src/app/tools/drawTools/vtoollineintersect.h @@ -51,17 +51,17 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::LineIntersect)}; - quint32 getP1Line1() const; - void setP1Line1(const quint32 &value); + quint32 GetP1Line1() const; + void SetP1Line1(const quint32 &value); - quint32 getP2Line1() const; - void setP2Line1(const quint32 &value); + quint32 GetP2Line1() const; + void SetP2Line1(const quint32 &value); - quint32 getP1Line2() const; - void setP1Line2(const quint32 &value); + quint32 GetP1Line2() const; + void SetP1Line2(const quint32 &value); - quint32 getP2Line2() const; - void setP2Line2(const quint32 &value); + quint32 GetP2Line2() const; + void SetP2Line2(const quint32 &value); virtual void ShowVisualization(bool show); public slots: diff --git a/src/app/tools/drawTools/vtoollineintersectaxis.cpp b/src/app/tools/drawTools/vtoollineintersectaxis.cpp index 53f88fb5a..00b0b6dd4 100644 --- a/src/app/tools/drawTools/vtoollineintersectaxis.cpp +++ b/src/app/tools/drawTools/vtoollineintersectaxis.cpp @@ -67,12 +67,12 @@ void VToolLineIntersectAxis::setDialog() DialogLineIntersectAxis *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setTypeLine(typeLine); - dialogTool->setAngle(formulaAngle); - dialogTool->setBasePointId(basePointId); - dialogTool->setFirstPointId(firstPointId); - dialogTool->setSecondPointId(secondPointId); - dialogTool->setPointName(p->name()); + dialogTool->SetTypeLine(typeLine); + dialogTool->SetAngle(formulaAngle); + dialogTool->SetBasePointId(basePointId); + dialogTool->SetFirstPointId(firstPointId); + dialogTool->SetSecondPointId(secondPointId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -83,11 +83,11 @@ VToolLineIntersectAxis *VToolLineIntersectAxis::Create(DialogTool *dialog, VMain DialogLineIntersectAxis *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool); const QString pointName = dialogTool->getPointName(); - const QString typeLine = dialogTool->getTypeLine(); - QString formulaAngle = dialogTool->getAngle(); - const quint32 basePointId = dialogTool->getBasePointId(); - const quint32 firstPointId = dialogTool->getFirstPointId(); - const quint32 secondPointId = dialogTool->getSecondPointId(); + const QString typeLine = dialogTool->GetTypeLine(); + QString formulaAngle = dialogTool->GetAngle(); + const quint32 basePointId = dialogTool->GetBasePointId(); + const quint32 firstPointId = dialogTool->GetFirstPointId(); + const quint32 secondPointId = dialogTool->GetSecondPointId(); VToolLineIntersectAxis *point = nullptr; point=Create(0, pointName, typeLine, formulaAngle, basePointId, firstPointId, secondPointId, 5, 10, scene, doc, @@ -170,7 +170,7 @@ QPointF VToolLineIntersectAxis::FindPoint(const QLineF &axis, const QLineF &line } //--------------------------------------------------------------------------------------------------------------------- -VFormula VToolLineIntersectAxis::getFormulaAngle() const +VFormula VToolLineIntersectAxis::GetFormulaAngle() const { VFormula fAngle(formulaAngle, getData()); fAngle.setCheckZero(false); @@ -180,11 +180,11 @@ VFormula VToolLineIntersectAxis::getFormulaAngle() const } //--------------------------------------------------------------------------------------------------------------------- -void VToolLineIntersectAxis::setFormulaAngle(const VFormula &value) +void VToolLineIntersectAxis::SetFormulaAngle(const VFormula &value) { if (value.error() == false) { - formulaAngle = value.getFormula(FormulaType::FromUser); + formulaAngle = value.GetFormula(FormulaType::FromUser); QSharedPointer obj = VAbstractTool::data.GetGObject(id); SaveOption(obj); @@ -192,13 +192,13 @@ void VToolLineIntersectAxis::setFormulaAngle(const VFormula &value) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLineIntersectAxis::getFirstPointId() const +quint32 VToolLineIntersectAxis::GetFirstPointId() const { return firstPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLineIntersectAxis::setFirstPointId(const quint32 &value) +void VToolLineIntersectAxis::SetFirstPointId(const quint32 &value) { if (value != NULL_ID) { @@ -210,13 +210,13 @@ void VToolLineIntersectAxis::setFirstPointId(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLineIntersectAxis::getSecondPointId() const +quint32 VToolLineIntersectAxis::GetSecondPointId() const { return secondPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLineIntersectAxis::setSecondPointId(const quint32 &value) +void VToolLineIntersectAxis::SetSecondPointId(const quint32 &value) { if (value != NULL_ID) { @@ -242,7 +242,7 @@ void VToolLineIntersectAxis::ShowVisualization(bool show) visual->setPoint1Id(firstPointId); visual->setPoint2Id(secondPointId); visual->setAxisPointId(basePointId); - visual->setAngle(qApp->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->FormulaToUser(formulaAngle)); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); vis = visual; @@ -283,7 +283,7 @@ void VToolLineIntersectAxis::FullUpdateFromFile() visual->setPoint1Id(firstPointId); visual->setPoint2Id(secondPointId); visual->setAxisPointId(basePointId); - visual->setAngle(qApp->FormulaToUser(formulaAngle)); + visual->SetAngle(qApp->FormulaToUser(formulaAngle)); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } @@ -308,11 +308,11 @@ void VToolLineIntersectAxis::SaveDialog(QDomElement &domElement) DialogLineIntersectAxis *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); - doc->SetAttribute(domElement, AttrAngle, dialogTool->getAngle()); - doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->getBasePointId())); - doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->getFirstPointId())); - doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->getSecondPointId())); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrAngle, dialogTool->GetAngle()); + doc->SetAttribute(domElement, AttrBasePoint, QString().setNum(dialogTool->GetBasePointId())); + doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetFirstPointId())); + doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetSecondPointId())); } //--------------------------------------------------------------------------------------------------------------------- diff --git a/src/app/tools/drawTools/vtoollineintersectaxis.h b/src/app/tools/drawTools/vtoollineintersectaxis.h index b7ddb00d7..9de3f38c4 100644 --- a/src/app/tools/drawTools/vtoollineintersectaxis.h +++ b/src/app/tools/drawTools/vtoollineintersectaxis.h @@ -55,14 +55,14 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::LineIntersectAxis)}; - VFormula getFormulaAngle() const; - void setFormulaAngle(const VFormula &value); + VFormula GetFormulaAngle() const; + void SetFormulaAngle(const VFormula &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); virtual void ShowVisualization(bool show); public slots: diff --git a/src/app/tools/drawTools/vtoollinepoint.cpp b/src/app/tools/drawTools/vtoollinepoint.cpp index 1213c85ca..59823347e 100644 --- a/src/app/tools/drawTools/vtoollinepoint.cpp +++ b/src/app/tools/drawTools/vtoollinepoint.cpp @@ -108,13 +108,13 @@ void VToolLinePoint::SetFactor(qreal factor) } //--------------------------------------------------------------------------------------------------------------------- -qreal VToolLinePoint::getAngle() const +qreal VToolLinePoint::GetAngle() const { return angle; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLinePoint::setAngle(const qreal &value) +void VToolLinePoint::SetAngle(const qreal &value) { angle = value; QSharedPointer obj = VAbstractTool::data.GetGObject(id); @@ -122,13 +122,13 @@ void VToolLinePoint::setAngle(const qreal &value) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolLinePoint::getBasePointId() const +quint32 VToolLinePoint::GetBasePointId() const { return basePointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolLinePoint::setBasePointId(const quint32 &value) +void VToolLinePoint::SetBasePointId(const quint32 &value) { if (value != NULL_ID) { @@ -140,7 +140,7 @@ void VToolLinePoint::setBasePointId(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -VFormula VToolLinePoint::getFormulaLength() const +VFormula VToolLinePoint::GetFormulaLength() const { VFormula fLength(formulaLength, this->getData()); fLength.setCheckZero(true); @@ -151,11 +151,11 @@ VFormula VToolLinePoint::getFormulaLength() const } //--------------------------------------------------------------------------------------------------------------------- -void VToolLinePoint::setFormulaLength(const VFormula &value) +void VToolLinePoint::SetFormulaLength(const VFormula &value) { if (value.error() == false) { - formulaLength = value.getFormula(FormulaType::FromUser); + formulaLength = value.GetFormula(FormulaType::FromUser); QSharedPointer obj = VAbstractTool::data.GetGObject(id); SaveOption(obj); diff --git a/src/app/tools/drawTools/vtoollinepoint.h b/src/app/tools/drawTools/vtoollinepoint.h index 3c29e248e..d605dd797 100644 --- a/src/app/tools/drawTools/vtoollinepoint.h +++ b/src/app/tools/drawTools/vtoollinepoint.h @@ -44,14 +44,14 @@ public: virtual ~VToolLinePoint(); virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::LinePoint)}; - VFormula getFormulaLength() const; - void setFormulaLength(const VFormula &value); + VFormula GetFormulaLength() const; + void SetFormulaLength(const VFormula &value); - quint32 getBasePointId() const; - void setBasePointId(const quint32 &value); + quint32 GetBasePointId() const; + void SetBasePointId(const quint32 &value); - qreal getAngle() const; - void setAngle(const qreal &value); + qreal GetAngle() const; + void SetAngle(const qreal &value); public slots: virtual void ChangedActivDraw(const QString &newName); diff --git a/src/app/tools/drawTools/vtoolnormal.cpp b/src/app/tools/drawTools/vtoolnormal.cpp index c4d9f9268..117519d46 100644 --- a/src/app/tools/drawTools/vtoolnormal.cpp +++ b/src/app/tools/drawTools/vtoolnormal.cpp @@ -75,12 +75,12 @@ void VToolNormal::setDialog() DialogNormal *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setTypeLine(typeLine); - dialogTool->setFormula(formulaLength); - dialogTool->setAngle(angle); - dialogTool->setFirstPointId(basePointId); - dialogTool->setSecondPointId(secondPointId); - dialogTool->setPointName(p->name()); + dialogTool->SetTypeLine(typeLine); + dialogTool->SetFormula(formulaLength); + dialogTool->SetAngle(angle); + dialogTool->SetFirstPointId(basePointId); + dialogTool->SetSecondPointId(secondPointId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -96,12 +96,12 @@ VToolNormal* VToolNormal::Create(DialogTool *dialog, VMainGraphicsScene *scene, SCASSERT(dialog != nullptr); DialogNormal *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - QString formula = dialogTool->getFormula(); - const quint32 firstPointId = dialogTool->getFirstPointId(); - const quint32 secondPointId = dialogTool->getSecondPointId(); - const QString typeLine = dialogTool->getTypeLine(); + QString formula = dialogTool->GetFormula(); + const quint32 firstPointId = dialogTool->GetFirstPointId(); + const quint32 secondPointId = dialogTool->GetSecondPointId(); + const QString typeLine = dialogTool->GetTypeLine(); const QString pointName = dialogTool->getPointName(); - const qreal angle = dialogTool->getAngle(); + const qreal angle = dialogTool->GetAngle(); VToolNormal *point = nullptr; point=Create(0, formula, firstPointId, secondPointId, typeLine, pointName, angle, 5, 10, scene, doc, data, Document::FullParse, Source::FromGui); @@ -217,7 +217,7 @@ void VToolNormal::FullUpdateFromFile() visual->setPoint1Id(basePointId); visual->setPoint2Id(secondPointId); visual->setLength(qApp->FormulaToUser(formulaLength)); - visual->setAngle(angle); + visual->SetAngle(angle); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); } @@ -274,11 +274,11 @@ void VToolNormal::SaveDialog(QDomElement &domElement) DialogNormal *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); - doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula()); - doc->SetAttribute(domElement, AttrAngle, QString().setNum(dialogTool->getAngle())); - doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPointId())); - doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPointId())); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); + doc->SetAttribute(domElement, AttrAngle, QString().setNum(dialogTool->GetAngle())); + doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); + doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId())); } //--------------------------------------------------------------------------------------------------------------------- @@ -301,13 +301,13 @@ void VToolNormal::SaveOptions(QDomElement &tag, QSharedPointer &obj) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolNormal::getSecondPointId() const +quint32 VToolNormal::GetSecondPointId() const { return secondPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolNormal::setSecondPointId(const quint32 &value) +void VToolNormal::SetSecondPointId(const quint32 &value) { if (value != NULL_ID) { @@ -333,7 +333,7 @@ void VToolNormal::ShowVisualization(bool show) visual->setPoint1Id(basePointId); visual->setPoint2Id(secondPointId); visual->setLength(qApp->FormulaToUser(formulaLength)); - visual->setAngle(angle); + visual->SetAngle(angle); visual->setLineStyle(VAbstractTool::LineStyleToPenStyle(typeLine)); visual->RefreshGeometry(); vis = visual; diff --git a/src/app/tools/drawTools/vtoolnormal.h b/src/app/tools/drawTools/vtoolnormal.h index 3c85cb439..02da26909 100644 --- a/src/app/tools/drawTools/vtoolnormal.h +++ b/src/app/tools/drawTools/vtoolnormal.h @@ -53,8 +53,8 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::Normal)}; - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); virtual void ShowVisualization(bool show); public slots: diff --git a/src/app/tools/drawTools/vtoolpointofcontact.cpp b/src/app/tools/drawTools/vtoolpointofcontact.cpp index 96e4eabe7..cc56bf460 100644 --- a/src/app/tools/drawTools/vtoolpointofcontact.cpp +++ b/src/app/tools/drawTools/vtoolpointofcontact.cpp @@ -78,9 +78,9 @@ void VToolPointOfContact::setDialog() const QSharedPointer p = VAbstractTool::data.GeometricObject(id); dialogTool->setRadius(arcRadius); dialogTool->setCenter(center); - dialogTool->setFirstPoint(firstPointId); - dialogTool->setSecondPoint(secondPointId); - dialogTool->setPointName(p->name()); + dialogTool->SetFirstPoint(firstPointId); + dialogTool->SetSecondPoint(secondPointId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -138,8 +138,8 @@ VToolPointOfContact* VToolPointOfContact::Create(DialogTool *dialog, VMainGraphi SCASSERT(dialogTool != nullptr); QString radius = dialogTool->getRadius(); const quint32 center = dialogTool->getCenter(); - const quint32 firstPointId = dialogTool->getFirstPoint(); - const quint32 secondPointId = dialogTool->getSecondPoint(); + const quint32 firstPointId = dialogTool->GetFirstPoint(); + const quint32 secondPointId = dialogTool->GetSecondPoint(); const QString pointName = dialogTool->getPointName(); VToolPointOfContact *point = nullptr; point=Create(0, radius, center, firstPointId, secondPointId, pointName, 5, 10, scene, doc, data, @@ -300,8 +300,8 @@ void VToolPointOfContact::SaveDialog(QDomElement &domElement) doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); doc->SetAttribute(domElement, AttrRadius, dialogTool->getRadius()); doc->SetAttribute(domElement, AttrCenter, QString().setNum(dialogTool->getCenter())); - doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPoint())); - doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPoint())); + doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPoint())); + doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPoint())); } //--------------------------------------------------------------------------------------------------------------------- @@ -323,13 +323,13 @@ void VToolPointOfContact::SaveOptions(QDomElement &tag, QSharedPointer } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolPointOfContact::getSecondPointId() const +quint32 VToolPointOfContact::GetSecondPointId() const { return secondPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolPointOfContact::setSecondPointId(const quint32 &value) +void VToolPointOfContact::SetSecondPointId(const quint32 &value) { secondPointId = value; } @@ -370,13 +370,13 @@ void VToolPointOfContact::ShowVisualization(bool show) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolPointOfContact::getFirstPointId() const +quint32 VToolPointOfContact::GetFirstPointId() const { return firstPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolPointOfContact::setFirstPointId(const quint32 &value) +void VToolPointOfContact::SetFirstPointId(const quint32 &value) { firstPointId = value; } @@ -415,7 +415,7 @@ void VToolPointOfContact::setArcRadius(const VFormula &value) { if (value.error() == false) { - arcRadius = value.getFormula(FormulaType::FromUser); + arcRadius = value.GetFormula(FormulaType::FromUser); QSharedPointer obj = VAbstractTool::data.GetGObject(id); SaveOption(obj); diff --git a/src/app/tools/drawTools/vtoolpointofcontact.h b/src/app/tools/drawTools/vtoolpointofcontact.h index 1cbc84815..7c58a9ac7 100644 --- a/src/app/tools/drawTools/vtoolpointofcontact.h +++ b/src/app/tools/drawTools/vtoolpointofcontact.h @@ -62,11 +62,11 @@ public: quint32 getCenter() const; void setCenter(const quint32 &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); virtual void ShowVisualization(bool show); public slots: diff --git a/src/app/tools/drawTools/vtoolpointofintersection.cpp b/src/app/tools/drawTools/vtoolpointofintersection.cpp index 52ef71132..f8f771723 100644 --- a/src/app/tools/drawTools/vtoolpointofintersection.cpp +++ b/src/app/tools/drawTools/vtoolpointofintersection.cpp @@ -70,9 +70,9 @@ void VToolPointOfIntersection::setDialog() DialogPointOfIntersection *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setFirstPointId(firstPointId); - dialogTool->setSecondPointId(secondPointId); - dialogTool->setPointName(p->name()); + dialogTool->SetFirstPointId(firstPointId); + dialogTool->SetSecondPointId(secondPointId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -90,8 +90,8 @@ VToolPointOfIntersection *VToolPointOfIntersection::Create(DialogTool *dialog, V SCASSERT(dialog != nullptr); DialogPointOfIntersection *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - const quint32 firstPointId = dialogTool->getFirstPointId(); - const quint32 secondPointId = dialogTool->getSecondPointId(); + const quint32 firstPointId = dialogTool->GetFirstPointId(); + const quint32 secondPointId = dialogTool->GetSecondPointId(); const QString pointName = dialogTool->getPointName(); VToolPointOfIntersection *point = nullptr; point = Create(0, pointName, firstPointId, secondPointId, 5, 10, scene, doc, data, Document::FullParse, @@ -222,8 +222,8 @@ void VToolPointOfIntersection::SaveDialog(QDomElement &domElement) DialogPointOfIntersection *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPointId())); - doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPointId())); + doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); + doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId())); } //--------------------------------------------------------------------------------------------------------------------- @@ -243,13 +243,13 @@ void VToolPointOfIntersection::SaveOptions(QDomElement &tag, QSharedPointer(Tool::PointOfIntersection) }; - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); virtual void ShowVisualization(bool show); public slots: diff --git a/src/app/tools/drawTools/vtoolshoulderpoint.cpp b/src/app/tools/drawTools/vtoolshoulderpoint.cpp index 312aa5d9d..338ae3e75 100644 --- a/src/app/tools/drawTools/vtoolshoulderpoint.cpp +++ b/src/app/tools/drawTools/vtoolshoulderpoint.cpp @@ -74,12 +74,12 @@ void VToolShoulderPoint::setDialog() DialogShoulderPoint *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setTypeLine(typeLine); - dialogTool->setFormula(formulaLength); - dialogTool->setP1Line(basePointId); - dialogTool->setP2Line(p2Line); - dialogTool->setP3(pShoulder); - dialogTool->setPointName(p->name()); + dialogTool->SetTypeLine(typeLine); + dialogTool->SetFormula(formulaLength); + dialogTool->SetP1Line(basePointId); + dialogTool->SetP2Line(p2Line); + dialogTool->SetP3(pShoulder); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -134,11 +134,11 @@ VToolShoulderPoint* VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphics SCASSERT(dialog != nullptr); DialogShoulderPoint *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool); - QString formula = dialogTool->getFormula(); - const quint32 p1Line = dialogTool->getP1Line(); - const quint32 p2Line = dialogTool->getP2Line(); - const quint32 pShoulder = dialogTool->getP3(); - const QString typeLine = dialogTool->getTypeLine(); + QString formula = dialogTool->GetFormula(); + const quint32 p1Line = dialogTool->GetP1Line(); + const quint32 p2Line = dialogTool->GetP2Line(); + const quint32 pShoulder = dialogTool->GetP3(); + const QString typeLine = dialogTool->GetTypeLine(); const QString pointName = dialogTool->getPointName(); VToolShoulderPoint * point = nullptr; point=Create(0, formula, p1Line, p2Line, pShoulder, typeLine, pointName, 5, 10, scene, doc, data, @@ -300,11 +300,11 @@ void VToolShoulderPoint::SaveDialog(QDomElement &domElement) DialogShoulderPoint *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrTypeLine, dialogTool->getTypeLine()); - doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula()); - doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->getP1Line())); - doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->getP2Line())); - doc->SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogTool->getP3())); + doc->SetAttribute(domElement, AttrTypeLine, dialogTool->GetTypeLine()); + doc->SetAttribute(domElement, AttrLength, dialogTool->GetFormula()); + doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->GetP1Line())); + doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->GetP2Line())); + doc->SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogTool->GetP3())); } //--------------------------------------------------------------------------------------------------------------------- @@ -381,13 +381,13 @@ void VToolShoulderPoint::ShowVisualization(bool show) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolShoulderPoint::getP2Line() const +quint32 VToolShoulderPoint::GetP2Line() const { return p2Line; } //--------------------------------------------------------------------------------------------------------------------- -void VToolShoulderPoint::setP2Line(const quint32 &value) +void VToolShoulderPoint::SetP2Line(const quint32 &value) { if (value != NULL_ID) { diff --git a/src/app/tools/drawTools/vtoolshoulderpoint.h b/src/app/tools/drawTools/vtoolshoulderpoint.h index ef8c08df6..32bdd257c 100644 --- a/src/app/tools/drawTools/vtoolshoulderpoint.h +++ b/src/app/tools/drawTools/vtoolshoulderpoint.h @@ -54,8 +54,8 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::ShoulderPoint) }; - quint32 getP2Line() const; - void setP2Line(const quint32 &value); + quint32 GetP2Line() const; + void SetP2Line(const quint32 &value); quint32 getPShoulder() const; void setPShoulder(const quint32 &value); diff --git a/src/app/tools/drawTools/vtoolsinglepoint.cpp b/src/app/tools/drawTools/vtoolsinglepoint.cpp index 1320132b6..204849b16 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.cpp +++ b/src/app/tools/drawTools/vtoolsinglepoint.cpp @@ -58,7 +58,7 @@ VToolSinglePoint::VToolSinglePoint (VPattern *doc, VContainer *data, quint32 id, this->setFlag(QGraphicsItem::ItemIsMovable, true); this->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); this->setFlag(QGraphicsItem::ItemIsFocusable, false); - setColorLabel(Qt::black); + SetColorLabel(Qt::black); if (typeCreation == Source::FromGui) { AddToFile(); @@ -79,7 +79,7 @@ void VToolSinglePoint::setDialog() DialogSinglePoint *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setData(p->name(), p->toQPointF()); + dialogTool->SetData(p->name(), p->toQPointF()); } //--------------------------------------------------------------------------------------------------------------------- @@ -194,7 +194,7 @@ void VToolSinglePoint::SaveDialog(QDomElement &domElement) SCASSERT(dialog != nullptr); DialogSinglePoint *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - QPointF p = dialogTool->getPoint(); + QPointF p = dialogTool->GetPoint(); QString name = dialogTool->getPointName(); doc->SetAttribute(domElement, AttrName, name); doc->SetAttribute(domElement, AttrX, QString().setNum(qApp->fromPixel(p.x()))); @@ -241,10 +241,10 @@ void VToolSinglePoint::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) //--------------------------------------------------------------------------------------------------------------------- /** - * @brief setColorLabel change color for label and label line. + * @brief SetColorLabel change color for label and label line. * @param color new color. */ -void VToolSinglePoint::setColorLabel(const Qt::GlobalColor &color) +void VToolSinglePoint::SetColorLabel(const Qt::GlobalColor &color) { namePoint->setBrush(color); lineName->setPen(QPen(color, qApp->toPixel(qApp->widthHairLine())/factor)); @@ -310,12 +310,12 @@ void VToolSinglePoint::ChangedActivDraw(const QString &newName) if (nameActivDraw == newName) { this->setEnabled(true); - setColorLabel(Qt::black); + SetColorLabel(Qt::black); } else { this->setEnabled(false); - setColorLabel(Qt::gray); + SetColorLabel(Qt::gray); } } diff --git a/src/app/tools/drawTools/vtoolsinglepoint.h b/src/app/tools/drawTools/vtoolsinglepoint.h index 2e9aa14f1..3cbcdb202 100644 --- a/src/app/tools/drawTools/vtoolsinglepoint.h +++ b/src/app/tools/drawTools/vtoolsinglepoint.h @@ -71,7 +71,7 @@ protected: private: QString namePP; QString mPath; - void setColorLabel(const Qt::GlobalColor & color); + void SetColorLabel(const Qt::GlobalColor & color); }; diff --git a/src/app/tools/drawTools/vtoolspline.cpp b/src/app/tools/drawTools/vtoolspline.cpp index 96eddc313..979c51751 100644 --- a/src/app/tools/drawTools/vtoolspline.cpp +++ b/src/app/tools/drawTools/vtoolspline.cpp @@ -98,13 +98,13 @@ void VToolSpline::setDialog() DialogSpline *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer spl = VAbstractTool::data.GeometricObject(id); - dialogTool->setP1(spl->GetP1().id()); - dialogTool->setP4(spl->GetP4().id()); - dialogTool->setAngle1(spl->GetAngle1()); - dialogTool->setAngle2(spl->GetAngle2()); - dialogTool->setKAsm1(spl->GetKasm1()); - dialogTool->setKAsm2(spl->GetKasm2()); - dialogTool->setKCurve(spl->GetKcurve()); + dialogTool->SetP1(spl->GetP1().id()); + dialogTool->SetP4(spl->GetP4().id()); + dialogTool->SetAngle1(spl->GetAngle1()); + dialogTool->SetAngle2(spl->GetAngle2()); + dialogTool->SetKAsm1(spl->GetKasm1()); + dialogTool->SetKAsm2(spl->GetKasm2()); + dialogTool->SetKCurve(spl->GetKcurve()); } //--------------------------------------------------------------------------------------------------------------------- @@ -121,13 +121,13 @@ VToolSpline* VToolSpline::Create(DialogTool *dialog, VMainGraphicsScene *scene, SCASSERT(dialog != nullptr); DialogSpline *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - const quint32 p1 = dialogTool->getP1(); - const quint32 p4 = dialogTool->getP4(); - const qreal kAsm1 = dialogTool->getKAsm1(); - const qreal kAsm2 = dialogTool->getKAsm2(); - const qreal angle1 = dialogTool->getAngle1(); - const qreal angle2 = dialogTool->getAngle2(); - const qreal kCurve = dialogTool->getKCurve(); + const quint32 p1 = dialogTool->GetP1(); + const quint32 p4 = dialogTool->GetP4(); + const qreal kAsm1 = dialogTool->GetKAsm1(); + const qreal kAsm2 = dialogTool->GetKAsm2(); + const qreal angle1 = dialogTool->GetAngle1(); + const qreal angle2 = dialogTool->GetAngle2(); + const qreal kCurve = dialogTool->GetKCurve(); VToolSpline *spl = nullptr; spl = Create(0, p1, p4, kAsm1, kAsm2, angle1, angle2, kCurve, scene, doc, data, Document::FullParse, Source::FromGui); @@ -225,11 +225,11 @@ void VToolSpline::ShowVisualization(bool show) const QSharedPointer spl = VAbstractTool::data.GeometricObject(id); visual->setPoint1Id(spl->GetP1().id()); visual->setPoint4Id(spl->GetP4().id()); - visual->setAngle1(spl->GetAngle1()); - visual->setAngle2(spl->GetAngle2()); - visual->setKAsm1(spl->GetKasm1()); - visual->setKAsm2(spl->GetKasm2()); - visual->setKCurve(spl->GetKcurve()); + visual->SetAngle1(spl->GetAngle1()); + visual->SetAngle2(spl->GetAngle2()); + visual->SetKAsm1(spl->GetKasm1()); + visual->SetKAsm2(spl->GetKasm2()); + visual->SetKCurve(spl->GetKcurve()); visual->RefreshGeometry(); vis = visual; } @@ -308,10 +308,10 @@ void VToolSpline::SaveDialog(QDomElement &domElement) DialogSpline *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - VPointF point1 = *VAbstractTool::data.GeometricObject(dialogTool->getP1()); - VPointF point4 = *VAbstractTool::data.GeometricObject(dialogTool->getP4()); - VSpline spl = VSpline (point1, point4, dialogTool->getAngle1(), dialogTool->getAngle2(), - dialogTool->getKAsm1(), dialogTool->getKAsm2(), dialogTool->getKCurve()); + VPointF point1 = *VAbstractTool::data.GeometricObject(dialogTool->GetP1()); + VPointF point4 = *VAbstractTool::data.GeometricObject(dialogTool->GetP4()); + VSpline spl = VSpline (point1, point4, dialogTool->GetAngle1(), dialogTool->GetAngle2(), + dialogTool->GetKAsm1(), dialogTool->GetKAsm2(), dialogTool->GetKCurve()); controlPoints[0]->blockSignals(true); controlPoints[1]->blockSignals(true); @@ -322,7 +322,7 @@ void VToolSpline::SaveDialog(QDomElement &domElement) controlPoints[0]->blockSignals(false); controlPoints[1]->blockSignals(false); - spl = VSpline (point1, controlPoints[0]->pos(), controlPoints[1]->pos(), point4, dialogTool->getKCurve()); + spl = VSpline (point1, controlPoints[0]->pos(), controlPoints[1]->pos(), point4, dialogTool->GetKCurve()); doc->SetAttribute(domElement, AttrPoint1, spl.GetP1().id()); doc->SetAttribute(domElement, AttrPoint4, spl.GetP4().id()); @@ -388,11 +388,11 @@ void VToolSpline::RefreshGeometry() VisToolSpline *visual = qobject_cast(vis); visual->setPoint1Id(spl->GetP1().id()); visual->setPoint4Id(spl->GetP4().id()); - visual->setAngle1(spl->GetAngle1()); - visual->setAngle2(spl->GetAngle2()); - visual->setKAsm1(spl->GetKasm1()); - visual->setKAsm2(spl->GetKasm2()); - visual->setKCurve(spl->GetKcurve()); + visual->SetAngle1(spl->GetAngle1()); + visual->SetAngle2(spl->GetAngle2()); + visual->SetKAsm1(spl->GetKasm1()); + visual->SetKAsm2(spl->GetKasm2()); + visual->SetKCurve(spl->GetKcurve()); visual->RefreshGeometry(); } } diff --git a/src/app/tools/drawTools/vtoolsplinepath.cpp b/src/app/tools/drawTools/vtoolsplinepath.cpp index c77576e96..601ac96b5 100644 --- a/src/app/tools/drawTools/vtoolsplinepath.cpp +++ b/src/app/tools/drawTools/vtoolsplinepath.cpp @@ -237,7 +237,7 @@ void VToolSplinePath::RefreshSplinePath(VSplinePath &splPath) controlPoints[j-1]->blockSignals(false); spl = VSpline (spl.GetP1(), controlPoints[j-2]->pos(), controlPoints[j-1]->pos(), spl.GetP4(), - splPath.getKCurve()); + splPath.GetKCurve()); UpdateControlPoints(spl, splPath, i); } } @@ -340,7 +340,7 @@ void VToolSplinePath::RefreshDataInFile() } VSplinePath splPath = *VAbstractTool::data.GeometricObject(id); RefreshSplinePath(splPath); - doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.getKCurve())); + doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.GetKCurve())); UpdatePathPoint(doc, domElement, splPath); } @@ -388,7 +388,7 @@ void VToolSplinePath::SaveDialog(QDomElement &domElement) VSplinePath splPath = dialogTool->GetPath(); RefreshSplinePath(splPath); - doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.getKCurve())); + doc->SetAttribute(domElement, AttrKCurve, QString().setNum(splPath.GetKCurve())); UpdatePathPoint(doc, domElement, splPath); } @@ -400,7 +400,7 @@ void VToolSplinePath::SaveOptions(QDomElement &tag, QSharedPointer &ob doc->SetAttribute(tag, VDomDocument::AttrId, id); doc->SetAttribute(tag, AttrType, ToolType); - doc->SetAttribute(tag, AttrKCurve, splPath->getKCurve()); + doc->SetAttribute(tag, AttrKCurve, splPath->GetKCurve()); doc->RemoveAllChild(tag); for (qint32 i = 0; i < splPath->CountPoint(); ++i) diff --git a/src/app/tools/drawTools/vtooltriangle.cpp b/src/app/tools/drawTools/vtooltriangle.cpp index 6afce72ce..bf7d99bdd 100644 --- a/src/app/tools/drawTools/vtooltriangle.cpp +++ b/src/app/tools/drawTools/vtooltriangle.cpp @@ -74,11 +74,11 @@ void VToolTriangle::setDialog() DialogTriangle *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); const QSharedPointer p = VAbstractTool::data.GeometricObject(id); - dialogTool->setAxisP1Id(axisP1Id); - dialogTool->setAxisP2Id(axisP2Id); - dialogTool->setFirstPointId(firstPointId); - dialogTool->setSecondPointId(secondPointId); - dialogTool->setPointName(p->name()); + dialogTool->SetAxisP1Id(axisP1Id); + dialogTool->SetAxisP2Id(axisP2Id); + dialogTool->SetFirstPointId(firstPointId); + dialogTool->SetSecondPointId(secondPointId); + dialogTool->SetPointName(p->name()); } //--------------------------------------------------------------------------------------------------------------------- @@ -95,10 +95,10 @@ VToolTriangle* VToolTriangle::Create(DialogTool *dialog, VMainGraphicsScene *sce SCASSERT(dialog != nullptr); DialogTriangle *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); - const quint32 axisP1Id = dialogTool->getAxisP1Id(); - const quint32 axisP2Id = dialogTool->getAxisP2Id(); - const quint32 firstPointId = dialogTool->getFirstPointId(); - const quint32 secondPointId = dialogTool->getSecondPointId(); + const quint32 axisP1Id = dialogTool->GetAxisP1Id(); + const quint32 axisP2Id = dialogTool->GetAxisP2Id(); + const quint32 firstPointId = dialogTool->GetFirstPointId(); + const quint32 secondPointId = dialogTool->GetSecondPointId(); const QString pointName = dialogTool->getPointName(); VToolTriangle* point = nullptr; point = Create(0, pointName, axisP1Id, axisP2Id, firstPointId, secondPointId, 5, 10, scene, doc, data, @@ -283,10 +283,10 @@ void VToolTriangle::SaveDialog(QDomElement &domElement) DialogTriangle *dialogTool = qobject_cast(dialog); SCASSERT(dialogTool != nullptr); doc->SetAttribute(domElement, AttrName, dialogTool->getPointName()); - doc->SetAttribute(domElement, AttrAxisP1, QString().setNum(dialogTool->getAxisP1Id())); - doc->SetAttribute(domElement, AttrAxisP2, QString().setNum(dialogTool->getAxisP2Id())); - doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->getFirstPointId())); - doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->getSecondPointId())); + doc->SetAttribute(domElement, AttrAxisP1, QString().setNum(dialogTool->GetAxisP1Id())); + doc->SetAttribute(domElement, AttrAxisP2, QString().setNum(dialogTool->GetAxisP2Id())); + doc->SetAttribute(domElement, AttrFirstPoint, QString().setNum(dialogTool->GetFirstPointId())); + doc->SetAttribute(domElement, AttrSecondPoint, QString().setNum(dialogTool->GetSecondPointId())); } //--------------------------------------------------------------------------------------------------------------------- @@ -308,13 +308,13 @@ void VToolTriangle::SaveOptions(QDomElement &tag, QSharedPointer &obj) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolTriangle::getSecondPointId() const +quint32 VToolTriangle::GetSecondPointId() const { return secondPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolTriangle::setSecondPointId(const quint32 &value) +void VToolTriangle::SetSecondPointId(const quint32 &value) { if (value != NULL_ID) { @@ -361,13 +361,13 @@ void VToolTriangle::ShowVisualization(bool show) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolTriangle::getFirstPointId() const +quint32 VToolTriangle::GetFirstPointId() const { return firstPointId; } //--------------------------------------------------------------------------------------------------------------------- -void VToolTriangle::setFirstPointId(const quint32 &value) +void VToolTriangle::SetFirstPointId(const quint32 &value) { if (value != NULL_ID) { @@ -379,13 +379,13 @@ void VToolTriangle::setFirstPointId(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolTriangle::getAxisP2Id() const +quint32 VToolTriangle::GetAxisP2Id() const { return axisP2Id; } //--------------------------------------------------------------------------------------------------------------------- -void VToolTriangle::setAxisP2Id(const quint32 &value) +void VToolTriangle::SetAxisP2Id(const quint32 &value) { if (value != NULL_ID) { @@ -397,13 +397,13 @@ void VToolTriangle::setAxisP2Id(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -quint32 VToolTriangle::getAxisP1Id() const +quint32 VToolTriangle::GetAxisP1Id() const { return axisP1Id; } //--------------------------------------------------------------------------------------------------------------------- -void VToolTriangle::setAxisP1Id(const quint32 &value) +void VToolTriangle::SetAxisP1Id(const quint32 &value) { if (value != NULL_ID) { diff --git a/src/app/tools/drawTools/vtooltriangle.h b/src/app/tools/drawTools/vtooltriangle.h index 5ae0743dc..678f4da40 100644 --- a/src/app/tools/drawTools/vtooltriangle.h +++ b/src/app/tools/drawTools/vtooltriangle.h @@ -54,17 +54,17 @@ public: virtual int type() const {return Type;} enum { Type = UserType + static_cast(Tool::Triangle)}; - quint32 getAxisP1Id() const; - void setAxisP1Id(const quint32 &value); + quint32 GetAxisP1Id() const; + void SetAxisP1Id(const quint32 &value); - quint32 getAxisP2Id() const; - void setAxisP2Id(const quint32 &value); + quint32 GetAxisP2Id() const; + void SetAxisP2Id(const quint32 &value); - quint32 getFirstPointId() const; - void setFirstPointId(const quint32 &value); + quint32 GetFirstPointId() const; + void SetFirstPointId(const quint32 &value); - quint32 getSecondPointId() const; - void setSecondPointId(const quint32 &value); + quint32 GetSecondPointId() const; + void SetSecondPointId(const quint32 &value); virtual void ShowVisualization(bool show); public slots: diff --git a/src/app/tools/vabstracttool.cpp b/src/app/tools/vabstracttool.cpp index 7b5034667..b2375c224 100644 --- a/src/app/tools/vabstracttool.cpp +++ b/src/app/tools/vabstracttool.cpp @@ -239,7 +239,7 @@ QString VAbstractTool::getLineType() const } //--------------------------------------------------------------------------------------------------------------------- -void VAbstractTool::setTypeLine(const QString &value) +void VAbstractTool::SetTypeLine(const QString &value) { typeLine = value; diff --git a/src/app/tools/vabstracttool.h b/src/app/tools/vabstracttool.h index dca1083a1..0a8505bd5 100644 --- a/src/app/tools/vabstracttool.h +++ b/src/app/tools/vabstracttool.h @@ -115,7 +115,7 @@ public: const VContainer *getData() const; QString getLineType() const; - virtual void setTypeLine(const QString &value); + virtual void SetTypeLine(const QString &value); QMap PointsList() const; virtual QString getTagName() const =0; virtual void ShowVisualization(bool show) =0; diff --git a/src/app/tools/vtooluniondetails.cpp b/src/app/tools/vtooluniondetails.cpp index d59f93e40..32350ad1d 100644 --- a/src/app/tools/vtooluniondetails.cpp +++ b/src/app/tools/vtooluniondetails.cpp @@ -206,7 +206,7 @@ void VToolUnionDetails::AddToNewDetail(QObject *tool, VPattern *doc, VContainer { VSpline spline(splinePath->at(i-1).P(), splinePath->at(i).P(), splinePath->at(i-1).Angle2(), splinePath->at(i).Angle1(), splinePath->at(i-1).KAsm2(), - splinePath->at(i).KAsm1(), splinePath->getKCurve()); + splinePath->at(i).KAsm1(), splinePath->GetKCurve()); VPointF *p1 = new VPointF(spline.GetP1()); BiasRotatePoint(p1, dx, dy, data->GeometricObject(pRotate)->toQPointF(), @@ -366,7 +366,7 @@ void VToolUnionDetails::UpdatePoints(const quint32 &idDetail, VContainer *data, { VSpline spline(splinePath->at(i-1).P(), splinePath->at(i).P(), splinePath->at(i-1).Angle2(), splinePath->at(i).Angle1(), splinePath->at(i-1).KAsm2(), - splinePath->at(i).KAsm1(), splinePath->getKCurve()); + splinePath->at(i).KAsm1(), splinePath->GetKCurve()); VPointF *p1 = new VPointF(spline.GetP1()); BiasRotatePoint(p1, dx, dy, data->GeometricObject(pRotate)->toQPointF(), diff --git a/src/app/undocommands/movesplinepath.cpp b/src/app/undocommands/movesplinepath.cpp index 1e756ad8a..86f72b5a3 100644 --- a/src/app/undocommands/movesplinepath.cpp +++ b/src/app/undocommands/movesplinepath.cpp @@ -89,7 +89,7 @@ void MoveSplinePath::Do(const VSplinePath &splPath) QDomElement domElement = doc->elementById(QString().setNum(nodeId)); if (domElement.isElement()) { - doc->SetAttribute(domElement, VToolSplinePath::AttrKCurve, QString().setNum(splPath.getKCurve())); + doc->SetAttribute(domElement, VToolSplinePath::AttrKCurve, QString().setNum(splPath.GetKCurve())); VToolSplinePath::UpdatePathPoint(doc, domElement, splPath); emit NeedLiteParsing(Document::LiteParse); diff --git a/src/app/visualization/vistoolcurveintersectaxis.cpp b/src/app/visualization/vistoolcurveintersectaxis.cpp index d3cabc903..9ceb59a18 100644 --- a/src/app/visualization/vistoolcurveintersectaxis.cpp +++ b/src/app/visualization/vistoolcurveintersectaxis.cpp @@ -92,7 +92,7 @@ QString VisToolCurveIntersectAxis::Angle() const } //--------------------------------------------------------------------------------------------------------------------- -void VisToolCurveIntersectAxis::setAngle(const QString &expression) +void VisToolCurveIntersectAxis::SetAngle(const QString &expression) { angle = FindVal(expression); } diff --git a/src/app/visualization/vistoolcurveintersectaxis.h b/src/app/visualization/vistoolcurveintersectaxis.h index d6481bf48..1398a01ce 100644 --- a/src/app/visualization/vistoolcurveintersectaxis.h +++ b/src/app/visualization/vistoolcurveintersectaxis.h @@ -43,7 +43,7 @@ public: virtual void RefreshGeometry(); QString Angle() const; - void setAngle(const QString &expression); + void SetAngle(const QString &expression); void setAxisPointId(const quint32 &value); virtual int type() const {return Type;} diff --git a/src/app/visualization/vistoolcutsplinepath.cpp b/src/app/visualization/vistoolcutsplinepath.cpp index fcea7e2ee..f79105cc8 100644 --- a/src/app/visualization/vistoolcutsplinepath.cpp +++ b/src/app/visualization/vistoolcutsplinepath.cpp @@ -67,8 +67,8 @@ void VisToolCutSplinePath::RefreshGeometry() VSplinePoint splP1 = splPath->at(p1); VSplinePoint splP2 = splPath->at(p2); - const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, p, splPath->getKCurve()); - const VSpline spl2 = VSpline(p, spl2p2, spl2p3, splP2.P(), splPath->getKCurve()); + const VSpline spl1 = VSpline(splP1.P(), spl1p2, spl1p3, p, splPath->GetKCurve()); + const VSpline spl2 = VSpline(p, spl2p2, spl2p3, splP2.P(), splPath->GetKCurve()); VSplinePath spPath1 = VSplinePath(); VSplinePath spPath2 = VSplinePath(); @@ -104,8 +104,8 @@ void VisToolCutSplinePath::RefreshGeometry() } } - spPath1.setKCurve(splPath->getKCurve()); - spPath2.setKCurve(splPath->getKCurve()); + spPath1.SetKCurve(splPath->GetKCurve()); + spPath2.SetKCurve(splPath->GetKCurve()); DrawPoint(point, cutPoint, mainColor); diff --git a/src/app/visualization/vistoolendline.cpp b/src/app/visualization/vistoolendline.cpp index 0bd977362..a3483c829 100644 --- a/src/app/visualization/vistoolendline.cpp +++ b/src/app/visualization/vistoolendline.cpp @@ -72,7 +72,7 @@ QString VisToolEndLine::Angle() const } //--------------------------------------------------------------------------------------------------------------------- -void VisToolEndLine::setAngle(const QString &expression) +void VisToolEndLine::SetAngle(const QString &expression) { angle = FindVal(expression); } diff --git a/src/app/visualization/vistoolendline.h b/src/app/visualization/vistoolendline.h index 7b44f697f..cc3dd3f14 100644 --- a/src/app/visualization/vistoolendline.h +++ b/src/app/visualization/vistoolendline.h @@ -42,7 +42,7 @@ public: virtual void RefreshGeometry(); QString Angle() const; - void setAngle(const QString &expression); + void SetAngle(const QString &expression); void setLength(const QString &expression); virtual int type() const {return Type;} enum { Type = UserType + static_cast(Vis::ToolEndLine)}; diff --git a/src/app/visualization/vistoollineintersectaxis.cpp b/src/app/visualization/vistoollineintersectaxis.cpp index 371d46cad..bf757847f 100644 --- a/src/app/visualization/vistoollineintersectaxis.cpp +++ b/src/app/visualization/vistoollineintersectaxis.cpp @@ -108,7 +108,7 @@ QString VisToolLineIntersectAxis::Angle() const } //--------------------------------------------------------------------------------------------------------------------- -void VisToolLineIntersectAxis::setAngle(const QString &expression) +void VisToolLineIntersectAxis::SetAngle(const QString &expression) { angle = FindVal(expression); } diff --git a/src/app/visualization/vistoollineintersectaxis.h b/src/app/visualization/vistoollineintersectaxis.h index f9f0f370e..419873f80 100644 --- a/src/app/visualization/vistoollineintersectaxis.h +++ b/src/app/visualization/vistoollineintersectaxis.h @@ -43,7 +43,7 @@ public: virtual void RefreshGeometry(); QString Angle() const; - void setAngle(const QString &expression); + void SetAngle(const QString &expression); void setPoint2Id(const quint32 &value); void setAxisPointId(const quint32 &value); diff --git a/src/app/visualization/vistoolnormal.cpp b/src/app/visualization/vistoolnormal.cpp index e9b5402c5..858415366 100644 --- a/src/app/visualization/vistoolnormal.cpp +++ b/src/app/visualization/vistoolnormal.cpp @@ -104,13 +104,13 @@ void VisToolNormal::setLength(const QString &expression) } //--------------------------------------------------------------------------------------------------------------------- -qreal VisToolNormal::getAngle() const +qreal VisToolNormal::GetAngle() const { return angle; } //--------------------------------------------------------------------------------------------------------------------- -void VisToolNormal::setAngle(const qreal &value) +void VisToolNormal::SetAngle(const qreal &value) { angle = value; } diff --git a/src/app/visualization/vistoolnormal.h b/src/app/visualization/vistoolnormal.h index 1593d03f5..c73a0cace 100644 --- a/src/app/visualization/vistoolnormal.h +++ b/src/app/visualization/vistoolnormal.h @@ -42,8 +42,8 @@ public: void setPoint2Id(const quint32 &value); void setLength(const QString &expression); - qreal getAngle() const; - void setAngle(const qreal &value); + qreal GetAngle() const; + void SetAngle(const qreal &value); virtual int type() const {return Type;} enum { Type = UserType + static_cast(Vis::ToolNormal)}; private: diff --git a/src/app/visualization/vistoolspline.cpp b/src/app/visualization/vistoolspline.cpp index 92562e751..5c014feeb 100644 --- a/src/app/visualization/vistoolspline.cpp +++ b/src/app/visualization/vistoolspline.cpp @@ -84,31 +84,31 @@ void VisToolSpline::setPoint4Id(const quint32 &value) } //--------------------------------------------------------------------------------------------------------------------- -void VisToolSpline::setAngle1(const qreal &value) +void VisToolSpline::SetAngle1(const qreal &value) { angle1 = value; } //--------------------------------------------------------------------------------------------------------------------- -void VisToolSpline::setAngle2(const qreal &value) +void VisToolSpline::SetAngle2(const qreal &value) { angle2 = value; } //--------------------------------------------------------------------------------------------------------------------- -void VisToolSpline::setKAsm1(const qreal &value) +void VisToolSpline::SetKAsm1(const qreal &value) { kAsm1 = value; } //--------------------------------------------------------------------------------------------------------------------- -void VisToolSpline::setKAsm2(const qreal &value) +void VisToolSpline::SetKAsm2(const qreal &value) { kAsm2 = value; } //--------------------------------------------------------------------------------------------------------------------- -void VisToolSpline::setKCurve(const qreal &value) +void VisToolSpline::SetKCurve(const qreal &value) { kCurve = value; } diff --git a/src/app/visualization/vistoolspline.h b/src/app/visualization/vistoolspline.h index 56c12d021..df24af01b 100644 --- a/src/app/visualization/vistoolspline.h +++ b/src/app/visualization/vistoolspline.h @@ -41,11 +41,11 @@ public: virtual void RefreshGeometry(); void setPoint4Id(const quint32 &value); - void setAngle1(const qreal &value); - void setAngle2(const qreal &value); - void setKAsm1(const qreal &value); - void setKAsm2(const qreal &value); - void setKCurve(const qreal &value); + void SetAngle1(const qreal &value); + void SetAngle2(const qreal &value); + void SetKAsm1(const qreal &value); + void SetKAsm2(const qreal &value); + void SetKCurve(const qreal &value); virtual int type() const {return Type;} enum { Type = UserType + static_cast(Vis::ToolSpline)}; diff --git a/src/app/widgets/vformulaproperty.cpp b/src/app/widgets/vformulaproperty.cpp index 444a9fca6..09fbd2057 100644 --- a/src/app/widgets/vformulaproperty.cpp +++ b/src/app/widgets/vformulaproperty.cpp @@ -95,7 +95,7 @@ QWidget* VFormulaProperty::createEditor(QWidget* parent, const QStyleOptionViewI VFormula formula = VProperty::d_ptr->VariantValue.value(); VFormulaPropertyEditor* tmpEditor = new VFormulaPropertyEditor(parent); - tmpEditor->setFormula(formula); + tmpEditor->SetFormula(formula); VProperty::d_ptr->editor = tmpEditor; return VProperty::d_ptr->editor; } @@ -108,7 +108,7 @@ bool VFormulaProperty::setEditorData(QWidget* editor) if (tmpWidget) { VFormula formula = VProperty::d_ptr->VariantValue.value(); - tmpWidget->setFormula(formula); + tmpWidget->SetFormula(formula); } else return false; @@ -124,7 +124,7 @@ QVariant VFormulaProperty::getEditorData(const QWidget *editor) const if (tmpWidget) { QVariant value; - value.setValue(tmpWidget->getFormula()); + value.setValue(tmpWidget->GetFormula()); return value; } @@ -163,26 +163,26 @@ VProperty *VFormulaProperty::clone(bool include_children, VProperty *container) void VFormulaProperty::setValue(const QVariant &value) { VFormula tmpFormula = value.value(); - setFormula(tmpFormula); + SetFormula(tmpFormula); } //--------------------------------------------------------------------------------------------------------------------- QVariant VFormulaProperty::getValue() const { - VFormula tmpFormula = getFormula(); + VFormula tmpFormula = GetFormula(); QVariant value; value.setValue(tmpFormula); return value; } //--------------------------------------------------------------------------------------------------------------------- -VFormula VFormulaProperty::getFormula() const +VFormula VFormulaProperty::GetFormula() const { return VProperty::d_ptr->VariantValue.value(); } //--------------------------------------------------------------------------------------------------------------------- -void VFormulaProperty::setFormula(const VFormula &formula) +void VFormulaProperty::SetFormula(const VFormula &formula) { if (d_ptr->Children.count() < 2) { @@ -197,7 +197,7 @@ void VFormulaProperty::setFormula(const VFormula &formula) QVariant tmpValue(formula.getStringValue()); tmpValue.convert(QVariant::String); - QVariant tmpFormula(formula.getFormula()); + QVariant tmpFormula(formula.GetFormula()); tmpFormula.convert(QVariant::String); VProperty::d_ptr->Children.at(0)->setValue(tmpValue); @@ -213,8 +213,8 @@ void VFormulaProperty::ValueChildChanged(const QVariant &value, int typeForParen { if (typeForParent == static_cast(ChildType::Formula)) { - VFormula newFormula = getFormula(); - newFormula.setFormula(value.toString()); - setFormula(newFormula); + VFormula newFormula = GetFormula(); + newFormula.SetFormula(value.toString()); + SetFormula(newFormula); } } diff --git a/src/app/widgets/vformulaproperty.h b/src/app/widgets/vformulaproperty.h index 90c177aed..bcbc2f407 100644 --- a/src/app/widgets/vformulaproperty.h +++ b/src/app/widgets/vformulaproperty.h @@ -76,10 +76,10 @@ public: virtual QVariant getValue() const; //! Returns the formula - virtual VFormula getFormula() const; + virtual VFormula GetFormula() const; //! Sets the formula - virtual void setFormula(const VFormula &formula); + virtual void SetFormula(const VFormula &formula); public slots: virtual void ValueChildChanged(const QVariant &value, int typeForParent); diff --git a/src/app/widgets/vformulapropertyeditor.cpp b/src/app/widgets/vformulapropertyeditor.cpp index 7030ae7fa..cc583ccfb 100644 --- a/src/app/widgets/vformulapropertyeditor.cpp +++ b/src/app/widgets/vformulapropertyeditor.cpp @@ -73,7 +73,7 @@ VFormulaPropertyEditor::VFormulaPropertyEditor(QWidget *parent) } //--------------------------------------------------------------------------------------------------------------------- -void VFormulaPropertyEditor::setFormula(const VFormula& formula) +void VFormulaPropertyEditor::SetFormula(const VFormula& formula) { if (this->formula != formula) { @@ -89,11 +89,11 @@ void VFormulaPropertyEditor::onToolButtonClicked() qApp->getMainWindow()); tmpWidget->setCheckZero(formula.getCheckZero()); tmpWidget->setPostfix(formula.getPostfix()); - tmpWidget->setFormula(formula.getFormula(FormulaType::FromUser)); + tmpWidget->SetFormula(formula.GetFormula(FormulaType::FromUser)); if (tmpWidget->exec() == QDialog::Accepted) { - formula.setFormula(tmpWidget->getFormula(), FormulaType::ToUser); + formula.SetFormula(tmpWidget->GetFormula(), FormulaType::ToUser); TextLabel->setText(formula.getStringValue()); delete tmpWidget; emit dataChangedByUser(formula, this); @@ -122,7 +122,7 @@ VFormulaPropertyEditor::~VFormulaPropertyEditor() } //--------------------------------------------------------------------------------------------------------------------- -VFormula VFormulaPropertyEditor::getFormula() const +VFormula VFormulaPropertyEditor::GetFormula() const { return formula; } diff --git a/src/app/widgets/vformulapropertyeditor.h b/src/app/widgets/vformulapropertyeditor.h index e7a1ab291..52de778aa 100644 --- a/src/app/widgets/vformulapropertyeditor.h +++ b/src/app/widgets/vformulapropertyeditor.h @@ -49,20 +49,20 @@ public: virtual ~VFormulaPropertyEditor(); //! Returns the formula currently set - VFormula getFormula() const; + VFormula GetFormula() const; //! Needed for proper event handling bool eventFilter(QObject *obj, QEvent *ev); signals: //! This is emitted, when the user changes the color - void dataChangedByUser(const VFormula &getFormula, VFormulaPropertyEditor* editor); + void dataChangedByUser(const VFormula &GetFormula, VFormulaPropertyEditor* editor); void dataChanged(); public slots: //! Sets the color of the widget - void setFormula(const VFormula &formula); + void SetFormula(const VFormula &formula); private slots: void onToolButtonClicked(); diff --git a/src/app/widgets/vtooloptionspropertybrowser.cpp b/src/app/widgets/vtooloptionspropertybrowser.cpp index 178d6c6f3..3c030e12c 100644 --- a/src/app/widgets/vtooloptionspropertybrowser.cpp +++ b/src/app/widgets/vtooloptionspropertybrowser.cpp @@ -367,7 +367,7 @@ void VToolOptionsPropertyBrowser::AddPropertyFormula(const QString &propertyName const QString &attrName) { VFormulaProperty* itemLength = new VFormulaProperty(propertyName); - itemLength->setFormula(formula); + itemLength->SetFormula(formula); AddProperty(itemLength, attrName); } @@ -469,13 +469,13 @@ void VToolOptionsPropertyBrowser::ChangeDataToolEndLine(VProperty *property) SetPointName(value.toString()); break; case 3: // VAbstractTool::AttrTypeLine - i->setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; case 4: // VAbstractTool::AttrLength - i->setFormulaLength(value.value()); + i->SetFormulaLength(value.value()); break; case 5: // VAbstractTool::AttrAngle - i->setFormulaAngle(value.value()); + i->SetFormulaAngle(value.value()); break; default: qWarning()<<"Unknown property type. id = "<(value.toString()); break; case 3: // VAbstractTool::AttrTypeLine - i->setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; case 4: // VAbstractTool::AttrLength - i->setFormulaLength(value.value()); + i->SetFormulaLength(value.value()); break; default: qWarning()<<"Unknown property type. id = "<setFormulaRadius(value.value()); + i->SetFormulaRadius(value.value()); break; case 9: // VAbstractTool::AttrAngle1 - i->setFormulaF1(value.value()); + i->SetFormulaF1(value.value()); break; case 10: // VAbstractTool::AttrAngle2 - i->setFormulaF2(value.value()); + i->SetFormulaF2(value.value()); break; default: qWarning()<<"Unknown property type. id = "<(value.toString()); break; case 4: // VAbstractTool::AttrLength - i->setFormulaLength(value.value()); + i->SetFormulaLength(value.value()); break; case 3: // VAbstractTool::AttrTypeLine - i->setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; default: qWarning()<<"Unknown property type. id = "<(value.toString()); break; case 4: // VAbstractTool::AttrLength - i->setFormula(value.value()); + i->SetFormula(value.value()); break; default: qWarning()<<"Unknown property type. id = "<(value.toString()); break; case 4: // VAbstractTool::AttrLength - i->setFormula(value.value()); + i->SetFormula(value.value()); break; default: qWarning()<<"Unknown property type. id = "<(value.toString()); break; case 4: // VAbstractTool::AttrLength - i->setFormula(value.value()); + i->SetFormula(value.value()); break; default: qWarning()<<"Unknown property type. id = "<(value.toString()); break; case 3: // VAbstractTool::AttrTypeLine - i->setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; default: qWarning()<<"Unknown property type. id = "<setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; default: qWarning()<<"Unknown property type. id = "<setFormulaLength(value.value()); + i->SetFormulaLength(value.value()); break; case 0: // VAbstractTool::AttrName SetPointName(value.toString()); break; case 5: // VAbstractTool::AttrAngle - i->setAngle(value.toDouble()); + i->SetAngle(value.toDouble()); break; case 3: // VAbstractTool::AttrTypeLine - i->setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; default: qWarning()<<"Unknown property type. id = "<setFormulaLength(value.value()); + i->SetFormulaLength(value.value()); break; case 0: // VAbstractTool::AttrName SetPointName(value.toString()); break; case 3: // VAbstractTool::AttrTypeLine - i->setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; default: qWarning()<<"Unknown property type. id = "<getSplinePath(); - splPath.setKCurve(value.toDouble()); + splPath.SetKCurve(value.toDouble()); i->setSplinePath(splPath); break; } @@ -885,10 +885,10 @@ void VToolOptionsPropertyBrowser::ChangeDataToolLineIntersectAxis(VProperty *pro SetPointName(value.toString()); break; case 3: // VAbstractTool::AttrTypeLine - i->setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; case 5: // VAbstractTool::AttrAngle - i->setFormulaAngle(value.value()); + i->SetFormulaAngle(value.value()); break; default: qWarning()<<"Unknown property type. id = "<(value.toString()); break; case 3: // VAbstractTool::AttrTypeLine - i->setTypeLine(value.toString()); + i->SetTypeLine(value.toString()); break; case 5: // VAbstractTool::AttrAngle - i->setFormulaAngle(value.value()); + i->SetFormulaAngle(value.value()); break; default: qWarning()<<"Unknown property type. id = "<getFormulaLength(), VAbstractTool::AttrLength); - AddPropertyFormula(tr("Angle"), i->getFormulaAngle(), VAbstractTool::AttrAngle); + AddPropertyFormula(tr("Length"), i->GetFormulaLength(), VAbstractTool::AttrLength); + AddPropertyFormula(tr("Angle"), i->GetFormulaAngle(), VAbstractTool::AttrAngle); } //--------------------------------------------------------------------------------------------------------------------- @@ -959,7 +959,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolAlongLine(QGraphicsItem *item) AddPropertyPointName(i, tr("Point label")); AddPropertyLineType(i, tr("Line type"), VAbstractTool::LineStylesPics()); - AddPropertyFormula(tr("Length"), i->getFormulaLength(), VAbstractTool::AttrLength); + AddPropertyFormula(tr("Length"), i->GetFormulaLength(), VAbstractTool::AttrLength); } //--------------------------------------------------------------------------------------------------------------------- @@ -969,9 +969,9 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolArc(QGraphicsItem *item) i->ShowVisualization(true); formView->setTitle(tr("Arc")); - AddPropertyFormula(tr("Radius"), i->getFormulaRadius(), VAbstractTool::AttrRadius); - AddPropertyFormula(tr("First angle"), i->getFormulaF1(), VAbstractTool::AttrAngle1); - AddPropertyFormula(tr("Second angle"), i->getFormulaF2(), VAbstractTool::AttrAngle2); + AddPropertyFormula(tr("Radius"), i->GetFormulaRadius(), VAbstractTool::AttrRadius); + AddPropertyFormula(tr("First angle"), i->GetFormulaF1(), VAbstractTool::AttrAngle1); + AddPropertyFormula(tr("Second angle"), i->GetFormulaF2(), VAbstractTool::AttrAngle2); } //--------------------------------------------------------------------------------------------------------------------- @@ -983,7 +983,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolBisector(QGraphicsItem *item) AddPropertyPointName(i, tr("Point label")); AddPropertyLineType(i, tr("Line type"), VAbstractTool::LineStylesPics()); - AddPropertyFormula(tr("Length"), i->getFormulaLength(), VAbstractTool::AttrLength); + AddPropertyFormula(tr("Length"), i->GetFormulaLength(), VAbstractTool::AttrLength); } //--------------------------------------------------------------------------------------------------------------------- @@ -994,7 +994,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolCutArc(QGraphicsItem *item) formView->setTitle(tr("Cut arc tool")); AddPropertyPointName(i, tr("Point label")); - AddPropertyFormula(tr("Length"), i->getFormula(), VAbstractTool::AttrLength); + AddPropertyFormula(tr("Length"), i->GetFormula(), VAbstractTool::AttrLength); } //--------------------------------------------------------------------------------------------------------------------- @@ -1005,7 +1005,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolCutSpline(QGraphicsItem *item) formView->setTitle(tr("Tool for segmenting a curve")); AddPropertyPointName(i, tr("Point label")); - AddPropertyFormula(tr("Length"), i->getFormula(), VAbstractTool::AttrLength); + AddPropertyFormula(tr("Length"), i->GetFormula(), VAbstractTool::AttrLength); } //--------------------------------------------------------------------------------------------------------------------- @@ -1016,7 +1016,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolCutSplinePath(QGraphicsItem *it formView->setTitle(tr("Tool segment a pathed curve")); AddPropertyPointName(i, tr("Point label")); - AddPropertyFormula(tr("Length"), i->getFormula(), VAbstractTool::AttrLength); + AddPropertyFormula(tr("Length"), i->GetFormula(), VAbstractTool::AttrLength); } //--------------------------------------------------------------------------------------------------------------------- @@ -1059,12 +1059,12 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolNormal(QGraphicsItem *item) i->ShowVisualization(true); formView->setTitle(tr("Point along perpendicular")); - AddPropertyFormula(tr("Length"), i->getFormulaLength(), VAbstractTool::AttrLength); + AddPropertyFormula(tr("Length"), i->GetFormulaLength(), VAbstractTool::AttrLength); AddPropertyPointName(i, tr("Point label")); AddPropertyLineType(i, tr("Line type"), VAbstractTool::LineStylesPics()); VDoubleProperty* itemAngle = new VDoubleProperty(tr("Additional angle degrees")); - itemAngle->setValue(i->getAngle()); + itemAngle->setValue(i->GetAngle()); itemAngle->setSetting("Min", -360); itemAngle->setSetting("Max", 360); itemAngle->setSetting("Precision", 3); @@ -1101,7 +1101,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolShoulderPoint(QGraphicsItem *it AddPropertyPointName(i, tr("Point label")); AddPropertyLineType(i, tr("Line type"), VAbstractTool::LineStylesPics()); - AddPropertyFormula(tr("Length"), i->getFormulaLength(), VAbstractTool::AttrLength); + AddPropertyFormula(tr("Length"), i->GetFormulaLength(), VAbstractTool::AttrLength); } //--------------------------------------------------------------------------------------------------------------------- @@ -1134,7 +1134,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolSplinePath(QGraphicsItem *item) itemFactor->setSetting("Max", 1000); itemFactor->setSetting("Step", 0.01); itemFactor->setSetting("Precision", 3); - itemFactor->setValue(splPath.getKCurve()); + itemFactor->setValue(splPath.GetKCurve()); AddProperty(itemFactor, VAbstractTool::AttrKCurve); } @@ -1157,7 +1157,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolLineIntersectAxis(QGraphicsItem AddPropertyPointName(i, tr("Point label")); AddPropertyLineType(i, tr("Line type"), VAbstractTool::LineStylesPics()); - AddPropertyFormula(tr("Angle"), i->getFormulaAngle(), VAbstractTool::AttrAngle); + AddPropertyFormula(tr("Angle"), i->GetFormulaAngle(), VAbstractTool::AttrAngle); } //--------------------------------------------------------------------------------------------------------------------- @@ -1169,7 +1169,7 @@ void VToolOptionsPropertyBrowser::ShowOptionsToolCurveIntersectAxis(QGraphicsIte AddPropertyPointName(i, tr("Point label")); AddPropertyLineType(i, tr("Line type"), VAbstractTool::LineStylesPics()); - AddPropertyFormula(tr("Angle"), i->getFormulaAngle(), VAbstractTool::AttrAngle); + AddPropertyFormula(tr("Angle"), i->GetFormulaAngle(), VAbstractTool::AttrAngle); } //--------------------------------------------------------------------------------------------------------------------- @@ -1190,11 +1190,11 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolEndLine() idToProperty[VAbstractTool::AttrTypeLine]->setValue(index); QVariant valueFormula; - valueFormula.setValue(i->getFormulaLength()); + valueFormula.setValue(i->GetFormulaLength()); idToProperty[VAbstractTool::AttrLength]->setValue(valueFormula); QVariant valueAngle; - valueAngle.setValue(i->getFormulaAngle()); + valueAngle.setValue(i->GetFormulaAngle()); idToProperty[VAbstractTool::AttrAngle]->setValue(valueAngle); } @@ -1208,7 +1208,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolAlongLine() idToProperty[VAbstractTool::AttrTypeLine]->setValue(index); QVariant valueFormula; - valueFormula.setValue(i->getFormulaLength()); + valueFormula.setValue(i->GetFormulaLength()); idToProperty[VAbstractTool::AttrLength]->setValue(valueFormula); } @@ -1219,15 +1219,15 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolArc() QVariant valueRadius; - valueRadius.setValue(i->getFormulaRadius()); + valueRadius.setValue(i->GetFormulaRadius()); idToProperty[VAbstractTool::AttrRadius]->setValue(valueRadius); QVariant valueFirstAngle; - valueFirstAngle.setValue(i->getFormulaF1()); + valueFirstAngle.setValue(i->GetFormulaF1()); idToProperty[VAbstractTool::AttrAngle1]->setValue(valueFirstAngle); QVariant valueSecondAngle; - valueSecondAngle.setValue(i->getFormulaF2()); + valueSecondAngle.setValue(i->GetFormulaF2()); idToProperty[VAbstractTool::AttrAngle2]->setValue(valueSecondAngle); } @@ -1239,7 +1239,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolBisector() idToProperty[VAbstractTool::AttrName]->setValue(i->name()); QVariant valueFormula; - valueFormula.setValue(i->getFormulaLength()); + valueFormula.setValue(i->GetFormulaLength()); idToProperty[VAbstractTool::AttrLength]->setValue(valueFormula); const qint32 index = VLineTypeProperty::IndexOfStyle(VAbstractTool::LineStylesPics(), i->getLineType()); @@ -1254,7 +1254,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCutArc() idToProperty[VAbstractTool::AttrName]->setValue(i->name()); QVariant valueFormula; - valueFormula.setValue(i->getFormula()); + valueFormula.setValue(i->GetFormula()); idToProperty[VAbstractTool::AttrLength]->setValue(valueFormula); } @@ -1266,7 +1266,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCutSpline() idToProperty[VAbstractTool::AttrName]->setValue(i->name()); QVariant valueFormula; - valueFormula.setValue(i->getFormula()); + valueFormula.setValue(i->GetFormula()); idToProperty[VAbstractTool::AttrLength]->setValue(valueFormula); } @@ -1278,7 +1278,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCutSplinePath() idToProperty[VAbstractTool::AttrName]->setValue(i->name()); QVariant valueFormula; - valueFormula.setValue(i->getFormula()); + valueFormula.setValue(i->GetFormula()); idToProperty[VAbstractTool::AttrLength]->setValue(valueFormula); } @@ -1316,12 +1316,12 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolNormal() VToolNormal *i = qgraphicsitem_cast(currentItem); QVariant valueFormula; - valueFormula.setValue(i->getFormulaLength()); + valueFormula.setValue(i->GetFormulaLength()); idToProperty[VAbstractTool::AttrLength]->setValue(valueFormula); idToProperty[VAbstractTool::AttrName]->setValue(i->name()); - idToProperty[VAbstractTool::AttrAngle]->setValue( i->getAngle()); + idToProperty[VAbstractTool::AttrAngle]->setValue( i->GetAngle()); const qint32 index = VLineTypeProperty::IndexOfStyle(VAbstractTool::LineStylesPics(), i->getLineType()); idToProperty[VAbstractTool::AttrTypeLine]->setValue(index); @@ -1353,7 +1353,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolShoulderPoint() VToolShoulderPoint *i = qgraphicsitem_cast(currentItem); QVariant valueFormula; - valueFormula.setValue(i->getFormulaLength()); + valueFormula.setValue(i->GetFormulaLength()); idToProperty[VAbstractTool::AttrLength]->setValue(valueFormula); idToProperty[VAbstractTool::AttrName]->setValue(i->name()); @@ -1377,7 +1377,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolSplinePath() VToolSplinePath *i = qgraphicsitem_cast(currentItem); VSplinePath splPath = i->getSplinePath(); - idToProperty[VAbstractTool::AttrKCurve]->setValue(splPath.getKCurve()); + idToProperty[VAbstractTool::AttrKCurve]->setValue(splPath.GetKCurve()); } //--------------------------------------------------------------------------------------------------------------------- @@ -1398,7 +1398,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolLineIntersectAxis() idToProperty[VAbstractTool::AttrTypeLine]->setValue(index); QVariant valueAngle; - valueAngle.setValue(i->getFormulaAngle()); + valueAngle.setValue(i->GetFormulaAngle()); idToProperty[VAbstractTool::AttrAngle]->setValue(valueAngle); } @@ -1412,7 +1412,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCurveIntersectAxis() idToProperty[VAbstractTool::AttrTypeLine]->setValue(index); QVariant valueAngle; - valueAngle.setValue(i->getFormulaAngle()); + valueAngle.setValue(i->GetFormulaAngle()); idToProperty[VAbstractTool::AttrAngle]->setValue(valueAngle); } diff --git a/src/libs/vpropertyexplorer/plugins/vcolorproperty.cpp b/src/libs/vpropertyexplorer/plugins/vcolorproperty.cpp index f47b41856..38a1791a9 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorproperty.cpp +++ b/src/libs/vpropertyexplorer/plugins/vcolorproperty.cpp @@ -36,7 +36,7 @@ QVariant VColorProperty::data (int column, int role) const { if (column == DPC_Data && (Qt::DisplayRole == role)) { - return VColorPropertyEditor::getColorString(d_ptr->VariantValue.value()); + return VColorPropertyEditor::GetColorString(d_ptr->VariantValue.value()); } else if (Qt::EditRole == role) { @@ -44,7 +44,7 @@ QVariant VColorProperty::data (int column, int role) const } else if (column == DPC_Data && (Qt::DecorationRole == role)) { - return VColorPropertyEditor::getColorPixmap(d_ptr->VariantValue.value()); + return VColorPropertyEditor::GetColorPixmap(d_ptr->VariantValue.value()); } else return VProperty::data(column, role); @@ -58,7 +58,7 @@ QWidget* VColorProperty::createEditor(QWidget* parent, const QStyleOptionViewIte Q_UNUSED(delegate); VColorPropertyEditor* tmpWidget = new VColorPropertyEditor(parent); - tmpWidget->setColor(d_ptr->VariantValue.value()); + tmpWidget->SetColor(d_ptr->VariantValue.value()); return tmpWidget; } @@ -68,7 +68,7 @@ bool VColorProperty::setEditorData(QWidget* editor) VColorPropertyEditor* tmpWidget = qobject_cast(editor); if (tmpWidget) { - tmpWidget->setColor(d_ptr->VariantValue.value()); + tmpWidget->SetColor(d_ptr->VariantValue.value()); } else return false; @@ -82,7 +82,7 @@ QVariant VColorProperty::getEditorData(const QWidget *editor) const const VColorPropertyEditor* tmpWidget = qobject_cast(editor); if (tmpWidget) { - return tmpWidget->getColor(); + return tmpWidget->GetColor(); } return QVariant(); diff --git a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp index ab55c2378..8dface9a7 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp @@ -47,11 +47,11 @@ VColorPropertyEditor::VColorPropertyEditor(QWidget *parent) // Create the text label TextLabel = new QLabel(this); - TextLabel->setText(getColorString(Color)); + TextLabel->setText(GetColorString(Color)); // Create the label for the pixmap ColorLabel = new QLabel(this); - ColorLabel->setPixmap(getColorPixmap(Color)); + ColorLabel->setPixmap(GetColorPixmap(Color)); // Spacer (this is needed for proper display of the label and button) Spacer = new QSpacerItem(1, 0, QSizePolicy::Expanding, QSizePolicy::Ignored); @@ -68,17 +68,17 @@ VColorPropertyEditor::VColorPropertyEditor(QWidget *parent) //ColorLabel->hide(); // for now, we just use the standard display and only add the button } -void VColorPropertyEditor::setColor(const QColor& color_) +void VColorPropertyEditor::SetColor(const QColor& color_) { if (Color != color_) { Color = color_; - ColorLabel->setPixmap(getColorPixmap(Color)); - TextLabel->setText(getColorString(Color)); + ColorLabel->setPixmap(GetColorPixmap(Color)); + TextLabel->setText(GetColorString(Color)); } } -QPixmap VColorPropertyEditor::getColorPixmap(const QColor& color, unsigned int size) +QPixmap VColorPropertyEditor::GetColorPixmap(const QColor& color, unsigned int size) { QImage tmpImgage(static_cast(size), static_cast(size), QImage::Format_ARGB32_Premultiplied); tmpImgage.fill(static_cast(color.rgb())); @@ -86,7 +86,7 @@ QPixmap VColorPropertyEditor::getColorPixmap(const QColor& color, unsigned int s // todo: support alpha channel } -QString VColorPropertyEditor::getColorString(const QColor& color) +QString VColorPropertyEditor::GetColorString(const QColor& color) { return QString("[%1, %2, %3] (%4)").arg(color.red()).arg(color.green()).arg(color.blue()).arg(color.alpha()); } @@ -98,7 +98,7 @@ void VColorPropertyEditor::onToolButtonClicked() QRgb newRgba = QColorDialog::getRgba(oldRgba, &ok, this); if (ok && newRgba != oldRgba) { - setColor(QColor::fromRgba(newRgba)); + SetColor(QColor::fromRgba(newRgba)); emit dataChangedByUser(Color, this); UserChangeEvent *event = new UserChangeEvent(); QCoreApplication::postEvent ( this, event ); @@ -123,7 +123,7 @@ VColorPropertyEditor::~VColorPropertyEditor() // } -QColor VColorPropertyEditor::getColor() const +QColor VColorPropertyEditor::GetColor() const { return Color; } diff --git a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h index ac6dba31a..2de237f34 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h +++ b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.h @@ -45,31 +45,31 @@ public: //! Returns the color currently set - QColor getColor() const; + QColor GetColor() const; //! A little helper function generating an image to represent a color //! \param color The color to fill the image with //! \size The size of the generated pixmap //! \return Returns a QPixmap - static QPixmap getColorPixmap(const QColor& color, unsigned int size = 16); + static QPixmap GetColorPixmap(const QColor& color, unsigned int size = 16); //! A helper function to convert a color into a string. //! \param color The color to fill the image with //! \return The color as string, usually in the format [RRR, GGG, BBB] (AAA) - static QString getColorString(const QColor& color); + static QString GetColorString(const QColor& color); //! Needed for proper event handling bool eventFilter(QObject *obj, QEvent *ev); signals: //! This is emitted, when the user changes the color - void dataChangedByUser(const QColor &getColor, VColorPropertyEditor* editor); + void dataChangedByUser(const QColor &GetColor, VColorPropertyEditor* editor); void dataChanged(); public slots: //! Sets the color of the widget - void setColor(const QColor &color_); + void SetColor(const QColor &color_); private slots: void onToolButtonClicked();