24class API_AUI_VIEWS ADoubleNumberPicker :
public AViewContainerBase {
28 ADoubleNumberPicker& mPicker;
31 ADoubleNumberPickerField(::ADoubleNumberPicker& picker) : mPicker(picker) {}
33 virtual ~ADoubleNumberPickerField() =
default;
35 void onKeyRepeat(AInput::Key key)
override;
38 bool isValidText(
const AString& text)
override;
47 ADoubleNumberPicker();
49 void setValue(
double v);
51 void setSuffix(
const AString& suffix);
53 [[nodiscard]]
const AString& text()
const noexcept {
return mTextField->text(); }
55 [[nodiscard]]
double getValue()
const {
return mTextField->getText().
toDouble().valueOr(0.0); }
57 [[nodiscard]]
double getMin()
const {
return mMin; }
59 [[nodiscard]]
double getMax()
const {
return mMax; }
61 void setMin(
double min);
62 void setMax(
double max);
66 void changeBy(
double v);
Text field implementation.
Definition AAbstractTextField.h:26
AOptional< double > toDouble() const noexcept
Converts the string to a double number.
Definition AString.cpp:1316