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/weatherservice.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/weatherservice.h')
-rw-r--r-- | kweather/weatherservice.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/kweather/weatherservice.h b/kweather/weatherservice.h index 2ec63be..0efab9a 100644 --- a/kweather/weatherservice.h +++ b/kweather/weatherservice.h @@ -61,15 +61,21 @@ class WeatherService : public TQObject, public DCOPObject TQString windChill(const TQString &stationID); TQString wind(const TQString &stationID); TQString pressure(const TQString &stationID); - TQPixmap currentIcon(const TQString &stationID); - TQPixmap icon(const TQString &stationID); - TQString currentIconString(const TQString &stationID); - TQString iconFileName(const TQString &stationID); + TQPixmap icon(const TQString &stationID, uint iconSize); + TQString iconName(const TQString &stationID, uint iconSize); + TQString iconPath(const TQString &stationID, uint iconSize); TQString date(const TQString &stationID); TQString visibility(const TQString &stationID); TQStringList cover(const TQString &stationID); TQStringList weather(const TQString &stationID); bool stationNeedsMaintenance(const TQString &stationID); + bool weatherDataAvailable(const TQString &stationID); + + /* compatibility */ + TQPixmap currentIcon(const TQString &stationID) KDE_DEPRECATED; + TQPixmap icon(const TQString &stationID) KDE_DEPRECATED; + TQString currentIconString(const TQString &stationID) KDE_DEPRECATED; + TQString iconFileName(const TQString &stationID) KDE_DEPRECATED; TQString stationName(const TQString &stationID); TQString stationCountry(const TQString &stationID); |