Public Member Functions |
| | DtUnitConverterFactory () |
| virtual | ~DtUnitConverterFactory () |
| virtual void | registerUnitConversion (const QString &from, const QString &to, DtConverterFcn fcn, const QString &title="", const QString &unitTitle="", bool addTimeUnits=false) |
| | Use this routine to add a new conversion to the unit converter factory.
|
| virtual void | registerConversion (const QString &from, const QString &to, DtConverterFcn) |
| virtual bool | init () |
| | Calls registerConverters.
|
| virtual DtUnit | parse (const QString &) const |
| virtual bool | canConvert (const DtUnit &, const DtUnit &) const |
| virtual double | convert (const DtUnit &from, const DtUnit &to, double val, bool &valid, bool reverse=false) const |
| virtual double | convert (DtConversionType, const DtUnit &from, const DtUnit &to, double val, bool &valid, bool reverse=false) const |
| virtual double | convertReverse (const DtUnit &from, const DtUnit &to, double val, bool &valid) const |
| virtual QList< DtConverter * > | conversion (DtConversionType type, const DtUnit &from, const DtUnit &to) const |
| virtual void | findPath (DtConversionType type, const DtUnit &from, const DtUnit &to, const QHash< QString, DtConverterClass > &, QList< DtConverter * > &path) const |
| virtual double | convertSourceToDestination (double val, const QString &source, const QString &destination) const |
| | These routines are convenience functions that call convert methods Converts from the source to the destination units and returns formatted value.
|
| virtual double | convertDestinationToSource (double val, const QString &source, const QString &destination) const |
| | Converts from the destination to the source.
|
| virtual QString | unitTitle (const QString &u) const |