#include <UiQuantity.hpp>
|
|
void | quantityChanged (const Quantity &quantity) |
| |
◆ changeUnit()
| void ast::UiQuantity::changeUnit |
( |
const Unit & | unit | ) |
|
切换当前单位
切换当前单位后,数量值会自动转换为该单位 例如将1000m转换为1km,将1000kg转换为1t等
- 参数
-
◆ getMagnitude()
| double ast::UiQuantity::getMagnitude |
( |
| ) |
const |
◆ getQuantity()
| Quantity ast::UiQuantity::getQuantity |
( |
| ) |
const |
◆ getUnit()
| Unit ast::UiQuantity::getUnit |
( |
| ) |
const |
◆ getValueInUnit()
| double ast::UiQuantity::getValueInUnit |
( |
const Unit & | unit | ) |
const |
◆ getValueSI()
| double ast::UiQuantity::getValueSI |
( |
| ) |
const |
◆ setMagnitude()
| void ast::UiQuantity::setMagnitude |
( |
double | value | ) |
|
◆ setQuantity()
| void ast::UiQuantity::setQuantity |
( |
const Quantity & | quantity | ) |
|
◆ setUnit()
| void ast::UiQuantity::setUnit |
( |
const Unit & | unit | ) |
|
设置当前单位
不会改变当前数量值的数值大小,仅改变单位表示 例如将1000m转换为1000km,将1000kg转换为1000t等
- 参数
-
◆ setValueInUnit()
| void ast::UiQuantity::setValueInUnit |
( |
double | value, |
|
|
const Unit & | unit ) |
设置指定单位下的值
只会改变数量值的数值大小,不会改变数量值的单位
- 参数
-
◆ setValueSI()
| void ast::UiQuantity::setValueSI |
( |
double | value | ) |
|
设置国际单位下的值
只会改变数量值的数值大小,不会改变数量值的单位
- 参数
-
◆ setValueUnit()
| void ast::UiQuantity::setValueUnit |
( |
double | value, |
|
|
const Unit & | unit ) |
该类的文档由以下文件生成: