IncidenceEditorNG::IncidenceDefaults Class

The IncidenceDefaults class. More...

Header: #include <IncidenceEditor/IncidenceDefaults>
CMake: find_package(KPim6IncidenceEditor REQUIRED)
target_link_libraries(mytarget PRIVATE KPim6::IncidenceEditor)

Public Functions

IncidenceDefaults(bool cleanupAttachmentTEmporaryFiles = false)
IncidenceDefaults(const IncidenceEditorNG::IncidenceDefaults &other)
~IncidenceDefaults()
void setAttachments(const QStringList &attachments, const QStringList &attachmentMimetypes = QStringList(), const QStringList &attachmentLabels = QStringList(), bool inlineAttachment = false)
void setAttendees(const QStringList &attendees)
void setDefaults(const KCalendarCore::Incidence::Ptr &incidence) const
void setEndDateTime(const QDateTime &endDT)
void setFullEmails(const QStringList &fullEmails)
void setGroupWareDomain(const QString &domain)
void setRelatedIncidence(const KCalendarCore::Incidence::Ptr &incidence)
void setStartDateTime(const QDateTime &startDT)
IncidenceEditorNG::IncidenceDefaults &operator=(const IncidenceEditorNG::IncidenceDefaults &other)

Static Public Members

QString invalidEmailAddress()
IncidenceEditorNG::IncidenceDefaults minimalIncidenceDefaults(bool cleanupAttachmentTempFiles = false)

Detailed Description

Member Function Documentation

[explicit] IncidenceDefaults::IncidenceDefaults(bool cleanupAttachmentTEmporaryFiles = false)

Creates a new IncidenceDefaults object. cleanupAttachmentTEmporaryFiles If true, temporary attachment files will be cleaned up.

IncidenceDefaults::IncidenceDefaults(const IncidenceEditorNG::IncidenceDefaults &other)

Copy constructor. other The IncidenceDefaults object to copy.

[noexcept] IncidenceDefaults::~IncidenceDefaults()

Destructor.

[static] QString IncidenceDefaults::invalidEmailAddress()

Returns the e-mail address used for the organizer when we can't find anything useful This is something like "invalid@invalid"

[static] IncidenceEditorNG::IncidenceDefaults IncidenceDefaults::minimalIncidenceDefaults(bool cleanupAttachmentTempFiles = false)

Returns minimal incidence defaults: e-mails and groupware domain.

TODO: See if this is always called when using IncidenceDefaults. If yes, this should be done inside ctor. cleanupAttachmentTempFiles If true, temporary attachment files will be cleaned up.

void IncidenceDefaults::setAttachments(const QStringList &attachments, const QStringList &attachmentMimetypes = QStringList(), const QStringList &attachmentLabels = QStringList(), bool inlineAttachment = false)

Sets the attachments that are added by default to incidences. attachments The list of attachment file paths. attachmentMimetypes Optional list of MIME types for each attachment. attachmentLabels Optional list of labels for each attachment. inlineAttachment If true, attachments are embedded inline.

void IncidenceDefaults::setAttendees(const QStringList &attendees)

Sets the attendees that are added by default to incidences. attendees Expected to be of the form "name name <email>"

void IncidenceDefaults::setDefaults(const KCalendarCore::Incidence::Ptr &incidence) const

Sets the default values for incidence. This method is merely meant for <em>new</em> incidences. However, it will clear out all fields and set them to default values. incidence The incidence that will get default values for all of its field.

void IncidenceDefaults::setEndDateTime(const QDateTime &endDT)

Set the end date/time to use for passed incidences. This defaults to the current start date/time. The main purpose of this method is supporting defaults for new incidences that where created with a given time slot. endDT The start date time to set on the incidence.

void IncidenceDefaults::setFullEmails(const QStringList &fullEmails)

Sets the list of identities to be used for the user. The items in the list are expected to be of the form: "name [name] <email>".

If the list is empty, it is assumed that no valid identities are configured.

fullEmails The list of name email pairs that the user has configured as identities.

void IncidenceDefaults::setGroupWareDomain(const QString &domain)

This is used to do a smarter guess about which identity to use for the organizer. If the groupware server is not set, the first available identity will be used. domain The gropuware server domain name without any protocol prefixes (e.g. demo.kolab.org).

void IncidenceDefaults::setRelatedIncidence(const KCalendarCore::Incidence::Ptr &incidence)

Sets the incidence related to the incidence for which to set the defaults. For example the parent todo of a new sub todo. incidence The related incidence.

void IncidenceDefaults::setStartDateTime(const QDateTime &startDT)

Set the start date/time to use for passed incidences. This defaults to the current start date/time. The main purpose of this method is supporting defaults for new incidences that where created with a given time slot. startDT The start date time to set on the incidence.

IncidenceEditorNG::IncidenceDefaults &IncidenceDefaults::operator=(const IncidenceEditorNG::IncidenceDefaults &other)

Assignment operator. other The IncidenceDefaults object to assign.