blob: c0e0885e4cdcce5aa0a2612bdec6e2b84d21e83c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#pragma once
#include "displayapp/screens/Screen.h"
#include "components/datetime/DateTimeController.h"
#include "systemtask/SystemTask.h"
#include "displayapp/LittleVgl.h"
#include "components/timer/TimerController.h"
namespace Pinetime::Applications::Screens {
class Timer : public Screen {
public:
enum class Modes { Normal, Done };
Timer(DisplayApp* app, Controllers::TimerController& timerController);
~Timer() override;
void Refresh() override;
void SetDone();
void OnButtonEvent(lv_obj_t* obj, lv_event_t event);
private:
void CreateButtons();
bool running;
uint8_t secondsToSet = 0;
uint8_t minutesToSet = 0;
Controllers::TimerController& timerController;
void Stop();
lv_task_t* taskRefresh;
lv_obj_t *time, *btnPlayPause, *txtPlayPause, *btnMinutesUp, *btnMinutesDown, *btnSecondsUp, *btnSecondsDown, *txtMUp,
*txtMDown, *txtSUp, *txtSDown;
};
}
|