bool scheduleMessage(const QString& message, const QDateTime* dateTime, const QColor& bg, int flags)
bool scheduleMessage(const QString& message, const QDateTime* dateTime, const QColor& bg, int flags, int repeat_count, int interval)
Specifies the scheduled date and time at which the message should be displayed.
Specifies the logical OR of the desired alarm message flags. The flag bits are those defined in msgevent.h
Specifies the number of times that the alarm message should be repeated, after its initial display.
Specifies the interval in minutes between repetitions of the alarm message.
scheduleMessage() is a DCOP call to schedule the specified alarm message for display at the specified date and time. It has two forms: one for a non-repeating alarm, and another for a repeating alarm.
If the scheduled time (including any repetitions) has already passed, KAlarm immediately displays the message or, if the LATE_CANCEL flag bit is set, ignores the request. If the scheduled time is in the future, KAlarm adds the alarm message to the calendar file for later display.
Use a code sequence similar to the following to set up the parameter data for the DCOP call to scheduleMessage() for a non-repeating alarm:
QString message; QDateTime dateTime; QColor bgColour; Q_UINT32 flags; . . . QByteArray data; QDataStream arg(data, IO_WriteOnly); arg << message; arg.writeRawBytes((char*)&dateTime, sizeof(QDateTime)); arg.writeRawBytes((char*)&bgColour, sizeof(QColor)); arg << flags;
Use a code sequence similar to the following to set up the parameter data for the DCOP call to scheduleMessage() for a repeating alarm:
QString message; QDateTime dateTime; QColor bgColour; Q_UINT32 flags; Q_INT32 repeatCount, repeatInterval; . . . QByteArray data; QDataStream arg(data, IO_WriteOnly); arg << message; arg.writeRawBytes((char*)&dateTime, sizeof(QDateTime)); arg.writeRawBytes((char*)&bgColour, sizeof(QColor)); arg << flags << repeatCount << repeatInterval;