diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-12 03:49:38 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-12 03:49:38 +0200 |
commit | 3ca9235ddb93b52730099164a0dc387f7a301280 (patch) | |
tree | aa6e74210ce6075fc9e974dd275d28adf5f5d0c5 /testnotification/testweathernotification.cpp | |
parent | ac182bd9bf076b4d03d4812e85b989edae32d756 (diff) | |
download | sowatch-3ca9235ddb93b52730099164a0dc387f7a301280.tar.gz sowatch-3ca9235ddb93b52730099164a0dc387f7a301280.zip |
weather rendering in metawatchwatchlets
Diffstat (limited to 'testnotification/testweathernotification.cpp')
-rw-r--r-- | testnotification/testweathernotification.cpp | 59 |
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. +} |