screens: Remove unused DisplayApp parameters

This commit is contained in:
Riku Isokoski 2023-02-22 22:36:38 +02:00
parent c78211952e
commit 26478d9006
72 changed files with 99 additions and 156 deletions

View file

@ -361,8 +361,7 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
break;
case Apps::None:
case Apps::Clock:
currentScreen = std::make_unique<Screens::Clock>(this,
dateTimeController,
currentScreen = std::make_unique<Screens::Clock>(dateTimeController,
batteryController,
bleController,
notificationManager,
@ -373,18 +372,18 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
break;
case Apps::Error:
currentScreen = std::make_unique<Screens::Error>(this, bootError);
currentScreen = std::make_unique<Screens::Error>(bootError);
break;
case Apps::FirmwareValidation:
currentScreen = std::make_unique<Screens::FirmwareValidation>(this, validator);
currentScreen = std::make_unique<Screens::FirmwareValidation>(validator);
break;
case Apps::FirmwareUpdate:
currentScreen = std::make_unique<Screens::FirmwareUpdate>(this, bleController);
currentScreen = std::make_unique<Screens::FirmwareUpdate>(bleController);
break;
case Apps::PassKey:
currentScreen = std::make_unique<Screens::PassKey>(this, bleController.GetPairingKey());
currentScreen = std::make_unique<Screens::PassKey>(bleController.GetPairingKey());
break;
case Apps::Notifications:
@ -404,11 +403,10 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
Screens::Notifications::Modes::Preview);
break;
case Apps::Timer:
currentScreen = std::make_unique<Screens::Timer>(this, timerController);
currentScreen = std::make_unique<Screens::Timer>(timerController);
break;
case Apps::Alarm:
currentScreen =
std::make_unique<Screens::Alarm>(this, alarmController, settingsController.GetClockType(), *systemTask, motorController);
currentScreen = std::make_unique<Screens::Alarm>(alarmController, settingsController.GetClockType(), *systemTask, motorController);
break;
// Settings
@ -428,31 +426,31 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
currentScreen = std::make_unique<Screens::SettingWatchFace>(this, settingsController, filesystem);
break;
case Apps::SettingTimeFormat:
currentScreen = std::make_unique<Screens::SettingTimeFormat>(this, settingsController);
currentScreen = std::make_unique<Screens::SettingTimeFormat>(settingsController);
break;
case Apps::SettingWakeUp:
currentScreen = std::make_unique<Screens::SettingWakeUp>(this, settingsController);
currentScreen = std::make_unique<Screens::SettingWakeUp>(settingsController);
break;
case Apps::SettingDisplay:
currentScreen = std::make_unique<Screens::SettingDisplay>(this, settingsController);
break;
case Apps::SettingSteps:
currentScreen = std::make_unique<Screens::SettingSteps>(this, settingsController);
currentScreen = std::make_unique<Screens::SettingSteps>(settingsController);
break;
case Apps::SettingSetDateTime:
currentScreen = std::make_unique<Screens::SettingSetDateTime>(this, dateTimeController, settingsController);
break;
case Apps::SettingChimes:
currentScreen = std::make_unique<Screens::SettingChimes>(this, settingsController);
currentScreen = std::make_unique<Screens::SettingChimes>(settingsController);
break;
case Apps::SettingShakeThreshold:
currentScreen = std::make_unique<Screens::SettingShakeThreshold>(this, settingsController, motionController, *systemTask);
currentScreen = std::make_unique<Screens::SettingShakeThreshold>(settingsController, motionController, *systemTask);
break;
case Apps::SettingBluetooth:
currentScreen = std::make_unique<Screens::SettingBluetooth>(this, settingsController);
break;
case Apps::BatteryInfo:
currentScreen = std::make_unique<Screens::BatteryInfo>(this, batteryController);
currentScreen = std::make_unique<Screens::BatteryInfo>(batteryController);
break;
case Apps::SysInfo:
currentScreen = std::make_unique<Screens::SystemInfo>(this,
@ -465,37 +463,37 @@ void DisplayApp::LoadScreen(Apps app, DisplayApp::FullRefreshDirections directio
touchPanel);
break;
case Apps::FlashLight:
currentScreen = std::make_unique<Screens::FlashLight>(this, *systemTask, brightnessController);
currentScreen = std::make_unique<Screens::FlashLight>(*systemTask, brightnessController);
break;
case Apps::StopWatch:
currentScreen = std::make_unique<Screens::StopWatch>(this, *systemTask);
currentScreen = std::make_unique<Screens::StopWatch>(*systemTask);
break;
case Apps::Twos:
currentScreen = std::make_unique<Screens::Twos>(this);
currentScreen = std::make_unique<Screens::Twos>();
break;
case Apps::Paint:
currentScreen = std::make_unique<Screens::InfiniPaint>(this, lvgl, motorController);
currentScreen = std::make_unique<Screens::InfiniPaint>(lvgl, motorController);
break;
case Apps::Paddle:
currentScreen = std::make_unique<Screens::Paddle>(this, lvgl);
currentScreen = std::make_unique<Screens::Paddle>(lvgl);
break;
case Apps::Music:
currentScreen = std::make_unique<Screens::Music>(this, systemTask->nimble().music());
currentScreen = std::make_unique<Screens::Music>(systemTask->nimble().music());
break;
case Apps::Navigation:
currentScreen = std::make_unique<Screens::Navigation>(this, systemTask->nimble().navigation());
currentScreen = std::make_unique<Screens::Navigation>(systemTask->nimble().navigation());
break;
case Apps::HeartRate:
currentScreen = std::make_unique<Screens::HeartRate>(this, heartRateController, *systemTask);
currentScreen = std::make_unique<Screens::HeartRate>(heartRateController, *systemTask);
break;
case Apps::Metronome:
currentScreen = std::make_unique<Screens::Metronome>(this, motorController, *systemTask);
currentScreen = std::make_unique<Screens::Metronome>(motorController, *systemTask);
break;
case Apps::Motion:
currentScreen = std::make_unique<Screens::Motion>(this, motionController);
currentScreen = std::make_unique<Screens::Motion>(motionController);
break;
case Apps::Steps:
currentScreen = std::make_unique<Screens::Steps>(this, motionController, settingsController);
currentScreen = std::make_unique<Screens::Steps>(motionController, settingsController);
break;
}
currentApp = app;

View file

@ -40,8 +40,7 @@ static void StopAlarmTaskCallback(lv_task_t* task) {
screen->StopAlerting();
}
Alarm::Alarm(DisplayApp* app,
Controllers::AlarmController& alarmController,
Alarm::Alarm(Controllers::AlarmController& alarmController,
Controllers::Settings::ClockType clockType,
System::SystemTask& systemTask,
Controllers::MotorController& motorController)

View file

@ -28,8 +28,7 @@ namespace Pinetime {
namespace Screens {
class Alarm : public Screen {
public:
Alarm(DisplayApp* app,
Controllers::AlarmController& alarmController,
Alarm(Controllers::AlarmController& alarmController,
Controllers::Settings::ClockType clockType,
System::SystemTask& systemTask,
Controllers::MotorController& motorController);

View file

@ -5,8 +5,7 @@
using namespace Pinetime::Applications::Screens;
BatteryInfo::BatteryInfo(Pinetime::Applications::DisplayApp* app, const Pinetime::Controllers::Battery& batteryController)
: batteryController {batteryController} {
BatteryInfo::BatteryInfo(const Pinetime::Controllers::Battery& batteryController) : batteryController {batteryController} {
batteryPercent = batteryController.PercentRemaining();
batteryVoltage = batteryController.Voltage();

View file

@ -14,7 +14,7 @@ namespace Pinetime {
class BatteryInfo : public Screen {
public:
BatteryInfo(DisplayApp* app, const Pinetime::Controllers::Battery& batteryController);
BatteryInfo(const Pinetime::Controllers::Battery& batteryController);
~BatteryInfo() override;
void Refresh() override;

View file

@ -13,7 +13,6 @@ namespace {
CheckboxList::CheckboxList(const uint8_t screenID,
const uint8_t numScreens,
DisplayApp* app,
const char* optionsTitle,
const char* optionsSymbol,
uint32_t originalValue,

View file

@ -23,7 +23,6 @@ namespace Pinetime {
CheckboxList(const uint8_t screenID,
const uint8_t numScreens,
DisplayApp* app,
const char* optionsTitle,
const char* optionsSymbol,
uint32_t originalValue,

View file

@ -17,8 +17,7 @@
using namespace Pinetime::Applications::Screens;
Clock::Clock(DisplayApp* app,
Controllers::DateTime& dateTimeController,
Clock::Clock(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,
@ -26,8 +25,7 @@ Clock::Clock(DisplayApp* app,
Controllers::HeartRateController& heartRateController,
Controllers::MotionController& motionController,
Controllers::FS& filesystem)
: app {app},
dateTimeController {dateTimeController},
: dateTimeController {dateTimeController},
batteryController {batteryController},
bleController {bleController},
notificationManager {notificationManager},
@ -74,8 +72,7 @@ bool Clock::OnButtonPushed() {
}
std::unique_ptr<Screen> Clock::WatchFaceDigitalScreen() {
return std::make_unique<Screens::WatchFaceDigital>(app,
dateTimeController,
return std::make_unique<Screens::WatchFaceDigital>(dateTimeController,
batteryController,
bleController,
notificationManager,
@ -85,8 +82,7 @@ std::unique_ptr<Screen> Clock::WatchFaceDigitalScreen() {
}
std::unique_ptr<Screen> Clock::WatchFaceAnalogScreen() {
return std::make_unique<Screens::WatchFaceAnalog>(app,
dateTimeController,
return std::make_unique<Screens::WatchFaceAnalog>(dateTimeController,
batteryController,
bleController,
notificationManager,
@ -94,8 +90,7 @@ std::unique_ptr<Screen> Clock::WatchFaceAnalogScreen() {
}
std::unique_ptr<Screen> Clock::WatchFacePineTimeStyleScreen() {
return std::make_unique<Screens::WatchFacePineTimeStyle>(app,
dateTimeController,
return std::make_unique<Screens::WatchFacePineTimeStyle>(dateTimeController,
batteryController,
bleController,
notificationManager,
@ -104,8 +99,7 @@ std::unique_ptr<Screen> Clock::WatchFacePineTimeStyleScreen() {
}
std::unique_ptr<Screen> Clock::WatchFaceTerminalScreen() {
return std::make_unique<Screens::WatchFaceTerminal>(app,
dateTimeController,
return std::make_unique<Screens::WatchFaceTerminal>(dateTimeController,
batteryController,
bleController,
notificationManager,
@ -115,8 +109,7 @@ std::unique_ptr<Screen> Clock::WatchFaceTerminalScreen() {
}
std::unique_ptr<Screen> Clock::WatchFaceInfineatScreen() {
return std::make_unique<Screens::WatchFaceInfineat>(app,
dateTimeController,
return std::make_unique<Screens::WatchFaceInfineat>(dateTimeController,
batteryController,
bleController,
notificationManager,
@ -126,8 +119,7 @@ std::unique_ptr<Screen> Clock::WatchFaceInfineatScreen() {
}
std::unique_ptr<Screen> Clock::WatchFaceCasioStyleG7710() {
return std::make_unique<Screens::WatchFaceCasioStyleG7710>(app,
dateTimeController,
return std::make_unique<Screens::WatchFaceCasioStyleG7710>(dateTimeController,
batteryController,
bleController,
notificationManager,

View file

@ -21,8 +21,7 @@ namespace Pinetime {
namespace Screens {
class Clock : public Screen {
public:
Clock(DisplayApp* app,
Controllers::DateTime& dateTimeController,
Clock(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,
@ -36,7 +35,6 @@ namespace Pinetime {
bool OnButtonPushed() override;
private:
DisplayApp* app;
Controllers::DateTime& dateTimeController;
const Controllers::Battery& batteryController;
const Controllers::Ble& bleController;

View file

@ -9,7 +9,7 @@ namespace {
}
}
Error::Error(Pinetime::Applications::DisplayApp* app, System::BootErrors error) {
Error::Error(System::BootErrors error) {
lv_obj_t* warningLabel = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(warningLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);

View file

@ -9,7 +9,7 @@ namespace Pinetime {
namespace Screens {
class Error : public Screen {
public:
Error(DisplayApp* app, System::BootErrors error);
Error(System::BootErrors error);
~Error() override;
void ButtonEventHandler();

View file

@ -5,8 +5,7 @@
using namespace Pinetime::Applications::Screens;
FirmwareUpdate::FirmwareUpdate(Pinetime::Applications::DisplayApp* app, const Pinetime::Controllers::Ble& bleController)
: bleController {bleController} {
FirmwareUpdate::FirmwareUpdate(const Pinetime::Controllers::Ble& bleController) : bleController {bleController} {
titleLabel = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_text_static(titleLabel, "Firmware update");

View file

@ -14,7 +14,7 @@ namespace Pinetime {
class FirmwareUpdate : public Screen {
public:
FirmwareUpdate(DisplayApp* app, const Pinetime::Controllers::Ble& bleController);
FirmwareUpdate(const Pinetime::Controllers::Ble& bleController);
~FirmwareUpdate() override;
void Refresh() override;

View file

@ -14,8 +14,7 @@ namespace {
}
}
FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator)
: validator {validator} {
FirmwareValidation::FirmwareValidation(Pinetime::Controllers::FirmwareValidator& validator) : validator {validator} {
labelVersion = lv_label_create(lv_scr_act(), nullptr);
lv_label_set_text_fmt(labelVersion,
"Version : %lu.%lu.%lu\n"

View file

@ -13,7 +13,7 @@ namespace Pinetime {
class FirmwareValidation : public Screen {
public:
FirmwareValidation(DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator);
FirmwareValidation(Pinetime::Controllers::FirmwareValidator& validator);
~FirmwareValidation() override;
void OnButtonEvent(lv_obj_t* object, lv_event_t event);

View file

@ -14,9 +14,7 @@ namespace {
}
}
FlashLight::FlashLight(Pinetime::Applications::DisplayApp* app,
System::SystemTask& systemTask,
Controllers::BrightnessController& brightnessController)
FlashLight::FlashLight(System::SystemTask& systemTask, Controllers::BrightnessController& brightnessController)
: systemTask {systemTask}, brightnessController {brightnessController} {
brightnessController.Set(Controllers::BrightnessController::Levels::Low);

View file

@ -13,7 +13,7 @@ namespace Pinetime {
class FlashLight : public Screen {
public:
FlashLight(DisplayApp* app, System::SystemTask& systemTask, Controllers::BrightnessController& brightness);
FlashLight(System::SystemTask& systemTask, Controllers::BrightnessController& brightness);
~FlashLight() override;
bool OnTouchEvent(Pinetime::Applications::TouchEvents event) override;

View file

@ -28,9 +28,7 @@ namespace {
}
}
HeartRate::HeartRate(Pinetime::Applications::DisplayApp* app,
Controllers::HeartRateController& heartRateController,
System::SystemTask& systemTask)
HeartRate::HeartRate(Controllers::HeartRateController& heartRateController, System::SystemTask& systemTask)
: heartRateController {heartRateController}, systemTask {systemTask} {
bool isHrRunning = heartRateController.State() != Controllers::HeartRateController::States::Stopped;
label_hr = lv_label_create(lv_scr_act(), nullptr);

View file

@ -17,7 +17,7 @@ namespace Pinetime {
class HeartRate : public Screen {
public:
HeartRate(DisplayApp* app, Controllers::HeartRateController& HeartRateController, System::SystemTask& systemTask);
HeartRate(Controllers::HeartRateController& HeartRateController, System::SystemTask& systemTask);
~HeartRate() override;
void Refresh() override;

View file

@ -7,9 +7,7 @@
using namespace Pinetime::Applications::Screens;
InfiniPaint::InfiniPaint(Pinetime::Applications::DisplayApp* app,
Pinetime::Components::LittleVgl& lvgl,
Pinetime::Controllers::MotorController& motor)
InfiniPaint::InfiniPaint(Pinetime::Components::LittleVgl& lvgl, Pinetime::Controllers::MotorController& motor)
: lvgl {lvgl}, motor {motor} {
std::fill(b, b + bufferSize, selectColor);
}

View file

@ -16,7 +16,7 @@ namespace Pinetime {
class InfiniPaint : public Screen {
public:
InfiniPaint(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl, Controllers::MotorController& motor);
InfiniPaint(Pinetime::Components::LittleVgl& lvgl, Controllers::MotorController& motor);
~InfiniPaint() override;

View file

@ -2,8 +2,7 @@
using namespace Pinetime::Applications::Screens;
Label::Label(uint8_t screenID, uint8_t numScreens, lv_obj_t* labelText)
: labelText {labelText}, pageIndicator(screenID, numScreens) {
Label::Label(uint8_t screenID, uint8_t numScreens, lv_obj_t* labelText) : labelText {labelText}, pageIndicator(screenID, numScreens) {
pageIndicator.Create();
}

View file

@ -21,7 +21,7 @@ namespace {
}
}
Metronome::Metronome(DisplayApp* app, Controllers::MotorController& motorController, System::SystemTask& systemTask)
Metronome::Metronome(Controllers::MotorController& motorController, System::SystemTask& systemTask)
: motorController {motorController}, systemTask {systemTask} {
bpmArc = lv_arc_create(lv_scr_act(), nullptr);

View file

@ -10,7 +10,7 @@ namespace Pinetime {
class Metronome : public Screen {
public:
Metronome(DisplayApp* app, Controllers::MotorController& motorController, System::SystemTask& systemTask);
Metronome(Controllers::MotorController& motorController, System::SystemTask& systemTask);
~Metronome() override;
void Refresh() override;
void OnEvent(lv_obj_t* obj, lv_event_t event);

View file

@ -5,8 +5,7 @@
using namespace Pinetime::Applications::Screens;
Motion::Motion(Pinetime::Applications::DisplayApp* app, Controllers::MotionController& motionController)
: motionController {motionController} {
Motion::Motion(Controllers::MotionController& motionController) : motionController {motionController} {
chart = lv_chart_create(lv_scr_act(), nullptr);
lv_obj_set_size(chart, 240, 240);
lv_obj_align(chart, nullptr, LV_ALIGN_IN_TOP_MID, 0, 0);

View file

@ -13,7 +13,7 @@ namespace Pinetime {
class Motion : public Screen {
public:
Motion(DisplayApp* app, Controllers::MotionController& motionController);
Motion(Controllers::MotionController& motionController);
~Motion() override;
void Refresh() override;

View file

@ -47,7 +47,7 @@ inline void lv_img_set_src_arr(lv_obj_t* img, const lv_img_dsc_t* src_img) {
*
* TODO: Investigate Apple Media Service and AVRCPv1.6 support for seamless integration
*/
Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::MusicService& music) : musicService(music) {
Music::Music(Pinetime::Controllers::MusicService& music) : musicService(music) {
lv_obj_t* label;
lv_style_init(&btn_style);

View file

@ -31,7 +31,7 @@ namespace Pinetime {
namespace Screens {
class Music : public Screen {
public:
Music(DisplayApp* app, Pinetime::Controllers::MusicService& music);
Music(Pinetime::Controllers::MusicService& music);
~Music() override;

View file

@ -129,8 +129,7 @@ namespace {
* Navigation watchapp
*
*/
Navigation::Navigation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::NavigationService& nav)
: navService(nav) {
Navigation::Navigation(Pinetime::Controllers::NavigationService& nav) : navService(nav) {
imgFlag = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(imgFlag, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_navi_80);

View file

@ -32,7 +32,7 @@ namespace Pinetime {
namespace Screens {
class Navigation : public Screen {
public:
Navigation(DisplayApp* app, Pinetime::Controllers::NavigationService& nav);
Navigation(Pinetime::Controllers::NavigationService& nav);
~Navigation() override;
void Refresh() override;

View file

@ -6,7 +6,7 @@
using namespace Pinetime::Applications::Screens;
Paddle::Paddle(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : lvgl {lvgl} {
Paddle::Paddle(Pinetime::Components::LittleVgl& lvgl) : lvgl {lvgl} {
background = lv_obj_create(lv_scr_act(), nullptr);
lv_obj_set_size(background, LV_HOR_RES + 1, LV_VER_RES);
lv_obj_set_pos(background, -1, 0);

View file

@ -14,7 +14,7 @@ namespace Pinetime {
class Paddle : public Screen {
public:
Paddle(DisplayApp* app, Pinetime::Components::LittleVgl& lvgl);
Paddle(Pinetime::Components::LittleVgl& lvgl);
~Paddle() override;
void Refresh() override;

View file

@ -3,7 +3,7 @@
using namespace Pinetime::Applications::Screens;
PassKey::PassKey(Pinetime::Applications::DisplayApp* app, uint32_t key) {
PassKey::PassKey(uint32_t key) {
passkeyLabel = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_color(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW);
lv_obj_set_style_local_text_font(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);

View file

@ -9,7 +9,7 @@ namespace Pinetime {
class PassKey : public Screen {
public:
PassKey(DisplayApp* app, uint32_t key);
explicit PassKey(uint32_t key);
~PassKey() override;
private:

View file

@ -10,9 +10,7 @@ static void lap_event_handler(lv_obj_t* obj, lv_event_t event) {
steps->lapBtnEventHandler(event);
}
Steps::Steps(Pinetime::Applications::DisplayApp* app,
Controllers::MotionController& motionController,
Controllers::Settings& settingsController)
Steps::Steps(Controllers::MotionController& motionController, Controllers::Settings& settingsController)
: motionController {motionController}, settingsController {settingsController} {
stepsArc = lv_arc_create(lv_scr_act(), nullptr);

View file

@ -16,7 +16,7 @@ namespace Pinetime {
class Steps : public Screen {
public:
Steps(DisplayApp* app, Controllers::MotionController& motionController, Controllers::Settings& settingsController);
Steps(Controllers::MotionController& motionController, Controllers::Settings& settingsController);
~Steps() override;
void Refresh() override;

View file

@ -33,7 +33,7 @@ namespace {
constexpr TickType_t blinkInterval = pdMS_TO_TICKS(1000);
}
StopWatch::StopWatch(DisplayApp* app, System::SystemTask& systemTask) : systemTask {systemTask} {
StopWatch::StopWatch(System::SystemTask& systemTask) : systemTask {systemTask} {
static constexpr uint8_t btnWidth = 115;
static constexpr uint8_t btnHeight = 80;
btnPlayPause = lv_btn_create(lv_scr_act(), nullptr);

View file

@ -20,7 +20,7 @@ namespace Pinetime::Applications::Screens {
class StopWatch : public Screen {
public:
StopWatch(DisplayApp* app, System::SystemTask& systemTask);
explicit StopWatch(System::SystemTask& systemTask);
~StopWatch() override;
void Refresh() override;

View file

@ -32,10 +32,7 @@ Tile::Tile(uint8_t screenID,
const Controllers::Ble& bleController,
Controllers::DateTime& dateTimeController,
std::array<Applications, 6>& applications)
: app {app},
dateTimeController {dateTimeController},
pageIndicator(screenID, numScreens),
statusIcons(batteryController, bleController) {
: app {app}, dateTimeController {dateTimeController}, pageIndicator(screenID, numScreens), statusIcons(batteryController, bleController) {
settingsController.SetAppMenu(screenID);

View file

@ -17,7 +17,7 @@ static void btnEventHandler(lv_obj_t* obj, lv_event_t event) {
}
}
Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) : timerController {timerController} {
Timer::Timer(Controllers::TimerController& timerController) : timerController {timerController} {
lv_obj_t* colonLabel = lv_label_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_text_font(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76);

View file

@ -12,7 +12,7 @@
namespace Pinetime::Applications::Screens {
class Timer : public Screen {
public:
Timer(DisplayApp* app, Controllers::TimerController& timerController);
Timer(Controllers::TimerController& timerController);
~Timer() override;
void Refresh() override;
void Reset();

View file

@ -5,7 +5,7 @@
using namespace Pinetime::Applications::Screens;
Twos::Twos(Pinetime::Applications::DisplayApp* app) {
Twos::Twos() {
struct colorPair {
lv_color_t bg;

View file

@ -13,7 +13,7 @@ namespace Pinetime {
namespace Screens {
class Twos : public Screen {
public:
Twos(DisplayApp* app);
Twos();
~Twos() override;
bool OnTouchEvent(TouchEvents event) override;

View file

@ -43,8 +43,7 @@ namespace {
}
WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceAnalog::WatchFaceAnalog(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -24,8 +24,7 @@ namespace Pinetime {
class WatchFaceAnalog : public Screen {
public:
WatchFaceAnalog(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceAnalog(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -15,8 +15,7 @@
#include "components/settings/Settings.h"
using namespace Pinetime::Applications::Screens;
WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificatioManager,

View file

@ -24,8 +24,7 @@ namespace Pinetime {
class WatchFaceCasioStyleG7710 : public Screen {
public:
WatchFaceCasioStyleG7710(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceCasioStyleG7710(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificatioManager,

View file

@ -14,8 +14,7 @@
using namespace Pinetime::Applications::Screens;
WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceDigital::WatchFaceDigital(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -24,8 +24,7 @@ namespace Pinetime {
class WatchFaceDigital : public Screen {
public:
WatchFaceDigital(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceDigital(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -20,8 +20,7 @@ namespace {
}
}
WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceInfineat::WatchFaceInfineat(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -21,8 +21,7 @@ namespace Pinetime {
class WatchFaceInfineat : public Screen {
public:
WatchFaceInfineat(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceInfineat(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -44,8 +44,7 @@ namespace {
}
}
WatchFacePineTimeStyle::WatchFacePineTimeStyle(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFacePineTimeStyle::WatchFacePineTimeStyle(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -24,8 +24,7 @@ namespace Pinetime {
namespace Screens {
class WatchFacePineTimeStyle : public Screen {
public:
WatchFacePineTimeStyle(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFacePineTimeStyle(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -13,8 +13,7 @@
using namespace Pinetime::Applications::Screens;
WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceTerminal::WatchFaceTerminal(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -22,8 +22,7 @@ namespace Pinetime {
class WatchFaceTerminal : public Screen {
public:
WatchFaceTerminal(DisplayApp* app,
Controllers::DateTime& dateTimeController,
WatchFaceTerminal(Controllers::DateTime& dateTimeController,
const Controllers::Battery& batteryController,
const Controllers::Ble& bleController,
Controllers::NotificationManager& notificationManager,

View file

@ -39,7 +39,6 @@ SettingBluetooth::SettingBluetooth(Pinetime::Applications::DisplayApp* app, Pine
checkboxList(
0,
1,
app,
"Bluetooth",
Symbols::bluetooth,
settingsController.GetBleRadioEnabled() ? 0 : 1,

View file

@ -44,11 +44,10 @@ namespace {
}
}
SettingChimes::SettingChimes(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
SettingChimes::SettingChimes(Pinetime::Controllers::Settings& settingsController)
: checkboxList(
0,
1,
app,
"Chimes",
Symbols::clock,
GetDefaultOption(settingsController.GetChimeOption()),

View file

@ -14,7 +14,7 @@ namespace Pinetime {
class SettingChimes : public Screen {
public:
SettingChimes(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
SettingChimes(Pinetime::Controllers::Settings& settingsController);
~SettingChimes() override;
void UpdateSelected(lv_obj_t* object, lv_event_t event);

View file

@ -45,8 +45,7 @@ namespace {
}
}
SettingSetDate::SettingSetDate(Pinetime::Applications::DisplayApp* app,
Pinetime::Controllers::DateTime& dateTimeController,
SettingSetDate::SettingSetDate(Pinetime::Controllers::DateTime& dateTimeController,
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime)
: dateTimeController {dateTimeController}, settingSetDateTime {settingSetDateTime} {

View file

@ -13,8 +13,7 @@ namespace Pinetime {
namespace Screens {
class SettingSetDate : public Screen {
public:
SettingSetDate(DisplayApp* app,
Pinetime::Controllers::DateTime& dateTimeController,
SettingSetDate(Pinetime::Controllers::DateTime& dateTimeController,
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime);
~SettingSetDate() override;

View file

@ -32,13 +32,13 @@ SettingSetDateTime::SettingSetDateTime(Pinetime::Applications::DisplayApp* app,
std::unique_ptr<Screen> SettingSetDateTime::screenSetDate() {
Widgets::DotIndicator dotIndicator(0, 2);
dotIndicator.Create();
return std::make_unique<Screens::SettingSetDate>(app, dateTimeController, *this);
return std::make_unique<Screens::SettingSetDate>(dateTimeController, *this);
}
std::unique_ptr<Screen> SettingSetDateTime::screenSetTime() {
Widgets::DotIndicator dotIndicator(1, 2);
dotIndicator.Create();
return std::make_unique<Screens::SettingSetTime>(app, dateTimeController, settingsController, *this);
return std::make_unique<Screens::SettingSetTime>(dateTimeController, settingsController, *this);
}
SettingSetDateTime::~SettingSetDateTime() {

View file

@ -25,8 +25,7 @@ namespace {
}
}
SettingSetTime::SettingSetTime(Pinetime::Applications::DisplayApp* app,
Pinetime::Controllers::DateTime& dateTimeController,
SettingSetTime::SettingSetTime(Pinetime::Controllers::DateTime& dateTimeController,
Pinetime::Controllers::Settings& settingsController,
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime)
: dateTimeController {dateTimeController}, settingsController {settingsController}, settingSetDateTime {settingSetDateTime} {

View file

@ -14,8 +14,7 @@ namespace Pinetime {
namespace Screens {
class SettingSetTime : public Screen {
public:
SettingSetTime(DisplayApp* app,
Pinetime::Controllers::DateTime& dateTimeController,
SettingSetTime(Pinetime::Controllers::DateTime& dateTimeController,
Pinetime::Controllers::Settings& settingsController,
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime);
~SettingSetTime() override;

View file

@ -14,8 +14,7 @@ namespace {
}
}
SettingShakeThreshold::SettingShakeThreshold(DisplayApp* app,
Controllers::Settings& settingsController,
SettingShakeThreshold::SettingShakeThreshold(Controllers::Settings& settingsController,
Controllers::MotionController& motionController,
System::SystemTask& systemTask)
: settingsController {settingsController}, motionController {motionController}, systemTask {systemTask} {

View file

@ -14,8 +14,7 @@ namespace Pinetime {
class SettingShakeThreshold : public Screen {
public:
SettingShakeThreshold(DisplayApp* app,
Pinetime::Controllers::Settings& settingsController,
SettingShakeThreshold(Pinetime::Controllers::Settings& settingsController,
Controllers::MotionController& motionController,
System::SystemTask& systemTask);

View file

@ -13,8 +13,7 @@ namespace {
}
}
SettingSteps::SettingSteps(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
: settingsController {settingsController} {
SettingSteps::SettingSteps(Pinetime::Controllers::Settings& settingsController) : settingsController {settingsController} {
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);

View file

@ -12,7 +12,7 @@ namespace Pinetime {
class SettingSteps : public Screen {
public:
SettingSteps(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
SettingSteps(Pinetime::Controllers::Settings& settingsController);
~SettingSteps() override;
void UpdateSelected(lv_obj_t* object, lv_event_t event);

View file

@ -42,11 +42,10 @@ namespace {
}
}
SettingTimeFormat::SettingTimeFormat(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
SettingTimeFormat::SettingTimeFormat(Pinetime::Controllers::Settings& settingsController)
: checkboxList(
0,
1,
app,
"Time format",
Symbols::clock,
GetDefaultOption(settingsController.GetClockType()),

View file

@ -15,7 +15,7 @@ namespace Pinetime {
class SettingTimeFormat : public Screen {
public:
SettingTimeFormat(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
SettingTimeFormat(Pinetime::Controllers::Settings& settingsController);
~SettingTimeFormat() override;
private:

View file

@ -19,8 +19,7 @@ namespace {
}
}
SettingWakeUp::SettingWakeUp(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
: settingsController {settingsController} {
SettingWakeUp::SettingWakeUp(Pinetime::Controllers::Settings& settingsController) : settingsController {settingsController} {
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);
lv_obj_set_style_local_bg_opa(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP);

View file

@ -13,7 +13,7 @@ namespace Pinetime {
class SettingWakeUp : public Screen {
public:
SettingWakeUp(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
SettingWakeUp(Pinetime::Controllers::Settings& settingsController);
~SettingWakeUp() override;
void UpdateSelected(lv_obj_t* object);

View file

@ -45,7 +45,6 @@ std::unique_ptr<Screen> SettingWatchFace::CreateScreen(unsigned int screenNum) c
return std::make_unique<Screens::CheckboxList>(
screenNum,
nScreens,
app,
title,
symbol,
settingsController.GetClockFace(),