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.h31
1 files changed, 26 insertions, 5 deletions
diff --git a/kweather/weather_icon.h b/kweather/weather_icon.h
index 3ae8ddc..f18c472 100644
--- a/kweather/weather_icon.h
+++ b/kweather/weather_icon.h
@@ -1,5 +1,28 @@
class TDEIconLoader;
+class WeatherIconPrivate {
+ friend class WeatherIcon;
+
+ public:
+ WeatherIconPrivate();
+ ~WeatherIconPrivate();
+
+ static WeatherIconPrivate* instance();
+
+ void useIconTheme( bool use );
+ bool usingIconTheme();
+
+ TQString iconPath( TQString icon, bool inTheme );
+ TQString iconPath( TQString icon );
+
+ private:
+ static WeatherIconPrivate* s_instance;
+ TDEIconLoader* iconLoader;
+ bool m_useIconTheme;
+
+ TQPair<TQString,TQString> findIcon( TQStringList fallback );
+};
+
class WeatherIcon {
public:
enum SimpleCondition { Sunny, Fog, Mist, Overcast, Hail, LightRain, Sleet };
@@ -10,12 +33,10 @@ class WeatherIcon {
~WeatherIcon();
static TQString unknown() { return "weather-none-available"; };
- TQString& name() { return iconName; }
+ TQString name() { return iconName; }
+ TQString path() { return iconPath; }
private:
- TQString findIcon( TQStringList fallback );
- bool iconExists( TQString& icon, bool inTheme = true );
-
- TDEIconLoader* iconLoader;
TQString iconName;
+ TQString iconPath;
};