1
0
Fork 0
InfiniTime/src/displayapp/screens/settings/Settings.h

62 lines
2.1 KiB
C
Raw Normal View History

#pragma once
#include <array>
#include <memory>
#include "displayapp/screens/Screen.h"
#include "displayapp/screens/ScreenList.h"
#include "displayapp/screens/Symbols.h"
#include "displayapp/screens/List.h"
namespace Pinetime {
namespace Applications {
namespace Screens {
class Settings : public Screen {
2021-04-24 12:00:45 +03:00
public:
Settings(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
~Settings() override;
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;
2021-04-24 12:00:45 +03:00
private:
DisplayApp* app;
auto CreateScreenList() const;
std::unique_ptr<Screen> CreateScreen(unsigned int screenNum) const;
Controllers::Settings& settingsController;
static constexpr int entriesPerScreen = 4;
// Increment this when more space is needed
static constexpr int nScreens = 4;
static constexpr std::array<List::Applications, entriesPerScreen * nScreens> entries {{
{Symbols::home, "Watch face", Apps::SettingWatchFace},
2024-05-10 11:53:36 +01:00
{Symbols::clock, "Time format", Apps::SettingTimeFormat},
{Symbols::eye, "Turn on when", Apps::SettingWakeUp},
{Symbols::sun, "Turn off when", Apps::SettingDisplay},
2024-05-10 11:53:36 +01:00
{Symbols::shoe, "Steps goal", Apps::SettingSteps},
{Symbols::clock, "Date & time", Apps::SettingSetDateTime},
//{Symbols::cloudSunRain, "Weather", Apps::SettingWeatherFormat},
//{Symbols::clock, "Chimes", Apps::SettingChimes},
{Symbols::tachometer, "Shake sensit'y", Apps::SettingShakeThreshold},
{Symbols::batteryHalf, "Battery level", Apps::BatteryInfo},
{Symbols::bluetooth, "Bluetooth", Apps::SettingBluetooth},
2024-05-10 11:53:36 +01:00
{Symbols::check, "Firmware", Apps::FirmwareValidation},
{Symbols::list, "About", Apps::SysInfo},
// {Symbols::none, "None", Apps::None},
// {Symbols::none, "None", Apps::None},
// {Symbols::none, "None", Apps::None},
// {Symbols::none, "None", Apps::None},
}};
ScreenList<nScreens> screens;
};
}
}
}