#include <alarm.h>
|
enum | Type {
Invalid
, Display
, Procedure
, Email
,
Audio
} |
|
typedef ListBase< Alarm > | List |
|
|
| Alarm (Incidence *parent) |
|
virtual | ~Alarm () |
|
Alarm * | clone () |
|
Alarm & | operator= (const Alarm &) |
|
bool | operator== (const Alarm &) const |
|
bool | operator!= (const Alarm &a) const |
|
void | setType (Type type) |
|
Type | type () const |
|
void | setDisplayAlarm (const TQString &text=TQString()) |
|
void | setText (const TQString &text) |
|
TQString | text () const |
|
void | setAudioAlarm (const TQString &audioFile=TQString()) |
|
void | setAudioFile (const TQString &audioFile) |
|
TQString | audioFile () const |
|
void | setProcedureAlarm (const TQString &programFile, const TQString &arguments=TQString()) |
|
void | setProgramFile (const TQString &programFile) |
|
TQString | programFile () const |
|
void | setProgramArguments (const TQString &arguments) |
|
TQString | programArguments () const |
|
void | setEmailAlarm (const TQString &subject, const TQString &text, const TQValueList< Person > &addressees, const TQStringList &attachments=TQStringList()) |
|
void | setMailAddress (const Person &mailAlarmAddress) |
|
void | setMailAddresses (const TQValueList< Person > &mailAlarmAddresses) |
|
void | addMailAddress (const Person &mailAlarmAddress) |
|
TQValueList< Person > | mailAddresses () const |
|
void | setMailSubject (const TQString &mailAlarmSubject) |
|
TQString | mailSubject () const |
|
void | setMailAttachment (const TQString &mailAttachFile) |
|
void | setMailAttachments (const TQStringList &mailAttachFiles) |
|
void | addMailAttachment (const TQString &mailAttachFile) |
|
TQStringList | mailAttachments () const |
|
void | setMailText (const TQString &text) |
|
TQString | mailText () const |
|
void | setTime (const TQDateTime &alarmTime) |
|
TQDateTime | time () const |
|
TQDateTime | endTime () const |
|
bool | hasTime () const |
|
void | setStartOffset (const Duration &) |
|
Duration | startOffset () const |
|
bool | hasStartOffset () const |
|
void | setEndOffset (const Duration &) |
|
Duration | endOffset () const |
|
bool | hasEndOffset () const |
|
void | setSnoozeTime (const Duration &alarmSnoozeTime) |
|
Duration | snoozeTime () const |
|
void | setRepeatCount (int alarmRepeatCount) |
|
int | repeatCount () const |
|
TQDateTime | nextRepetition (const TQDateTime &preTime) const |
|
TQDateTime | previousRepetition (const TQDateTime &afterTime) const |
|
Duration | duration () const |
|
void | toggleAlarm () |
|
void | setEnabled (bool enable) |
|
bool | enabled () const |
|
void | setParent (Incidence *) |
|
Incidence * | parent () const |
|
| CustomProperties () |
|
| CustomProperties (const CustomProperties &) |
|
bool | operator== (const CustomProperties &) const |
|
void | setCustomProperty (const TQCString &app, const TQCString &key, const TQString &value) |
|
void | removeCustomProperty (const TQCString &app, const TQCString &key) |
|
TQString | customProperty (const TQCString &app, const TQCString &key) const |
|
void | setNonKDECustomProperty (const TQCString &name, const TQString &value) |
|
void | removeNonKDECustomProperty (const TQCString &name) |
|
TQString | nonKDECustomProperty (const TQCString &name) const |
|
void | setCustomProperties (const TQMap< TQCString, TQString > &properties) |
|
TQMap< TQCString, TQString > | customProperties () const |
|
This class represents an alarm notification.
Definition at line 45 of file alarm.h.
◆ Alarm()
Construct a new alarm with variables initialized to "sane" values.
Definition at line 32 of file alarm.cpp.
◆ ~Alarm()
◆ addMailAddress()
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.
Definition at line 231 of file alarm.cpp.
◆ addMailAttachment()
void Alarm::addMailAttachment |
( |
const TQString & |
mailAttachFile | ) |
|
Add this filename to the list of files to attach to the email.
Ignored if the alarm is not an email alarm.
Definition at line 274 of file alarm.cpp.
◆ audioFile()
TQString Alarm::audioFile |
( |
| ) |
const |
Return the name of the audio file for the alarm.
- Returns
- The audio file for the alarm, or TQString() if not an audio alarm.
Definition at line 164 of file alarm.cpp.
◆ clone()
Returns an exact copy of this alarm.
The returned object is owned by the caller. - Since
- 4.5
Definition at line 50 of file alarm.cpp.
◆ customPropertyUpdated()
void Alarm::customPropertyUpdated |
( |
| ) |
|
|
protectedvirtual |
◆ duration()
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.
Definition at line 378 of file alarm.cpp.
◆ enabled()
bool Alarm::enabled |
( |
| ) |
const |
Get the alarm enabled status.
Definition at line 438 of file alarm.cpp.
◆ endOffset()
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.
Definition at line 474 of file alarm.cpp.
◆ endTime()
TQDateTime 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().
Definition at line 418 of file alarm.cpp.
◆ hasEndOffset()
bool Alarm::hasEndOffset |
( |
| ) |
const |
Return whether the alarm is defined in terms of an offset relative to the end of the event.
Definition at line 461 of file alarm.cpp.
◆ hasStartOffset()
bool Alarm::hasStartOffset |
( |
| ) |
const |
Return whether the alarm is defined in terms of an offset relative to the start of the event.
Definition at line 456 of file alarm.cpp.
◆ hasTime()
bool Alarm::hasTime |
( |
| ) |
const |
Return true, if the alarm has an explicit date/time.
Definition at line 349 of file alarm.cpp.
◆ mailAddresses()
TQValueList< Person > Alarm::mailAddresses |
( |
| ) |
const |
Return the addresses to send mail to when an alarm goes off.
Definition at line 239 of file alarm.cpp.
◆ mailAttachments()
TQStringList Alarm::mailAttachments |
( |
| ) |
const |
Return the filenames to attach to the email.
Definition at line 282 of file alarm.cpp.
◆ mailSubject()
TQString Alarm::mailSubject |
( |
| ) |
const |
Return the subject line of the mail.
Definition at line 252 of file alarm.cpp.
◆ mailText()
TQString Alarm::mailText |
( |
| ) |
const |
Return the email body text.
- Returns
- the body text, or TQString() if not an email alarm.
Definition at line 295 of file alarm.cpp.
◆ nextRepetition()
TQDateTime Alarm::nextRepetition |
( |
const TQDateTime & |
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.
Definition at line 384 of file alarm.cpp.
◆ operator=()
Copy operator.
- Since
- 4.5
Definition at line 55 of file alarm.cpp.
◆ operator==()
bool Alarm::operator== |
( |
const Alarm & |
rhs | ) |
const |
Compare this alarm with another one.
Definition at line 74 of file alarm.cpp.
◆ parent()
Get the alarm's parent incidence.
Definition at line 351 of file alarm.h.
◆ previousRepetition()
TQDateTime Alarm::previousRepetition |
( |
const TQDateTime & |
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.
Definition at line 401 of file alarm.cpp.
◆ programArguments()
TQString Alarm::programArguments |
( |
| ) |
const |
Return the arguments to the program to run when the alarm is triggered.
- Returns
- the program arguments, or TQString() if not a procedure alarm.
Definition at line 198 of file alarm.cpp.
◆ programFile()
TQString Alarm::programFile |
( |
| ) |
const |
Return the name of the program file to execute when the alarm is triggered.
- Returns
- the program file name, or TQString() if not a procedure alarm.
Definition at line 185 of file alarm.cpp.
◆ repeatCount()
int Alarm::repeatCount |
( |
| ) |
const |
Get how many times an alarm repeats, after its initial occurrence.
Definition at line 373 of file alarm.cpp.
◆ setAudioAlarm()
void Alarm::setAudioAlarm |
( |
const TQString & |
audioFile = TQString() | ) |
|
Set the alarm to be an audio alarm.
- Parameters
-
audioFile | optional file to play when the alarm is triggered. |
Definition at line 149 of file alarm.cpp.
◆ setAudioFile()
void Alarm::setAudioFile |
( |
const TQString & |
audioFile | ) |
|
Set the file to play when the audio alarm is triggered.
Ignored if the alarm is not an audio alarm.
Definition at line 156 of file alarm.cpp.
◆ setDisplayAlarm()
void Alarm::setDisplayAlarm |
( |
const TQString & |
text = TQString() | ) |
|
Set the alarm to be a display alarm.
- Parameters
-
text | text to display when the alarm is triggered. |
Definition at line 300 of file alarm.cpp.
◆ setEmailAlarm()
void Alarm::setEmailAlarm |
( |
const TQString & |
subject, |
|
|
const TQString & |
text, |
|
|
const TQValueList< Person > & |
addressees, |
|
|
const TQStringList & |
attachments = TQStringList() |
|
) |
| |
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. |
Definition at line 203 of file alarm.cpp.
◆ setEnabled()
void Alarm::setEnabled |
( |
bool |
enable | ) |
|
Set the alarm enabled status.
Definition at line 432 of file alarm.cpp.
◆ setEndOffset()
void Alarm::setEndOffset |
( |
const Duration & |
offset | ) |
|
Set offset of alarm in time relative to the end of the event.
Definition at line 466 of file alarm.cpp.
◆ setMailAddress()
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.
Definition at line 214 of file alarm.cpp.
◆ setMailAddresses()
void Alarm::setMailAddresses |
( |
const TQValueList< Person > & |
mailAlarmAddresses | ) |
|
Send mail to these addresses when the alarm is triggered.
Ignored if the alarm is not an email alarm.
Definition at line 223 of file alarm.cpp.
◆ setMailAttachment()
void Alarm::setMailAttachment |
( |
const TQString & |
mailAttachFile | ) |
|
Attach this filename to the email.
Ignored if the alarm is not an email alarm.
Definition at line 257 of file alarm.cpp.
◆ setMailAttachments()
void Alarm::setMailAttachments |
( |
const TQStringList & |
mailAttachFiles | ) |
|
Attach these filenames to the email.
Ignored if the alarm is not an email alarm.
Definition at line 266 of file alarm.cpp.
◆ setMailSubject()
void Alarm::setMailSubject |
( |
const TQString & |
mailAlarmSubject | ) |
|
Set the subject line of the mail.
Ignored if the alarm is not an email alarm.
Definition at line 244 of file alarm.cpp.
◆ setMailText()
void Alarm::setMailText |
( |
const TQString & |
text | ) |
|
Set the email body text.
Ignored if the alarm is not an email alarm.
Definition at line 287 of file alarm.cpp.
◆ setParent()
Set the alarm's parent incidence.
Definition at line 479 of file alarm.cpp.
◆ setProcedureAlarm()
void Alarm::setProcedureAlarm |
( |
const TQString & |
programFile, |
|
|
const TQString & |
arguments = TQString() |
|
) |
| |
Set the alarm to be a procedure alarm.
- Parameters
-
programFile | program to execute when the alarm is triggered. |
arguments | arguments to supply to programFile. |
Definition at line 169 of file alarm.cpp.
◆ setProgramArguments()
void Alarm::setProgramArguments |
( |
const TQString & |
arguments | ) |
|
Set the arguments to the program to execute when the alarm is triggered.
Ignored if the alarm is not a procedure alarm.
Definition at line 190 of file alarm.cpp.
◆ setProgramFile()
void Alarm::setProgramFile |
( |
const TQString & |
programFile | ) |
|
Set the program file to execute when the alarm is triggered.
Ignored if the alarm is not a procedure alarm.
Definition at line 177 of file alarm.cpp.
◆ setRepeatCount()
void Alarm::setRepeatCount |
( |
int |
alarmRepeatCount | ) |
|
Set how many times an alarm is to repeat itself after its initial occurrence (w/snoozes).
Definition at line 367 of file alarm.cpp.
◆ setSnoozeTime()
void Alarm::setSnoozeTime |
( |
const Duration & |
alarmSnoozeTime | ) |
|
Set the interval between snoozes for the alarm.
- Parameters
-
alarmSnoozeTime | the time in minutes between snoozes. |
Definition at line 354 of file alarm.cpp.
◆ setStartOffset()
void Alarm::setStartOffset |
( |
const Duration & |
offset | ) |
|
Set offset of alarm in time relative to the start of the event.
Definition at line 443 of file alarm.cpp.
◆ setText()
void Alarm::setText |
( |
const TQString & |
text | ) |
|
Set the text to be displayed when the alarm is triggered.
Ignored if the alarm is not a display alarm.
Definition at line 308 of file alarm.cpp.
◆ setTime()
void Alarm::setTime |
( |
const TQDateTime & |
alarmTime | ) |
|
Set the time to trigger an alarm.
Definition at line 321 of file alarm.cpp.
◆ setType()
void Alarm::setType |
( |
Alarm::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
-
Definition at line 115 of file alarm.cpp.
◆ snoozeTime()
Get how long the alarm snooze interval is.
- Returns
- the number of minutes between snoozes.
Definition at line 362 of file alarm.cpp.
◆ startOffset()
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.
Definition at line 451 of file alarm.cpp.
◆ text()
TQString Alarm::text |
( |
| ) |
const |
Return the text string that displays when the alarm is triggered.
Definition at line 316 of file alarm.cpp.
◆ time()
TQDateTime Alarm::time |
( |
| ) |
const |
Return the date/time when an alarm goes off.
Definition at line 329 of file alarm.cpp.
◆ toggleAlarm()
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.
Definition at line 426 of file alarm.cpp.
◆ type()
Alarm::Type Alarm::type |
( |
| ) |
const |
Return the type of the alarm.
Definition at line 144 of file alarm.cpp.
The documentation for this class was generated from the following files:
|