KCalendarCore::OccurrenceIterator
#include <occurrenceiterator.h>
Public Member Functions | |
OccurrenceIterator (const Calendar &calendar, const KCalendarCore::Incidence::Ptr &incidence, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime()) | |
OccurrenceIterator (const Calendar &calendar, const QDateTime &start=QDateTime(), const QDateTime &end=QDateTime()) | |
bool | hasNext () const |
Incidence::Ptr | incidence () const |
void | next () |
QDateTime | occurrenceEndDate () const |
QDateTime | occurrenceStartDate () const |
QDateTime | recurrenceId () const |
Detailed Description
Iterate over calendar items in a calendar.
The iterator takes recurrences and exceptions to recurrences into account
The iterator does not iterate the occurrences of all incidences chronologically.
- Since
- 4.11
Definition at line 33 of file occurrenceiterator.h.
Constructor & Destructor Documentation
◆ OccurrenceIterator() [1/2]
|
explicit |
Creates iterator that iterates over all occurrences of all incidences between.
Private class that helps to provide binary compatibility between releases.
- Parameters
-
start and end (inclusive)
Right now there is little point in the iterator, but: With an iterator it should be possible to solve this more memory efficiently and with immediate results at the beginning of the selected timeframe. Either all events are iterated simoulatneously, resulting in occurrences of all events in parallel in the correct time-order, or incidence after incidence, which would be even more efficient.
By making this class a friend of calendar, we could also use the internally available data structures.
Definition at line 181 of file occurrenceiterator.cpp.
◆ OccurrenceIterator() [2/2]
OccurrenceIterator::OccurrenceIterator | ( | const Calendar & | calendar, |
const KCalendarCore::Incidence::Ptr & | incidence, | ||
const QDateTime & | start = QDateTime(), | ||
const QDateTime & | end = QDateTime() ) |
Creates iterator that iterates over all occurrences of.
- Parameters
-
incidence between start and end (inclusive)
Definition at line 214 of file occurrenceiterator.cpp.
◆ ~OccurrenceIterator()
OccurrenceIterator::~OccurrenceIterator | ( | ) |
Definition at line 223 of file occurrenceiterator.cpp.
Member Function Documentation
◆ hasNext()
bool OccurrenceIterator::hasNext | ( | ) | const |
Definition at line 227 of file occurrenceiterator.cpp.
◆ incidence()
Incidence::Ptr OccurrenceIterator::incidence | ( | ) | const |
Returns either main incidence or exception, depending on occurrence.
Definition at line 237 of file occurrenceiterator.cpp.
◆ next()
void OccurrenceIterator::next | ( | ) |
Advance iterator to the next occurrence.
Definition at line 232 of file occurrenceiterator.cpp.
◆ occurrenceEndDate()
QDateTime OccurrenceIterator::occurrenceEndDate | ( | ) | const |
Returns the end date of the occurrence.
For incidence that supports end date (events and due date for todos), this is computed from the duration or directly the end date of the occurrence or an exception overriding that occurrence. For incidences without end date, an invalid date is returned.
- Since
- 5.87
Definition at line 247 of file occurrenceiterator.cpp.
◆ occurrenceStartDate()
QDateTime OccurrenceIterator::occurrenceStartDate | ( | ) | const |
Returns the start date of the occurrence.
This is either the occurrence date, or the start date of an exception which overrides that occurrence.
Definition at line 242 of file occurrenceiterator.cpp.
◆ recurrenceId()
QDateTime OccurrenceIterator::recurrenceId | ( | ) | const |
Returns the recurrence Id.
This is the date where the occurrence starts without exceptions, this id is used to identify one exact occurrence.
Definition at line 252 of file occurrenceiterator.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.