summaryrefslogtreecommitdiff
path: root/testnotification/testnotification.cpp
blob: fa904b9c83c5e06442512cb9c935b5c9f506fd01 (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
#include "testnotification.h"

using namespace sowatch;

TestNotification::TestNotification(Type type, const QString &title, const QString &body, QObject *parent)
    : Notification(parent),
      _type(type),
      _time(QDateTime::currentDateTime()),
      _title(title), _body(body)
{
}

Notification::Type TestNotification::type() const
{
	return _type;
}

uint TestNotification::count() const
{
	return 1;
}

QDateTime TestNotification::dateTime() const
{
	return _time;
}

QString TestNotification::title() const
{
	return _title;
}

QString TestNotification::body() const
{
	return _body;
}

void TestNotification::activate()
{
	// Do nothing
}

void TestNotification::dismiss()
{
	deleteLater(); // We do not want to keep those around.
}