vivek
vivek

Reputation: 23

How to set alarm in qt mobility application

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

Upvotes: 0

Views: 1105

Answers (1)

Viren
Viren

Reputation: 2171

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);

Upvotes: 2

Related Questions