summaryrefslogtreecommitdiff
path: root/src/displayapp
diff options
context:
space:
mode:
authormabuch <marcel.buechler@gmail.com>2022-03-12 17:55:54 +0100
committermabuch <marcel.buechler@gmail.com>2022-03-12 18:16:09 +0100
commitea14c580ca6296cb93facf526d65a2db0e3ff1b0 (patch)
tree4828389ef5fd407240bd2e167df185414e467e1b /src/displayapp
parent21da5869c5e48df666ea9d9c7698f7f69528645e (diff)
Rename PineTimeStyle to WatchFacePineTimeStyle
Diffstat (limited to 'src/displayapp')
-rw-r--r--src/displayapp/screens/Clock.cpp8
-rw-r--r--src/displayapp/screens/Clock.h2
-rw-r--r--src/displayapp/screens/WatchFacePineTimeStyle.cpp (renamed from src/displayapp/screens/PineTimeStyle.cpp)26
-rw-r--r--src/displayapp/screens/WatchFacePineTimeStyle.h (renamed from src/displayapp/screens/PineTimeStyle.h)6
4 files changed, 21 insertions, 21 deletions
diff --git a/src/displayapp/screens/Clock.cpp b/src/displayapp/screens/Clock.cpp
index fd74683a..693e42a9 100644
--- a/src/displayapp/screens/Clock.cpp
+++ b/src/displayapp/screens/Clock.cpp
@@ -11,7 +11,7 @@
#include "displayapp/screens/WatchFaceDigital.h"
#include "displayapp/screens/WatchFaceTerminal.h"
#include "displayapp/screens/WatchFaceAnalog.h"
-#include "displayapp/screens/PineTimeStyle.h"
+#include "displayapp/screens/WatchFacePineTimeStyle.h"
using namespace Pinetime::Applications::Screens;
@@ -40,7 +40,7 @@ Clock::Clock(DisplayApp* app,
return WatchFaceAnalogScreen();
break;
case 2:
- return PineTimeStyleScreen();
+ return WatchFacePineTimeStyleScreen();
break;
case 3:
return WatchFaceTerminalScreen();
@@ -79,8 +79,8 @@ std::unique_ptr<Screen> Clock::WatchFaceAnalogScreen() {
app, dateTimeController, batteryController, bleController, notificatioManager, settingsController);
}
-std::unique_ptr<Screen> Clock::PineTimeStyleScreen() {
- return std::make_unique<Screens::PineTimeStyle>(
+std::unique_ptr<Screen> Clock::WatchFacePineTimeStyleScreen() {
+ return std::make_unique<Screens::WatchFacePineTimeStyle>(
app, dateTimeController, batteryController, bleController, notificatioManager, settingsController, motionController);
}
diff --git a/src/displayapp/screens/Clock.h b/src/displayapp/screens/Clock.h
index 50996a73..1ba752c7 100644
--- a/src/displayapp/screens/Clock.h
+++ b/src/displayapp/screens/Clock.h
@@ -46,7 +46,7 @@ namespace Pinetime {
std::unique_ptr<Screen> screen;
std::unique_ptr<Screen> WatchFaceDigitalScreen();
std::unique_ptr<Screen> WatchFaceAnalogScreen();
- std::unique_ptr<Screen> PineTimeStyleScreen();
+ std::unique_ptr<Screen> WatchFacePineTimeStyleScreen();
std::unique_ptr<Screen> WatchFaceTerminalScreen();
};
}
diff --git a/src/displayapp/screens/PineTimeStyle.cpp b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
index 44bf47a4..e032ac2e 100644
--- a/src/displayapp/screens/PineTimeStyle.cpp
+++ b/src/displayapp/screens/WatchFacePineTimeStyle.cpp
@@ -19,7 +19,7 @@
* Style/layout copied from TimeStyle for Pebble by Dan Tilden (github.com/tilden)
*/
-#include "displayapp/screens/PineTimeStyle.h"
+#include "displayapp/screens/WatchFacePineTimeStyle.h"
#include <date/date.h>
#include <lvgl/lvgl.h>
#include <cstdio>
@@ -39,7 +39,7 @@ using namespace Pinetime::Applications::Screens;
namespace {
void event_handler(lv_obj_t* obj, lv_event_t event) {
- auto* screen = static_cast<PineTimeStyle*>(obj->user_data);
+ auto* screen = static_cast<WatchFacePineTimeStyle*>(obj->user_data);
screen->UpdateSelected(obj, event);
}
@@ -51,7 +51,7 @@ namespace {
}
}
-PineTimeStyle::PineTimeStyle(DisplayApp* app,
+WatchFacePineTimeStyle::WatchFacePineTimeStyle(DisplayApp* app,
Controllers::DateTime& dateTimeController,
Controllers::Battery& batteryController,
Controllers::Ble& bleController,
@@ -300,12 +300,12 @@ PineTimeStyle::PineTimeStyle(DisplayApp* app,
Refresh();
}
-PineTimeStyle::~PineTimeStyle() {
+WatchFacePineTimeStyle::~WatchFacePineTimeStyle() {
lv_task_del(taskRefresh);
lv_obj_clean(lv_scr_act());
}
-bool PineTimeStyle::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
+bool WatchFacePineTimeStyle::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
if ((event == Pinetime::Applications::TouchEvents::LongTap) && lv_obj_get_hidden(btnRandom)) {
lv_obj_set_hidden(btnSet, false);
savedTick = lv_tick_get();
@@ -317,7 +317,7 @@ bool PineTimeStyle::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
return false;
}
-void PineTimeStyle::CloseMenu() {
+void WatchFacePineTimeStyle::CloseMenu() {
settingsController.SaveSettings();
lv_obj_set_hidden(btnNextTime, true);
lv_obj_set_hidden(btnPrevTime, true);
@@ -330,7 +330,7 @@ void PineTimeStyle::CloseMenu() {
lv_obj_set_hidden(btnClose, true);
}
-bool PineTimeStyle::OnButtonPushed() {
+bool WatchFacePineTimeStyle::OnButtonPushed() {
if (!lv_obj_get_hidden(btnClose)) {
CloseMenu();
return true;
@@ -338,13 +338,13 @@ bool PineTimeStyle::OnButtonPushed() {
return false;
}
-void PineTimeStyle::SetBatteryIcon() {
+void WatchFacePineTimeStyle::SetBatteryIcon() {
auto batteryPercent = batteryPercentRemaining.Get();
lv_label_set_text_static(batteryIcon, BatteryIcon::GetBatteryIcon(batteryPercent));
}
-void PineTimeStyle::AlignIcons() {
+void WatchFacePineTimeStyle::AlignIcons() {
bool isBleIconVisible = IsBleIconVisible(bleRadioEnabled.Get(), bleState.Get());
if (notificationState.Get() && isBleIconVisible) {
lv_obj_align(bleIcon, sidebar, LV_ALIGN_IN_TOP_MID, 8, 25);
@@ -356,7 +356,7 @@ void PineTimeStyle::AlignIcons() {
}
}
-void PineTimeStyle::Refresh() {
+void WatchFacePineTimeStyle::Refresh() {
isCharging = batteryController.IsCharging();
if (isCharging.IsUpdated()) {
if (isCharging.Get()) {
@@ -456,7 +456,7 @@ void PineTimeStyle::Refresh() {
}
}
-void PineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event) {
+void WatchFacePineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event) {
auto valueTime = settingsController.GetPTSColorTime();
auto valueBar = settingsController.GetPTSColorBar();
auto valueBG = settingsController.GetPTSColorBG();
@@ -577,7 +577,7 @@ void PineTimeStyle::UpdateSelected(lv_obj_t* object, lv_event_t event) {
}
}
-Pinetime::Controllers::Settings::Colors PineTimeStyle::GetNext(Pinetime::Controllers::Settings::Colors color) {
+Pinetime::Controllers::Settings::Colors WatchFacePineTimeStyle::GetNext(Pinetime::Controllers::Settings::Colors color) {
auto colorAsInt = static_cast<uint8_t>(color);
Pinetime::Controllers::Settings::Colors nextColor;
if (colorAsInt < 16) {
@@ -588,7 +588,7 @@ Pinetime::Controllers::Settings::Colors PineTimeStyle::GetNext(Pinetime::Control
return nextColor;
}
-Pinetime::Controllers::Settings::Colors PineTimeStyle::GetPrevious(Pinetime::Controllers::Settings::Colors color) {
+Pinetime::Controllers::Settings::Colors WatchFacePineTimeStyle::GetPrevious(Pinetime::Controllers::Settings::Colors color) {
auto colorAsInt = static_cast<uint8_t>(color);
Pinetime::Controllers::Settings::Colors prevColor;
diff --git a/src/displayapp/screens/PineTimeStyle.h b/src/displayapp/screens/WatchFacePineTimeStyle.h
index 5de9a5fa..465aa705 100644
--- a/src/displayapp/screens/PineTimeStyle.h
+++ b/src/displayapp/screens/WatchFacePineTimeStyle.h
@@ -21,16 +21,16 @@ namespace Pinetime {
namespace Applications {
namespace Screens {
- class PineTimeStyle : public Screen {
+ class WatchFacePineTimeStyle : public Screen {
public:
- PineTimeStyle(DisplayApp* app,
+ WatchFacePineTimeStyle(DisplayApp* app,
Controllers::DateTime& dateTimeController,
Controllers::Battery& batteryController,
Controllers::Ble& bleController,
Controllers::NotificationManager& notificatioManager,
Controllers::Settings& settingsController,
Controllers::MotionController& motionController);
- ~PineTimeStyle() override;
+ ~WatchFacePineTimeStyle() override;
bool OnTouchEvent(TouchEvents event) override;
bool OnButtonPushed() override;