45 explicit UiQuantity(QWidget* parent =
nullptr);
51 void setQuantity(
const Quantity& quantity);
59 double getMagnitude()
const;
63 void setMagnitude(
double value);
73 void setUnit(
const Unit& unit);
79 void changeUnit(
const Unit& unit);
83 double getValueSI()
const;
87 double value()
const{
return getValueSI();}
92 void setValueSI(
double value);
96 void setValue(
double valueInSI){setValueSI(valueInSI);}
101 double getValueInUnit(
const Unit& unit)
const;
106 void setValueUnit(
double value,
const Unit& unit);
121 void quantityChanged(
const Quantity& quantity);
123 void changeEvent(QEvent* event)
override;
128 void updateQuantity();
129 void updateArrowIcon();
131 QAction* actionSwitchUnit_{
nullptr};
132 bool dimensionLocked_{
true};