kalarm

KAlarmIface Class Referenceabstract

#include <kalarmiface.h>

Inherits DCOPObject.

Inherited by DcopHandler [virtual].

Public Types

enum  Flags {
  REPEAT_AT_LOGIN = 0x01 , BEEP = 0x02 , REPEAT_SOUND = 0x08 , CONFIRM_ACK = 0x04 ,
  AUTO_CLOSE = 0x10 , EMAIL_BCC = 0x20 , DISABLED = 0x40 , SCRIPT = 0x80 ,
  EXEC_IN_XTERM = 0x100 , SPEAK = 0x200 , SHOW_IN_KORG = 0x400
}
 
enum  RecurType {
  MINUTELY = 1 , DAILY = 2 , WEEKLY = 3 , MONTHLY = 4 ,
  YEARLY = 5
}
 

Detailed Description

KAlarmIface provides a DCOP interface for other applications to request KAlarm actions.

Definition at line 36 of file kalarmiface.h.

Member Enumeration Documentation

◆ Flags

Bit values for the flags parameter of "scheduleXxxx()" DCOP calls.

The bit values may be OR'ed together.

  • REPEAT_AT_LOGIN - repeat the alarm at every login.
  • BEEP - sound an audible beep when the alarm is displayed.
  • SPEAK - speak the alarm message when it is displayed.
  • REPEAT_SOUND - repeat the sound file while the alarm is displayed.
  • CONFIRM_ACK - closing the alarm message window requires a confirmation prompt.
  • AUTO_CLOSE - auto-close the alarm window after the late-cancel period.
  • SCRIPT - the command to execute is a script, not a shell command line.
  • EXEC_IN_XTERM - execute the command alarm in a terminal window.
  • EMAIL_BCC - send a blind copy the email to the user.
  • SHOW_IN_KORG - show the alarm as an event in KOrganizer
  • DISABLED - set the alarm status to disabled.

Definition at line 54 of file kalarmiface.h.

◆ RecurType

Values for the repeatType parameter of "scheduleXxxx()" DCOP calls.

  • MINUTELY - the repeat interval is measured in minutes.
  • DAILY - the repeat interval is measured in days.
  • WEEKLY - the repeat interval is measured in weeks.
  • MONTHLY - the repeat interval is measured in months.
  • YEARLY - the repeat interval is measured in years.

Definition at line 75 of file kalarmiface.h.

Member Function Documentation

◆ cancelEvent

virtual bool KAlarmIface::cancelEvent ( const TQString &  url,
const TQString &  eventId 
)
pure virtual

Cancel (delete) an already scheduled alarm.

Parameters
url- The URL (not path) of the calendar file containing the event to be cancelled. Used only for integrity checking: the call will fail if it is not KAlarm's current calendar file.
eventId- The unique ID of the event to be cancelled, as stored in the calendar file url.

◆ edit

virtual bool KAlarmIface::edit ( const TQString &  eventID)
pure virtual

Open the alarm edit dialog to edit an existing alarm.

Parameters
eventIdThe unique ID of the event to be edited, or TQString() to create a new alarm.
Returns
false if the alarm could not be found or is read-only, true otherwise.

◆ editNew

virtual bool KAlarmIface::editNew ( const TQString &  templateName)
pure virtual

Open the alarm edit dialog to edit a new alarm.

Parameters
templateNameName of the alarm template to base the new alarm on, or TQString() if none. If a template is specified but cannot be found, the alarm edit dialog is still opened but is (obviously) not preset with the template.
Returns
false if an alarm template was specified but could not be found, true otherwise.

◆ scheduleCommand [1/3]

virtual bool KAlarmIface::scheduleCommand ( const TQString &  commandLine,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
const TQString &  recurrence,
int  repeatInterval,
int  repeatCount 
)
pure virtual

Schedule a command execution alarm.

Parameters
commandLineThe command line or command script to execute.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
recurrenceRecurrence specification using iCalendar syntax (defined in RFC2445).
repeatIntervalSimple repetition repeat interval in minutes, or 0 for no sub-repetition.
repeatCountSimple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleCommand [2/3]

