KCalendarCore
occurrenceiterator.cpp
Go to the documentation of this file.
73 bool occurrenceIsHidden(const Calendar &calendar, const Incidence::Ptr &inc, const QDateTime &occurrenceDate)
75 if ((inc->type() == Incidence::TypeTodo) && calendar.filter() && (calendar.filter()->criteria() & KCalendarCore::CalFilter::HideCompletedTodos)) {
118 recurrenceIds.insert(exception->recurrenceId().toTimeZone(incidenceRecStart.timeZone()), exception);
149 occurrenceList << Private::Occurrence(incidence, recurrenceId, occurrenceStartDate, period.end());
151 occurrenceList << Private::Occurrence(incidence, recurrenceId, occurrenceStartDate, occurrenceEnd(incidence, occurrenceStartDate));
181 OccurrenceIterator::OccurrenceIterator(const Calendar &calendar, const QDateTime &start, const QDateTime &end)
201 if (journal->dtStart().isValid() && journalStart >= start.date() && journalStart <= end.date()) {
210 const Incidence::List incidences = KCalendarCore::Calendar::mergeIncidenceList(events, todos, journals);
214 OccurrenceIterator::OccurrenceIterator(const Calendar &calendar, const Incidence::Ptr &incidence, const QDateTime &start, const QDateTime &end)
QDateTime addSecs(qint64 s) const const
const T value(const Key &key) const const
Represents a span of time measured in seconds or days.
Definition: duration.h:43
QTimeZone timeZone() const const
void apply(Event::List *eventList) const
Applies the filter to a list of Events.
Definition: calfilter.cpp:69
The period can be defined by either a start time and an end time or by a start time and a duration.
Definition: period.h:37
virtual Todo::List rawTodos(TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all Todos for this Calendar.
OccurrenceIterator(const Calendar &calendar, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime())
Creates iterator that iterates over all occurrences of all incidences between.
Definition: occurrenceiterator.cpp:181
AKONADI_CALENDAR_EXPORT KCalendarCore::Incidence::Ptr incidence(const Akonadi::Item &item)
QHash::iterator insert(const Key &key, const T &value)
Q_SCRIPTABLE Q_NOREPLY void start()
static Incidence::List mergeIncidenceList(const Event::List &events, const Todo::List &todos, const Journal::List &journals)
Create a merged list of Events, Todos, and Journals.
Definition: calendar.cpp:1164
QDateTime occurrenceStartDate() const
Returns the start date of the occurrence.
Definition: occurrenceiterator.cpp:242
virtual Event::List rawEvents(EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all Events for this Calendar.
@ RoleEnd
Role for determining an incidence's dtEnd, will return an invalid QDateTime if the incidence does not...
Definition: incidencebase.h:139
QDateTime occurrenceEndDate() const
Returns the end date of the occurrence.
Definition: occurrenceiterator.cpp:247
bool isValid() const const
@ RoleRecurrenceStart
Role for determining the start of the recurrence.
Definition: incidencebase.h:145
virtual Incidence::List instances(const Incidence::Ptr &incidence) const
Returns an unfiltered list of all exceptions of this recurring incidence.
Definition: calendar.cpp:290
Iterate over calendar items in a calendar.
Definition: occurrenceiterator.h:33
bool contains(const Key &key) const const
virtual Todo::Ptr todo(const QString &uid, const QDateTime &recurrenceId={}) const =0
Returns the Todo associated with the given unique identifier.
virtual Journal::List rawJournals(JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending) const =0
Returns a sorted, unfiltered list of all Journals for this Calendar.
AKONADI_CALENDAR_EXPORT KCalendarCore::Todo::Ptr todo(const Akonadi::Item &item)
const QList< QKeySequence > & end()
Incidence::Ptr incidence() const
Returns either main incidence or exception, depending on occurrence.
Definition: occurrenceiterator.cpp:237
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 03:53:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 28 2023 03:53:12 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.