summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Weather.h
blob: 21b05bd8c6309f3ff86f3a5a48007c34cd94d612 (plain)
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();
      };
    }
  }
}