diff options
author | Mavridis Philippe <[email protected]> | 2021-12-21 10:28:09 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2022-01-14 12:39:17 +0200 |
commit | c0d50863dffd6b5b7a5737a01c5cd93be6bc53d9 (patch) | |
tree | 863763f89e6666ae443c7e643fba9de1733b6413 /kweather | |
parent | 2dc62c135ee15e8b105be66381bc0ccbc52debd1 (diff) | |
download | tdetoys-c0d50863dffd6b5b7a5737a01c5cd93be6bc53d9.tar.gz tdetoys-c0d50863dffd6b5b7a5737a01c5cd93be6bc53d9.zip |
WeatherService: Added forceUpdateAll() function.
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'kweather')
-rw-r--r-- | kweather/weatherservice.cpp | 13 | ||||
-rw-r--r-- | kweather/weatherservice.h | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/kweather/weatherservice.cpp b/kweather/weatherservice.cpp index 556a015..966216b 100644 --- a/kweather/weatherservice.cpp +++ b/kweather/weatherservice.cpp @@ -73,13 +73,22 @@ void WeatherService::updated(const TQString &stationID) void WeatherService::updateAll() { - kdDebug(12006) << "Sending for all" << endl; + kdDebug(12006) << "Sending update for all" << endl; TQStringList stations = m_weatherLib->stations(); TQStringList::ConstIterator end(stations.end()); for ( TQStringList::ConstIterator it = stations.begin(); it != end; ++it ) { update(*it); - } + } +} +void WeatherService::forceUpdateAll() +{ + kdDebug(12006) << "Sending forceUpdate for all" << endl; + TQStringList stations = m_weatherLib->stations(); + TQStringList::ConstIterator end(stations.end()); + for ( TQStringList::ConstIterator it = stations.begin(); it != end; ++it ) { + forceUpdate(*it); + } } void WeatherService::updating(const TQString &stationID) diff --git a/kweather/weatherservice.h b/kweather/weatherservice.h index ae0f39b..2ec63be 100644 --- a/kweather/weatherservice.h +++ b/kweather/weatherservice.h @@ -86,6 +86,7 @@ class WeatherService : public TQObject, public DCOPObject void update(const TQString &stationID); void updateAll(); void forceUpdate(const TQString &stationID); + void forceUpdateAll(); void removeStation(const TQString &stationID); void addStation(const TQString &stationID); TQStringList listStations(); |