From 6668b34bc5deb36e73aa45e0457ed6740f828efd Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Sun, 12 Dec 2021 15:50:37 +0200 Subject: Implemented icon theme option. Changes in this commit include: * The option itself; * A method of updating the option right after Apply or Ok is pressed in the settings dialog; * A new WeatherIconPrivate class to store the methods previously in WeatherIcons, as well as the settings; * Improved icon name helper function in METAR parser; * A few cleanups to the WeatherIcon class. Signed-off-by: Mavridis Philippe --- kweather/metar_parser.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'kweather/metar_parser.h') diff --git a/kweather/metar_parser.h b/kweather/metar_parser.h index a5ab028..6a645d2 100644 --- a/kweather/metar_parser.h +++ b/kweather/metar_parser.h @@ -32,6 +32,8 @@ struct WeatherInfo { /** The current weather state outside */ TQString theWeather; + TQString iconName; + TQString iconPath; int clouds; float windMPH; float tempC; @@ -92,7 +94,7 @@ class MetarParser void calcCurrentIcon(); void calcWindChill(); bool isNight(const TQString &stationID) const; - TQString iconName( int condition, bool night, int strength = 0 ) const; + void getIcon( int condition, bool night, int strength = 0 ); /* * Reset the internal WeatherInfo struct of the class so that -- cgit v1.2.1