summaryrefslogtreecommitdiff
path: root/testnotification/testweathernotification.cpp
blob: 98c0713ad2f871a12e6160c02f524890fa3fe65c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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.
}