summaryrefslogtreecommitdiff
path: root/meecastweather/meecastweather.h
diff options
context:
space:
mode:
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