Use Counter widget in Alarm
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "systemtask/SystemTask.h"
|
||||
#include "displayapp/LittleVgl.h"
|
||||
#include "components/alarm/AlarmController.h"
|
||||
#include "displayapp/widgets/Counter.h"
|
||||
|
||||
namespace Pinetime {
|
||||
namespace Applications {
|
||||
@@ -29,29 +30,28 @@ namespace Pinetime {
|
||||
public:
|
||||
Alarm(DisplayApp* app,
|
||||
Controllers::AlarmController& alarmController,
|
||||
Pinetime::Controllers::Settings& settingsController,
|
||||
Controllers::Settings::ClockType clockType,
|
||||
System::SystemTask& systemTask);
|
||||
~Alarm() override;
|
||||
void SetAlerting();
|
||||
void OnButtonEvent(lv_obj_t* obj, lv_event_t event);
|
||||
bool OnButtonPushed() override;
|
||||
bool OnTouchEvent(TouchEvents event) override;
|
||||
void OnValueChanged();
|
||||
void StopAlerting();
|
||||
|
||||
private:
|
||||
uint8_t alarmHours;
|
||||
uint8_t alarmMinutes;
|
||||
Controllers::AlarmController& alarmController;
|
||||
Controllers::Settings& settingsController;
|
||||
const Controllers::Settings::ClockType clockType;
|
||||
System::SystemTask& systemTask;
|
||||
|
||||
lv_obj_t *time, *lblampm, *btnStop, *txtStop, *btnMinutesUp, *btnMinutesDown, *btnHoursUp, *btnHoursDown, *txtMinUp, *txtMinDown,
|
||||
*txtHrUp, *txtHrDown, *btnRecur, *txtRecur, *btnInfo, *txtInfo, *enableSwitch;
|
||||
lv_obj_t *lblampm, *btnStop, *txtStop, *btnRecur, *txtRecur, *btnInfo, *enableSwitch;
|
||||
lv_obj_t* txtMessage = nullptr;
|
||||
lv_obj_t* btnMessage = nullptr;
|
||||
lv_task_t* taskStopAlarm = nullptr;
|
||||
|
||||
enum class EnableButtonState { On, Off, Alerting };
|
||||
void DisableAlarm();
|
||||
void SetRecurButtonState();
|
||||
void SetSwitchState(lv_anim_enable_t anim);
|
||||
void SetAlarm();
|
||||
@@ -59,6 +59,8 @@ namespace Pinetime {
|
||||
void HideInfo();
|
||||
void ToggleRecurrence();
|
||||
void UpdateAlarmTime();
|
||||
Widgets::Counter hourCounter = Widgets::Counter(0, 23, jetbrains_mono_76);
|
||||
Widgets::Counter minuteCounter = Widgets::Counter(0, 59, jetbrains_mono_76);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user