summaryrefslogtreecommitdiff
path: root/testnotification
diff options
context:
space:
mode:
Diffstat (limited to 'testnotification')
-rw-r--r--testnotification/testnotificationprovider.cpp15
-rw-r--r--testnotification/testnotificationprovider.h1
2 files changed, 12 insertions, 4 deletions
diff --git a/testnotification/testnotificationprovider.cpp b/testnotification/testnotificationprovider.cpp
index 960f450..f66ae89 100644
--- a/testnotification/testnotificationprovider.cpp
+++ b/testnotification/testnotificationprovider.cpp
@@ -3,14 +3,19 @@
using namespace sowatch;
+int TestNotificationProvider::_counter = 1;
+
TestNotificationProvider::TestNotificationProvider(QObject *parent) :
NotificationProvider(parent),
_timer(new QTimer(this))
{
- QTimer::singleShot(15000, this, SLOT(generateInitialNotification()));
+ QTimer::singleShot(1000, this, SLOT(generateInitialNotification()));
+ QTimer::singleShot(1200, this, SLOT(generateNotification()));
+ QTimer::singleShot(1400, this, SLOT(generateNotification()));
+ QTimer::singleShot(1600, this, SLOT(generateNotification()));
connect(_timer, SIGNAL(timeout()), SLOT(generateNotification()));
_timer->setInterval(60000);
- _timer->start();
+ //_timer->start();
}
TestNotificationProvider::~TestNotificationProvider()
@@ -28,7 +33,9 @@ void TestNotificationProvider::generateInitialNotification()
void TestNotificationProvider::generateNotification()
{
TestNotification *n = new TestNotification(Notification::ImNotification,
- "A friend",
- "I will keep talking to you");
+ QString("Friend %1").arg(_counter++),
+ "Lorem ipsum dolor sit amet. "
+ "Consectetur adipiscing elit. "
+ "Donec non congue augue.");
emit incomingNotification(n);
}
diff --git a/testnotification/testnotificationprovider.h b/testnotification/testnotificationprovider.h
index 9931ea0..7bca1f3 100644
--- a/testnotification/testnotificationprovider.h
+++ b/testnotification/testnotificationprovider.h
@@ -21,6 +21,7 @@ private slots:
void generateNotification();
private:
+ static int _counter;
QTimer *_timer;
};