• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KCalUtils Library

  • KCalUtils
  • RecurrenceActions
Enumerations | Functions
KCalUtils::RecurrenceActions Namespace Reference

Enumerations

enum  Scope {
  NoOccurrence = 0, SelectedOccurrence = 1, PastOccurrences = 2, FutureOccurrences = 4,
  AllOccurrences = PastOccurrences | SelectedOccurrence | FutureOccurrences
}
 

Functions

KCALUTILS_EXPORT int availableOccurrences (const KCalCore::Incidence::Ptr &incidence, const KDateTime &selectedOccurrence)
 
KCALUTILS_EXPORT int questionMultipleChoice (const KDateTime &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.

Author
Kevin Krammer, krake.nosp@m.@kda.nosp@m.b.com
Since
4.6

Enumeration Type Documentation

enum KCalUtils::RecurrenceActions::Scope

Flags for indicating on which occurrences to work on.

Flags can be OR'ed together to get a combined scope.

Enumerator
NoOccurrence 

Scope does not apply to any occurrence.

SelectedOccurrence 

Scope does include the given/selected occurrence.

PastOccurrences 

Scope does include occurrences before the given/selected occurrence.

FutureOccurrences 

Scope does include occurrences after the given/selected occurrence.

AllOccurrences 

Scope does include all occurrences (past, present and future)

Definition at line 52 of file recurrenceactions.h.

Function Documentation

KCALUTILS_EXPORT int KCalUtils::RecurrenceActions::availableOccurrences ( const KCalCore::Incidence::Ptr &  incidence,
const KDateTime &  selectedOccurrence 
)

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
incidencethe incidence of which to check recurrences.
selectedOccurrencethe 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 can be applied to
int KCalUtils::RecurrenceActions::questionMultipleChoice ( const KDateTime &  selectedOccurrence,
const QString &  message,
const QString &  caption,
const KGuiItem &  action,
int  availableChoices,
int  preselectedChoices,
QWidget *  parent 
)

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
selectedOccurrencethe date to use for telling the user which occurrence is the selected one.
messagethe message which explains the change and selection options.
captionthe dialog's caption.
actionthe GUI item to use for the "OK" button.
availableChoicescombined Scope values to select which options should be present.
preselectedChoicescombined Scope values to optionally preselect some of the options specified with availableChoices.
parentQWidget parent for the dialog.
Returns
the chosen Scope options, OR'ed together

Definition at line 143 of file recurrenceactions.cpp.

int KCalUtils::RecurrenceActions::questionSelectedAllCancel ( const QString &  message,
const QString &  caption,
const KGuiItem &  actionSelected,
const KGuiItem &  actionAll,
QWidget *  parent 
)

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
messagethe message which explains the change and available options.
captionthe dialog's caption.
actionSelectedthe GUI item to use for the button representing the SelectedOccurrence scope.
actionAllthe GUI item to use for the button representing the AllOccurrences scope.
parentQWidget parent for the dialog.
NoOccurrenceon cancel, SelectedOccurrence or AllOccurrences on the respective action.

Definition at line 173 of file recurrenceactions.cpp.

int KCalUtils::RecurrenceActions::questionSelectedFutureAllCancel ( const QString &  message,
const QString &  caption,
const KGuiItem &  actionSelected,
const KGuiItem &  actionFuture,
const KGuiItem &  actionAll,
QWidget *  parent 
)

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
messagethe message which explains the change and available options.
captionthe dialog's caption.
actionSelectedthe GUI item to use for the button representing the SelectedOccurrence scope.
actionSelectedthe GUI item to use for the button representing the FutureOccurrences scope.
actionAllthe GUI item to use for the button representing the AllOccurrences scope.
parentQWidget parent for the dialog.
NoOccurrenceon cancel, SelectedOccurrence, FutureOccurrences or AllOccurrences on the respective action.

Definition at line 208 of file recurrenceactions.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalUtils Library

Skip menu "KCalUtils Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Members
  • File List
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal