diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2012-08-15 15:53:09 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2012-08-15 15:53:09 +0200 |
commit | 2ecf718cc9d460ad192de196aac8d13e30a7ab4c (patch) | |
tree | 28ad0698f48e563ff0cca74c780e283ad16b7994 /meecastweather/meecastweather.h | |
parent | c752ccafd8d826b3c0c9140e89ece09e90b34cb1 (diff) | |
download | sowatch-2ecf718cc9d460ad192de196aac8d13e30a7ab4c.tar.gz sowatch-2ecf718cc9d460ad192de196aac8d13e30a7ab4c.zip |
preparing meecastweather plugin
Diffstat (limited to 'meecastweather/meecastweather.h')
-rw-r--r-- | meecastweather/meecastweather.h | 52 |
1 files changed, 52 insertions, 0 deletions
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 <QtCore/QFileSystemWatcher> +#include <QtCore/QTimer> +#include <QtCore/QSettings> +#include <sowatch.h> + +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 |