Consolidate frequency field on_edit (#1166)

This commit is contained in:
Kyle Reed 2023-06-18 12:11:04 -07:00 committed by GitHub
parent 7b669d7001
commit 5daa0dfbb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 215 additions and 350 deletions

View file

@ -36,7 +36,6 @@
namespace ui {
// TODO: build in support for editing.
class FrequencyField : public Widget {
public:
std::function<void(rf::Frequency)> on_change{};
@ -45,7 +44,7 @@ class FrequencyField : public Widget {
using range_t = rf::FrequencyRange;
FrequencyField(const Point parent_pos);
FrequencyField(Point parent_pos);
rf::Frequency value() const;
@ -54,9 +53,9 @@ class FrequencyField : public Widget {
void paint(Painter& painter) override;
bool on_key(const ui::KeyEvent event) override;
bool on_encoder(const EncoderEvent delta) override;
bool on_touch(const TouchEvent event) override;
bool on_key(ui::KeyEvent event) override;
bool on_encoder(EncoderEvent delta) override;
bool on_touch(TouchEvent event) override;
void on_focus() override;
private: