mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-12-24 10:13:56 +03:00
Split declaration and implementation of GetSymbol
This commit is contained in:
parent
264b5bed43
commit
034d83fe6b
@ -394,6 +394,7 @@ list(APPEND SOURCE_FILES
|
|||||||
displayapp/screens/Error.cpp
|
displayapp/screens/Error.cpp
|
||||||
displayapp/screens/Alarm.cpp
|
displayapp/screens/Alarm.cpp
|
||||||
displayapp/screens/Styles.cpp
|
displayapp/screens/Styles.cpp
|
||||||
|
displayapp/screens/WeatherSymbols.cpp
|
||||||
displayapp/Colors.cpp
|
displayapp/Colors.cpp
|
||||||
displayapp/widgets/Counter.cpp
|
displayapp/widgets/Counter.cpp
|
||||||
displayapp/widgets/PageIndicator.cpp
|
displayapp/widgets/PageIndicator.cpp
|
||||||
|
36
src/displayapp/screens/WeatherSymbols.cpp
Normal file
36
src/displayapp/screens/WeatherSymbols.cpp
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#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;
|
||||||
|
}
|
||||||
|
}
|
@ -6,40 +6,7 @@ namespace Pinetime {
|
|||||||
namespace Applications {
|
namespace Applications {
|
||||||
namespace Screens {
|
namespace Screens {
|
||||||
namespace Symbols {
|
namespace Symbols {
|
||||||
const char* GetSymbol(const Pinetime::Controllers::SimpleWeatherService::Icons icon) {
|
const char* 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user