Skip to content

Commit c782119

Browse files
committed
screens: Remove explicit Screen constructors
This constructor didn't do anything since DisplayApp reference was removed from the Screen base class.
1 parent 7c7a860 commit c782119

33 files changed

+32
-44
lines changed

src/displayapp/screens/Alarm.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Alarm::Alarm(DisplayApp* app,
4545
Controllers::Settings::ClockType clockType,
4646
System::SystemTask& systemTask,
4747
Controllers::MotorController& motorController)
48-
: Screen(app), alarmController {alarmController}, systemTask {systemTask}, motorController {motorController} {
48+
: alarmController {alarmController}, systemTask {systemTask}, motorController {motorController} {
4949

5050
hourCounter.Create();
5151
lv_obj_align(hourCounter.GetObject(), nullptr, LV_ALIGN_IN_TOP_LEFT, 0, 0);

src/displayapp/screens/BatteryInfo.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using namespace Pinetime::Applications::Screens;
77

88
BatteryInfo::BatteryInfo(Pinetime::Applications::DisplayApp* app, const Pinetime::Controllers::Battery& batteryController)
9-
: Screen(app), batteryController {batteryController} {
9+
: batteryController {batteryController} {
1010

1111
batteryPercent = batteryController.PercentRemaining();
1212
batteryVoltage = batteryController.Voltage();

src/displayapp/screens/CheckboxList.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ CheckboxList::CheckboxList(const uint8_t screenID,
1919
uint32_t originalValue,
2020
std::function<void(uint32_t)> OnValueChanged,
2121
std::array<Item, MaxItems> options)
22-
: Screen(app),
23-
screenID {screenID},
22+
: screenID {screenID},
2423
OnValueChanged {std::move(OnValueChanged)},
2524
options {options},
2625
value {originalValue},

src/displayapp/screens/Error.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace {
99
}
1010
}
1111

12-
Error::Error(Pinetime::Applications::DisplayApp* app, System::BootErrors error) : Screen(app) {
12+
Error::Error(Pinetime::Applications::DisplayApp* app, System::BootErrors error) {
1313

1414
lv_obj_t* warningLabel = lv_label_create(lv_scr_act(), nullptr);
1515
lv_obj_set_style_local_text_color(warningLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_ORANGE);

src/displayapp/screens/FirmwareUpdate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using namespace Pinetime::Applications::Screens;
77

88
FirmwareUpdate::FirmwareUpdate(Pinetime::Applications::DisplayApp* app, const Pinetime::Controllers::Ble& bleController)
9-
: Screen(app), bleController {bleController} {
9+
: bleController {bleController} {
1010

1111
titleLabel = lv_label_create(lv_scr_act(), nullptr);
1212
lv_label_set_text_static(titleLabel, "Firmware update");

src/displayapp/screens/FirmwareValidation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace {
1515
}
1616

1717
FirmwareValidation::FirmwareValidation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::FirmwareValidator& validator)
18-
: Screen {app}, validator {validator} {
18+
: validator {validator} {
1919
labelVersion = lv_label_create(lv_scr_act(), nullptr);
2020
lv_label_set_text_fmt(labelVersion,
2121
"Version : %lu.%lu.%lu\n"

src/displayapp/screens/FlashLight.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace {
1717
FlashLight::FlashLight(Pinetime::Applications::DisplayApp* app,
1818
System::SystemTask& systemTask,
1919
Controllers::BrightnessController& brightnessController)
20-
: Screen(app), systemTask {systemTask}, brightnessController {brightnessController} {
20+
: systemTask {systemTask}, brightnessController {brightnessController} {
2121

2222
brightnessController.Set(Controllers::BrightnessController::Levels::Low);
2323

src/displayapp/screens/HeartRate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace {
3131
HeartRate::HeartRate(Pinetime::Applications::DisplayApp* app,
3232
Controllers::HeartRateController& heartRateController,
3333
System::SystemTask& systemTask)
34-
: Screen(app), heartRateController {heartRateController}, systemTask {systemTask} {
34+
: heartRateController {heartRateController}, systemTask {systemTask} {
3535
bool isHrRunning = heartRateController.State() != Controllers::HeartRateController::States::Stopped;
3636
label_hr = lv_label_create(lv_scr_act(), nullptr);
3737

src/displayapp/screens/InfiniPaint.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using namespace Pinetime::Applications::Screens;
1010
InfiniPaint::InfiniPaint(Pinetime::Applications::DisplayApp* app,
1111
Pinetime::Components::LittleVgl& lvgl,
1212
Pinetime::Controllers::MotorController& motor)
13-
: Screen(app), lvgl {lvgl}, motor {motor} {
13+
: lvgl {lvgl}, motor {motor} {
1414
std::fill(b, b + bufferSize, selectColor);
1515
}
1616

src/displayapp/screens/Metronome.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace {
2222
}
2323

2424
Metronome::Metronome(DisplayApp* app, Controllers::MotorController& motorController, System::SystemTask& systemTask)
25-
: Screen(app), motorController {motorController}, systemTask {systemTask} {
25+
: motorController {motorController}, systemTask {systemTask} {
2626

2727
bpmArc = lv_arc_create(lv_scr_act(), nullptr);
2828
bpmArc->user_data = this;

src/displayapp/screens/Motion.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using namespace Pinetime::Applications::Screens;
77

88
Motion::Motion(Pinetime::Applications::DisplayApp* app, Controllers::MotionController& motionController)
9-
: Screen(app), motionController {motionController} {
9+
: motionController {motionController} {
1010
chart = lv_chart_create(lv_scr_act(), nullptr);
1111
lv_obj_set_size(chart, 240, 240);
1212
lv_obj_align(chart, nullptr, LV_ALIGN_IN_TOP_MID, 0, 0);

src/displayapp/screens/Music.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ inline void lv_img_set_src_arr(lv_obj_t* img, const lv_img_dsc_t* src_img) {
4747
*
4848
* TODO: Investigate Apple Media Service and AVRCPv1.6 support for seamless integration
4949
*/
50-
Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::MusicService& music) : Screen(app), musicService(music) {
50+
Music::Music(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::MusicService& music) : musicService(music) {
5151
lv_obj_t* label;
5252

5353
lv_style_init(&btn_style);

src/displayapp/screens/Navigation.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ namespace {
130130
*
131131
*/
132132
Navigation::Navigation(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::NavigationService& nav)
133-
: Screen(app), navService(nav) {
133+
: navService(nav) {
134134

135135
imgFlag = lv_label_create(lv_scr_act(), nullptr);
136136
lv_obj_set_style_local_text_font(imgFlag, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &lv_font_navi_80);

src/displayapp/screens/Paddle.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
using namespace Pinetime::Applications::Screens;
88

9-
Paddle::Paddle(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : Screen(app), lvgl {lvgl} {
9+
Paddle::Paddle(Pinetime::Applications::DisplayApp* app, Pinetime::Components::LittleVgl& lvgl) : lvgl {lvgl} {
1010
background = lv_obj_create(lv_scr_act(), nullptr);
1111
lv_obj_set_size(background, LV_HOR_RES + 1, LV_VER_RES);
1212
lv_obj_set_pos(background, -1, 0);

src/displayapp/screens/PassKey.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using namespace Pinetime::Applications::Screens;
55

6-
PassKey::PassKey(Pinetime::Applications::DisplayApp* app, uint32_t key) : Screen(app) {
6+
PassKey::PassKey(Pinetime::Applications::DisplayApp* app, uint32_t key) {
77
passkeyLabel = lv_label_create(lv_scr_act(), nullptr);
88
lv_obj_set_style_local_text_color(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, LV_COLOR_YELLOW);
99
lv_obj_set_style_local_text_font(passkeyLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_42);

src/displayapp/screens/Screen.h

-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ namespace Pinetime {
5050
}
5151

5252
public:
53-
explicit Screen(DisplayApp* app) {
54-
}
55-
5653
explicit Screen() = default;
5754

5855
virtual ~Screen() = default;

src/displayapp/screens/Steps.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ static void lap_event_handler(lv_obj_t* obj, lv_event_t event) {
1313
Steps::Steps(Pinetime::Applications::DisplayApp* app,
1414
Controllers::MotionController& motionController,
1515
Controllers::Settings& settingsController)
16-
: Screen(app), motionController {motionController}, settingsController {settingsController} {
16+
: motionController {motionController}, settingsController {settingsController} {
1717

1818
stepsArc = lv_arc_create(lv_scr_act(), nullptr);
1919

src/displayapp/screens/StopWatch.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace {
3333
constexpr TickType_t blinkInterval = pdMS_TO_TICKS(1000);
3434
}
3535

36-
StopWatch::StopWatch(DisplayApp* app, System::SystemTask& systemTask) : Screen(app), systemTask {systemTask} {
36+
StopWatch::StopWatch(DisplayApp* app, System::SystemTask& systemTask) : systemTask {systemTask} {
3737
static constexpr uint8_t btnWidth = 115;
3838
static constexpr uint8_t btnHeight = 80;
3939
btnPlayPause = lv_btn_create(lv_scr_act(), nullptr);

src/displayapp/screens/Timer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static void btnEventHandler(lv_obj_t* obj, lv_event_t event) {
1717
}
1818
}
1919

20-
Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) : Screen(app), timerController {timerController} {
20+
Timer::Timer(DisplayApp* app, Controllers::TimerController& timerController) : timerController {timerController} {
2121

2222
lv_obj_t* colonLabel = lv_label_create(lv_scr_act(), nullptr);
2323
lv_obj_set_style_local_text_font(colonLabel, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, &jetbrains_mono_76);

src/displayapp/screens/Twos.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
using namespace Pinetime::Applications::Screens;
77

8-
Twos::Twos(Pinetime::Applications::DisplayApp* app) : Screen(app) {
8+
Twos::Twos(Pinetime::Applications::DisplayApp* app) {
99

1010
struct colorPair {
1111
lv_color_t bg;

src/displayapp/screens/WatchFaceAnalog.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ WatchFaceAnalog::WatchFaceAnalog(Pinetime::Applications::DisplayApp* app,
4949
const Controllers::Ble& bleController,
5050
Controllers::NotificationManager& notificationManager,
5151
Controllers::Settings& settingsController)
52-
: Screen(app),
53-
currentDateTime {{}},
52+
: currentDateTime {{}},
5453
dateTimeController {dateTimeController},
5554
batteryController {batteryController},
5655
bleController {bleController},

src/displayapp/screens/WatchFaceCasioStyleG7710.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ WatchFaceCasioStyleG7710::WatchFaceCasioStyleG7710(DisplayApp* app,
2424
Controllers::HeartRateController& heartRateController,
2525
Controllers::MotionController& motionController,
2626
Controllers::FS& filesystem)
27-
: Screen(app),
28-
currentDateTime {{}},
27+
: currentDateTime {{}},
2928
dateTimeController {dateTimeController},
3029
batteryController {batteryController},
3130
bleController {bleController},

src/displayapp/screens/WatchFaceDigital.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ WatchFaceDigital::WatchFaceDigital(DisplayApp* app,
2222
Controllers::Settings& settingsController,
2323
Controllers::HeartRateController& heartRateController,
2424
Controllers::MotionController& motionController)
25-
: Screen(app),
26-
currentDateTime {{}},
25+
: currentDateTime {{}},
2726
dateTimeController {dateTimeController},
2827
notificationManager {notificationManager},
2928
settingsController {settingsController},

src/displayapp/screens/WatchFaceInfineat.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ WatchFaceInfineat::WatchFaceInfineat(DisplayApp* app,
2828
Controllers::Settings& settingsController,
2929
Controllers::MotionController& motionController,
3030
Controllers::FS& filesystem)
31-
: Screen(app),
32-
currentDateTime {{}},
31+
: currentDateTime {{}},
3332
dateTimeController {dateTimeController},
3433
batteryController {batteryController},
3534
bleController {bleController},

src/displayapp/screens/WatchFacePineTimeStyle.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ WatchFacePineTimeStyle::WatchFacePineTimeStyle(DisplayApp* app,
5151
Controllers::NotificationManager& notificationManager,
5252
Controllers::Settings& settingsController,
5353
Controllers::MotionController& motionController)
54-
: Screen(app),
55-
currentDateTime {{}},
54+
: currentDateTime {{}},
5655
dateTimeController {dateTimeController},
5756
batteryController {batteryController},
5857
bleController {bleController},

src/displayapp/screens/WatchFaceTerminal.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ WatchFaceTerminal::WatchFaceTerminal(DisplayApp* app,
2121
Controllers::Settings& settingsController,
2222
Controllers::HeartRateController& heartRateController,
2323
Controllers::MotionController& motionController)
24-
: Screen(app),
25-
currentDateTime {{}},
24+
: currentDateTime {{}},
2625
dateTimeController {dateTimeController},
2726
batteryController {batteryController},
2827
bleController {bleController},

src/displayapp/screens/settings/SettingChimes.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ namespace {
4545
}
4646

4747
SettingChimes::SettingChimes(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
48-
: Screen(app),
49-
checkboxList(
48+
: checkboxList(
5049
0,
5150
1,
5251
app,

src/displayapp/screens/settings/SettingSetDate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace {
4848
SettingSetDate::SettingSetDate(Pinetime::Applications::DisplayApp* app,
4949
Pinetime::Controllers::DateTime& dateTimeController,
5050
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime)
51-
: Screen(app), dateTimeController {dateTimeController}, settingSetDateTime {settingSetDateTime} {
51+
: dateTimeController {dateTimeController}, settingSetDateTime {settingSetDateTime} {
5252

5353
lv_obj_t* title = lv_label_create(lv_scr_act(), nullptr);
5454
lv_label_set_text_static(title, "Set current date");

src/displayapp/screens/settings/SettingSetTime.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SettingSetTime::SettingSetTime(Pinetime::Applications::DisplayApp* app,
2929
Pinetime::Controllers::DateTime& dateTimeController,
3030
Pinetime::Controllers::Settings& settingsController,
3131
Pinetime::Applications::Screens::SettingSetDateTime& settingSetDateTime)
32-
: Screen(app), dateTimeController {dateTimeController}, settingsController {settingsController}, settingSetDateTime {settingSetDateTime} {
32+
: dateTimeController {dateTimeController}, settingsController {settingsController}, settingSetDateTime {settingSetDateTime} {
3333

3434
lv_obj_t* title = lv_label_create(lv_scr_act(), nullptr);
3535
lv_label_set_text_static(title, "Set current time");

src/displayapp/screens/settings/SettingShakeThreshold.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SettingShakeThreshold::SettingShakeThreshold(DisplayApp* app,
1818
Controllers::Settings& settingsController,
1919
Controllers::MotionController& motionController,
2020
System::SystemTask& systemTask)
21-
: Screen(app), settingsController {settingsController}, motionController {motionController}, systemTask {systemTask} {
21+
: settingsController {settingsController}, motionController {motionController}, systemTask {systemTask} {
2222

2323
lv_obj_t* title = lv_label_create(lv_scr_act(), nullptr);
2424
lv_label_set_text_static(title, "Wake Sensitivity");

src/displayapp/screens/settings/SettingSteps.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace {
1414
}
1515

1616
SettingSteps::SettingSteps(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
17-
: Screen(app), settingsController {settingsController} {
17+
: settingsController {settingsController} {
1818

1919
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);
2020

src/displayapp/screens/settings/SettingTimeFormat.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ namespace {
4343
}
4444

4545
SettingTimeFormat::SettingTimeFormat(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
46-
: Screen(app),
47-
checkboxList(
46+
: checkboxList(
4847
0,
4948
1,
5049
app,

src/displayapp/screens/settings/SettingWakeUp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace {
2020
}
2121

2222
SettingWakeUp::SettingWakeUp(Pinetime::Applications::DisplayApp* app, Pinetime::Controllers::Settings& settingsController)
23-
: Screen(app), settingsController {settingsController} {
23+
: settingsController {settingsController} {
2424
lv_obj_t* container1 = lv_cont_create(lv_scr_act(), nullptr);
2525

2626
lv_obj_set_style_local_bg_opa(container1, LV_CONT_PART_MAIN, LV_STATE_DEFAULT, LV_OPA_TRANSP);

0 commit comments

Comments
 (0)