diff options
author | Mavridis Philippe <[email protected]> | 2023-06-01 16:30:11 +0300 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2023-06-14 17:42:21 +0300 |
commit | fe6de6f4bc8a0a7d86c2c3dc6413170214206cff (patch) | |
tree | d86bbc14c9c16c52b9d2b5b750de15ece38c7c5a /kweather/reportview.cpp | |
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 <[email protected]>
(cherry picked from commit bc71670331e16b15fc30214cb85c409b8c91bb9c)
Diffstat (limited to 'kweather/reportview.cpp')
-rw-r--r-- | kweather/reportview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kweather/reportview.cpp b/kweather/reportview.cpp index 88dadd1..97c308f 100644 --- a/kweather/reportview.cpp +++ b/kweather/reportview.cpp @@ -22,6 +22,7 @@ #include <tdehtml_part.h> #include <tdehtmlview.h> #include <tdeglobalsettings.h> +#include <kiconloader.h> #include <tqvbox.h> #include <tqpixmap.h> @@ -46,7 +47,7 @@ reportView::reportView(const TQString &reportLocation) m_weatherService = new WeatherService_stub( "KWeatherService", "WeatherService" ); - TQPixmap icon = m_weatherService->icon( m_locationCode ); + TQPixmap icon = m_weatherService->icon( m_locationCode, IconSize(TDEIcon::Panel) ); setIcon( icon ); render(); @@ -89,7 +90,7 @@ void reportView::render(){ TQString sunRiseTime = m_weatherService->sunRiseTime(m_locationCode ); TQString sunSetTime = m_weatherService->sunSetTime(m_locationCode ); TQString date = m_weatherService->date(m_locationCode ); - TQString icon = m_weatherService->iconFileName(m_locationCode ); + TQString icon = m_weatherService->iconPath(m_locationCode, IconSize(TDEIcon::Panel)); TQStringList cover = m_weatherService->cover(m_locationCode ); TQStringList weather = m_weatherService->weather(m_locationCode ); |