Is it possible to set an alarm for a specific time in Qt?
Asked
Active
Viewed 1,090 times
0
-
I think my qt sdk does not support XQAlarm APIs is there is any way to download it by outside if so plz tell me as i have to add alarm in my application and it is one of the most important part of my project – vivek Jan 16 '11 at 10:19
-
what version of qt are you using? how about giving a bit more info here? – Viren Jan 20 '11 at 09:23
1 Answers
2
Use extension class XQAlarm.
This is generally part of Mobile Extensions offered in the SDK for a given OS. For Symbian, for example, you can find it on http://forum.nokia.com. (Please note that they might have been deprecated by Nokia as it XQAlarm of Alarms API was released under "technology review" program only for Symbian community by Nokia).
Here is example how to use XQAlarm:
// Creating a workday wakeup alarm
XQAlarms* alarms = new XQAlarms(this);
QDateTime alarmDateTime = alarmDateTime.currentDateTime();
alarmDateTime.setTime(QTime(15, 0));
// Create XQAlarm data object
XQAlarm weeklyReport;
weeklyReport.setExpiryTime(alarmDateTime);
weeklyReport.setMessage("Do weekly report");
weeklyReport.setRepeatDefinition(XQAlarm::RepeatWeekly);
alarms->addAlarm(weeklyReport);
-
-
-
Thanks Viren Shakya its workings. and vivek download latest version of Nokia Qt sdk...then you will surely get XQAlarm class – Tirupati Balan Jan 30 '11 at 12:44
-
Glad that helped. :-) Could you please mind accepting the answer here by clicking on the "Accept" link above? :-) – Viren Jan 31 '11 at 07:59