#include <Unit.h>
Public Member Functions | |
const UnitSignature & | getSignature (void) const |
get the unit signature More... | |
QString | getString (void) const |
QString | getTypeString (void) const |
get the type as an string such as "Area", "Length" or "Pressure". More... | |
bool | isEmpty (void) 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 (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 (void) | |
~Unit () | |
Destruction. More... | |
Protected Attributes | |
UnitSignature | Sig |
Detailed Description
The Unit class.
Constructor & Destructor Documentation
◆ Unit() [1/4]
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() [2/4]
Unit::Unit | ( | void | ) |
◆ Unit() [3/4]
◆ Unit() [4/4]
Unit::Unit | ( | const QString & | expr | ) |
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.
◆ ~Unit()
Base::Unit::~Unit | ( | ) |
Destruction.
Member Function Documentation
◆ getSignature()
const UnitSignature& Base::Unit::getSignature | ( | void | ) | const |
get the unit signature
Referenced by Base::UnitPy::getSignature(), and Base::UnitPy::representation().
◆ getString()
QString Unit::getString | ( | void | ) | 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 CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), Base::QuantityPy::representation(), Base::UnitPy::representation(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMmMin::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), and Base::UnitsSchemaImperialCivil::schemaTranslate().
◆ getTypeString()
QString Unit::getTypeString | ( | void | ) | const |
get the type as an string such as "Area", "Length" or "Pressure".
References Acceleration, AmountOfSubstance, Angle, Area, Density, DynamicViscosity, ElectricalCapacitance, ElectricalConductance, ElectricalInductance, ElectricalResistance, ElectricCharge, ElectricCurrent, ElectricPotential, Force, Frequency, HeatFlux, KinematicViscosity, Length, LuminousIntensity, MagneticFieldStrength, MagneticFlux, MagneticFluxDensity, Mass, Power, Pressure, SpecificEnergy, SpecificHeat, Temperature, ThermalConductivity, ThermalExpansionCoefficient, ThermalTransferCoefficient, TimeSpan, VacuumPermittivity, Velocity, Volume, VolumetricThermalExpansionCoefficient, and Work.
Referenced by Base::UnitPy::representation(), and Gui::Dialog::DlgUnitsCalculator::valueChanged().
◆ isEmpty()
bool Unit::isEmpty | ( | void | ) | 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().
◆ operator!=()
◆ operator*()
◆ operator*=()
◆ operator/()
◆ operator/=()
◆ operator=()
◆ operator==()
◆ pow()
Unit Unit::pow | ( | signed char | exp | ) | const |
Member Data Documentation
◆ Acceleration
|
static |
◆ AmountOfSubstance
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), and Unit().
◆ Angle
|
static |
Angle.
Referenced by PartDesign::Chamfer::Chamfer(), PartGui::DlgExtrusion::DlgExtrusion(), PartGui::DlgRevolution::DlgRevolution(), Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), Gui::RDragger::drag(), SketcherGui::EditDatumDialog::exec(), Sketcher::SketchObjectPy::getDatum(), TechDraw::DrawViewDimension::getFormatedValue(), getTypeString(), PartGui::goDimensionAngularNoTask(), Gui::Dialog::Placement::Placement(), App::PropertyAngle::PropertyAngle(), Sketcher::ConstraintPy::PyInit(), Base::MatrixPy::rotateX(), Base::MatrixPy::rotateY(), Base::MatrixPy::rotateZ(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMmMin::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), Sketcher::SketchObjectPy::setDatum(), TechDrawGui::TaskCenterLine::setUiEdit(), TechDrawGui::TaskCenterLine::setUiPrimary(), Gui::PropertyEditor::PropertyPlacementItem::toolTip(), Gui::PropertyEditor::PropertyPlacementItem::toString(), Unit(), and SketcherGui::PropertyConstraintListItem::value().
◆ AngleOfFriction
|
static |
◆ Area
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertyArea::PropertyArea(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), and Base::UnitsSchemaImperialCivil::schemaTranslate().
◆ CompressiveStrength
|
static |
◆ Density
|
static |
◆ DynamicViscosity
|
static |
◆ ElectricalCapacitance
|
static |
◆ ElectricalConductance
|
static |
◆ ElectricalInductance
|
static |
◆ ElectricalResistance
|
static |
◆ ElectricCharge
|
static |
◆ ElectricCurrent
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), and Unit().
◆ ElectricPotential
|
static |
◆ Force
|
static |
◆ Frequency
|
static |
◆ HeatFlux
|
static |
◆ KinematicViscosity
|
static |
◆ Length
|
static |
Predefined Unit types.
Length unit
Referenced by CmdSketcherConstrainRadius::activated(), CmdSketcherConstrainDiameter::activated(), CmdSketcherConstrainRadius::applyConstraint(), CmdSketcherConstrainDiameter::applyConstraint(), 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(), PartGui::dumpLinearResults(), SketcherGui::EditDatumDialog::exec(), App::FeatureTest::FeatureTest(), PartDesign::Fillet::Fillet(), Sketcher::SketchObjectPy::getDatum(), TechDraw::DrawViewDimension::getFormatedValue(), ArchPanel.CommandPanel::getPoint(), getTypeString(), App::PropertyVectorDistance::getUnit(), App::PropertyPosition::getUnit(), App::PropertyDirection::getUnit(), Gui::LocationWidget::LocationWidget(), PartGui::Mirroring::Mirroring(), PartGui::OffsetWidget::OffsetWidget(), Gui::Dialog::Transform::on_applyButton_clicked(), Gui::Dialog::Placement::Placement(), TechDraw::DrawSVGTemplate::processTemplate(), App::PropertyDistance::PropertyDistance(), App::PropertyLength::PropertyLength(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), Base::UnitsSchemaMmMin::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), SketcherGui::SketcherGeneralWidget::setGridSize(), ArchPanel.CommandPanel::setLength(), Gui::Dialog::Transform::setTransformStrategy(), TechDrawGui::TaskSectionView::setUiEdit(), TechDrawGui::TaskCenterLine::setUiEdit(), TechDrawGui::TaskDetail::setUiFromFeat(), TechDrawGui::TaskSectionView::setUiPrimary(), TechDrawGui::TaskCosVertex::setUiPrimary(), TechDrawGui::TaskRichAnno::setUiPrimary(), TechDrawGui::TaskCenterLine::setUiPrimary(), TechDrawGui::TaskLeaderLine::setUiPrimary(), PartGui::DlgFilletEdges::setupFillet(), Gui::PropertyEditor::PropertyVectorDistanceItem::setValue(), TechDrawGui::TaskActiveView::TaskActiveView(), TechDrawGui::TaskBalloon::TaskBalloon(), PartDesignGui::TaskFilletParameters::TaskFilletParameters(), 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().
◆ LuminousIntensity
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), and Unit().
◆ MagneticFieldStrength
|
static |
◆ MagneticFlux
|
static |
◆ MagneticFluxDensity
|
static |
◆ Mass
|
static |
Mass unit.
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialCivil::schemaTranslate(), and Unit().
◆ Power
|
static |
◆ Pressure
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertyPressure::PropertyPressure(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), and Base::UnitsSchemaImperialCivil::schemaTranslate().
◆ ShearModulus
|
static |
◆ Sig
|
protected |
Referenced by getString(), isEmpty(), operator*(), operator/(), operator=(), operator==(), pow(), and Unit().
◆ SpecificEnergy
|
static |
◆ SpecificHeat
|
static |
◆ Stress
|
static |
◆ Temperature
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), FemGui::TaskFemConstraintHeatflux::TaskFemConstraintHeatflux(), FemGui::TaskFemConstraintInitialTemperature::TaskFemConstraintInitialTemperature(), and FemGui::TaskFemConstraintTemperature::TaskFemConstraintTemperature().
◆ ThermalConductivity
|
static |
◆ ThermalExpansionCoefficient
|
static |
◆ ThermalTransferCoefficient
|
static |
◆ TimeSpan
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), and getTypeString().
◆ UltimateTensileStrength
|
static |
◆ VacuumPermittivity
|
static |
Referenced by getTypeString().
◆ Velocity
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertySpeed::PropertySpeed(), Robot::WaypointPy::PyInit(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaMmMin::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), and Base::UnitsSchemaImperialCivil::schemaTranslate().
◆ Volume
|
static |
Referenced by Gui::Dialog::DlgUnitsCalculator::DlgUnitsCalculator(), getTypeString(), App::PropertyVolume::PropertyVolume(), Base::UnitsSchemaImperialDecimal::schemaTranslate(), Base::UnitsSchemaCentimeters::schemaTranslate(), Base::UnitsSchemaMKS::schemaTranslate(), Base::UnitsSchemaInternal::schemaTranslate(), Base::UnitsSchemaImperial1::schemaTranslate(), Base::UnitsSchemaImperialBuilding::schemaTranslate(), and Base::UnitsSchemaImperialCivil::schemaTranslate().
◆ VolumetricThermalExpansionCoefficient
|
static |
◆ Work
|
static |
◆ YieldStrength
|
static |
◆ YoungsModulus
|
static |
The documentation for this class was generated from the following files:
- src/Base/Unit.h
- src/Base/Unit.cpp