summaryrefslogtreecommitdiff
path: root/testnotification/testweathernotification.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-05-12 03:49:38 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-05-12 03:49:38 +0200
commit3ca9235ddb93b52730099164a0dc387f7a301280 (patch)
treeaa6e74210ce6075fc9e974dd275d28adf5f5d0c5 /testnotification/testweathernotification.cpp
parentac182bd9bf076b4d03d4812e85b989edae32d756 (diff)
downloadsowatch-3ca9235ddb93b52730099164a0dc387f7a301280.tar.gz
sowatch-3ca9235ddb93b52730099164a0dc387f7a301280.zip
weather rendering in metawatchwatchlets
Diffstat (limited to 'testnotification/testweathernotification.cpp')
-rw-r--r--testnotification/testweathernotification.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/testnotification/testweathernotification.cpp b/testnotification/testweathernotification.cpp
new file mode 100644
index 0000000..98c0713
--- /dev/null
+++ b/testnotification/testweathernotification.cpp
@@ -0,0 +1,59 @@
+#include "testweathernotification.h"
+
+using namespace sowatch;
+
+TestWeatherNotification::TestWeatherNotification(QObject *parent)
+ : WeatherNotification(parent)
+{
+}
+
+
+Notification::Type TestWeatherNotification::type() const
+{
+ return Notification::WeatherNotification;
+}
+
+uint TestWeatherNotification::count() const
+{
+ return 1;
+}
+
+QDateTime TestWeatherNotification::dateTime() const
+{
+ return QDateTime::currentDateTime();
+}
+
+QString TestWeatherNotification::title() const
+{
+ return "My city";
+}
+
+QString TestWeatherNotification::body() const
+{
+ return "Mostly sunny";
+}
+
+WeatherNotification::WeatherType TestWeatherNotification::forecast() const
+{
+ return Sunny;
+}
+
+int TestWeatherNotification::temperature() const
+{
+ return 30;
+}
+
+WeatherNotification::Unit TestWeatherNotification::temperatureUnits() const
+{
+ return Celsius;
+}
+
+void TestWeatherNotification::activate()
+{
+ // Do nothing
+}
+
+void TestWeatherNotification::dismiss()
+{
+ deleteLater(); // We do not want to keep those around.
+}