summaryrefslogtreecommitdiffstats
path: root/kweather/weather_icon.h
blob: f18c472d96565043b725578ff3f721b46d2d59dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 };
		enum RangedCondition { Cloudy, Showers, Snow, Thunderstorm };

		WeatherIcon( int condition /* SimpleCondition */, bool night );
		WeatherIcon( int condition /* RangedCondition */, bool night, unsigned int strength );
		~WeatherIcon();

		static TQString unknown() { return "weather-none-available"; };
		TQString name() { return iconName; }
		TQString path() { return iconPath; }

	private:
		TQString iconName;
		TQString iconPath;
};