void NotesManager::nextAlarm()
{
    QSqlQuery alarmQuery("SELECT * FROM todolist WHERE date > DATETIME('now', 'localtime') ORDER BY date");
    if (alarmQuery.next()) { 
        setAlarmTime(QDateTime::fromString(alarmQuery.value(2).toString(), "yyyy-MM-dd HH:mm:ss"));
        setAlarmMessage(alarmQuery.value(1).toString());
    }
}
Exemple #2
0
// Sets the alarm value
bool Timer::setSlotAlarmTime(const Time* const msg)
{
   bool ok = false;
   if (msg != 0) {
      ok = setAlarmTime( Seconds::convertStatic(*msg) );
    }
    return ok;
}
Exemple #3
0
Alarm::Alarm()
{
	// fill in structure with current time
	time_t n = now();
	tmElements_t alarmSetting;
	breakTime(n, alarmSetting);

	// set alarm value to 00:00:00 (HH:MM:SS).
	alarmSetting.Hour   = 0;
	alarmSetting.Minute = 0;
	alarmSetting.Second = 0;

	setAlarmTime(makeTime(alarmSetting));
	disableAlarm();
}