summaryrefslogtreecommitdiffstats
path: root/kweather/metar_parser.h
diff options
context:
space:
mode:
authorMavridis Philippe <[email protected]>2023-06-01 16:30:11 +0300
committerMavridis Philippe <[email protected]>2023-06-14 17:42:21 +0300
commitfe6de6f4bc8a0a7d86c2c3dc6413170214206cff (patch)
treed86bbc14c9c16c52b9d2b5b750de15ece38c7c5a /kweather/metar_parser.h
parent6b56a1befc9f510d4467cd5652cbb8fb49563070 (diff)
downloadtdetoys-fe6de6f4bc8a0a7d86c2c3dc6413170214206cff.tar.gz
tdetoys-fe6de6f4bc8a0a7d86c2c3dc6413170214206cff.zip
KWeather: improve icon loading and other fixes
- Fix pixelated icons (issue #19) - Fix "network offline" state - Add helper `bool weatherDataAvailable(TQString stationID)` DCOP function - Fix compatibility with old DCOP function signatures - Prevent double "Network is offline" strings in weather data. This commit introduces some new and renamed DCOP calls. Old function signatures are kept for compatibility, but are mraked as deprecated. Signed-off-by: Mavridis Philippe <[email protected]> (cherry picked from commit bc71670331e16b15fc30214cb85c409b8c91bb9c)
Diffstat (limited to 'kweather/metar_parser.h')
-rw-r--r--kweather/metar_parser.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/kweather/metar_parser.h b/kweather/metar_parser.h
index 4f276e8..fd202d8 100644
--- a/kweather/metar_parser.h
+++ b/kweather/metar_parser.h
@@ -32,8 +32,6 @@ struct WeatherInfo
{
/** The current weather state outside */
TQString theWeather;
- TQString iconName;
- TQString iconPath;
int clouds;
float windMPH;
float tempC;
@@ -54,6 +52,11 @@ struct WeatherInfo
TQString qsWindDirection;
TQString reportLocation;
bool stationNeedsMaintenance;
+
+ /* For WeatherIcon */
+ int wiCondition;
+ int wiStrength;
+ bool wiNight;
};
@@ -94,7 +97,7 @@ class MetarParser
void calcCurrentIcon();
void calcWindChill();
bool isNight(const TQString &stationID) const;
- void saveIconNamePath( int condition, bool night, int strength = 0 );
+ void saveIconData( int condition, bool night, int strength = 0 );
/*
* Reset the internal WeatherInfo struct of the class so that