Show for user translated curve name in tool dialog and the property browser.
--HG-- branch : release
This commit is contained in:
parent
14000924e2
commit
b63922fa9e
|
@ -516,7 +516,7 @@ void VToolOptionsPropertyBrowser::AddPropertyObjectName(Tool *i, const QString &
|
||||||
{
|
{
|
||||||
auto itemName = new VPE::VStringProperty(propertyName);
|
auto itemName = new VPE::VStringProperty(propertyName);
|
||||||
itemName->setClearButtonEnable(true);
|
itemName->setClearButtonEnable(true);
|
||||||
itemName->setValue(i->name());
|
itemName->setValue(qApp->TrVars()->VarToUser(i->name()));
|
||||||
itemName->setReadOnly(readOnly);
|
itemName->setReadOnly(readOnly);
|
||||||
AddProperty(itemName, AttrName);
|
AddProperty(itemName, AttrName);
|
||||||
}
|
}
|
||||||
|
@ -2875,7 +2875,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolSpline()
|
||||||
auto i = qgraphicsitem_cast<VToolSpline *>(currentItem);
|
auto i = qgraphicsitem_cast<VToolSpline *>(currentItem);
|
||||||
const VSpline spl = i->getSpline();
|
const VSpline spl = i->getSpline();
|
||||||
|
|
||||||
idToProperty[AttrName]->setValue(i->name());
|
idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(i->name()));
|
||||||
|
|
||||||
VFormula angle1F(spl.GetStartAngleFormula(), i->getData());
|
VFormula angle1F(spl.GetStartAngleFormula(), i->getData());
|
||||||
angle1F.setCheckZero(false);
|
angle1F.setCheckZero(false);
|
||||||
|
@ -2918,7 +2918,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCubicBezier()
|
||||||
{
|
{
|
||||||
auto i = qgraphicsitem_cast<VToolCubicBezier *>(currentItem);
|
auto i = qgraphicsitem_cast<VToolCubicBezier *>(currentItem);
|
||||||
|
|
||||||
idToProperty[AttrName]->setValue(i->name());
|
idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(i->name()));
|
||||||
idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(),
|
idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(),
|
||||||
i->GetLineColor()));
|
i->GetLineColor()));
|
||||||
|
|
||||||
|
@ -2944,7 +2944,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolSplinePath()
|
||||||
{
|
{
|
||||||
auto i = qgraphicsitem_cast<VToolSplinePath *>(currentItem);
|
auto i = qgraphicsitem_cast<VToolSplinePath *>(currentItem);
|
||||||
|
|
||||||
idToProperty[AttrName]->setValue(i->name());
|
idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(i->name()));
|
||||||
idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(),
|
idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(),
|
||||||
i->GetLineColor()));
|
i->GetLineColor()));
|
||||||
}
|
}
|
||||||
|
@ -2954,7 +2954,7 @@ void VToolOptionsPropertyBrowser::UpdateOptionsToolCubicBezierPath()
|
||||||
{
|
{
|
||||||
auto i = qgraphicsitem_cast<VToolCubicBezierPath *>(currentItem);
|
auto i = qgraphicsitem_cast<VToolCubicBezierPath *>(currentItem);
|
||||||
|
|
||||||
idToProperty[AttrName]->setValue(i->name());
|
idToProperty[AttrName]->setValue(qApp->TrVars()->VarToUser(i->name()));
|
||||||
idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(),
|
idToProperty[AttrColor]->setValue(VPE::VLineColorProperty::IndexOfColor(VAbstractTool::ColorsList(),
|
||||||
i->GetLineColor()));
|
i->GetLineColor()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ void DialogCubicBezier::SetSpline(const VCubicBezier &spline)
|
||||||
setCurrentPointId(ui->comboBoxP3, spl.GetP3().id());
|
setCurrentPointId(ui->comboBoxP3, spl.GetP3().id());
|
||||||
setCurrentPointId(ui->comboBoxP4, spl.GetP4().id());
|
setCurrentPointId(ui->comboBoxP4, spl.GetP4().id());
|
||||||
|
|
||||||
ui->lineEditSplineName->setText(spl.name());
|
ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name()));
|
||||||
|
|
||||||
auto path = qobject_cast<VisToolCubicBezier *>(vis);
|
auto path = qobject_cast<VisToolCubicBezier *>(vis);
|
||||||
SCASSERT(path != nullptr)
|
SCASSERT(path != nullptr)
|
||||||
|
@ -195,7 +195,7 @@ void DialogCubicBezier::PointNameChanged()
|
||||||
getCurrentObjectId(ui->comboBoxP4) == spl.GetP4().id())
|
getCurrentObjectId(ui->comboBoxP4) == spl.GetP4().id())
|
||||||
{
|
{
|
||||||
newDuplicate = -1;
|
newDuplicate = -1;
|
||||||
ui->lineEditSplineName->setText(spl.name());
|
ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -206,7 +206,7 @@ void DialogCubicBezier::PointNameChanged()
|
||||||
newDuplicate = static_cast<qint32>(DNumber(spline.name()));
|
newDuplicate = static_cast<qint32>(DNumber(spline.name()));
|
||||||
spline.SetDuplicate(static_cast<quint32>(newDuplicate));
|
spline.SetDuplicate(static_cast<quint32>(newDuplicate));
|
||||||
}
|
}
|
||||||
ui->lineEditSplineName->setText(spline.name());
|
ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spline.name()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ChangeColor(ui->labelName, color);
|
ChangeColor(ui->labelName, color);
|
||||||
|
|
|
@ -101,7 +101,7 @@ void DialogCubicBezierPath::SetPath(const VCubicBezierPath &value)
|
||||||
NewItem(path.at(i));
|
NewItem(path.at(i));
|
||||||
}
|
}
|
||||||
ui->listWidget->setFocus(Qt::OtherFocusReason);
|
ui->listWidget->setFocus(Qt::OtherFocusReason);
|
||||||
ui->lineEditSplPathName->setText(path.name());
|
ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name()));
|
||||||
|
|
||||||
auto visPath = qobject_cast<VisToolCubicBezierPath *>(vis);
|
auto visPath = qobject_cast<VisToolCubicBezierPath *>(vis);
|
||||||
SCASSERT(visPath != nullptr)
|
SCASSERT(visPath != nullptr)
|
||||||
|
@ -242,7 +242,7 @@ void DialogCubicBezierPath::currentPointChanged(int index)
|
||||||
if (first.id() == path.at(0).id() && last.id() == path.at(path.CountPoints()-1).id())
|
if (first.id() == path.at(0).id() && last.id() == path.at(path.CountPoints()-1).id())
|
||||||
{
|
{
|
||||||
newDuplicate = -1;
|
newDuplicate = -1;
|
||||||
ui->lineEditSplPathName->setText(path.name());
|
ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -254,7 +254,7 @@ void DialogCubicBezierPath::currentPointChanged(int index)
|
||||||
newPath.SetDuplicate(static_cast<quint32>(newDuplicate));
|
newPath.SetDuplicate(static_cast<quint32>(newDuplicate));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->lineEditSplPathName->setText(newPath.name());
|
ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(newPath.name()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ChangeColor(ui->labelName, color);
|
ChangeColor(ui->labelName, color);
|
||||||
|
|
|
@ -493,7 +493,7 @@ void DialogSpline::PointNameChanged()
|
||||||
getCurrentObjectId(ui->comboBoxP4) == spl.GetP4().id())
|
getCurrentObjectId(ui->comboBoxP4) == spl.GetP4().id())
|
||||||
{
|
{
|
||||||
newDuplicate = -1;
|
newDuplicate = -1;
|
||||||
ui->lineEditSplineName->setText(spl.name());
|
ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -505,7 +505,7 @@ void DialogSpline::PointNameChanged()
|
||||||
newDuplicate = static_cast<qint32>(DNumber(spline.name()));
|
newDuplicate = static_cast<qint32>(DNumber(spline.name()));
|
||||||
spline.SetDuplicate(static_cast<quint32>(newDuplicate));
|
spline.SetDuplicate(static_cast<quint32>(newDuplicate));
|
||||||
}
|
}
|
||||||
ui->lineEditSplineName->setText(spline.name());
|
ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spline.name()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ChangeColor(ui->labelName, color);
|
ChangeColor(ui->labelName, color);
|
||||||
|
@ -541,7 +541,7 @@ void DialogSpline::ShowDialog(bool click)
|
||||||
spl.SetDuplicate(DNumber(spl.name()));
|
spl.SetDuplicate(DNumber(spl.name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->lineEditSplineName->setText(spl.name());
|
ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name()));
|
||||||
|
|
||||||
DialogAccepted();
|
DialogAccepted();
|
||||||
}
|
}
|
||||||
|
@ -594,7 +594,7 @@ void DialogSpline::SetSpline(const VSpline &spline)
|
||||||
|
|
||||||
ui->plainTextEditLength1F->setPlainText(length1F);
|
ui->plainTextEditLength1F->setPlainText(length1F);
|
||||||
ui->plainTextEditLength2F->setPlainText(length2F);
|
ui->plainTextEditLength2F->setPlainText(length2F);
|
||||||
ui->lineEditSplineName->setText(spl.name());
|
ui->lineEditSplineName->setText(qApp->TrVars()->VarToUser(spl.name()));
|
||||||
|
|
||||||
auto path = qobject_cast<VisToolSpline *>(vis);
|
auto path = qobject_cast<VisToolSpline *>(vis);
|
||||||
SCASSERT(path != nullptr)
|
SCASSERT(path != nullptr)
|
||||||
|
|
|
@ -158,7 +158,7 @@ void DialogSplinePath::SetPath(const VSplinePath &value)
|
||||||
NewItem(path.at(i));
|
NewItem(path.at(i));
|
||||||
}
|
}
|
||||||
ui->listWidget->setFocus(Qt::OtherFocusReason);
|
ui->listWidget->setFocus(Qt::OtherFocusReason);
|
||||||
ui->lineEditSplPathName->setText(path.name());
|
ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name()));
|
||||||
|
|
||||||
auto visPath = qobject_cast<VisToolSplinePath *>(vis);
|
auto visPath = qobject_cast<VisToolSplinePath *>(vis);
|
||||||
SCASSERT(visPath != nullptr)
|
SCASSERT(visPath != nullptr)
|
||||||
|
@ -700,7 +700,7 @@ void DialogSplinePath::currentPointChanged(int index)
|
||||||
if (first.P().id() == path.at(0).P().id() && last.P().id() == path.at(path.CountPoints()-1).P().id())
|
if (first.P().id() == path.at(0).P().id() && last.P().id() == path.at(path.CountPoints()-1).P().id())
|
||||||
{
|
{
|
||||||
newDuplicate = -1;
|
newDuplicate = -1;
|
||||||
ui->lineEditSplPathName->setText(path.name());
|
ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(path.name()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -712,7 +712,7 @@ void DialogSplinePath::currentPointChanged(int index)
|
||||||
newPath.SetDuplicate(static_cast<quint32>(newDuplicate));
|
newPath.SetDuplicate(static_cast<quint32>(newDuplicate));
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->lineEditSplPathName->setText(newPath.name());
|
ui->lineEditSplPathName->setText(qApp->TrVars()->VarToUser(newPath.name()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ChangeColor(ui->labelName, color);
|
ChangeColor(ui->labelName, color);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user