KDE PIM / Developers / API Docs / libkcal

KCal::Alarm Class Reference

This class represents an alarm notification. More...

#include <alarm.h>

Inherits KCal::CustomProperties.

List of all members.

Public Types

Public Member Functions


Detailed Description

This class represents an alarm notification.


Constructor & Destructor Documentation

Alarm::Alarm Incidence parent  )  [explicit]
 

Construct a new alarm with variables initialized to "sane" values.

Alarm::~Alarm  ) 
 

Destruct Alarm object.


Member Function Documentation

bool Alarm::operator== const Alarm  )  const
 

Compare this alarm with another one.

void Alarm::setType Type  type  ) 
 

Set the type of the alarm.

If the specified type is different from the current type of the alarm, the alarm's type-specific properties are initialised to null.

Parameters:
type type of alarm.

Alarm::Type Alarm::type  )  const
 

Return the type of the alarm.

void Alarm::setDisplayAlarm const QString &  text = QString::null  ) 
 

Set the alarm to be a display alarm.

Parameters:
text text to display when the alarm is triggered.

void Alarm::setText const QString &  text  ) 
 

Set the text to be displayed when the alarm is triggered.

Ignored if the alarm is not a display alarm.

QString Alarm::text  )  const
 

Return the text string that displays when the alarm is triggered.

void Alarm::setAudioAlarm const QString &  audioFile = QString::null  ) 
 

Set the alarm to be an audio alarm.

Parameters:
audioFile optional file to play when the alarm is triggered.

void Alarm::setAudioFile const QString &  audioFile  ) 
 

Set the file to play when the audio alarm is triggered.

Ignored if the alarm is not an audio alarm.

QString Alarm::audioFile  )  const
 

Return the name of the audio file for the alarm.

Returns:
The audio file for the alarm, or QString::null if not an audio alarm.

void Alarm::setProcedureAlarm const QString &  programFile,
const QString &  arguments = QString::null
 

Set the alarm to be a procedure alarm.

Parameters:
programFile program to execute when the alarm is triggered.
arguments arguments to supply to programFile.

void Alarm::setProgramFile const QString &  programFile  ) 
 

Set the program file to execute when the alarm is triggered.

Ignored if the alarm is not a procedure alarm.

QString Alarm::programFile  )  const
 

Return the name of the program file to execute when the alarm is triggered.

Returns:
the program file name, or QString::null if not a procedure alarm.

void Alarm::setProgramArguments const QString &  arguments  ) 
 

Set the arguments to the program to execute when the alarm is triggered.

Ignored if the alarm is not a procedure alarm.

QString Alarm::programArguments  )  const
 

Return the arguments to the program to run when the alarm is triggered.

Returns:
the program arguments, or QString::null if not a procedure alarm.

void Alarm::setEmailAlarm const QString &  subject,
const QString &  text,
const QValueList< Person > &  addressees,
const QStringList &  attachments = QStringList()
 

Set the alarm to be an email alarm.

Parameters:
subject subject line of email.
text body of email.
addressees email addresses of recipient(s).
attachments optional names of files to attach to the email.

void Alarm::setMailAddress const Person mailAlarmAddress  ) 
 

Send mail to this address when the alarm is triggered.

Ignored if the alarm is not an email alarm.

void Alarm::setMailAddresses const QValueList< Person > &  mailAlarmAddresses  ) 
 

Send mail to these addresses when the alarm is triggered.

Ignored if the alarm is not an email alarm.

void Alarm::addMailAddress const Person mailAlarmAddress  ) 
 

Add this address to the list of addresses to send mail to when the alarm is triggered.

Ignored if the alarm is not an email alarm.

QValueList< Person > Alarm::mailAddresses  )  const
 

Return the addresses to send mail to when an alarm goes off.

void Alarm::setMailSubject const QString &  mailAlarmSubject  ) 
 

Set the subject line of the mail.

Ignored if the alarm is not an email alarm.

QString Alarm::mailSubject  )  const
 

Return the subject line of the mail.

void Alarm::setMailAttachment const QString &  mailAttachFile  ) 
 

