1 #ifndef CNOID_BASE_DOUBLE_SPINBOX_H
2 #define CNOID_BASE_DOUBLE_SPINBOX_H
4 #include <cnoid/Signal>
5 #include <QDoubleSpinBox>
6 #include <cnoid/stdx/optional>
7 #include "exportdecl.h"
16 void setUndoRedoKeyInputEnabled(
bool on);
19 void setValue(
double val);
23 SignalProxy<void()> sigEditingFinishedWithValueChange();
26 void onValueChanged(
double value);
27 void onEditingFinished();
28 virtual void keyPressEvent(QKeyEvent* event)
override;
31 stdx::optional<
Signal<void(
double)>> sigValueChanged_;
32 stdx::optional<
Signal<void()>> sigEditingFinished_;
33 stdx::optional<
Signal<void()>> sigEditingFinishedWithValueChange_;
34 bool isSettingValueInternally;
35 bool isUndoRedoKeyInputEnabled_;
36 bool valueChangedByLastUserInput;