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