From abdf3b1eaba8151f1b8e862750c38cb7a5411d2a Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Mon, 13 Aug 2012 21:31:52 +0200 Subject: make watchsimulator work again --- testnotification/testnotificationprovider.cpp | 15 +++++++++++---- testnotification/testnotificationprovider.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'testnotification') 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; }; -- cgit v1.2.3