Merged in BojanKverh/valentina-issue331/feature (pull request #147)
Grainline implementation. ref #331. --HG-- branch : develop
This commit is contained in:
commit
1aa896eff1
|
@ -728,7 +728,7 @@ void VPattern::ParseDetailElement(const QDomElement &domElement, const Document
|
|||
detail.GetGrainlineGeometry().SetPos(ptPos);
|
||||
QString qsLength = GetParametrString(element, AttrLength, "0");
|
||||
detail.GetGrainlineGeometry().SetLength(qsLength);
|
||||
QString qsRot = GetParametrString(element, VToolDetail::AttrRotation, "0");
|
||||
QString qsRot = GetParametrString(element, VToolDetail::AttrRotation, "90");
|
||||
detail.GetGrainlineGeometry().SetRotation(qsRot);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -903,8 +903,7 @@ void DialogDetail::UpdateValues()
|
|||
}
|
||||
else
|
||||
{
|
||||
QIcon icon;
|
||||
ui.tabWidget->setTabIcon(2, icon);
|
||||
ResetWarning();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -974,6 +973,7 @@ void DialogDetail::EnableGrainlineRotation()
|
|||
ChangeColor(ui.labelEditLen, okColor);
|
||||
ChangeColor(ui.labelEditRot, okColor);
|
||||
bOk->setEnabled(true);
|
||||
ResetWarning();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1024,3 +1024,11 @@ void DialogDetail::DeployLength()
|
|||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void DialogDetail::ResetWarning()
|
||||
{
|
||||
QIcon icon;
|
||||
ui.tabWidget->setTabIcon(2, icon);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -135,6 +135,7 @@ private slots:
|
|||
void EditFormula();
|
||||
void DeployRotation();
|
||||
void DeployLength();
|
||||
void ResetWarning();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -509,6 +509,7 @@ void VToolDetail::AddToFile()
|
|||
doc->SetAttribute(domData, AttrMy, glGeom.GetPos().y());
|
||||
doc->SetAttribute(domData, AttrLength, glGeom.GetLength());
|
||||
doc->SetAttribute(domData, AttrRotation, glGeom.GetRotation());
|
||||
qDebug() << "XML ROTATION" << glGeom.GetRotation();
|
||||
|
||||
// nodes
|
||||
for (int i = 0; i < detail.CountNode(); ++i)
|
||||
|
@ -587,6 +588,7 @@ void VToolDetail::RefreshDataInFile()
|
|||
doc->SetAttribute(domData, AttrMy, glGeom.GetPos().y());
|
||||
doc->SetAttribute(domData, AttrLength, glGeom.GetLength());
|
||||
doc->SetAttribute(domData, AttrRotation, glGeom.GetRotation());
|
||||
qDebug() << "XML ROTATION2" << glGeom.GetRotation();
|
||||
|
||||
// nodes
|
||||
for (int i = 0; i < det.CountNode(); ++i)
|
||||
|
@ -933,6 +935,7 @@ void VToolDetail::UpdateGrainline()
|
|||
QString qsFormula;
|
||||
qsFormula = geom.GetRotation().replace("\n", " ");
|
||||
qsFormula = qApp->TrVars()->FormulaFromUser(qsFormula, qApp->Settings()->GetOsSeparator());
|
||||
|
||||
Calculator cal1;
|
||||
dRotation = cal1.EvalFormula(VDataTool::data.PlainVariables(), qsFormula);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user