diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2012-08-13 21:31:52 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2012-08-13 21:31:52 +0200 |
commit | abdf3b1eaba8151f1b8e862750c38cb7a5411d2a (patch) | |
tree | 69e314d80a332295dd5475fc91f45c2078eaead5 /testnotification | |
parent | 51701e30d710ad016ddf2d306cdd7be122ddf25b (diff) | |
download | sowatch-abdf3b1eaba8151f1b8e862750c38cb7a5411d2a.tar.gz sowatch-abdf3b1eaba8151f1b8e862750c38cb7a5411d2a.zip |
make watchsimulator work again
Diffstat (limited to 'testnotification')
-rw-r--r-- | testnotification/testnotificationprovider.cpp | 15 | ||||
-rw-r--r-- | testnotification/testnotificationprovider.h | 1 |
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; }; |