[Base]use degree symbol in Imperial schemes

This commit is contained in:
wandererfan
2020-08-23 14:57:55 -04:00
committed by WandererFan
parent 08ba104d87
commit e989b5f7a4

View File

@@ -96,6 +96,10 @@ QString UnitsSchemaImperial1::schemaTranslate(const Quantity &quant, double &fac
factor = 25.4;
}
}
else if (unit == Unit::Angle) {
unitString = QString::fromUtf8("\xC2\xB0");
factor = 1.0;
}
else if (unit == Unit::Area) {
// TODO Cascade for the Areas
// default action for all cases without special treatment:
@@ -153,6 +157,10 @@ QString UnitsSchemaImperialDecimal::schemaTranslate(const Base::Quantity& quant,
unitString = QString::fromLatin1("in");
factor = 25.4;
}
else if (unit == Unit::Angle) {
unitString = QString::fromUtf8("\xC2\xB0");
factor = 1.0;
}
else if (unit == Unit::Area) {
// TODO Cascade for the Areas
// default action for all cases without special treatment:
@@ -296,6 +304,10 @@ QString UnitsSchemaImperialBuilding::schemaTranslate(const Quantity &quant, doub
// Done!
return QString::fromLatin1(output.str().c_str());
}
else if (unit == Unit::Angle) {
unitString = QString::fromUtf8("\xC2\xB0");
factor = 1.0;
}
else if (unit == Unit::Area) {
unitString = QString::fromLatin1("sqft");
factor = 92903.04;