2020-02-16 12:32:36 -05:00
|
|
|
#pragma once
|
|
|
|
|
2020-11-15 10:49:36 -05:00
|
|
|
#include <lvgl/lvgl.h>
|
2020-02-16 12:32:36 -05:00
|
|
|
#include <cstdint>
|
2020-11-15 10:49:36 -05:00
|
|
|
#include <memory>
|
2021-10-13 16:08:35 -04:00
|
|
|
#include "displayapp/screens/Screen.h"
|
|
|
|
#include "displayapp/Apps.h"
|
2021-04-03 22:08:51 -04:00
|
|
|
#include "components/datetime/DateTimeController.h"
|
2021-02-24 14:40:24 -05:00
|
|
|
#include "components/settings/Settings.h"
|
2021-04-03 22:08:51 -04:00
|
|
|
#include "components/battery/BatteryController.h"
|
2022-07-05 01:41:09 -04:00
|
|
|
#include "displayapp/widgets/PageIndicator.h"
|
2022-07-21 12:27:52 -04:00
|
|
|
#include "displayapp/widgets/StatusIcons.h"
|
2020-02-16 12:32:36 -05:00
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
class Tile : public Screen {
|
2021-04-24 05:00:45 -04:00
|
|
|
public:
|
2021-04-18 13:28:14 -04:00
|
|
|
struct Applications {
|
|
|
|
const char* icon;
|
|
|
|
Pinetime::Applications::Apps application;
|
|
|
|
};
|
|
|
|
|
|
|
|
explicit Tile(uint8_t screenID,
|
|
|
|
uint8_t numScreens,
|
|
|
|
DisplayApp* app,
|
|
|
|
Controllers::Settings& settingsController,
|
2022-07-21 12:27:52 -04:00
|
|
|
Controllers::Battery& batteryController,
|
|
|
|
Controllers::Ble& bleController,
|
2021-04-18 13:28:14 -04:00
|
|
|
Controllers::DateTime& dateTimeController,
|
|
|
|
std::array<Applications, 6>& applications);
|
|
|
|
|
|
|
|
~Tile() override;
|
|
|
|
|
|
|
|
void UpdateScreen();
|
2021-07-25 13:55:21 -04:00
|
|
|
void OnValueChangedEvent(lv_obj_t* obj, uint32_t buttonId);
|
2021-04-18 13:28:14 -04:00
|
|
|
|
2021-04-24 05:00:45 -04:00
|
|
|
private:
|
2021-04-18 13:28:14 -04:00
|
|
|
Controllers::DateTime& dateTimeController;
|
|
|
|
|
|
|
|
lv_task_t* taskUpdate;
|
|
|
|
|
|
|
|
lv_obj_t* label_time;
|
|
|
|
lv_obj_t* btnm1;
|
|
|
|
|
2022-07-05 01:41:09 -04:00
|
|
|
Widgets::PageIndicator pageIndicator;
|
2022-07-21 12:27:52 -04:00
|
|
|
Widgets::StatusIcons statusIcons;
|
2022-04-07 10:28:04 -04:00
|
|
|
|
2021-04-18 13:28:14 -04:00
|
|
|
const char* btnmMap[8];
|
|
|
|
Pinetime::Applications::Apps apps[6];
|
2020-02-16 12:32:36 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|