Refactoring.
--HG-- branch : develop
This commit is contained in:
parent
ab01a5b064
commit
48ad6cb678
|
@ -123,86 +123,86 @@ void DialogEditWrongFormula::ValChenged(int row)
|
||||||
{
|
{
|
||||||
if (item->text()==data->HeightName())
|
if (item->text()==data->HeightName())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->height()).arg(tr("Height"));
|
const QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->height()).arg(tr("Height"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
}
|
}
|
||||||
if (item->text()==data->SizeName())
|
if (item->text()==data->SizeName())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->size()).arg(tr("Size"));
|
const QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->size()).arg(tr("Size"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonStandardTable->isChecked())
|
if (ui->radioButtonStandardTable->isChecked())
|
||||||
{
|
{
|
||||||
QString name = qApp->VarFromUser(item->text());
|
const QString name = qApp->VarFromUser(item->text());
|
||||||
QSharedPointer<VMeasurement> stable = data->GetVariable<VMeasurement>(name);
|
const QSharedPointer<VMeasurement> stable = data->GetVariable<VMeasurement>(name);
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetTableValue(name))
|
const QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetTableValue(name))
|
||||||
.arg(stable->GetGuiText());
|
.arg(stable->GetGuiText());
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonIncrements->isChecked())
|
if (ui->radioButtonIncrements->isChecked())
|
||||||
{
|
{
|
||||||
QSharedPointer<VIncrement> incr = data->GetVariable<VIncrement>(item->text());
|
const QSharedPointer<VIncrement> incr = data->GetVariable<VIncrement>(item->text());
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetTableValue(item->text()))
|
const QString desc = QString("%1(%2) - %3").arg(item->text()).arg(data->GetTableValue(item->text()))
|
||||||
.arg(incr->GetDescription());
|
.arg(incr->GetDescription());
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonLengthLine->isChecked())
|
if (ui->radioButtonLengthLine->isChecked())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
const QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
.arg(*data->GetVariable<VLengthLine>(qApp->VarFromUser(item->text()))->GetValue())
|
.arg(*data->GetVariable<VLengthLine>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
.arg(tr("Line length"));
|
.arg(tr("Line length"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonLengthArc->isChecked())
|
if (ui->radioButtonLengthArc->isChecked())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
const QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
.arg(*data->GetVariable<VArcLength>(qApp->VarFromUser(item->text()))->GetValue())
|
.arg(*data->GetVariable<VArcLength>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
.arg(tr("Arc length"));
|
.arg(tr("Arc length"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonLengthSpline->isChecked())
|
if (ui->radioButtonLengthSpline->isChecked())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
const QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
.arg(*data->GetVariable<VSplineLength>(qApp->VarFromUser(item->text()))->GetValue())
|
.arg(*data->GetVariable<VSplineLength>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
.arg(tr("Curve length"));
|
.arg(tr("Curve length"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonAngleLine->isChecked())
|
if (ui->radioButtonAngleLine->isChecked())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
const QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
.arg(*data->GetVariable<VLineAngle>(qApp->VarFromUser(item->text()))->GetValue())
|
.arg(*data->GetVariable<VLineAngle>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
.arg(tr("Line Angle"));
|
.arg(tr("Line Angle"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonRadiusesArcs->isChecked())
|
if (ui->radioButtonRadiusesArcs->isChecked())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
const QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
.arg(*data->GetVariable<VArcRadius>(qApp->VarFromUser(item->text()))->GetValue())
|
.arg(*data->GetVariable<VArcRadius>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
.arg(tr("Arc radius"));
|
.arg(tr("Arc radius"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonAnglesArcs->isChecked())
|
if (ui->radioButtonAnglesArcs->isChecked())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
const QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
.arg(*data->GetVariable<VArcAngle>(qApp->VarFromUser(item->text()))->GetValue())
|
.arg(*data->GetVariable<VArcAngle>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
.arg(tr("Arc angle"));
|
.arg(tr("Arc angle"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ui->radioButtonAnglesCurves->isChecked())
|
if (ui->radioButtonAnglesCurves->isChecked())
|
||||||
{
|
{
|
||||||
QString desc = QString("%1(%2) - %3").arg(item->text())
|
const QString desc = QString("%1(%2) - %3").arg(item->text())
|
||||||
.arg(*data->GetVariable<VCurveAngle>(qApp->VarFromUser(item->text()))->GetValue())
|
.arg(*data->GetVariable<VCurveAngle>(qApp->VarFromUser(item->text()))->GetValue())
|
||||||
.arg(tr("Curve angle"));
|
.arg(tr("Curve angle"));
|
||||||
ui->labelDescription->setText(desc);
|
ui->labelDescription->setText(desc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user