1
0
Fork 0
InfiniTime/src/displayapp/screens/Weather.h

46 lines
1 KiB
C
Raw Normal View History

2021-06-09 23:44:49 +02:00
#pragma once
#include <memory>
2021-06-25 00:18:56 +02:00
#include <components/ble/weather/WeatherService.h>
2021-06-09 23:44:49 +02:00
#include "Screen.h"
#include "ScreenList.h"
namespace Pinetime {
namespace Applications {
class DisplayApp;
namespace Screens {
class Weather : public Screen {
public:
2021-06-25 00:18:56 +02:00
explicit Weather(DisplayApp* app, Pinetime::Controllers::WeatherService& weather);
2021-06-09 23:44:49 +02:00
~Weather() override;
2021-06-25 00:18:56 +02:00
void Refresh() override;
2021-06-25 00:18:56 +02:00
2021-06-09 23:44:49 +02:00
bool OnButtonPushed() override;
2021-06-25 00:18:56 +02:00
2021-06-09 23:44:49 +02:00
bool OnTouchEvent(TouchEvents event) override;
private:
bool running = true;
Pinetime::Controllers::DateTime& dateTimeController;
2021-06-25 00:18:56 +02:00
Controllers::WeatherService& weatherService;
2021-06-09 23:44:49 +02:00
ScreenList<5> screens;
2021-06-25 00:18:56 +02:00
std::unique_ptr<Screen> CreateScreenTemperature();
std::unique_ptr<Screen> CreateScreenAir();
2021-06-25 00:18:56 +02:00
std::unique_ptr<Screen> CreateScreenClouds();
2021-06-25 00:18:56 +02:00
std::unique_ptr<Screen> CreateScreenPrecipitation();
2021-06-25 00:18:56 +02:00
std::unique_ptr<Screen> CreateScreenHumidity();
2021-06-09 23:44:49 +02:00
};
}
}
}