virtual bool KAlarmIface::scheduleCommand ( const TQString &  commandLine,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
int  repeatType,
int  repeatInterval,
const TQString &  endDateTime 
)
pure virtual

Schedule a command execution alarm.

Parameters
commandLineThe command line or command script to execute.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
repeatTypeThe time units to use for recurrence. The actual recurrence interval is equal to repeatType multiplied by repeatInterval. The value of repeatType must a value defined in the RecurType enum.
repeatIntervalRecurrence interval in units defined by repeatType, or 0 for no recurrence.
endDateTimeDate/time after which the recurrence will end.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleCommand [3/3]

virtual bool KAlarmIface::scheduleCommand ( const TQString &  commandLine,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
int  repeatType,
int  repeatInterval,
int  repeatCount 
)
pure virtual

Schedule a command execution alarm.

Parameters
commandLineThe command line or command script to execute.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
repeatTypeThe time units to use for recurrence. The actual recurrence interval is equal to repeatType multiplied by repeatInterval. The value of repeatType must a value defined in the RecurType enum.
repeatIntervalRecurrence interval in units defined by repeatType, or 0 for no recurrence.
repeatCountRecurrence count (after the first occurrence), or 0 for no recurrence.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleEmail [1/3]

virtual bool KAlarmIface::scheduleEmail ( const TQString &  fromID,
const TQString &  addresses,
const TQString &  subject,
const TQString &  message,
const TQString &  attachments,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
const TQString &  recurrence,
int  repeatInterval,
int  repeatCount 
)
pure virtual

Schedule an email alarm.

Parameters
fromIDThe KMail identity to use as the sender of the email, or TQString() to use KAlarm's default sender ID.
addressesComma-separated list of addresses to send the email to.
subjectSubject line of the email.
messageEmail message's body text.
attachmentsComma- or semicolon-separated list of paths or URLs of files to send as attachments to the email.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
recurrenceRecurrence specification using iCalendar syntax (defined in RFC2445).
repeatIntervalSimple repetition repeat interval in minutes, or 0 for no sub-repetition.
repeatCountSimple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleEmail [2/3]

virtual bool KAlarmIface::scheduleEmail ( const TQString &  fromID,
const TQString &  addresses,
const TQString &  subject,
const TQString &  message,
const TQString &  attachments,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
int  repeatType,
int  repeatInterval,
const TQString &  endDateTime 
)
pure virtual

Schedule an email alarm.

Parameters
fromIDThe KMail identity to use as the sender of the email, or TQString() to use KAlarm's default sender ID.
addressesComma-separated list of addresses to send the email to.
subjectSubject line of the email.
messageEmail message's body text.
attachmentsComma- or semicolon-separated list of paths or URLs of files to send as attachments to the email.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in the Flags enum.
repeatTypeThe time units to use for recurrence. The actual recurrence interval is equal to repeatType multiplied by repeatInterval. The value of repeatType must a value defined in the RecurType enum.
repeatIntervalRecurrence interval in units defined by repeatType, or 0 for no recurrence.
endDateTimeDate/time after which the recurrence will end.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleEmail [3/3]

virtual bool KAlarmIface::scheduleEmail ( const TQString &  fromID,
const TQString &  addresses,
const TQString &  subject,
const TQString &  message,
const TQString &  attachments,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
int  repeatType,
int  repeatInterval,
int  repeatCount 
)
pure virtual

Schedule an email alarm.

Parameters
fromIDThe KMail identity to use as the sender of the email, or TQString() to use KAlarm's default sender ID.
addressesComma-separated list of addresses to send the email to.
subjectSubject line of the email.
messageEmail message's body text.
attachmentsComma- or semicolon-separated list of paths or URLs of files to send as attachments to the email.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in the Flags enum.
repeatTypeThe time units to use for recurrence. The actual recurrence interval is equal to repeatType multiplied by repeatInterval. The value of repeatType must a value defined in the RecurType enum.
repeatIntervalRecurrence interval in units defined by repeatType, or 0 for no recurrence.
repeatCountRecurrence count (after the first occurrence), or 0 for no recurrence.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleFile [1/3]

