disambiguate metric tonne (1,000kg) and US ton (2,000lb)

This commit is contained in:
Mathew Sutcliffe
2013-08-22 19:59:41 +01:00
parent 669af6b691
commit 74452599bf
3 changed files with 16 additions and 5 deletions

View File

@@ -488,15 +488,25 @@ public:
}
/*!
* \brief Tonne, aka metric tonne (1000kg)
* \brief Tonne, aka metric ton (1000kg)
* \return
*/
static const CMassUnit &t()
static const CMassUnit &tonne()
{
static CMassUnit t(QT_TRANSLATE_NOOP("CMeasurementUnit", "tonne"), "t", 1000.0, 3);
return t;
}
/*!
* \brief Short ton (2000lb) used in the United States
* \return
*/
static const CMassUnit &shortTon()
{
static CMassUnit ton(QT_TRANSLATE_NOOP("CMeasurementUnit", "short ton"), "ton", 907.18474, 3);
return ton;
}
/*!
* \brief Pound, aka mass pound
* \return
@@ -519,7 +529,8 @@ public:
u.append(CMassUnit::g());
u.append(CMassUnit::kg());
u.append(CMassUnit::lb());
u.append(CMassUnit::t());
u.append(CMassUnit::tonne());
u.append(CMassUnit::shortTon());
}
return u;
}