Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ list(APPEND SOURCE_FILES
displayapp/screens/settings/Settings.cpp
displayapp/screens/settings/SettingWatchFace.cpp
displayapp/screens/settings/SettingTimeFormat.cpp
displayapp/screens/settings/SettingClockFormat.cpp
displayapp/screens/settings/SettingDateFormat.cpp
displayapp/screens/settings/SettingWeatherFormat.cpp
displayapp/screens/settings/SettingWakeUp.cpp
displayapp/screens/settings/SettingDisplay.cpp
Expand All @@ -422,6 +424,7 @@ list(APPEND SOURCE_FILES
## Watch faces
displayapp/screens/WatchFaceAnalog.cpp
displayapp/screens/WatchFaceDigital.cpp
displayapp/screens/WatchFaceMixed.cpp
displayapp/screens/WatchFaceInfineat.cpp
displayapp/screens/WatchFaceTerminal.cpp
displayapp/screens/WatchFacePineTimeStyle.cpp
Expand Down
13 changes: 13 additions & 0 deletions src/components/settings/Settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace Pinetime {
class Settings {
public:
enum class ClockType : uint8_t { H24, H12 };
enum class DateFormat : uint8_t { YYYYMMDD, DDMMYYYY, MMDDYYYY, DayDDMonthYYYY };
enum class WeatherFormat : uint8_t { Metric, Imperial };
enum class Notification : uint8_t { On, Off, Sleep };
enum class ChimesOption : uint8_t { None, Hours, HalfHours };
Expand Down Expand Up @@ -181,6 +182,17 @@ namespace Pinetime {
return settings.clockType;
};

void SetDateFormat(DateFormat dateFormat) {
if (dateFormat != settings.dateFormat) {
settingsChanged = true;
}
settings.dateFormat = dateFormat;
};

DateFormat GetDateFormat() const {
return settings.dateFormat;
};

void SetWeatherFormat(WeatherFormat weatherFormat) {
if (weatherFormat != settings.weatherFormat) {
settingsChanged = true;
Expand Down Expand Up @@ -311,6 +323,7 @@ namespace Pinetime {
bool alwaysOnDisplay = false;

ClockType clockType = ClockType::H24;
DateFormat dateFormat = DateFormat::DayDDMonthYYYY;
WeatherFormat weatherFormat = WeatherFormat::Metric;
Notification notificationStatus = Notification::On;

Expand Down
2 changes: 1 addition & 1 deletion src/displayapp/DisplayApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
currentScreen = std::make_unique<Screens::SettingWatchFace>(this, std::move(items), settingsController, filesystem);
} break;
case Apps::SettingTimeFormat:
currentScreen = std::make_unique<Screens::SettingTimeFormat>(settingsController);
currentScreen = std::make_unique<Screens::SettingTimeFormat>(this, settingsController);
break;
case Apps::SettingWeatherFormat:
currentScreen = std::make_unique<Screens::SettingWeatherFormat>(settingsController);
Expand Down
1 change: 1 addition & 0 deletions src/displayapp/UserApps.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "displayapp/screens/ApplicationList.h"
#include "displayapp/screens/WatchFaceDigital.h"
#include "displayapp/screens/WatchFaceAnalog.h"
#include "displayapp/screens/WatchFaceMixed.h"
#include "displayapp/screens/WatchFaceCasioStyleG7710.h"
#include "displayapp/screens/WatchFaceInfineat.h"
#include "displayapp/screens/WatchFacePineTimeStyle.h"
Expand Down
1 change: 1 addition & 0 deletions src/displayapp/apps/Apps.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ namespace Pinetime {
enum class WatchFace : uint8_t {
Digital,
Analog,
Mixed,
PineTimeStyle,
Terminal,
Infineat,
Expand Down
1 change: 1 addition & 0 deletions src/displayapp/apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ if(DEFINED ENABLE_WATCHFACES)
else()
set(DEFAULT_WATCHFACE_TYPES "WatchFace::Digital")
set(DEFAULT_WATCHFACE_TYPES "${DEFAULT_WATCHFACE_TYPES}, WatchFace::Analog")
set(DEFAULT_WATCHFACE_TYPES "${DEFAULT_WATCHFACE_TYPES}, WatchFace::Mixed")
set(DEFAULT_WATCHFACE_TYPES "${DEFAULT_WATCHFACE_TYPES}, WatchFace::PineTimeStyle")
set(DEFAULT_WATCHFACE_TYPES "${DEFAULT_WATCHFACE_TYPES}, WatchFace::Terminal")
set(DEFAULT_WATCHFACE_TYPES "${DEFAULT_WATCHFACE_TYPES}, WatchFace::Infineat")
Expand Down
Loading