summaryrefslogtreecommitdiffstats
path: root/kweather/weather_icon.h
diff options
context:
space:
mode:
Diffstat (limited to 'kweather/weather_icon.h')
-rw-r--r--kweather/weather_icon.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/kweather/weather_icon.h b/kweather/weather_icon.h
index f18c472..011fb06 100644
--- a/kweather/weather_icon.h
+++ b/kweather/weather_icon.h
@@ -1,4 +1,11 @@
-class TDEIconLoader;
+#include <kiconloader.h>
+
+struct WeatherSingleIconData {
+ TQString name;
+ TQString path;
+ bool inTheme;
+ uint size;
+};
class WeatherIconPrivate {
friend class WeatherIcon;
@@ -9,18 +16,18 @@ class WeatherIconPrivate {
static WeatherIconPrivate* instance();
- void useIconTheme( bool use );
+ void useIconTheme(bool use);
bool usingIconTheme();
- TQString iconPath( TQString icon, bool inTheme );
- TQString iconPath( TQString icon );
+ TQString iconPath(TQString icon, uint size, bool inTheme);
+ TQString iconPath(TQString icon, uint size);
private:
static WeatherIconPrivate* s_instance;
TDEIconLoader* iconLoader;
bool m_useIconTheme;
- TQPair<TQString,TQString> findIcon( TQStringList fallback );
+ struct WeatherSingleIconData findIcon(TQStringList fallback, uint size);
};
class WeatherIcon {
@@ -30,13 +37,15 @@ class WeatherIcon {
WeatherIcon( int condition /* SimpleCondition */, bool night );
WeatherIcon( int condition /* RangedCondition */, bool night, unsigned int strength );
+ WeatherIcon(); /* Unknown conditions */
~WeatherIcon();
- static TQString unknown() { return "weather-none-available"; };
- TQString name() { return iconName; }
- TQString path() { return iconPath; }
+ static struct WeatherSingleIconData unknown(uint size); // for convenience
+
+ struct WeatherSingleIconData iconData(uint size);
+ TQString name(uint size);
+ TQString path(uint size);
private:
- TQString iconName;
- TQString iconPath;
+ TQStringList fallback;
};