Unit tests for temperature, virtual method for value conversion

This commit is contained in:
Klaus Basan
2013-03-22 23:02:25 +01:00
parent 525910c7a3
commit 3b99954bdc
12 changed files with 136 additions and 41 deletions

View File

@@ -179,7 +179,7 @@ private:
QString _type; //!< type,such as distance. Somehow redundant, but simplifies unit comparisons
bool _isSIUnit; //!< is this a SI unit?
bool _isSIBaseUnit; //!< SI base unit?
double _conversionFactorToSIConversionUnit; //!< factor to convert to SI
double _conversionFactorToSIConversionUnit; //!< factor to convert to SI, set to 0 if not applicable (rare cases, e.g. temperature)
double _epsilon; //!< values with differences below epsilon are the equal
qint32 _displayDigits; //!< standard rounding dor string conversions
CMeasurementPrefix _multiplier; //!< multiplier
@@ -278,7 +278,7 @@ public:
* \param to
* \return
*/
virtual double conversionFactor(const CMeasurementUnit &to) const;
double conversionFactor(const CMeasurementUnit &to) const;
/*!
* \brief Factor to convert between given units
* \param from