Base::UnitsSchema Class Referenceabstract

The UnitSchema class The subclasses of this class define the stuff for a certain units schema. More...

#include <UnitsSchema.h>

Public Member Functions

virtual void resetSchemaUnits ()
 If you use setSchemaUnits() you also have to impment this method to undo your changes! More...
 
virtual QString schemaTranslate (const Base::Quantity &quant, double &factor, QString &unitString)=0
 This method translates the quantity in a string as the user may expect it. More...
 
virtual void setSchemaUnits ()
 Gets called if this schema gets activated. More...
 
QString toLocale (const Base::Quantity &quant, double factor, const QString &unitString) const
 
virtual ~UnitsSchema ()
 

Detailed Description

The UnitSchema class The subclasses of this class define the stuff for a certain units schema.

Constructor & Destructor Documentation

◆ ~UnitsSchema()

virtual Base::UnitsSchema::~UnitsSchema ( )
virtual

Member Function Documentation

◆ resetSchemaUnits()

virtual void Base::UnitsSchema::resetSchemaUnits ( )
virtual

If you use setSchemaUnits() you also have to impment this method to undo your changes!

◆ schemaTranslate()

virtual QString Base::UnitsSchema::schemaTranslate ( const Base::Quantity quant,
double &  factor,
QString &  unitString 
)
pure virtual

◆ setSchemaUnits()

virtual void Base::UnitsSchema::setSchemaUnits ( )
virtual

Gets called if this schema gets activated.

Here it's theoretically possible that you can change the static factors for certain units (e.g. mi = 1,8km instead of mi=1.6km).

◆ toLocale()


The documentation for this class was generated from the following files: