Fixed wrong point name in dialog ToolShoulderPoint.
--HG-- branch : develop
This commit is contained in:
parent
50f82eee27
commit
26a95e0964
|
@ -60,7 +60,7 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 &
|
||||||
FillComboBoxTypeLine(ui->comboBoxLineType);
|
FillComboBoxTypeLine(ui->comboBoxLineType);
|
||||||
FillComboBoxPoints(ui->comboBoxP1Line);
|
FillComboBoxPoints(ui->comboBoxP1Line);
|
||||||
FillComboBoxPoints(ui->comboBoxP2Line);
|
FillComboBoxPoints(ui->comboBoxP2Line);
|
||||||
FillComboBoxPoints(ui->comboBoxPShoulder);
|
FillComboBoxPoints(ui->comboBoxP3);
|
||||||
|
|
||||||
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogShoulderPoint::PutHere);
|
connect(ui->toolButtonPutHere, &QPushButton::clicked, this, &DialogShoulderPoint::PutHere);
|
||||||
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogShoulderPoint::PutVal);
|
connect(ui->listWidget, &QListWidget::itemDoubleClicked, this, &DialogShoulderPoint::PutVal);
|
||||||
|
@ -72,7 +72,7 @@ DialogShoulderPoint::DialogShoulderPoint(const VContainer *data, const quint32 &
|
||||||
this, &DialogShoulderPoint::PointNameChanged);
|
this, &DialogShoulderPoint::PointNameChanged);
|
||||||
connect(ui->comboBoxP2Line, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
connect(ui->comboBoxP2Line, static_cast<void (QComboBox::*)(const QString &)>(&QComboBox::currentIndexChanged),
|
||||||
this, &DialogShoulderPoint::PointNameChanged);
|
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);
|
this, &DialogShoulderPoint::PointNameChanged);
|
||||||
|
|
||||||
line = new VisToolShoulderPoint(data);
|
line = new VisToolShoulderPoint(data);
|
||||||
|
@ -90,7 +90,7 @@ void DialogShoulderPoint::PointNameChanged()
|
||||||
QSet<quint32> set;
|
QSet<quint32> set;
|
||||||
set.insert(getCurrentObjectId(ui->comboBoxP1Line));
|
set.insert(getCurrentObjectId(ui->comboBoxP1Line));
|
||||||
set.insert(getCurrentObjectId(ui->comboBoxP2Line));
|
set.insert(getCurrentObjectId(ui->comboBoxP2Line));
|
||||||
set.insert(getCurrentObjectId(ui->comboBoxPShoulder));
|
set.insert(getCurrentObjectId(ui->comboBoxP3));
|
||||||
|
|
||||||
QColor color = okColor;
|
QColor color = okColor;
|
||||||
if (set.size() != 3)
|
if (set.size() != 3)
|
||||||
|
@ -105,7 +105,7 @@ void DialogShoulderPoint::PointNameChanged()
|
||||||
}
|
}
|
||||||
ChangeColor(ui->labelFirstPoint, color);
|
ChangeColor(ui->labelFirstPoint, color);
|
||||||
ChangeColor(ui->labelSecondPoint, color);
|
ChangeColor(ui->labelSecondPoint, color);
|
||||||
ChangeColor(ui->labelPointShoulder, color);
|
ChangeColor(ui->labelThirdPoint, color);
|
||||||
CheckState();
|
CheckState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ void DialogShoulderPoint::ChosenObject(quint32 id, const SceneObject &type)
|
||||||
switch (number)
|
switch (number)
|
||||||
{
|
{
|
||||||
case 0:
|
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++;
|
number++;
|
||||||
line->VisualMode(id);
|
line->VisualMode(id);
|
||||||
|
@ -189,7 +189,7 @@ void DialogShoulderPoint::SaveData()
|
||||||
formula.replace("\n", " ");
|
formula.replace("\n", " ");
|
||||||
p1Line = getCurrentObjectId(ui->comboBoxP1Line);
|
p1Line = getCurrentObjectId(ui->comboBoxP1Line);
|
||||||
p2Line = getCurrentObjectId(ui->comboBoxP2Line);
|
p2Line = getCurrentObjectId(ui->comboBoxP2Line);
|
||||||
pShoulder = getCurrentObjectId(ui->comboBoxPShoulder);
|
pShoulder = getCurrentObjectId(ui->comboBoxP3);
|
||||||
|
|
||||||
line->setPoint1Id(pShoulder);
|
line->setPoint1Id(pShoulder);
|
||||||
line->setLineP1Id(p1Line);
|
line->setLineP1Id(p1Line);
|
||||||
|
@ -204,9 +204,9 @@ void DialogShoulderPoint::SaveData()
|
||||||
* @brief setPShoulder set id shoulder point
|
* @brief setPShoulder set id shoulder point
|
||||||
* @param value id
|
* @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);
|
line->setPoint1Id(pShoulder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,8 +63,8 @@ public:
|
||||||
quint32 getP2Line() const;
|
quint32 getP2Line() const;
|
||||||
void setP2Line(const quint32 &value);
|
void setP2Line(const quint32 &value);
|
||||||
|
|
||||||
quint32 getPShoulder() const;
|
quint32 getP3() const;
|
||||||
void setPShoulder(const quint32 &value);
|
void setP3(const quint32 &value);
|
||||||
public slots:
|
public slots:
|
||||||
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
virtual void ChosenObject(quint32 id, const SceneObject &type);
|
||||||
/**
|
/**
|
||||||
|
@ -166,7 +166,7 @@ inline quint32 DialogShoulderPoint::getP2Line() const
|
||||||
* @brief getPShoulder return id shoulder point
|
* @brief getPShoulder return id shoulder point
|
||||||
* @return id
|
* @return id
|
||||||
*/
|
*/
|
||||||
inline quint32 DialogShoulderPoint::getPShoulder() const
|
inline quint32 DialogShoulderPoint::getP3() const
|
||||||
{
|
{
|
||||||
return pShoulder;
|
return pShoulder;
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,7 +299,7 @@
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labelPointShoulder">
|
<widget class="QLabel" name="labelThirdPoint">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -307,12 +307,12 @@
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Point of shoulder</string>
|
<string>Third point</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="comboBoxPShoulder">
|
<widget class="QComboBox" name="comboBoxP3">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -527,7 +527,7 @@
|
||||||
<tabstop>lineEditNamePoint</tabstop>
|
<tabstop>lineEditNamePoint</tabstop>
|
||||||
<tabstop>comboBoxP1Line</tabstop>
|
<tabstop>comboBoxP1Line</tabstop>
|
||||||
<tabstop>comboBoxP2Line</tabstop>
|
<tabstop>comboBoxP2Line</tabstop>
|
||||||
<tabstop>comboBoxPShoulder</tabstop>
|
<tabstop>comboBoxP3</tabstop>
|
||||||
<tabstop>comboBoxLineType</tabstop>
|
<tabstop>comboBoxLineType</tabstop>
|
||||||
<tabstop>radioButtonSizeGrowth</tabstop>
|
<tabstop>radioButtonSizeGrowth</tabstop>
|
||||||
<tabstop>radioButtonStandardTable</tabstop>
|
<tabstop>radioButtonStandardTable</tabstop>
|
||||||
|
|
|
@ -435,7 +435,7 @@ void MainWindow::ToolAlongLine(bool checked)
|
||||||
void MainWindow::ToolShoulderPoint(bool checked)
|
void MainWindow::ToolShoulderPoint(bool checked)
|
||||||
{
|
{
|
||||||
SetToolButtonWithApply<DialogShoulderPoint>(checked, Tool::ShoulderPoint, ":/cursor/shoulder_cursor.png",
|
SetToolButtonWithApply<DialogShoulderPoint>(checked, Tool::ShoulderPoint, ":/cursor/shoulder_cursor.png",
|
||||||
tr("Select point of shoulder"),
|
tr("Select point"),
|
||||||
&MainWindow::ClosedDialogWithApply<VToolShoulderPoint>,
|
&MainWindow::ClosedDialogWithApply<VToolShoulderPoint>,
|
||||||
&MainWindow::ApplyDialog<VToolShoulderPoint>);
|
&MainWindow::ApplyDialog<VToolShoulderPoint>);
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ void VToolShoulderPoint::setDialog()
|
||||||
dialogTool->setFormula(formulaLength);
|
dialogTool->setFormula(formulaLength);
|
||||||
dialogTool->setP1Line(basePointId);
|
dialogTool->setP1Line(basePointId);
|
||||||
dialogTool->setP2Line(p2Line);
|
dialogTool->setP2Line(p2Line);
|
||||||
dialogTool->setPShoulder(pShoulder);
|
dialogTool->setP3(pShoulder);
|
||||||
dialogTool->setPointName(p->name());
|
dialogTool->setPointName(p->name());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ VToolShoulderPoint* VToolShoulderPoint::Create(DialogTool *dialog, VMainGraphics
|
||||||
QString formula = dialogTool->getFormula();
|
QString formula = dialogTool->getFormula();
|
||||||
const quint32 p1Line = dialogTool->getP1Line();
|
const quint32 p1Line = dialogTool->getP1Line();
|
||||||
const quint32 p2Line = dialogTool->getP2Line();
|
const quint32 p2Line = dialogTool->getP2Line();
|
||||||
const quint32 pShoulder = dialogTool->getPShoulder();
|
const quint32 pShoulder = dialogTool->getP3();
|
||||||
const QString typeLine = dialogTool->getTypeLine();
|
const QString typeLine = dialogTool->getTypeLine();
|
||||||
const QString pointName = dialogTool->getPointName();
|
const QString pointName = dialogTool->getPointName();
|
||||||
VToolShoulderPoint * point = nullptr;
|
VToolShoulderPoint * point = nullptr;
|
||||||
|
@ -304,7 +304,7 @@ void VToolShoulderPoint::SaveDialog(QDomElement &domElement)
|
||||||
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
|
doc->SetAttribute(domElement, AttrLength, dialogTool->getFormula());
|
||||||
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->getP1Line()));
|
doc->SetAttribute(domElement, AttrP1Line, QString().setNum(dialogTool->getP1Line()));
|
||||||
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->getP2Line()));
|
doc->SetAttribute(domElement, AttrP2Line, QString().setNum(dialogTool->getP2Line()));
|
||||||
doc->SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogTool->getPShoulder()));
|
doc->SetAttribute(domElement, AttrPShoulder, QString().setNum(dialogTool->getP3()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user