From fe6de6f4bc8a0a7d86c2c3dc6413170214206cff Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Thu, 1 Jun 2023 16:30:11 +0300 Subject: 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 (cherry picked from commit bc71670331e16b15fc30214cb85c409b8c91bb9c) --- kweather/weatherservice.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'kweather/weatherservice.h') 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); -- cgit v1.2.1