2021-04-04 03:08:51 +01:00
|
|
|
#pragma once
|
|
|
|
|
2021-09-20 15:13:46 +03:00
|
|
|
#include <array>
|
|
|
|
#include <cstdint>
|
|
|
|
#include <lvgl/lvgl.h>
|
2021-04-04 03:08:51 +01:00
|
|
|
|
2021-12-03 21:39:18 +02:00
|
|
|
#include "components/settings/Settings.h"
|
|
|
|
#include "displayapp/screens/Screen.h"
|
|
|
|
|
2021-04-04 03:08:51 +01:00
|
|
|
namespace Pinetime {
|
|
|
|
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
|
2021-04-18 20:28:14 +03:00
|
|
|
class SettingTimeFormat : public Screen {
|
2021-04-24 12:00:45 +03:00
|
|
|
public:
|
2021-04-18 20:28:14 +03:00
|
|
|
SettingTimeFormat(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
|
|
|
|
~SettingTimeFormat() override;
|
2021-04-04 03:08:51 +01:00
|
|
|
|
2021-04-18 20:28:14 +03:00
|
|
|
void UpdateSelected(lv_obj_t* object, lv_event_t event);
|
2021-04-04 03:08:51 +01:00
|
|
|
|
2021-04-24 12:00:45 +03:00
|
|
|
private:
|
2022-10-13 21:24:33 +03:00
|
|
|
struct Option {
|
|
|
|
Controllers::Settings::ClockType clockType;
|
|
|
|
const char* name;
|
|
|
|
};
|
2023-01-07 21:23:15 +01:00
|
|
|
|
2022-10-13 21:24:33 +03:00
|
|
|
static constexpr std::array<Option, 2> options = {{
|
|
|
|
{Controllers::Settings::ClockType::H12, "12-hour"},
|
|
|
|
{Controllers::Settings::ClockType::H24, "24-hour"},
|
|
|
|
}};
|
2021-04-18 20:28:14 +03:00
|
|
|
Controllers::Settings& settingsController;
|
2021-09-23 02:27:09 +03:00
|
|
|
lv_obj_t* cbOption[options.size()];
|
2021-04-04 03:08:51 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|