From 26a95e096476ac5366d020b774da4ceca940de50 Mon Sep 17 00:00:00 2001 From: dismine Date: Thu, 2 Oct 2014 17:29:28 +0300 Subject: [PATCH] Fixed wrong point name in dialog ToolShoulderPoint. --HG-- branch : develop --- src/app/dialogs/tools/dialogshoulderpoint.cpp | 16 ++++++++-------- src/app/dialogs/tools/dialogshoulderpoint.h | 6 +++--- src/app/dialogs/tools/dialogshoulderpoint.ui | 8 ++++---- src/app/mainwindow.cpp | 2 +- src/app/tools/drawTools/vtoolshoulderpoint.cpp | 6 +++--- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/app/dialogs/tools/dialogshoulderpoint.cpp b/src/app/dialogs/tools/dialogshoulderpoint.cpp index eed3962de..731d05a03 100644 --- a/src/app/dialogs/tools/dialogshoulderpoint.cpp +++ b/src/app/dialogs/tools/dialogshoulderpoint.cpp @@ -60,7 +60,7 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 & FillComboBoxTypeLine(ui->comboBoxLineType); FillComboBoxPoints(ui->comboBoxP1Line); FillComboBoxPoints(ui->comboBoxP2Line); - FillComboBoxPoints(ui->comboBoxPShoulder); + FillComboBoxPoints(ui->comboBoxP3); connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogShoulderPoint::PutHere); connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogShoulderPoint::PutVal); @@ -72,7 +72,7 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 & this, &DialogShoulderPoint::PointNameChanged); connect(ui->comboBoxP2Line, static_cast(&QComboBox::currentIndexChanged), this, &DialogShoulderPoint::PointNameChanged); - connect(ui->comboBoxPShoulder, static_cast(&QComboBox::currentIndexChanged), + connect(ui->comboBoxP3, static_cast(&QComboBox::currentIndexChanged), this, &DialogShoulderPoint::PointNameChanged); line = new VisToolShoulderPoint(data); @@ -90,7 +90,7 @@ void DialogShoulderPoint::PointNameChanged() QSet set; set.insert(getCurrentObjectId(ui->comboBoxP1Line)); set.insert(getCurrentObjectId(ui->comboBoxP2Line)); - set.insert(getCurrentObjectId(ui->comboBoxPShoulder)); + set.insert(getCurrentObjectId(ui->comboBoxP3)); QColor color = okColor; if (set.size() != 3) @@ -105,7 +105,7 @@ void DialogShoulderPoint::PointNameChanged() } ChangeColor(ui->labelFirstPoint, color); ChangeColor(ui->labelSecondPoint, color); - ChangeColor(ui->labelPointShoulder, color); + ChangeColor(ui->labelThirdPoint, color); CheckState(); } @@ -149,7 +149,7 @@ void DialogShoulderPoint::ChosenObject(quint32 id, const SceneObject &type) switch (number) { case 0: - if (SetObject(id, ui->comboBoxPShoulder, tr("Select first point of line"))) + if (SetObject(id, ui->comboBoxP3, tr("Select first point of line"))) { number++; line->VisualMode(id); @@ -189,7 +189,7 @@ void DialogShoulderPoint::SaveData() formula.replace("\n", " "); p1Line = getCurrentObjectId(ui->comboBoxP1Line); p2Line = getCurrentObjectId(ui->comboBoxP2Line); - pShoulder = getCurrentObjectId(ui->comboBoxPShoulder); + pShoulder = getCurrentObjectId(ui->comboBoxP3); line->setPoint1Id(pShoulder); line->setLineP1Id(p1Line); @@ -204,9 +204,9 @@ void DialogShoulderPoint::SaveData() * @brief setPShoulder set id shoulder point * @param value id */ -void DialogShoulderPoint::setPShoulder(const quint32 &value) +void DialogShoulderPoint::setP3(const quint32 &value) { - setPointId(ui->comboBoxPShoulder, pShoulder, value); + setPointId(ui->comboBoxP3, pShoulder, value); line->setPoint1Id(pShoulder); } diff --git a/src/app/dialogs/tools/dialogshoulderpoint.h b/src/app/dialogs/tools/dialogshoulderpoint.h index f4e09d955..5e46f4a68 100644 --- a/src/app/dialogs/tools/dialogshoulderpoint.h +++ b/src/app/dialogs/tools/dialogshoulderpoint.h @@ -63,8 +63,8 @@ public: quint32 getP2Line() const; void setP2Line(const quint32 &value); - quint32 getPShoulder() const; - void setPShoulder(const quint32 &value); + quint32 getP3() const; + void setP3(const quint32 &value); public slots: virtual void ChosenObject(quint32 id, const SceneObject &type); /** @@ -166,7 +166,7 @@ inline quint32 DialogShoulderPoint::getP2Line() const * @brief getPShoulder return id shoulder point * @return id */ -inline quint32 DialogShoulderPoint::getPShoulder() const +inline quint32 DialogShoulderPoint::getP3() const { return pShoulder; } diff --git a/src/app/dialogs/tools/dialogshoulderpoint.ui b/src/app/dialogs/tools/dialogshoulderpoint.ui index 728371b0c..082c1bc0b 100644 --- a/src/app/dialogs/tools/dialogshoulderpoint.ui +++ b/src/app/dialogs/tools/dialogshoulderpoint.ui @@ -299,7 +299,7 @@ - + 0 @@ -307,12 +307,12 @@ - Point of shoulder + Third point - + 0 @@ -527,7 +527,7 @@ lineEditNamePoint comboBoxP1Line comboBoxP2Line - comboBoxPShoulder + comboBoxP3 comboBoxLineType radioButtonSizeGrowth radioButtonStandardTable diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index fa5a99c2a..f5f312c84 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -435,7 +435,7 @@ void MainWindow::ToolAlongLine(bool checked) void MainWindow::ToolShoulderPoint(bool checked) { SetToolButtonWithApply(checked, Tool::ShoulderPoint, ":/cursor/shoulder_cursor.png", - tr("Select point of shoulder"), + tr("Select point"), &MainWindow::ClosedDialogWithApply, &MainWindow::ApplyDialog); } diff --git a/src/app/tools/drawTools/vtoolshoulderpoint.cpp b/src/app/tools/drawTools/vtoolshoulderpoint.cpp index 311d28d9d..33d29bae5 100644 --- a/src/app/tools/drawTools/vtoolshoulderpoint.cpp +++ b/src/app/tools/drawTools/vtoolshoulderpoint.cpp @@ -78,7 +78,7 @@ void VToolShoulderPoint::setDialog() dialogTool->setFormula(formulaLength); dialogTool->setP1Line(basePointId); dialogTool->setP2Line(p2Line); - dialogTool->setPShoulder(pShoulder); + dialogTool->setP3(pShoulder); dialogTool->setPointName(p->name()); } @@ -137,7 +137,7 @@ VToolShoulderPoint* VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphics QString formula = dialogTool->getFormula(); const quint32 p1Line = dialogTool->getP1Line(); const quint32 p2Line = dialogTool->getP2Line(); - const quint32 pShoulder = dialogTool->getPShoulder(); + const quint32 pShoulder = dialogTool->getP3(); const QString typeLine = dialogTool->getTypeLine(); const QString pointName = dialogTool->getPointName(); VToolShoulderPoint * point = nullptr; @@ -304,7 +304,7 @@ void VToolShoulderPoint::SaveDialog(QDomElement &domElement) 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->getPShoulder())); + doc->SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogTool->getP3())); } //---------------------------------------------------------------------------------------------------------------------