#include <Unit.h>
Public Member Functions | |
const UnitSignature & | getSignature () const |
get the unit signature More... | |
QString | getString () const |
QString | getTypeString () const |
get the type as an string such as "Area", "Length" or "Pressure". More... | |
bool | isEmpty () const |
bool | operator!= (const Unit &that) const |
Unit | operator* (const Unit &) const |
Unit & | operator*= (const Unit &that) |
Operators. More... | |
Unit | operator/ (const Unit &) const |
Unit & | operator/= (const Unit &that) |
Unit & | operator= (const Unit &) |
bool | operator== (const Unit &) const |
Unit | pow (signed char exp) const |
Unit () | |
Unit (const QString &expr) | |
Unit (const Unit &) | |
Unit (int8_t Length, int8_t Mass=0, int8_t Time=0, int8_t ElectricCurrent=0, int8_t ThermodynamicTemperature=0, int8_t AmountOfSubstance=0, int8_t LuminousIntensity=0, int8_t Angle=0) | |
default constructor More... | |
~Unit () | |
Destruction. More... | |
Protected Attributes | |
UnitSignature | Sig |
The Unit class.
Unit::Unit | ( | int8_t | Length, |
int8_t | Mass = 0 , |
||
int8_t | Time = 0 , |
||
int8_t | ElectricCurrent = 0 , |
||
int8_t | ThermodynamicTemperature = 0 , |
||
int8_t | AmountOfSubstance = 0 , |
||
int8_t | LuminousIntensity = 0 , |
||
int8_t | Angle = 0 |
||
) |
default constructor
References Base::UnitSignature::AmountOfSubstance, AmountOfSubstance, Base::UnitSignature::Angle, Angle, Base::UnitSignature::ElectricCurrent, ElectricCurrent, Base::UnitSignature::Length, Length, Base::UnitSignature::LuminousIntensity, LuminousIntensity, Base::UnitSignature::Mass, Mass, Sig, Base::UnitSignature::ThermodynamicTemperature, and Base::UnitSignature::Time.
Unit::Unit | ( | ) |
|
explicit |
References Base::UnitSignature::AmountOfSubstance, Base::UnitSignature::Angle, Base::UnitSignature::ElectricCurrent, Base::Quantity::getUnit(), Base::UnitSignature::Length, Base::UnitSignature::LuminousIntensity, Base::UnitSignature::Mass, Base::Quantity::parse(), Sig, Base::UnitSignature::ThermodynamicTemperature, and Base::UnitSignature::Time.
Base::Unit::~Unit | ( | ) |
Destruction.
const UnitSignature & Base::Unit::getSignature | ( | ) | const |
get the unit signature
QString Unit::getString | ( | ) | const |
References Base::UnitSignature::AmountOfSubstance, Base::UnitSignature::Angle, Base::UnitSignature::ElectricCurrent, isEmpty(), Base::UnitSignature::Length, Base::UnitSignature::LuminousIntensity, Base::UnitSignature::Mass, Sig, Base::UnitSignature::ThermodynamicTemperature, and Base::UnitSignature::Time.
Referenced by Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaFemMilliMeterNewton::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), and Base::UnitsSchemaMmMin::schemaTranslate().
QString Unit::getTypeString | ( | ) | const |
get the type as an string such as "Area", "Length" or "Pressure".
References Acceleration, AmountOfSubstance, Angle, Area, Density, DynamicViscosity, ElectricalCapacitance, ElectricalConductance, ElectricalConductivity, ElectricalInductance, ElectricalResistance, ElectricCharge, ElectricCurrent, ElectricPotential, Force, Frequency, HeatFlux, KinematicViscosity, Length, LuminousIntensity, MagneticFieldStrength, MagneticFlux, MagneticFluxDensity, Mass, Power, Pressure, SpecificEnergy, SpecificHeat, Stiffness, Temperature, ThermalConductivity, ThermalExpansionCoefficient, ThermalTransferCoefficient, TimeSpan, VacuumPermittivity, Velocity, Volume, VolumetricThermalExpansionCoefficient, and Work.
Referenced by Gui::Dialog::DlgUnitsCalculator::valueChanged().
bool Unit::isEmpty | ( | ) | const |
References Base::UnitSignature::AmountOfSubstance, Base::UnitSignature::Angle, Base::UnitSignature::ElectricCurrent, Base::UnitSignature::Length, Base::UnitSignature::LuminousIntensity, Base::UnitSignature::Mass, Sig, Base::UnitSignature::ThermodynamicTemperature, and Base::UnitSignature::Time.
Referenced by SpreadsheetGui::SheetModel::data(), Spreadsheet::Cell::getFormattedQuantity(), getString(), Gui::InputField::newInput(), App::pyFromQuantity(), and Spreadsheet::Cell::setComputedUnit().
Unit Unit::pow | ( | signed char | exp | ) | const |
|
static |
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), and Unit().
|
static |
Angle.
Referenced by PartDesign::Chamfer::Chamfer(), PartGui::DlgExtrusion::DlgExtrusion(), PartGui::DlgRevolution::DlgRevolution(), Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), Gui::RDragger::drag(), SketcherGui::EditDatumDialog::exec(), TechDraw::DrawViewDimension::formatValue(), getTypeString(), PartGui::goDimensionAngularNoTask(), PartGui::Location::Location(), TechDraw::DrawViewDimension::onChanged(), TechDraw::DrawViewDimension::onDocumentRestored(), Gui::Dialog::Placement::Placement(), App::PropertyAngle::PropertyAngle(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMmMin::schemaTranslate(), TechDrawGui::TaskCenterLine::setUiEdit(), TechDrawGui::TaskCenterLine::setUiPrimary(), TechDrawGui::TaskDimension::TaskDimension(), Gui::PropertyEditor::PropertyRotationItem::toolTip(), Gui::PropertyEditor::PropertyPlacementItem::toolTip(), Gui::PropertyEditor::PropertyRotationItem::toString(), Gui::PropertyEditor::PropertyPlacementItem::toString(), Unit(), and SketcherGui::PropertyConstraintListItem::value().
|
static |
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertyArea::PropertyArea(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), and Base::UnitsSchemaMKS::schemaTranslate().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), and Unit().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Predefined Unit types.
Length unit
Referenced by ArchStructure.CommandStructuralSystem::Activated(), PartDesign::Chamfer::Chamfer(), PartGui::FilletRadiusDelegate::createEditor(), PartGui::createLinearDimension(), MeshPartGui::CrossSections::CrossSections(), PartGui::CrossSections::CrossSections(), Gui::PointMarker::customEvent(), PartGui::DlgExtrusion::DlgExtrusion(), PartGui::DlgFilletEdges::DlgFilletEdges(), TechDrawGui::DlgPrefsTechDrawAnnotationImp::DlgPrefsTechDrawAnnotationImp(), TechDrawGui::DlgPrefsTechDrawDimensionsImp::DlgPrefsTechDrawDimensionsImp(), TechDrawGui::DlgPrefsTechDrawGeneralImp::DlgPrefsTechDrawGeneralImp(), TechDrawGui::DlgPrefsTechDrawScaleImp::DlgPrefsTechDrawScaleImp(), PartGui::DlgRevolution::DlgRevolution(), Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), Gui::TDragger::drag(), TechDraw::DrawViewDimension::DrawViewDimension(), PartGui::dumpLinearResults(), SketcherGui::EditDatumDialog::exec(), App::FeatureTest::FeatureTest(), PartDesign::Fillet::Fillet(), TechDraw::DrawViewDimension::formatValue(), ArchPanel.CommandPanel::getPoint(), getTypeString(), App::PropertyVectorDistance::getUnit(), App::PropertyPosition::getUnit(), App::PropertyDirection::getUnit(), PartGui::Location::Location(), Gui::LocationWidget::LocationWidget(), PartGui::Mirroring::Mirroring(), PartGui::OffsetWidget::OffsetWidget(), Gui::Dialog::Transform::on_applyButton_clicked(), TechDraw::DrawViewDimension::onChanged(), Gui::Dialog::Placement::Placement(), TechDraw::DrawSVGTemplate::processTemplate(), App::PropertyDistance::PropertyDistance(), App::PropertyLength::PropertyLength(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaFemMilliMeterNewton::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), Base::UnitsSchemaMmMin::schemaTranslate(), SketcherGui::SketcherGeneralWidget::setGridSize(), ArchPanel.CommandPanel::setLength(), Gui::Dialog::Transform::setTransformStrategy(), TechDrawGui::TaskSectionView::setUiEdit(), TechDrawGui::TaskCenterLine::setUiEdit(), TechDrawGui::TaskDetail::setUiFromFeat(), TechDrawGui::TaskSectionView::setUiPrimary(), TechDrawGui::TaskCenterLine::setUiPrimary(), TechDrawGui::TaskCosmeticLine::setUiPrimary(), TechDrawGui::TaskCosVertex::setUiPrimary(), TechDrawGui::TaskLeaderLine::setUiPrimary(), TechDrawGui::TaskRichAnno::setUiPrimary(), PartGui::DlgFilletEdges::setupFillet(), Gui::PropertyEditor::PropertyVectorDistanceItem::setValue(), TechDrawGui::TaskActiveView::TaskActiveView(), TechDrawGui::TaskBalloon::TaskBalloon(), TechDrawGui::TaskDimension::TaskDimension(), PartDesignGui::TaskFilletParameters::TaskFilletParameters(), TechDrawGui::TaskProjGroup::TaskProjGroup(), Part::Thickness::Thickness(), Gui::PropertyEditor::PropertyPlacementItem::toolTip(), Gui::PropertyEditor::PropertyVectorDistanceItem::toString(), Gui::PropertyEditor::PropertyPlacementItem::toString(), Unit(), ArchPanel.CommandPanel::update(), Gui::ViewProviderMeasureDistance::updateData(), SketcherGui::PropertyConstraintListItem::value(), and InspectionGui::VisualInspection::VisualInspection().
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), and Unit().
|
static |
|
static |
|
static |
|
static |
Mass unit.
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), Base::UnitsSchemaFemMilliMeterNewton::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), and Unit().
|
static |
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertyPressure::PropertyPressure(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), and Base::UnitsSchemaMKS::schemaTranslate().
|
static |
|
protected |
Referenced by getString(), isEmpty(), operator*(), operator/(), operator=(), operator==(), pow(), and Unit().
|
static |
|
static |
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertyStiffness::PropertyStiffness(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), and FemGui::TaskFemConstraintSpring::TaskFemConstraintSpring().
|
static |
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), FemGui::TaskFemConstraintHeatflux::TaskFemConstraintHeatflux(), FemGui::TaskFemConstraintInitialTemperature::TaskFemConstraintInitialTemperature(), and FemGui::TaskFemConstraintTemperature::TaskFemConstraintTemperature().
|
static |
|
static |
|
static |
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), and getTypeString().
|
static |
|
static |
Referenced by getTypeString(), and App::PropertyVacuumPermittivity::PropertyVacuumPermittivity().
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertySpeed::PropertySpeed(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), and Base::UnitsSchemaMmMin::schemaTranslate().
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertyVolume::PropertyVolume(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), and Base::UnitsSchemaMKS::schemaTranslate().
|
static |
|
static |
|
static |
|
static |