Fixed wrong point name in dialog ToolShoulderPoint.

--HG--
branch : develop
This commit is contained in:
dismine 2014-10-02 17:29:28 +03:00
parent 50f82eee27
commit 26a95e0964
5 changed files with 19 additions and 19 deletions

View File

@ -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<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
this, &DialogShoulderPoint::PointNameChanged);
connect(ui->comboBoxPShoulder, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
connect(ui->comboBoxP3, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
this, &DialogShoulderPoint::PointNameChanged);
line = new VisToolShoulderPoint(data);
@ -90,7 +90,7 @@ void DialogShoulderPoint::PointNameChanged()
QSet<quint32> 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);
}

View File

@ -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;
}

View File

@ -299,7 +299,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QLabel" name="labelPointShoulder">
<widget class="QLabel" name="labelThirdPoint">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@ -307,12 +307,12 @@
</sizepolicy>
</property>
<property name="text">
<string>Point of shoulder</string>
<string>Third point</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="comboBoxPShoulder">
<widget class="QComboBox" name="comboBoxP3">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -527,7 +527,7 @@
<tabstop>lineEditNamePoint</tabstop>
<tabstop>comboBoxP1Line</tabstop>
<tabstop>comboBoxP2Line</tabstop>
<tabstop>comboBoxPShoulder</tabstop>
<tabstop>comboBoxP3</tabstop>
<tabstop>comboBoxLineType</tabstop>
<tabstop>radioButtonSizeGrowth</tabstop>
<tabstop>radioButtonStandardTable</tabstop>

View File

@ -435,7 +435,7 @@ void MainWindow::ToolAlongLine(bool checked)
void MainWindow::ToolShoulderPoint(bool checked)
{
SetToolButtonWithApply<DialogShoulderPoint>(checked, Tool::ShoulderPoint, ":/cursor/shoulder_cursor.png",
tr("Select point of shoulder"),
tr("Select point"),
&MainWindow::ClosedDialogWithApply<VToolShoulderPoint>,
&MainWindow::ApplyDialog<VToolShoulderPoint>);
}

View File

@ -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()));
}
//---------------------------------------------------------------------------------------------------------------------