40 lines
1.0 KiB
C
Raw Normal View History

2022-07-21 19:27:52 +03:00
#pragma once
#include <lvgl/lvgl.h>
#include "displayapp/screens/Screen.h"
#include "components/battery/BatteryController.h"
#include "components/ble/BleController.h"
#include "displayapp/screens/BatteryIcon.h"
namespace Pinetime {
namespace Applications {
namespace Widgets {
class StatusIcons {
public:
StatusIcons(Controllers::Battery& batteryController, Controllers::Ble& bleController);
void Align();
void Create();
lv_obj_t* GetObject() {
2022-07-23 19:13:56 +03:00
return container;
2022-07-21 19:27:52 +03:00
}
void Update();
private:
Screens::BatteryIcon batteryIcon;
Pinetime::Controllers::Battery& batteryController;
Controllers::Ble& bleController;
Screens::DirtyValue<uint8_t> batteryPercentRemaining {};
Screens::DirtyValue<bool> powerPresent {};
Screens::DirtyValue<bool> bleState {};
Screens::DirtyValue<bool> bleRadioEnabled {};
2022-07-23 19:13:56 +03:00
lv_obj_t* bleIcon;
lv_obj_t* batteryPlug;
lv_obj_t* container;
2022-07-21 19:27:52 +03:00
};
}
}
}