summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/settings/SettingSetDate.h
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-10-10 14:01:43 (GMT)
committerJean-François Milants <jf@codingfield.com>2021-10-10 14:01:43 (GMT)
commitcf9e149b33885c67c84697a9b422e123c090bc72 (patch)
treec59c322655180d670ebaa3a47e9686eaada5eff7 /src/displayapp/screens/settings/SettingSetDate.h
parent977faebcb8b26212e0868b30e1af5c38076ff6cb (diff)
parent3e9c30a18fb0a0fa7cc69e62821ca0d11e518f47 (diff)
Merge with develop and fix conflicts from timaios:set-datetime-manually.
Diffstat (limited to 'src/displayapp/screens/settings/SettingSetDate.h')
-rw-r--r--src/displayapp/screens/settings/SettingSetDate.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/displayapp/screens/settings/SettingSetDate.h b/src/displayapp/screens/settings/SettingSetDate.h
new file mode 100644
index 0000000..0f6317d
--- /dev/null
+++ b/src/displayapp/screens/settings/SettingSetDate.h
@@ -0,0 +1,44 @@
+#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();
+ };
+ }
+ }
+}