summaryrefslogtreecommitdiff
path: root/testnotification/testweathernotification.cpp
diff options
context:
space:
mode:
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.
+}