summaryrefslogtreecommitdiffstats
path: root/kweather/weatherservice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kweather/weatherservice.cpp')
-rw-r--r--kweather/weatherservice.cpp35
1 files changed, 28 insertions, 7 deletions
diff --git a/kweather/weatherservice.cpp b/kweather/weatherservice.cpp
index aa8454a..e61138b 100644
--- a/kweather/weatherservice.cpp
+++ b/kweather/weatherservice.cpp
@@ -139,18 +139,33 @@ TQString WeatherService::pressure(const TQString &stationID)
return m_weatherLib->pressure(stationID);
}
+TQPixmap WeatherService::icon(const TQString &stationID, uint iconSize)
+{
+ return kapp->iconLoader()->loadIcon(
+ iconPath(stationID, iconSize),
+ TDEIcon::Panel, iconSize
+ );
+}
+
+TQString WeatherService::iconName(const TQString &stationID, uint iconSize)
+{
+ return m_weatherLib->iconName(stationID, iconSize);
+}
+
+TQString WeatherService::iconPath(const TQString &stationID, uint iconSize)
+{
+ return m_weatherLib->iconPath(stationID, iconSize);
+}
+
+/*** (Begin) Deprecated: functions kept for compatibility reasons */
TQPixmap WeatherService::currentIcon(const TQString &stationID)
{
- return icon( stationID );
+ return icon(stationID, IconSize(TDEIcon::Panel));
}
TQPixmap WeatherService::icon(const TQString &stationID)
{
- kdDebug(12006) << "Get the current weather icon.." << endl;
- return kapp->iconLoader()->loadIcon(
- iconFileName(stationID),
- TDEIcon::Desktop
- );
+ return icon(stationID, IconSize(TDEIcon::Panel));
}
TQString WeatherService::currentIconString(const TQString &stationID)
@@ -160,8 +175,9 @@ TQString WeatherService::currentIconString(const TQString &stationID)
TQString WeatherService::iconFileName(const TQString &stationID)
{
- return m_weatherLib->iconPath(stationID);
+ return iconPath(stationID, IconSize(TDEIcon::Panel));
}
+/*** (End) Deprecated: functions kept for compatibility reasons */
void WeatherService::useIconTheme(bool use)
{
@@ -199,6 +215,11 @@ bool WeatherService::stationNeedsMaintenance(const TQString &stationID)
return m_weatherLib->stationNeedsMaintenance(stationID);
}
+bool WeatherService::weatherDataAvailable(const TQString &stationID)
+{
+ return m_weatherLib->weatherDataAvailable(stationID);
+}
+
void WeatherService::update(const TQString &stationID)
{
m_weatherLib->update(stationID);