aboutsummaryrefslogtreecommitdiffstats
path: root/src/DisplayApp/Screens/Clock.h
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-02-10 21:05:33 +0100
committerJF <jf@codingfield.com>2020-02-10 21:05:33 +0100
commite65c9fa18138e8623d5f8e5e8f25fcf0e3d3cf67 (patch)
tree39fe9ee738ae5af8c59c83d329ad6072a93b9cfd /src/DisplayApp/Screens/Clock.h
parenta97faf8e9e84053d6db37549cc4211866cb3b89f (diff)
Integration of lvgl : continued...
Diffstat (limited to 'src/DisplayApp/Screens/Clock.h')
-rw-r--r--src/DisplayApp/Screens/Clock.h15
1 files changed, 13 insertions, 2 deletions
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 <Components/Gfx/Gfx.h>
#include "Screen.h"
#include <bits/unique_ptr.h>
+#include <libs/lvgl/src/lv_core/lv_style.h>
+#include <libs/lvgl/src/lv_core/lv_obj.h>
#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<BleConnectionStates> bleState {BleConnectionStates::NotConnected};
DirtyValue<std::chrono::time_point<std::chrono::system_clock, std::chrono::milliseconds>> currentDateTime;
DirtyValue<Pinetime::Version> 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;
+
};
}
}