KAlarm Library
kaevent.h
410 bool updateKCalEvent(const KCalCore::Event::Ptr& event, UidAction u, bool setCustomProperties = true) const;
802 void setActions(const QString& pre, const QString& post, bool cancelOnError, bool dontShowError);
1099 bool setRecurMonthlyByPos(int freq, const QVector<MonthPos>& pos, int count, const QDate& end);
1114 bool setRecurAnnualByDate(int freq, const QVector<int>& months, int day, KARecurrence::Feb29Type, int count, const QDate& end);
1127 bool setRecurAnnualByPos(int freq, const QVector<MonthPos>& pos, const QVector<int>& months, int count, const QDate& end);
1214 OccurType nextOccurrence(const KDateTime& preDateTime, DateTime& result, OccurOption option = IGNORE_REPETITION) const;
1225 OccurType previousOccurrence(const KDateTime& afterDateTime, DateTime& result, bool includeRepetitions = false) const;
1242 bool setDisplaying(const KAEvent& event, KAAlarm::Type type, Akonadi::Collection::Id colId, const KDateTime& repeatAtLoginTime, bool showEdit, bool showDefer);
1244 bool setDisplaying(const KAEvent& event, KAAlarm::Type type, const QString& resourceID, const KDateTime& repeatAtLoginTime, bool showEdit, bool showDefer);
1257 void reinstateFromDisplaying(const KCalCore::Event::Ptr& event, Akonadi::Collection::Id& colId, bool& showEdit, bool& showDefer);
1259 void reinstateFromDisplaying(const KCal::Event* event, QString& resourceID, bool& showEdit, bool& showDefer);
qint64 Id
As KDateTime, but with a configurable start-of-day time for date-only values.
Definition datetime.h:43
@ FILE
KCal::Alarm::Display type: display a file (URL given by the alarm text)
Definition kaevent.h:84
void reinstateFromDisplaying(const KCalCore::Event::Ptr &event, Akonadi::Collection::Id &colId, bool &showEdit, bool &showDefer)
Reinstate the original event from the 'displaying' event.
Definition kaevent.cpp:3726
int reminderMinutes() const
Return the number of minutes BEFORE the main alarm when a reminder alarm is set.
Definition kaevent.cpp:2496
void setDeferDefaultMinutes(int minutes, bool dateOnly=false)
Set defaults for the deferral dialog.
Definition kaevent.cpp:2671
@ FIRST_OR_ONLY_OCCURRENCE
the first occurrence (takes precedence over LAST_RECURRENCE)
Definition kaevent.h:269
int repeatSoundPause() const
Return how many seconds to pause between repetitions of the sound file.
Definition kaevent.cpp:2337
bool deferDefaultDateOnly() const
Return the default date-only setting used in the deferral dialog.
Definition kaevent.cpp:2750
bool setRecurDaily(int freq, const QBitArray &days, int count, const QDate &end)
Set the recurrence to recur daily.
Definition kaevent.cpp:3025
static void setStartOfDay(const QTime &)
Set the start-of-day time used by all date-only alarms.
Definition kaevent.cpp:2784
void setReminder(int minutes, bool onceOnly)
Set an additional reminder alarm.
Definition kaevent.cpp:2431
bool emailBcc() const
Return whether to send a blind copy of the email to the sender, for an email alarm.
Definition kaevent.cpp:2285
DateTime mainDateTime(bool withRepeats=false) const
Return the next time the main alarm will trigger.
Definition kaevent.cpp:2766
void setCreatedDateTime(const KDateTime &dt)
Set the date/time the event was created, or saved in the archive calendar.
Definition kaevent.cpp:2827
QString logFile() const
Return the log file which command alarm output should be written to.
Definition kaevent.cpp:2193
bool holidaysExcluded() const
Return whether the alarm is disabled on holiday dates.
Definition kaevent.cpp:2883
OccurType previousOccurrence(const KDateTime &afterDateTime, DateTime &result, bool includeRepetitions=false) const
Get the date/time of the last previous occurrence of the event, before the specified date/time.
Definition kaevent.cpp:3603
QString emailSubject() const
Return the email subject line, for an email alarm.
Definition kaevent.cpp:2270
bool repeatSound() const
Return whether the sound file will be repeated indefinitely.
Definition kaevent.cpp:2332
bool mainExpired() const
Return whether the event's main alarm has expired.
Definition kaevent.cpp:1828
void setActions(const QString &pre, const QString &post, ExtraActionOptions options)
Set the pre-alarm and post-alarm actions, and their options.
Definition kaevent.cpp:2385
QString recurrenceText(bool brief=false) const
Return the recurrence interval as text suitable for display.
Definition kaevent.cpp:3291
bool setRecurMonthlyByDate(int freq, const QVector< int > &days, int count, const QDate &end)
Set the recurrence to recur monthly, on the specified days within the month.
Definition kaevent.cpp:3074
int recurInterval() const
Return the recurrence interval in units of the recurrence period type (minutes, days,...
Definition kaevent.cpp:3214
void setRecurrence(const KARecurrence &r)
Initialise the event's recurrence from a KARecurrence.
Definition kaevent.cpp:2973
void setCollectionId_const(Akonadi::Collection::Id id) const
Set the ID of the Akonadi Collection which contains the event.
Definition kaevent.cpp:1916
bool commandXterm() const
Return whether to execute the command in a terminal window, for a command alarm.
Definition kaevent.cpp:2095
bool deferred() const
Return whether there is currently a deferred alarm pending.
Definition kaevent.cpp:2677
static QString joinEmailAddresses(const KCalCore::Person::List &addresses, const QString &sep)
Concatenate a list of email addresses into a string.
Definition kaevent.cpp:2252
bool commandDisplay() const
Return whether the command output is to be displayed in an alarm message window.
Definition kaevent.cpp:2100
QStringList emailAddresses() const
Return a list of the email addresses, including names, for an email alarm.
Definition kaevent.cpp:2241
KACalendar::Compat compatibility() const
Return the event's storage format compatibility compared to the current KAlarm calendar format.
Definition kaevent.cpp:1965
Akonadi::Collection::Id collectionId() const
Return the ID of the Akonadi Collection which contains the event.
Definition kaevent.cpp:1921
QMap< QByteArray, QString > customProperties() const
Return the original KCalCore::Event's custom properties in the source calendar.
Definition kaevent.cpp:1970
bool repeatAtLogin(bool includeArchived=false) const
Return whether the alarm repeats at login.
Definition kaevent.cpp:2871
void setCommandError(CmdErrType error) const
Set or clear the command execution error for the last time the alarm triggered.
Definition kaevent.cpp:2106
void setExcludeHolidays(bool exclude)
Enable or disable the alarm on holiday dates.
Definition kaevent.cpp:2876
int fadeSeconds() const
Return the fade period in seconds, or 0 if no fade is specified.
Definition kaevent.cpp:2327
int deferDefaultMinutes() const
Return the default deferral interval used in the deferral dialog.
Definition kaevent.cpp:2745
QString command() const
Return the command or script to execute, for a command alarm.
Definition kaevent.cpp:2085
QStringList emailAttachments() const
Return the list of file paths of the attachments, for an email alarm.
Definition kaevent.cpp:2275
QString displayMessage() const
Return the message text for a display alarm.
Definition kaevent.cpp:2050
DateTime mainEndRepeatTime() const
Return the time at which the last sub-repetition of the main alarm will occur.
Definition kaevent.cpp:2776
KAAlarm convertDisplayingAlarm() const
Return the original alarm which the displaying alarm refers to.
Definition kaevent.cpp:3765
CalEvent::Type category() const
Return the alarm category (active/archived/template, or displaying).
Definition kaevent.cpp:1885
KARecurrence * recurrence() const
Return the full recurrence data for the event.
Definition kaevent.cpp:3206
void setCompatibility(KACalendar::Compat c)
Note the event's storage format compatibility compared to the current KAlarm calendar format.
Definition kaevent.cpp:1960
static int currentCalendarVersion()
Return the current KAlarm calendar storage format version.
Definition kaevent.cpp:446
void setFirstRecurrence()
Adjust the event date/time to the first recurrence of the event, on or after the event start date/tim...
Definition kaevent.cpp:3245
QColor bgColour() const
Return the message window background color, for a display alarm.
Definition kaevent.cpp:2060
bool copyToKOrganizer() const
Return whether KOrganizer should hold a copy of the event.
Definition kaevent.cpp:2203
QString repetitionText(bool brief=false) const
Return the repetition interval as text suitable for display.
Definition kaevent.cpp:3383
void incrementRevision()
Increment the revision number of the event (SEQUENCE property in iCalendar).
Definition kaevent.cpp:1900
static QByteArray currentCalendarVersionString()
Return the current KAlarm calendar storage format version.
Definition kaevent.cpp:445
void setTemplate(const QString &name, int afterTime=-1)
Set the event to be an alarm template.
Definition kaevent.cpp:2357
float soundVolume() const
Return the sound volume (the final volume if fade is specified).
Definition kaevent.cpp:2317
bool confirmAck() const
Return whether alarm acknowledgement must be confirmed by the user, for a display alarm.
Definition kaevent.cpp:2198
void setCollectionId(Akonadi::Collection::Id id)
Set the ID of the Akonadi Collection which contains the event.
Definition kaevent.cpp:1911
bool toBeArchived() const
Return whether the event should be archived when it expires or is deleted.
Definition kaevent.cpp:1823
QString message() const
Return the message text for a display alarm, or the email body for an email alarm.
Definition kaevent.cpp:2044
bool isWorkingTime(const KDateTime &dt) const
Check whether a date/time is during working hours and/or holidays, depending on the flags set for the...
Definition kaevent.cpp:2916
void set(const KCalCore::Event::Ptr &)
Initialise the instance from a KCalCore::Event.
Definition kaevent.cpp:757
KAAlarm nextAlarm(const KAAlarm &previousAlarm) const
Return the next alarm for the event, after the specified alarm.
Definition kaevent.cpp:3898
Akonadi::Item::Id itemId() const
Return the ID of the Akonadi Item which contains the event.
Definition kaevent.cpp:1932
void setTime(const KDateTime &dt)
Set the next time to trigger the alarm (excluding sub-repetitions).
Definition kaevent.cpp:2760
KDateTime createdDateTime() const
Return the date/time the event was created, or saved in the archive calendar.
Definition kaevent.cpp:2832
bool usingDefaultTime() const
Return whether the alarm template does not specify a time.
Definition kaevent.cpp:2375
static void setHolidays(const KHolidays::HolidayRegion ®ion)
Set the holiday region to be used by all KAEvent instances.
Definition kaevent.cpp:2895
int nextRepetition() const
Return the count of the next sub-repetition which is due.
Definition kaevent.cpp:3375
int revision() const
Return the revision number of the event (SEQUENCE property in iCalendar).
Definition kaevent.cpp:1905
bool setRecurMonthlyByPos(int freq, const QVector< MonthPos > &pos, int count, const QDate &end)
Set the recurrence to recur monthly, on the specified weekdays in the specified weeks of the month.
Definition kaevent.cpp:3098
@ ALLOW_FOR_REPETITION
if a sub-repetition is the next occurrence, return the previous recurrence, not the sub-repetition
Definition kaevent.h:285
void defer(const DateTime &dt, bool reminder, bool adjustRecurrence=false)
Defer the event to the specified time.
Definition kaevent.cpp:2522
bool reminderDeferral() const
Return whether there is currently a deferred reminder alarm pending.
Definition kaevent.cpp:2511
bool setRecurAnnualByPos(int freq, const QVector< MonthPos > &pos, const QVector< int > &months, int count, const QDate &end)
Set the recurrence to recur annually, on the specified weekdays in the specified weeks of the specifi...
Definition kaevent.cpp:3151
@ UID_CHECK
verify that the KCal::Event UID is already the same as the KAEvent ID, if the latter is non-empty
Definition kaevent.h:333
QStringList emailPureAddresses() const
Return the list of email addressees, excluding names, for an email alarm.
Definition kaevent.cpp:2260
@ CONFIRM_ACK
closing the alarm message window requires a confirmation prompt
Definition kaevent.h:222
QString postAction() const
Return the shell command to execute after the display alarm is acknowledged.
Definition kaevent.cpp:2407
bool setRepetition(const Repetition &r)
Initialise the event's sub-repetition.
Definition kaevent.cpp:3332
OccurType setNextOccurrence(const KDateTime &preDateTime)
Set the date/time of the event to the next scheduled occurrence after a specified date/time,...
Definition kaevent.cpp:3453
CmdErrType
Command execution error type for last time the alarm was triggered.
Definition kaevent.h:310
bool commandScript() const
Return whether a command script is specified, for a command alarm.
Definition kaevent.cpp:2090
static void setDefaultFont(const QFont &font)
Set the global default font for alarm message texts.
Definition kaevent.cpp:2070
static List ptrList(QVector< KAEvent > &events)
Return a list of pointers to a list of KAEvent objects.
Definition kaevent.cpp:4035
DateTime deferralLimit(DeferLimitType *limitType=0) const
Return the latest time which the alarm can currently be deferred to.
Definition kaevent.cpp:2690
QString fileName() const
Return the path of the file whose contents are to be shown, for a display alarm.
Definition kaevent.cpp:2055
void setArchive()
Set the event to be archived when it expires or is deleted.
Definition kaevent.cpp:1818
DateTime nextTrigger(TriggerType type) const
Return the next time the alarm will trigger.
Definition kaevent.cpp:2807
void endChanges()
Call when a group of changes preceded by startChanges() is complete, to allow resultant updates to oc...
Definition kaevent.cpp:4020
OccurType nextOccurrence(const KDateTime &preDateTime, DateTime &result, OccurOption option=IGNORE_REPETITION) const
Get the date/time of the next occurrence of the event, after the specified date/time.
Definition kaevent.cpp:3527
bool setRecurMinutely(int freq, int count, const KDateTime &end)
Set the recurrence to recur at a minutes interval.
Definition kaevent.cpp:3007
SubAction actionSubType() const
Return the action sub-type of the event's main alarm.
Definition kaevent.cpp:1987
bool setRecurAnnualByDate(int freq, const QVector< int > &months, int day, KARecurrence::Feb29Type, int count, const QDate &end)
Set the recurrence to recur annually, on the specified day in each of the specified months.
Definition kaevent.cpp:3124
void setLogFile(const QString &logfile)
Set the log file to write command alarm output to.
Definition kaevent.cpp:2186
bool reminderActive() const
Return whether a reminder is currently due (before the next, or after the last, main alarm/recurrence...
Definition kaevent.cpp:2501
void setEmail(uint from, const KCalCore::Person::List &, const QString &subject, const QStringList &attachments)
Set the email related data for the event.
Definition kaevent.cpp:2209
KCalCore::Duration longestRecurrenceInterval() const
Return the longest interval which can occur between consecutive recurrences.
Definition kaevent.cpp:3235
DateTime deferDateTime() const
Return the time at which the currently pending deferred alarm should trigger.
Definition kaevent.cpp:2682
int templateAfterTime() const
Return the number of minutes (>= 0) after the default alarm time which is specified in the alarm temp...
Definition kaevent.cpp:2380
bool setItemPayload(Akonadi::Item &, const QStringList &collectionMimeTypes) const
Initialise an Akonadi::Item with the event's data.
Definition kaevent.cpp:1943
KARecurrence::Type recurType() const
Return the recurrence period type for the event.
Definition kaevent.cpp:3201
float fadeVolume() const
Return the initial volume which will fade to the final volume.
Definition kaevent.cpp:2322
bool speak() const
Return whether the displayed alarm text should be spoken.
Definition kaevent.cpp:2347
bool setRecurWeekly(int freq, const QBitArray &days, int count, const QDate &end)
Set the recurrence to recur weekly, on the specified weekdays.
Definition kaevent.cpp:3054
bool displaying() const
Return whether the alarm is currently being displayed, i.e.
Definition kaevent.cpp:3788
static void adjustStartOfDay(const KAEvent::List &events)
Call when the user changes the start-of-day time, to adjust the data for each date-only event in a li...
Definition kaevent.cpp:2797
bool isValid() const
Return whether the instance represents a valid event.
Definition kaevent.cpp:1791
void setItemId(Akonadi::Item::Id id)
Set the ID of the Akonadi Item which contains the event.
Definition kaevent.cpp:1927
ExtraActionOptions extraActionOptions() const
Return the pre- and post-alarm action options.
Definition kaevent.cpp:2412
bool updateKCalEvent(const KCalCore::Event::Ptr &event, UidAction u, bool setCustomProperties=true) const
Update an existing KCalCore::Event with the KAEvent data.
Definition kaevent.cpp:1346
void removeExpiredAlarm(KAAlarm::Type type)
Remove the alarm of the specified type from the event.
Definition kaevent.cpp:3951
DeferLimitType
What type of occurrence currently limits how long the alarm can be deferred.
Definition kaevent.h:290
bool beep() const
Return whether a beep should sound when the alarm is displayed.
Definition kaevent.cpp:2342
KAAlarm alarm(KAAlarm::Type type) const
Return the alarm of a specified type.
Definition kaevent.cpp:3796
static void setWorkTime(const QBitArray &days, const QTime &start, const QTime &end)
Set working days and times, to be used by all KAEvent instances.
Definition kaevent.cpp:2937
bool dontShowPreActionError() const
Return whether the user should not be notified if the pre-alarm action fails.
Definition kaevent.cpp:2422
Actions actionTypes() const
Return the OR of the basic action types of the event's main alarm (display, command,...
Definition kaevent.cpp:1992
QColor fgColour() const
Return the message window foreground color, for a display alarm.
Definition kaevent.cpp:2065
void setAudioFile(const QString &filename, float volume, float fadeVolume, int fadeSeconds, int repeatPause=-1, bool allowEmptyFile=false)
Set the audio file related data for the event.
Definition kaevent.cpp:2290
@ MAIN_TRIGGER
next trigger, excluding reminders, ignoring working hours & holidays
Definition kaevent.h:302
@ ALL_TRIGGER
next trigger, including reminders, ignoring working hours & holidays
Definition kaevent.h:301
@ DISPLAY_TRIGGER
next trigger time for display purposes (i.e. excluding reminders)
Definition kaevent.h:305
bool useDefaultFont() const
Return whether to use the default font (as set by setDefaultFont()) for alarm message texts.
Definition kaevent.cpp:2075
QTime mainTime() const
Return the time at which the main alarm will next trigger.
Definition kaevent.cpp:2771
uint emailFromId() const
Return the email identity to be used as the sender, for an email alarm.
Definition kaevent.cpp:2227
bool occursAfter(const KDateTime &preDateTime, bool includeRepetitions) const
Determine whether the event will occur after the specified date/time.
Definition kaevent.cpp:3410
bool cancelOnPreActionError() const
Return whether the alarm is to be cancelled if the pre-alarm action fails.
Definition kaevent.cpp:2417
static bool convertKCalEvents(const KCalCore::Calendar::Ptr &, int calendarVersion)
If a calendar was written by a previous version of KAlarm, do any necessary format conversions on the...
Definition kaevent.cpp:5240
void startChanges()
Call before making a group of changes to the event, to avoid unnecessary calculation intensive recalc...
Definition kaevent.cpp:4011
void activateReminderAfter(const DateTime &mainAlarmTime)
If there is a reminder which occurs AFTER the main alarm, activate the event's reminder which occurs ...
Definition kaevent.cpp:2458
QString preAction() const
Return the shell command to execute before the alarm is displayed.
Definition kaevent.cpp:2402
QString emailMessage() const
Return the email message body, for an email alarm.
Definition kaevent.cpp:2222
bool workTimeOnly() const
Return whether the alarm is disabled on non-working days and outside working hours.
Definition kaevent.cpp:2907
CmdErrType commandError() const
Return the command execution error for the last time the alarm triggered.
Definition kaevent.cpp:2181
void setCategory(CalEvent::Type type)
Set the alarm category (active/archived/template, or displaying).
Definition kaevent.cpp:1871
KCalCore::Person::List emailAddressees() const
Return the list of email addressees, including names, for an email alarm.
Definition kaevent.cpp:2233
bool setDisplaying(const KAEvent &event, KAAlarm::Type type, Akonadi::Collection::Id colId, const KDateTime &repeatAtLoginTime, bool showEdit, bool showDefer)
Set the event to be a copy of the specified event, making the specified alarm the 'displaying' alarm.
Definition kaevent.cpp:3667
void setWorkTimeOnly(bool wto)
Enable or disable the alarm on non-working days and outside working hours.
Definition kaevent.cpp:2900
void setAutoClose(bool autoclose)
Enable or disable auto-close for a display alarm, i.e.
Definition kaevent.cpp:2019
bool reminderOnceOnly() const
Return whether the reminder alarm is triggered only for the first recurrence.
Definition kaevent.cpp:2506
Feb29Type
When annual February 29th recurrences should occur in non-leap years.
Definition karecurrence.h:80
Represents a sub-repetition, defined by interval and repeat count.
Definition repetition.h:48
QSharedPointer< Calendar > Ptr
QSharedPointer< Event > Ptr
QVector< Ptr > List
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.