diff options
author | Mavridis Philippe <mavridisf@gmail.com> | 2023-06-01 16:30:11 +0300 |
---|---|---|
committer | Mavridis Philippe <mavridisf@gmail.com> | 2023-06-14 17:42:21 +0300 |
commit | fe6de6f4bc8a0a7d86c2c3dc6413170214206cff (patch) | |
tree | d86bbc14c9c16c52b9d2b5b750de15ece38c7c5a /kweather/weatherlib.h | |
parent | 6b56a1befc9f510d4467cd5652cbb8fb49563070 (diff) | |
download | tdetoys-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 <mavridisf@gmail.com>
(cherry picked from commit bc71670331e16b15fc30214cb85c409b8c91bb9c)
Diffstat (limited to 'kweather/weatherlib.h')
-rw-r--r-- | kweather/weatherlib.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/kweather/weatherlib.h b/kweather/weatherlib.h index 5dde37c..0e83d77 100644 --- a/kweather/weatherlib.h +++ b/kweather/weatherlib.h @@ -28,12 +28,12 @@ namespace TDEIO } class StationDatabase; +class WeatherIcon; class WeatherLib : public TQObject { Q_OBJECT - - + public: class Data; @@ -48,16 +48,18 @@ class WeatherLib : public TQObject TQString wind(const TQString &stationID); TQString pressure(const TQString &stationID); TQString iconName(const TQString &stationID); - TQString iconPath(const TQString &stationID); + TQString iconName(const TQString &stationID, uint iconSize); + TQString iconPath(const TQString &stationID, uint iconSize); TQString date(const TQString &stationID); TQStringList weather(const TQString &stationID); TQString visibility(const TQString &stationID); TQStringList cover(const TQString &stationID); bool stationNeedsMaintenance(const TQString &stationID); - + bool weatherDataAvailable(const TQString &stationID); + TQStringList stations(); bool isNight(const TQString &stationID) const; - + void update(const TQString &stationID); void forceUpdate(const TQString &stationID); void remove(const TQString &stationID); @@ -72,6 +74,7 @@ class WeatherLib : public TQObject private: Data* findData(const TQString &stationID); + WeatherIcon* weatherIcon(const TQString &stationID); void clearData(Data *d); void getData(Data *d, bool force = false); void processData(const TQString &metar, Data *d); |