virtual bool KAlarmIface::scheduleFile ( const KURL &  file,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
const TQString &  bgColor,
const KURL &  audioFile,
int  reminderMins,
const TQString &  recurrence,
int  repeatInterval,
int  repeatCount 
)
pure virtual

Schedule a file display alarm.

Parameters
fileThe text or image file to display.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
bgColorThe background colour for the alarm message window, or TQString() for the current default background colour. The string may be in any of the formats accepted by TQColor::TQColor(const TQString&).
audioFileThe audio file to play when the alarm is displayed, or TQString() for none.
reminderMinsThe number of minutes in advance of the main alarm and its recurrences to display a reminder alarm, or 0 for no reminder.
recurrenceRecurrence specification using iCalendar syntax (defined in RFC2445).
repeatIntervalSimple repetition repeat interval in minutes, or 0 for no sub-repetition.
repeatCountSimple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleFile [2/3]

virtual bool KAlarmIface::scheduleFile ( const KURL &  file,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
const TQString &  bgColor,
const KURL &  audioFile,
int  reminderMins,
int  repeatType,
int  repeatInterval,
const TQString &  endDateTime 
)
pure virtual

Schedule a file display alarm.

Parameters
fileThe text or image file to display.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
bgColorThe background colour for the alarm message window, or TQString() for the current default background colour. The string may be in any of the formats accepted by TQColor::TQColor(const TQString&).
audioFileThe audio file to play when the alarm is displayed, or TQString() for none.
reminderMinsThe number of minutes in advance of the main alarm and its recurrences to display a reminder alarm, or 0 for no reminder.
repeatTypeThe time units to use for recurrence. The actual recurrence interval is equal to repeatType multiplied by repeatInterval. The value of repeatType must a value defined in the RecurType enum.
repeatIntervalRecurrence interval in units defined by repeatType, or 0 for no recurrence.
endDateTimeDate/time after which the recurrence will end.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleFile [3/3]

virtual bool KAlarmIface::scheduleFile ( const KURL &  file,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
const TQString &  bgColor,
const KURL &  audioFile,
int  reminderMins,
int  repeatType,
int  repeatInterval,
int  repeatCount 
)
pure virtual

Schedule a file display alarm.

Parameters
fileThe text or image file to display.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
bgColorThe background colour for the alarm message window, or TQString() for the current default background colour. The string may be in any of the formats accepted by TQColor::TQColor(const TQString&).
audioFileThe audio file to play when the alarm is displayed, or TQString() for none.
reminderMinsThe number of minutes in advance of the main alarm and its recurrences to display a reminder alarm, or 0 for no reminder.
repeatTypeThe time units to use for recurrence. The actual recurrence interval is equal to repeatType multiplied by repeatInterval. The value of repeatType must a value defined in the RecurType enum.
repeatIntervalRecurrence interval in units defined by repeatType, or 0 for no recurrence.
repeatCountRecurrence count (after the first occurrence), or 0 for no recurrence.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleMessage [1/3]

virtual bool KAlarmIface::scheduleMessage ( const TQString &  message,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
const TQString &  bgColor,
const TQString &  fgColor,
const TQString &  font,
const KURL &  audioFile,
int  reminderMins,
const TQString &  recurrence,
int  repeatInterval,
int  repeatCount 
)
pure virtual

Schedule a message display alarm.

Parameters
messageThe text of the message to display.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
bgColorThe background colour for the alarm message window, or TQString() for the current default background colour. The string may be in any of the formats accepted by TQColor::TQColor(const TQString&).
fgColorThe foreground colour for the alarm message, or TQString() for the current default foreground colour. The format of the string is the same as for bgColor.
fontThe font for the alarm message, or TQString() for the default message font current at the time the message is displayed. The string should be in format returned by TQFont::toString().
audioFileThe audio file to play when the alarm is displayed, or TQString() for none.
reminderMinsThe number of minutes in advance of the main alarm and its recurrences to display a reminder alarm, or 0 for no reminder.
recurrenceRecurrence specification using iCalendar syntax (defined in RFC2445).
repeatIntervalSimple repetition repeat interval in minutes, or 0 for no sub-repetition.
repeatCountSimple repetition repeat count (after the first occurrence), or 0 for no sub-repetition.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleMessage [2/3]

