2021-04-04 02:08:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <FreeRTOS.h>
|
|
|
|
#include <timers.h>
|
|
|
|
#include "displayapp/screens/Screen.h"
|
|
|
|
#include <lvgl/lvgl.h>
|
|
|
|
#include "components/datetime/DateTimeController.h"
|
|
|
|
#include "components/brightness/BrightnessController.h"
|
2021-04-20 11:31:40 +00:00
|
|
|
#include "components/motor/MotorController.h"
|
2021-04-04 02:08:51 +00:00
|
|
|
#include "components/settings/Settings.h"
|
|
|
|
#include "components/battery/BatteryController.h"
|
|
|
|
|
|
|
|
namespace Pinetime {
|
|
|
|
|
|
|
|
namespace Applications {
|
|
|
|
namespace Screens {
|
|
|
|
|
2021-04-18 17:28:14 +00:00
|
|
|
class QuickSettings : public Screen {
|
2021-04-24 09:00:45 +00:00
|
|
|
public:
|
2021-04-18 17:28:14 +00:00
|
|
|
QuickSettings(DisplayApp* app,
|
|
|
|
Pinetime::Controllers::Battery& batteryController,
|
|
|
|
Controllers::DateTime& dateTimeController,
|
|
|
|
Controllers::BrightnessController& brightness,
|
2021-04-20 11:31:40 +00:00
|
|
|
Controllers::MotorController& motorController,
|
2021-04-18 17:28:14 +00:00
|
|
|
Pinetime::Controllers::Settings& settingsController);
|
2021-04-04 02:08:51 +00:00
|
|
|
|
2021-04-18 17:28:14 +00:00
|
|
|
~QuickSettings() override;
|
2021-04-04 02:08:51 +00:00
|
|
|
|
2021-04-18 17:28:14 +00:00
|
|
|
bool Refresh() override;
|
2021-04-04 02:08:51 +00:00
|
|
|
|
2021-04-18 17:28:14 +00:00
|
|
|
void OnButtonEvent(lv_obj_t* object, lv_event_t event);
|
2021-04-04 02:08:51 +00:00
|
|
|
|
2021-04-18 17:28:14 +00:00
|
|
|
void UpdateScreen();
|
2021-04-04 02:08:51 +00:00
|
|
|
|
2021-04-24 09:00:45 +00:00
|
|
|
private:
|
2021-04-18 17:28:14 +00:00
|
|
|
Pinetime::Controllers::Battery& batteryController;
|
|
|
|
Controllers::DateTime& dateTimeController;
|
|
|
|
Controllers::BrightnessController& brightness;
|
2021-04-20 11:31:40 +00:00
|
|
|
Controllers::MotorController& motorController;
|
2021-04-18 17:28:14 +00:00
|
|
|
Controllers::Settings& settingsController;
|
2021-04-04 02:08:51 +00:00
|
|
|
|
2021-04-18 17:28:14 +00:00
|
|
|
lv_task_t* taskUpdate;
|
|
|
|
lv_obj_t* batteryIcon;
|
|
|
|
lv_obj_t* label_time;
|
2021-04-04 02:08:51 +00:00
|
|
|
|
2021-04-18 17:28:14 +00:00
|
|
|
lv_obj_t* btn1;
|
|
|
|
lv_obj_t* btn1_lvl;
|
|
|
|
lv_obj_t* btn2;
|
|
|
|
lv_obj_t* btn3;
|
|
|
|
lv_obj_t* btn3_lvl;
|
|
|
|
lv_obj_t* btn4;
|
2021-04-04 02:08:51 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|