KCalUtils::RecurrenceActions
Enumerations | |
enum | Scope { NoOccurrence = 0 , SelectedOccurrence = 1 , PastOccurrences = 2 , FutureOccurrences = 4 , AllOccurrences = PastOccurrences | SelectedOccurrence | FutureOccurrences } |
Functions | |
KCALUTILS_EXPORT int | availableOccurrences (const KCalendarCore::Incidence::Ptr &incidence, const QDateTime &selectedOccurrence) |
KCALUTILS_EXPORT int | questionMultipleChoice (const QDateTime &selectedOccurrence, const QString &message, const QString &caption, const KGuiItem &action, int availableChoices, int preselectedChoices, QWidget *parent) |
KCALUTILS_EXPORT int | questionSelectedAllCancel (const QString &message, const QString &caption, const KGuiItem &actionSelected, const KGuiItem &actionAll, QWidget *parent) |
KCALUTILS_EXPORT int | questionSelectedFutureAllCancel (const QString &message, const QString &caption, const KGuiItem &actionSelected, const KGuiItem &actionFuture, const KGuiItem &actionAll, QWidget *parent) |
Detailed Description
Utility functions for dealing with recurrences.
Incidences with recurrencies need to be treated differently than single independent ones. For example the user might be given the choice to not only modify a selected occurrence of an incidence but also all that follow that one, etc.
- Since
- 4.6
Enumeration Type Documentation
◆ Scope
Flags for indicating on which occurrences to work on.
Flags can be OR'ed together to get a combined scope.
Definition at line 39 of file recurrenceactions.h.
Function Documentation
◆ availableOccurrences()
|
nodiscard |
Checks what scope an action could be applied on for a given incidence.
Checks whether the incidence is occurring on the given date and whether there are occurrences in the past and future.
- Parameters
-
incidence the incidence of which to check recurrences. selectedOccurrence the date (including timespec) to use as the base occurrence, i.e., from which to check for past and future occurrences.
- Returns
- the Scope to which actions on the given @incidence can be applied to
Definition at line 117 of file recurrenceactions.cpp.
◆ questionMultipleChoice()
|
nodiscard |
Presents a multiple choice scope selection dialog to the user.
Shows a message box style question dialog with checkboxes for occurrence scope flags so the user can be asked specifically which occurrences to apply actions to.
- Parameters
-
selectedOccurrence the date to use for telling the user which occurrence is the selected one. message the message which explains the change and selection options. caption the dialog's caption. action the GUI item to use for the "OK" button. availableChoices combined Scope values to select which options should be present. preselectedChoices combined Scope values to optionally preselect some of the options specified with availableChoices
.parent QWidget parent for the dialog.
- Returns
- the chosen Scope options, OR'ed together
Definition at line 161 of file recurrenceactions.cpp.
◆ questionSelectedAllCancel()
|
nodiscard |
Presents a message box with two action choices and cancel to the user.
Shows a message box style question dialog with two action scope buttons and cancel. This is for quick decisions like whether to only modify a single occurrence or all occurrences.
- Parameters
-
message the message which explains the change and available options. caption the dialog's caption. actionSelected the GUI item to use for the button representing the SelectedOccurrence scope. actionAll the GUI item to use for the button representing the AllOccurrences scope. parent QWidget parent for the dialog. NoOccurrence on cancel, SelectedOccurrence or AllOccurrences on the respective action.
Definition at line 192 of file recurrenceactions.cpp.
◆ questionSelectedFutureAllCancel()
|
nodiscard |
Presents a message box with three action choices and cancel to the user.
Shows a message box style question dialog with three action scope buttons and cancel. This is for quick decisions like whether to only modify a single occurrence, to include future or all occurrences.
- Note
- The calling application code can of course decide to word the future action text in a way that it includes the selected occurrence, e.g. "Also Future Items". The returned value will still just be FutureOccurrences so the calling code has to include SelectedOccurrence itself if it passes the value further on
- Parameters
-
message the message which explains the change and available options. caption the dialog's caption. actionSelected the GUI item to use for the button representing the SelectedOccurrence scope. actionSelected the GUI item to use for the button representing the FutureOccurrences scope. actionAll the GUI item to use for the button representing the AllOccurrences scope. parent QWidget parent for the dialog. NoOccurrence on cancel, SelectedOccurrence, FutureOccurrences or AllOccurrences on the respective action.
Definition at line 225 of file recurrenceactions.cpp.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:55:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.