virtual bool KAlarmIface::scheduleMessage ( const TQString &  message,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
const TQString &  bgColor,
const TQString &  fgColor,
const TQString &  font,
const KURL &  audioFile,
int  reminderMins,
int  repeatType,
int  repeatInterval,
const TQString &  endDateTime 
)
pure virtual

Schedule a message display alarm.

Parameters
messageThe text of the message to display.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
bgColorThe background colour for the alarm message window, or TQString() for the current default background colour. The string may be in any of the formats accepted by TQColor::TQColor(const TQString&).
fgColorThe foreground colour for the alarm message, or TQString() for the current default foreground colour. The format of the string is the same as for bgColor.
fontThe font for the alarm message, or TQString() for the default message font current at the time the message is displayed. The string should be in format returned by TQFont::toString().
audioFileThe audio file to play when the alarm is displayed, or TQString() for none.
reminderMinsThe number of minutes in advance of the main alarm and its recurrences to display a reminder alarm, or 0 for no reminder.
repeatTypeThe time units to use for recurrence. The actual recurrence interval is equal to repeatType multiplied by repeatInterval. The value of repeatType must a value defined in the RecurType enum.
repeatIntervalRecurrence interval in units defined by repeatType, or 0 for no recurrence.
endDateTimeDate/time after which the recurrence will end.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ scheduleMessage [3/3]

virtual bool KAlarmIface::scheduleMessage ( const TQString &  message,
const TQString &  startDateTime,
int  lateCancel,
unsigned  flags,
const TQString &  bgColor,
const TQString &  fgColor,
const TQString &  font,
const KURL &  audioFile,
int  reminderMins,
int  repeatType,
int  repeatInterval,
int  repeatCount 
)
pure virtual

Schedule a message display alarm.

Parameters
messageThe text of the message to display.
startDateTimeStart date/time, in the format YYYY-MM-DD[THH:MM[:SS]] or [T]HH:MM[:SS]
lateCancelLate-cancellation period in minutes, or 0 for no cancellation.
flagsOR of flag bits defined in Flags enum.
bgColorThe background colour for the alarm message window, or TQString() for the current default background colour. The string may be in any of the formats accepted by TQColor::TQColor(const TQString&).
fgColorThe foreground colour for the alarm message, or TQString() for the current default foreground colour. The format of the string is the same as for bgColor.
fontThe font for the alarm message, or TQString() for the default message font current at the time the message is displayed. The string should be in format returned by TQFont::toString().
audioFileThe audio file to play when the alarm is displayed, or TQString() for none.
reminderMinsThe number of minutes in advance of the main alarm and its recurrences to display a reminder alarm, or 0 for no reminder.
repeatTypeThe time units to use for recurrence. The actual recurrence interval is equal to repeatType multiplied by repeatInterval. The value of repeatType must a value defined in the RecurType enum.
repeatIntervalRecurrence interval in units defined by repeatType, or 0 for no recurrence.
repeatCountRecurrence count (after the first occurrence), or 0 for no recurrence.
Returns
true if alarm was scheduled successfully, false if configuration errors were found.

◆ triggerEvent

virtual bool KAlarmIface::triggerEvent ( const TQString &  url,
const TQString &  eventId 
)
pure virtual

Trigger the immediate display or execution of an alarm, regardless of what time it is scheduled for.

Parameters
url- The URL (not path) of the calendar file containing the event to be triggered. Used only for integrity checking: the call will fail if it is not KAlarm's current calendar file.
eventId- The unique ID of the event to be triggered, as stored in the calendar file url.

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