45 explicit UiQuantity(QWidget* parent =
nullptr);
49 void setQuantity(
const Quantity& quantity);
57 double getMagnitude()
const;
61 void setMagnitude(
double value);
71 void setUnit(
const Unit& unit);
77 void changeUnit(
const Unit& unit);
81 double getValueSI()
const;
85 double value()
const{
return getValueSI();}
90 void setValueSI(
double value);
94 void setValue(
double valueInSI){setValueSI(valueInSI);}
99 double getValueInUnit(
const Unit& unit)
const;
104 void setValueUnit(
double value,
const Unit& unit);
119 void quantityChanged(
const Quantity& quantity);
121 void changeEvent(QEvent* event)
override;
126 void updateQuantity();
127 void updateArrowIcon();
129 QAction* actionSwitchUnit_{
nullptr};
130 bool dimensionLocked_{
true};