summaryrefslogtreecommitdiff
path: root/harmaccuweather/harmaccuweather.h
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-10-16 04:42:30 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-10-16 04:42:30 +0200
commit4da9bced6a27b92d49b9fc9392946510b8519d82 (patch)
tree7a2417a932a6463e3e6f6ec4d3799e24de917306 /harmaccuweather/harmaccuweather.h
parentbde4bde8ec9d6d09874d5ae9e0ba6dc9431859b6 (diff)
downloadsowatch-4da9bced6a27b92d49b9fc9392946510b8519d82.tar.gz
sowatch-4da9bced6a27b92d49b9fc9392946510b8519d82.zip
Initial implementation of weather
Diffstat (limited to 'harmaccuweather/harmaccuweather.h')
-rw-r--r--harmaccuweather/harmaccuweather.h48
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