0

Is it possible to set an alarm for a specific time in Qt?

legoscia
  • 39,593
  • 22
  • 116
  • 167
vivek
  • 23
  • 1
  • 7
  • 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 Answers1

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);
legoscia
  • 39,593
  • 22
  • 116
  • 167
Viren
  • 2,161
  • 22
  • 27