diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-10-16 04:42:30 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-10-16 04:42:30 +0200 |
commit | 4da9bced6a27b92d49b9fc9392946510b8519d82 (patch) | |
tree | 7a2417a932a6463e3e6f6ec4d3799e24de917306 /harmaccuweather/harmaccuweather.h | |
parent | bde4bde8ec9d6d09874d5ae9e0ba6dc9431859b6 (diff) | |
download | sowatch-4da9bced6a27b92d49b9fc9392946510b8519d82.tar.gz sowatch-4da9bced6a27b92d49b9fc9392946510b8519d82.zip |
Initial implementation of weather
Diffstat (limited to 'harmaccuweather/harmaccuweather.h')
-rw-r--r-- | harmaccuweather/harmaccuweather.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/harmaccuweather/harmaccuweather.h b/harmaccuweather/harmaccuweather.h new file mode 100644 index 0000000..bac08e2 --- /dev/null +++ b/harmaccuweather/harmaccuweather.h @@ -0,0 +1,48 @@ +#ifndef HARMACCUWEATHER_H +#define HARMACCUWEATHER_H + +#include <QtCore/QTimer> +#include <QtCore/QSettings> +#include <sowatch.h> + +namespace sowatch +{ + +class HarmAccuWeather : public WeatherNotification +{ + Q_OBJECT + +public: + explicit HarmAccuWeather(int updateTime, QObject *parent = 0); + + static QSettings* getAccuweatherData(); + + Type type() const; + uint count() const; + QDateTime dateTime() const; + QString title() const; + QString body() const; + + WeatherType forecast(); + int temperature(); + Unit temperatureUnits(); + + void activate(); + void dismiss(); + +private slots: + void update(); + +private: + QTimer* _updateTimer; + bool _metric; + QDateTime _lastUpdate; + QString _lastLocation; + int _lastTemp; + int _lastWxCode; + +}; + +} + +#endif // HARMACCUWEATHER_H |