ref: fdc89f1a20889c0295534f58dc2e82ce8c55a18b
src/displayapp/screens/Weather.h
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
#pragma once #include <memory> #include <components/ble/weather/WeatherService.h> #include "Screen.h" #include "ScreenList.h" namespace Pinetime { namespace Applications { class DisplayApp; namespace Screens { class Weather : public Screen { public: explicit Weather(DisplayApp* app, Pinetime::Controllers::WeatherService& weather); ~Weather() override; void Refresh() override; bool OnButtonPushed() override; bool OnTouchEvent(TouchEvents event) override; private: bool running = true; Controllers::WeatherService& weatherService; ScreenList<5> screens; std::unique_ptr<Screen> CreateScreenTemperature(); std::unique_ptr<Screen> CreateScreenAir(); std::unique_ptr<Screen> CreateScreenClouds(); std::unique_ptr<Screen> CreateScreenPrecipitation(); std::unique_ptr<Screen> CreateScreenHumidity(); }; } } } |