diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2022-08-01 20:58:20 +0300 |
|---|---|---|
| committer | Riku Isokoski <riksu9000@gmail.com> | 2022-08-10 08:37:52 +0300 |
| commit | eb487c71be22bd7568a538bf30a1f0dcd4ed3a8b (patch) | |
| tree | 1e6590cc80d169bbd38b31da2a8e212374d8a26c /src/displayapp/screens/settings/SettingSetDate.h | |
| parent | 3eebe0244872818d7b96d4dae3e55e3548941bda (diff) | |
Use Counter in SettingsSetDate
Diffstat (limited to 'src/displayapp/screens/settings/SettingSetDate.h')
| -rw-r--r-- | src/displayapp/screens/settings/SettingSetDate.h | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/src/displayapp/screens/settings/SettingSetDate.h b/src/displayapp/screens/settings/SettingSetDate.h index a1795942..af0d654e 100644 --- a/src/displayapp/screens/settings/SettingSetDate.h +++ b/src/displayapp/screens/settings/SettingSetDate.h @@ -4,6 +4,7 @@ #include <lvgl/lvgl.h> #include "components/datetime/DateTimeController.h" #include "displayapp/screens/Screen.h" +#include "displayapp/widgets/Counter.h" namespace Pinetime { namespace Applications { @@ -13,28 +14,17 @@ namespace Pinetime { SettingSetDate(DisplayApp* app, Pinetime::Controllers::DateTime& dateTimeController); ~SettingSetDate() override; - void HandleButtonPress(lv_obj_t* object, lv_event_t event); + void HandleButtonPress(); + void CheckDay(); private: Controllers::DateTime& dateTimeController; - int dayValue; - int monthValue; - int yearValue; - lv_obj_t* lblDay; - lv_obj_t* lblMonth; - lv_obj_t* lblYear; - lv_obj_t* btnDayPlus; - lv_obj_t* btnDayMinus; - lv_obj_t* btnMonthPlus; - lv_obj_t* btnMonthMinus; - lv_obj_t* btnYearPlus; - lv_obj_t* btnYearMinus; lv_obj_t* btnSetTime; - int MaximumDayOfMonth() const; - void CheckDay(); - void UpdateMonthLabel(); + Widgets::Counter dayCounter = Widgets::Counter(1, 31, jetbrains_mono_bold_20); + Widgets::Counter monthCounter = Widgets::Counter(1, 12, jetbrains_mono_bold_20); + Widgets::Counter yearCounter = Widgets::Counter(1970, 9999, jetbrains_mono_bold_20); }; } } |