Attach this filename to the email.

Ignored if the alarm is not an email alarm.

void Alarm::setMailAttachments const QStringList &  mailAttachFiles  ) 
 

Attach these filenames to the email.

Ignored if the alarm is not an email alarm.

void Alarm::addMailAttachment const QString &  mailAttachFile  ) 
 

Add this filename to the list of files to attach to the email.

Ignored if the alarm is not an email alarm.

QStringList Alarm::mailAttachments  )  const
 

Return the filenames to attach to the email.

void Alarm::setMailText const QString &  text  ) 
 

Set the email body text.

Ignored if the alarm is not an email alarm.

QString Alarm::mailText  )  const
 

Return the email body text.

Returns:
the body text, or QString::null if not an email alarm.

void Alarm::setTime const QDateTime &  alarmTime  ) 
 

Set the time to trigger an alarm.

QDateTime Alarm::time  )  const
 

Return the date/time when an alarm goes off.

QDateTime Alarm::endTime  )  const
 

Return the date/time when the last repetition of the alarm goes off.

If the alarm does not repeat, this is equivalent to calling time().

bool Alarm::hasTime  )  const
 

Return true, if the alarm has an explicit date/time.

void Alarm::setStartOffset const Duration  ) 
 

Set offset of alarm in time relative to the start of the event.

Duration Alarm::startOffset  )  const
 

Return offset of alarm in time relative to the start of the event.

If the alarm's time is not defined in terms of an offset relative to the start of the event, returns zero.

bool Alarm::hasStartOffset  )  const
 

Return whether the alarm is defined in terms of an offset relative to the start of the event.

void Alarm::setEndOffset const Duration  ) 
 

Set offset of alarm in time relative to the end of the event.

Duration Alarm::endOffset  )  const
 

Return offset of alarm in time relative to the end of the event.

If the alarm's time is not defined in terms of an offset relative to the end of the event, returns zero.

bool Alarm::hasEndOffset  )  const
 

Return whether the alarm is defined in terms of an offset relative to the end of the event.

void Alarm::setSnoozeTime int  alarmSnoozeTime  ) 
 

Set the interval between snoozes for the alarm.

Parameters:
alarmSnoozeTime the time in minutes between snoozes.

int Alarm::snoozeTime  )  const
 

Get how long the alarm snooze interval is.

Returns:
the number of minutes between snoozes.

void Alarm::setRepeatCount int  alarmRepeatCount  ) 
 

Set how many times an alarm is to repeat itself after its initial occurrence (w/snoozes).

int Alarm::repeatCount  )  const
 

Get how many times an alarm repeats, after its initial occurrence.

QDateTime Alarm::nextRepetition const QDateTime &  preTime  )  const
 

Get the time of the alarm's initial occurrence or its next repetition, after a given time.

Parameters:
preTime the date and time after which to find the next repetition.
Returns:
the date and time of the next repetition, or an invalid date/time if the specified time is at or after the alarm's last repetition.

QDateTime Alarm::previousRepetition const QDateTime &  afterTime  )  const
 

Get the time of the alarm's latest repetition, or its initial occurrence if none, before a given time.

Parameters:
afterTime the date and time before which to find the latest repetition.
Returns:
the date and time of the latest repetition, or an invalid date/time if the specified time is at or before the alarm's initial occurrence.

int Alarm::duration  )  const
 

Get how long between the alarm's initial occurrence and its final repetition.

Returns:
the number of seconds between the initial occurrence and final repetition.

void Alarm::toggleAlarm  ) 
 

Toggles the value of alarm to be either on or off.

Set's the alarm time to be x minutes before dtStart time.

void Alarm::setEnabled bool  enable  ) 
 

Set the alarm enabled status.

bool Alarm::enabled  )  const
 

Get the alarm enabled status.

void Alarm::setParent Incidence  ) 
 

Set the alarm's parent incidence.

Incidence* KCal::Alarm::parent  )  const [inline]
 

Get the alarm's parent incidence.


The documentation for this class was generated from the following files: