From e65c9fa18138e8623d5f8e5e8f25fcf0e3d3cf67 Mon Sep 17 00:00:00 2001 From: JF Date: Mon, 10 Feb 2020 21:05:33 +0100 Subject: Integration of lvgl : continued... --- src/DisplayApp/Screens/Clock.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/DisplayApp/Screens/Clock.h') diff --git a/src/DisplayApp/Screens/Clock.h b/src/DisplayApp/Screens/Clock.h index 12dd8850..f5328535 100644 --- a/src/DisplayApp/Screens/Clock.h +++ b/src/DisplayApp/Screens/Clock.h @@ -5,6 +5,8 @@ #include #include "Screen.h" #include +#include +#include #include "../Fonts/lcdfont14.h" #include "../Fonts/lcdfont70.h" #include "../../Version.h" @@ -33,7 +35,7 @@ namespace Pinetime { class Clock : public Screen{ public: enum class BleConnectionStates{ NotConnected, Connected}; - Clock(Components::Gfx& gfx) : Screen(gfx), currentDateTime{{}}, version {{}} {} + Clock(Components::Gfx& gfx); void Refresh(bool fullRefresh) override; void SetBatteryPercentRemaining(uint8_t percent) { batteryPercentRemaining = percent; } @@ -49,7 +51,6 @@ namespace Pinetime { const FONT_INFO largeFont {lCD_70ptFontInfo.height, lCD_70ptFontInfo.startChar, lCD_70ptFontInfo.endChar, lCD_70ptFontInfo.spacePixels, lCD_70ptFontInfo.charInfo, lCD_70ptFontInfo.data}; const FONT_INFO smallFont {lCD_14ptFontInfo.height, lCD_14ptFontInfo.startChar, lCD_14ptFontInfo.endChar, lCD_14ptFontInfo.spacePixels, lCD_14ptFontInfo.charInfo, lCD_14ptFontInfo.data}; - char currentChar[4]; uint16_t currentYear = 1970; Pinetime::Controllers::DateTime::Months currentMonth = Pinetime::Controllers::DateTime::Months::Unknown; Pinetime::Controllers::DateTime::Days currentDayOfWeek = Pinetime::Controllers::DateTime::Days::Unknown; @@ -59,6 +60,16 @@ namespace Pinetime { DirtyValue bleState {BleConnectionStates::NotConnected}; DirtyValue> currentDateTime; DirtyValue version; + + lv_style_t* labelStyle; + lv_style_t labelBigStyle; + lv_obj_t * label_battery; + + lv_obj_t * label_ble; + lv_obj_t* label_time; + lv_obj_t* label_date; + lv_obj_t* label_version; + }; } } -- cgit v1.2.3-70-g09d2