summaryrefslogtreecommitdiff
path: root/meecastweather/meecastweather.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-15 15:53:09 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-15 15:53:09 +0200
commit2ecf718cc9d460ad192de196aac8d13e30a7ab4c (patch)
tree28ad0698f48e563ff0cca74c780e283ad16b7994 /meecastweather/meecastweather.h
parentc752ccafd8d826b3c0c9140e89ece09e90b34cb1 (diff)
downloadsowatch-2ecf718cc9d460ad192de196aac8d13e30a7ab4c.tar.gz
sowatch-2ecf718cc9d460ad192de196aac8d13e30a7ab4c.zip
preparing meecastweather plugin
Diffstat (limited to 'meecastweather/meecastweather.h')
-rw-r--r--meecastweather/meecastweather.h52
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