mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-06-14 03:25:25 -04:00
[EGD-7612] Add alarm popup
Added alarm popup window. Added ImageBoxWithText widget.
This commit is contained in:
committed by
Wojciech Rzepecki
parent
b82c29fa39
commit
4c19fa16b3
@@ -40,6 +40,7 @@
|
||||
#include <service-db/agents/settings/SystemSettings.hpp>
|
||||
#include <service-audio/AudioServiceAPI.hpp> // for GetOutputVolume
|
||||
|
||||
#include <popups/AlarmPopup.hpp>
|
||||
#include <popups/VolumeWindow.hpp>
|
||||
#include <popups/HomeModesWindow.hpp>
|
||||
#include <popups/TetheringPhoneModePopup.hpp>
|
||||
@@ -57,6 +58,7 @@
|
||||
#include <popups/data/PopupRequestParams.hpp>
|
||||
#include <popups/data/PhoneModeParams.hpp>
|
||||
#include <popups/data/BluetoothModeParams.hpp>
|
||||
#include <popups/data/AlarmPopupParams.hpp>
|
||||
#include <locks/data/LockData.hpp>
|
||||
|
||||
namespace gui
|
||||
@@ -859,6 +861,10 @@ namespace app
|
||||
return std::make_unique<gui::SimNotReadyWindow>(app, window::sim_not_ready_window);
|
||||
});
|
||||
break;
|
||||
case ID::Alarm:
|
||||
windowsFactory.attach(window::alarm_window, [](ApplicationCommon *app, const std::string &name) {
|
||||
return std::make_unique<gui::AlarmPopup>(app, window::alarm_window);
|
||||
});
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -898,6 +904,13 @@ namespace app
|
||||
popupParams->getSimInputTypeAction(),
|
||||
popupParams->getErrorCode()));
|
||||
}
|
||||
else if (id == ID::Alarm) {
|
||||
auto popupParams = static_cast<const gui::AlarmPopupRequestParams *>(params);
|
||||
switchWindow(gui::popup::resolveWindowName(id),
|
||||
std::make_unique<gui::AlarmPopupParams>(popupParams->getPopupType(),
|
||||
popupParams->getAlarmTimeString(),
|
||||
popupParams->getSnoozeTimeString()));
|
||||
}
|
||||
else {
|
||||
switchWindow(gui::popup::resolveWindowName(id));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user