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