mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-24 05:47:58 -05:00
- add DateAndTimeSettings class and dateAndTimeSettings global var (cache for storing date and time related settings), - add DateAndTimeChangeRequest messages and proper methods in app::manager::Controller for sending them, - handle DateAndTimeChangeRequest messages in ApplicationManager, - add SettingRightItem::Text case for OptionSettings to provide possibility to add text on the right side of particular option, - rename fields in db (settings_tab table): gs_time_format_12 to gs_time_format and gs_time_date_format to gs_date_format - create only main Date&Time window. Sub windows will be added in separate task.
30 lines
734 B
C++
30 lines
734 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "DateAndTimeSettings.hpp"
|
|
|
|
namespace utils
|
|
{
|
|
DateAndTimeSettings dateAndTimeSettings;
|
|
|
|
void DateAndTimeSettings::setAutomaticDateAndTimeOn(bool value)
|
|
{
|
|
automaticDateAndTimeIsOn = value;
|
|
}
|
|
|
|
void DateAndTimeSettings::setAutomaticTimeZoneOn(bool value)
|
|
{
|
|
automaticTimeZoneIsOn = value;
|
|
}
|
|
|
|
void DateAndTimeSettings::setTimeFormat(time::Locale::TimeFormat format)
|
|
{
|
|
timeFormat = format;
|
|
}
|
|
|
|
void DateAndTimeSettings::setDateFormat(time::Locale::DateFormat format)
|
|
{
|
|
dateFormat = format;
|
|
}
|
|
} // namespace utils
|