forked from InfiniTimeOrg/InfiniTime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tile.h
56 lines (46 loc) · 1.55 KB
/
Tile.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include <lvgl/lvgl.h>
#include <cstdint>
#include <memory>
#include "displayapp/screens/Screen.h"
#include "displayapp/apps/Apps.h"
#include "components/datetime/DateTimeController.h"
#include "components/settings/Settings.h"
#include "components/battery/BatteryController.h"
#include "displayapp/widgets/PageIndicator.h"
#include "displayapp/widgets/StatusIcons.h"
namespace Pinetime {
namespace Applications {
namespace Screens {
class Tile : public Screen {
public:
struct Applications {
const char* icon;
Pinetime::Applications::Apps application;
bool enabled;
};
explicit Tile(uint8_t screenID,
uint8_t numScreens,
DisplayApp* app,
Controllers::Settings& settingsController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::DateTime& dateTimeController,
std::array<Applications, 6>& applications);
~Tile() override;
void UpdateScreen();
void OnValueChangedEvent(lv_obj_t* obj, uint32_t buttonId);
private:
DisplayApp* app;
Controllers::DateTime& dateTimeController;
lv_task_t* taskUpdate;
lv_obj_t* label_time;
lv_obj_t* btnm1;
Widgets::PageIndicator pageIndicator;
Widgets::StatusIcons statusIcons;
const char* btnmMap[8];
Pinetime::Applications::Apps apps[6];
};
}
}
}