2021-07-09 08:11:20 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <lvgl/lvgl.h>
|
|
|
|
#include "components/datetime/DateTimeController.h"
|
2022-01-02 10:24:34 -05:00
|
|
|
#include "components/settings/Settings.h"
|
2021-07-09 08:11:20 -04:00
|
|
|
#include "displayapp/screens/Screen.h"
|
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
class SettingSetTime : public Screen{
|
|
|
|
public:
|
2022-01-02 10:24:34 -05:00
|
|
|
SettingSetTime(DisplayApp* app,
|
|
|
|
Pinetime::Controllers::DateTime& dateTimeController,
|
|
|
|
Pinetime::Controllers::Settings& settingsController);
|
2021-07-09 08:11:20 -04:00
|
|
|
~SettingSetTime() override;
|
|
|
|
|
|
|
|
void HandleButtonPress(lv_obj_t *object, lv_event_t event);
|
2022-01-02 10:24:34 -05:00
|
|
|
|
2021-10-10 10:18:14 -04:00
|
|
|
private:
|
2021-07-09 08:11:20 -04:00
|
|
|
Controllers::DateTime& dateTimeController;
|
2022-01-02 10:24:34 -05:00
|
|
|
Controllers::Settings& settingsController;
|
2021-07-09 08:11:20 -04:00
|
|
|
|
|
|
|
int hoursValue;
|
|
|
|
int minutesValue;
|
2022-01-02 10:24:34 -05:00
|
|
|
char ampmValue[3];
|
|
|
|
bool is24H;
|
2021-07-09 08:11:20 -04:00
|
|
|
lv_obj_t * lblHours;
|
|
|
|
lv_obj_t * lblMinutes;
|
2022-01-02 10:24:34 -05:00
|
|
|
lv_obj_t * lblampm;
|
2021-07-09 08:11:20 -04:00
|
|
|
lv_obj_t * btnHoursPlus;
|
|
|
|
lv_obj_t * btnHoursMinus;
|
|
|
|
lv_obj_t * btnMinutesPlus;
|
|
|
|
lv_obj_t * btnMinutesMinus;
|
|
|
|
lv_obj_t * btnSetTime;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|