SHOW:
|
|
- or go back to the newest paste.
| 1 | static void testme(void) | |
| 2 | {
| |
| 3 | QObject o; | |
| 4 | int notificationId = MythUINotificationCenter::GetInstance()->Register(&o); | |
| 5 | MythMediaNotification n1(MythNotification::New, QImage(), DMAP(), 0.5, "step 1"); | |
| 6 | n1.SetId(notificationId); | |
| 7 | n1.SetParent(&o); | |
| 8 | n1.SetDuration(10); | |
| 9 | MythUINotificationCenter::GetInstance()->Queue(n1); | |
| 10 | sleep (5); | |
| 11 | ||
| 12 | MythPlaybackNotification n2(MythNotification::Update, 1, "done"); | |
| 13 | n2.SetId(notificationId); | |
| 14 | n2.SetParent(&o); | |
| 15 | n2.SetDuration(10); | |
| 16 | MythUINotificationCenter::GetInstance()->Queue(n2); | |
| 17 | MythUINotificationCenter::GetInstance()->UnRegister(&o, notificationId); | |
| 18 | } | |
| 19 | ||
| 20 | static void runTestMethod (void) | |
| 21 | {
| |
| 22 | QtConcurrent::run(testme); | |
| 23 | } |