diff options
author | Kieran Cawthray <kieranc@gmail.com> | 2021-10-18 23:14:39 +0200 |
---|---|---|
committer | Kieran Cawthray <kieranc@gmail.com> | 2021-10-18 23:14:39 +0200 |
commit | ff1fce18d6188d8b23374613f07e281173f228e7 (patch) | |
tree | 7d8bcf5448f86f31f092f4f554a8af167c225d7d /src/displayapp/screens/settings/SettingSetDate.h | |
parent | c4ab17f58707771256c6fffd8db63d32e2831610 (diff) | |
parent | ab7c6e162f82674d176466d361b1f87a0d55cf4a (diff) |
Merge remote-tracking branch 'upstream/develop' into pts-settings
Diffstat (limited to 'src/displayapp/screens/settings/SettingSetDate.h')
-rw-r--r-- | src/displayapp/screens/settings/SettingSetDate.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/displayapp/screens/settings/SettingSetDate.h b/src/displayapp/screens/settings/SettingSetDate.h new file mode 100644 index 00000000..477337ff --- /dev/null +++ b/src/displayapp/screens/settings/SettingSetDate.h @@ -0,0 +1,41 @@ +#pragma once + +#include <cstdint> +#include <lvgl/lvgl.h> +#include "components/datetime/DateTimeController.h" +#include "displayapp/screens/Screen.h" + +namespace Pinetime { + namespace Applications { + namespace Screens { + class SettingSetDate : public Screen{ + public: + SettingSetDate(DisplayApp* app, Pinetime::Controllers::DateTime &dateTimeController); + ~SettingSetDate() override; + + void HandleButtonPress(lv_obj_t *object, lv_event_t event); + + 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(); + }; + } + } +} |