-
-
Notifications
You must be signed in to change notification settings - Fork 952
/
WeatherSymbols.cpp
61 lines (59 loc) · 2.32 KB
/
WeatherSymbols.cpp
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include "displayapp/screens/WeatherSymbols.h"
const char* Pinetime::Applications::Screens::Symbols::GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon) {
switch (icon) {
case Pinetime::Controllers::SimpleWeatherService::Icons::Sun:
return Symbols::sun;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudsSun:
return Symbols::cloudSun;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds:
return Symbols::cloud;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::BrokenClouds:
return Symbols::cloudMeatball;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::Thunderstorm:
return Symbols::bolt;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::Snow:
return Symbols::snowflake;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudShowerHeavy:
return Symbols::cloudShowersHeavy;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudSunRain:
return Symbols::cloudSunRain;
break;
case Pinetime::Controllers::SimpleWeatherService::Icons::Smog:
return Symbols::smog;
break;
default:
return Symbols::ban;
break;
}
}
const char* Pinetime::Applications::Screens::Symbols::GetCondition(const Pinetime::Controllers::SimpleWeatherService::Icons icon) {
switch (icon) {
case Pinetime::Controllers::SimpleWeatherService::Icons::Sun:
return "Clear sky";
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudsSun:
return "Few clouds";
case Pinetime::Controllers::SimpleWeatherService::Icons::Clouds:
return "Scattered clouds";
case Pinetime::Controllers::SimpleWeatherService::Icons::BrokenClouds:
return "Broken clouds";
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudShowerHeavy:
return "Shower rain";
case Pinetime::Controllers::SimpleWeatherService::Icons::CloudSunRain:
return "Rain";
case Pinetime::Controllers::SimpleWeatherService::Icons::Thunderstorm:
return "Thunderstorm";
case Pinetime::Controllers::SimpleWeatherService::Icons::Snow:
return "Snow";
case Pinetime::Controllers::SimpleWeatherService::Icons::Smog:
return "Mist";
default:
return "";
}
}