From 2ecf718cc9d460ad192de196aac8d13e30a7ab4c Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Wed, 15 Aug 2012 15:53:09 +0200 Subject: preparing meecastweather plugin --- meecastweather/meecastweather.h | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 meecastweather/meecastweather.h (limited to 'meecastweather/meecastweather.h') diff --git a/meecastweather/meecastweather.h b/meecastweather/meecastweather.h new file mode 100644 index 0000000..8b403b9 --- /dev/null +++ b/meecastweather/meecastweather.h @@ -0,0 +1,52 @@ +#ifndef HARMACCUWEATHER_H +#define HARMACCUWEATHER_H + +#include +#include +#include +#include + +namespace sowatch +{ + +class HarmAccuWeather : public WeatherNotification +{ + Q_OBJECT + +public: + explicit HarmAccuWeather(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 fileChanged(const QString& path); + void update(); + +private: + QFileSystemWatcher* _watcher; + QTimer* _timer; + + bool _metric; + QDateTime _lastUpdate; + QString _lastLocation; + int _lastTemp; + int _lastWxCode; + +}; + +} + +#endif // HARMACCUWEATHER_H -- cgit v1.2.3