KCalendarCore::Calendar
#include <calendar.h>

Classes | |
class | CalendarObserver |
Public Types | |
typedef QSharedPointer< Calendar > | Ptr |
Properties | |
AccessMode | accessMode |
QIcon | icon |
QString | id |
QString | name |
KCalendarCore::Person | owner |
QString | productId |
![]() | |
objectName | |
Signals | |
void | accessModeChanged () |
void | filterChanged () |
void | iconChanged () |
void | idChanged () |
void | nameChanged () |
void | ownerChanged () |
Static Public Member Functions | |
static Incidence::Ptr | createException (const Incidence::Ptr &incidence, const QDateTime &recurrenceId, bool thisAndFuture=false) |
static Incidence::List | mergeIncidenceList (const Event::List &events, const Todo::List &todos, const Journal::List &journals) |
static Event::List | sortEvents (const Event::List &eventList, EventSortField sortField, SortDirection sortDirection) |
static Journal::List | sortJournals (const Journal::List &journalList, JournalSortField sortField, SortDirection sortDirection) |
static Todo::List | sortTodos (const Todo::List &todoList, TodoSortField sortField, SortDirection sortDirection) |
![]() | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
static QByteArray | customPropertyName (const QByteArray &app, const QByteArray &key) |
Additional Inherited Members | |
![]() | |
typedef | QObjectList |
Detailed Description
Represents the main calendar class.
A calendar contains information like incidences (events, to-dos, journals), alarms, time zones, and other useful information.
This is an abstract base class defining the interface to a calendar. It is implemented by subclasses like MemoryCalendar, which use different methods to store and access the data.
Ownership of Incidences:
Incidence ownership is handled by the following policy: as soon as an incidence (or any other subclass of IncidenceBase) is added to the Calendar by an add...() method it is owned by the Calendar object. The Calendar takes care of deleting the incidence using the delete...() methods. All Incidences returned by the query functions are returned as pointers so that changes to the returned Incidences are immediately visible in the Calendar. Do Not attempt to 'delete' any Incidence object you get from Calendar – use the delete...() methods.
Definition at line 129 of file calendar.h.
Member Typedef Documentation
◆ Ptr
A shared pointer to a Calendar.
Definition at line 143 of file calendar.h.
Constructor & Destructor Documentation
◆ Calendar() [1/2]
|
explicit |
Constructs a calendar with a specified time zone timeZone
.
The time zone is used as the default for creating or modifying incidences in the Calendar. The time zone does not alter existing incidences.
- Parameters
-
timeZone time specification
Definition at line 143 of file calendar.cpp.
◆ Calendar() [2/2]
|
explicit |
Construct Calendar object using a time zone ID.
The time zone ID is used as the default for creating or modifying incidences in the Calendar. The time zone does not alter existing incidences.
- Parameters
-
timeZoneId is a string containing a time zone ID, which is assumed to be valid. If no time zone is found, the viewing time specification is set to local time zone. Example: "Europe/Berlin"
Definition at line 153 of file calendar.cpp.
◆ ~Calendar()
|
override |
Destroys the calendar.
Definition at line 159 of file calendar.cpp.
Member Function Documentation
◆ accessMode()
AccessMode KCalendarCore::Calendar::accessMode | ( | ) | const |
This calendar's AccessMode, i.e.
whether it is writable or read-only. Defaults to ReadWrite.
- Since
- 5.85
- See also
- setAccessMode()
◆ accessModeChanged
|
signal |
Emitted when the AccessMode changes.
- Since
- 5.85
- See also
- accessMode()
◆ addEvent()
|
pure virtual |
Inserts an Event into the calendar.
- Parameters
-
event is a pointer to the Event to insert.
- Returns
- true if the Event was successfully inserted; false otherwise.
- See also
- deleteEvent()
Implemented in Akonadi::CalendarBase, and KCalendarCore::MemoryCalendar.
◆ addIncidence()
|
virtual |
Inserts an Incidence into the calendar.
- Parameters
-
incidence is a pointer to the Incidence to insert.
- Returns
- true if the Incidence was successfully inserted; false otherwise.
- See also
- deleteIncidence()
Reimplemented in Akonadi::CalendarBase, and KCalendarCore::MemoryCalendar.
Definition at line 554 of file calendar.cpp.
◆ addJournal()
|
pure virtual |
Inserts a Journal into the calendar.
- Parameters
-
journal is a pointer to the Journal to insert.
- Returns
- true if the Journal was successfully inserted; false otherwise.
- See also
- deleteJournal()
Implemented in Akonadi::CalendarBase, and KCalendarCore::MemoryCalendar.
◆ addNotebook()
bool Calendar::addNotebook | ( | const QString & | notebook, |
bool | isVisible | ||
) |
Add notebook information into calendar.
Is usually called by storages only.
- Parameters
-
notebook notebook uid isVisible notebook visibility
- Returns
- true if operation succeeded
- See also
- isVisible()
Definition at line 325 of file calendar.cpp.
◆ addTodo()
|
pure virtual |
Inserts a Todo into the calendar.
- Parameters
-
todo is a pointer to the Todo to insert.
- Returns
- true if the Todo was successfully inserted; false otherwise.
- See also
- deleteTodo()
Implemented in KCalendarCore::MemoryCalendar, and Akonadi::CalendarBase.
◆ alarms()
|
pure virtual |
Returns a list of Alarms within a time range for this Calendar.
- Parameters
-
from is the starting timestamp. to is the ending timestamp. excludeBlockedAlarms if true, alarms belonging to blocked collections aren't returned.
- Returns
- the list of Alarms for the for the specified time range.
Implemented in KCalendarCore::MemoryCalendar, and Akonadi::ETMCalendar.
◆ alarmsTo()
Alarm::List Calendar::alarmsTo | ( | const QDateTime & | to | ) | const |
Return a list of Alarms that occur before the specified timestamp.
- Parameters
-
to is the ending timestamp.
- Returns
- the list of Alarms occurring before the specified QDateTime.
- Since
- 5.77
Definition at line 1345 of file calendar.cpp.
◆ appendAlarms()
|
protected |
Appends alarms of incidence in interval to list of alarms.
- Parameters
-
alarms is a List of Alarms to be appended onto. incidence is a pointer to an Incidence containing the Alarm to be appended. from is the lower range of the next Alarm repetition. to is the upper range of the next Alarm repetition.
Definition at line 1205 of file calendar.cpp.
◆ appendRecurringAlarms()
|
protected |
Appends alarms of recurring events in interval to list of alarms.
- Parameters
-
alarms is a List of Alarms to be appended onto. incidence is a pointer to an Incidence containing the Alarm to be appended. from is the lower range of the next Alarm repetition. to is the upper range of the next Alarm repetition.
Definition at line 1221 of file calendar.cpp.
◆ batchAdding()
bool Calendar::batchAdding | ( | ) | const |
- Returns
- true if batch adding is in progress
Definition at line 1330 of file calendar.cpp.
◆ beginChange()
|
virtual |
Flag that a change to a Calendar Incidence is starting.
- Parameters
-
incidence is a pointer to the Incidence that will be changing.
Definition at line 1188 of file calendar.cpp.
◆ categories()
QStringList Calendar::categories | ( | ) | const |
Returns a list of all categories used by Incidences in this Calendar.
- Returns
- a QStringList containing all the categories.
Definition at line 257 of file calendar.cpp.
◆ clearNotebookAssociations()
|
virtual |
Clears notebook associations from hash-tables for incidences.
Called when in-memory content of the calendar is cleared.
Definition at line 404 of file calendar.cpp.
◆ close()
|
pure virtual |
Clears out the current calendar, freeing all used memory etc.
Implemented in KCalendarCore::MemoryCalendar.
◆ createException()
|
static |
Creates an exception for an occurrence from a recurring Incidence.
The returned exception is not automatically inserted into the calendar.
- Parameters
-
incidence is a pointer to a recurring Incidence. recurrenceId specifies the specific occurrence for which the exception applies. thisAndFuture specifies if the exception applies only this specific occcurrence or also to all future occurrences.
- Returns
- a pointer to a new exception incidence with
- Parameters
-
recurrenceId set.
- Since
- 4.11
Definition at line 580 of file calendar.cpp.
◆ customPropertyUpdated()
|
overrideprotectedvirtual |
CustomProperties::customPropertyUpdated()
Reimplemented from KCalendarCore::CustomProperties.
Definition at line 1150 of file calendar.cpp.
◆ defaultNotebook()
QString Calendar::defaultNotebook | ( | ) | const |
◆ deleted()
Incidence::Ptr Calendar::deleted | ( | const QString & | uid, |
const QDateTime & | recurrenceId = {} |
||
) | const |
Returns the deleted Incidence associated with the given unique identifier.
- Parameters
-
uid is a unique identifier string. recurrenceId is possible recurrenceid of incidence, default is null
Definition at line 631 of file calendar.cpp.
◆ deletedEvent()
|
pure virtual |
Returns the deleted Event associated with the given unique identifier.
- Parameters
-
uid is a unique identifier string. recurrenceId is possible recurrenceId of event, default is null
- Returns
- a pointer to the deleted Event. A null pointer is returned if no such deleted Event exists, or if deletion tracking is disabled.
- See also
- deletionTracking()
Implemented in KCalendarCore::MemoryCalendar.
◆ deletedEvents()
|
pure virtual |
Returns a sorted, unfiltered list of all deleted Events for this Calendar.
- Parameters
-
sortField specifies the EventSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered deleted Events sorted as specified. An empty list is returned if deletion tracking is disabled.
- See also
- deletionTracking()
Implemented in KCalendarCore::MemoryCalendar.
◆ deletedJournal()
|
pure virtual |
Returns the deleted Journal associated with the given unique identifier.
- Parameters
-
uid is a unique identifier string. recurrenceId is possible recurrenceId of journal, default is null
- Returns
- a pointer to the deleted Journal. A null pointer is returned if no such deleted Journal exists or if deletion tracking is disabled.
- See also
- deletionTracking()
Implemented in KCalendarCore::MemoryCalendar.
◆ deletedJournals()
|
pure virtual |
Returns a sorted, unfiltered list of all deleted Journals for this Calendar.
- Parameters
-
sortField specifies the JournalSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered deleted Journals sorted as specified. An empty list is returned if deletion tracking is disabled.
- See also
- deletionTracking()
Implemented in KCalendarCore::MemoryCalendar.
◆ deletedTodo()
|
pure virtual |
Returns the deleted Todo associated with the given unique identifier.
- Parameters
-
uid is a unique identifier string. recurrenceId is possible recurrenceId of todo, default is null
- Returns
- a pointer to the deleted Todo. A null pointer is returned if no such deleted Todo exists or if deletion tracking is disabled.
- See also
- deletionTracking()
Implemented in KCalendarCore::MemoryCalendar.
◆ deletedTodos()
|
pure virtual |
Returns a sorted, unfiltered list of all deleted Todos for this Calendar.
- Parameters
-
sortField specifies the TodoSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered deleted Todos sorted as specified. An empty list is returned if deletion tracking is disabled.
- See also
- deletionTracking()
Implemented in KCalendarCore::MemoryCalendar.
◆ deleteEvent()
|
pure virtual |
Removes an Event from the calendar.
- Parameters
-
event is a pointer to the Event to remove.
- Returns
- true if the Event was successfully remove; false otherwise.
- See also
- addEvent()
Implemented in Akonadi::CalendarBase, and KCalendarCore::MemoryCalendar.
◆ deleteEventInstances()
|
pure virtual |
Delete all events that are instances of recurring event event
.
- Parameters
-
event is a pointer to a deleted Event
- Returns
- true if delete was successful; false otherwise
Implemented in KCalendarCore::MemoryCalendar.
◆ deleteIncidence()
|
virtual |
Removes an Incidence from the calendar.
- Parameters
-
incidence is a pointer to the Incidence to remove.
- Returns
- true if the Incidence was successfully removed; false otherwise.
- See also
- addIncidence()
Reimplemented in Akonadi::CalendarBase, and KCalendarCore::MemoryCalendar.
Definition at line 564 of file calendar.cpp.
◆ deleteIncidenceInstances()
|
pure virtual |
Delete all incidences that are instances of recurring incidence incidence
.
- Parameters
-
incidence is a pointer to a deleted Incidence
- Returns
- true if delete was successful; false otherwise
Implemented in KCalendarCore::MemoryCalendar.
◆ deleteJournal()
|
pure virtual |
Removes a Journal from the calendar.
- Parameters
-
journal is a pointer to the Journal to remove.
- Returns
- true if the Journal was successfully removed; false otherwise.
- See also
- addJournal()
Implemented in Akonadi::CalendarBase, and KCalendarCore::MemoryCalendar.
◆ deleteJournalInstances()
|
pure virtual |
Delete all journals that are instances of recurring journal journal
.
- Parameters
-
journal is a pointer to a deleted Journal
- Returns
- true if delete was successful; false otherwise
Implemented in KCalendarCore::MemoryCalendar.
◆ deleteNotebook()
bool Calendar::deleteNotebook | ( | const QString & | notebook | ) |
Delete notebook information from calendar.
Is usually called by storages only.
- Parameters
-
notebook notebook uid
- Returns
- true if operation succeeded
- See also
- isVisible()
Definition at line 352 of file calendar.cpp.
◆ deleteTodo()
|
pure virtual |
Removes a Todo from the calendar.
- Parameters
-
todo is a pointer to the Todo to remove.
- Returns
- true if the Todo was successfully removed; false otherwise.
- See also
- addTodo()
Implemented in KCalendarCore::MemoryCalendar, and Akonadi::CalendarBase.
◆ deleteTodoInstances()
|
pure virtual |
Delete all to-dos that are instances of recurring to-do todo
.
- Parameters
-
todo is a pointer to a deleted Todo
- Returns
- true if delete was successful; false otherwise
Implemented in KCalendarCore::MemoryCalendar.
◆ deletionTracking()
|
protected |
Returns if deletion tracking is enabled.
Default is true.
- Since
- 4.11
Definition at line 1340 of file calendar.cpp.
◆ doSetTimeZone()
|
protectedvirtual |
Let Calendar subclasses set the time specification.
- Parameters
-
timeZone is the time specification (time zone, etc.) for viewing Incidence dates.
Reimplemented in KCalendarCore::MemoryCalendar.
Definition at line 1061 of file calendar.cpp.
◆ duplicates()
|
virtual |
List all possible duplicate incidences.
- Parameters
-
incidence is the incidence to check.
- Returns
- a list of duplicate incidences.
Definition at line 310 of file calendar.cpp.
◆ endBatchAdding()
|
virtual |
Tells the Calendar that you stopped adding a batch of incidences.
- See also
- startBatchAdding()
Reimplemented in Akonadi::CalendarBase.
Definition at line 1325 of file calendar.cpp.
◆ endChange()
|
virtual |
Flag that a change to a Calendar Incidence has completed.
- Parameters
-
incidence is a pointer to the Incidence that was changed.
Definition at line 1194 of file calendar.cpp.
◆ event()
|
pure virtual |
Returns the Event associated with the given unique identifier.
- Parameters
-
uid is a unique identifier string. recurrenceId is possible recurrenceId of event, default is null
Implemented in KCalendarCore::MemoryCalendar.
◆ eventInstances()
|
pure virtual |
Returns a sorted, unfiltered list of all possible instances for this recurring Event.
- Parameters
-
event event to check for. Caller guarantees it's of type Event. sortField specifies the EventSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered event instances sorted as specified.
Implemented in KCalendarCore::MemoryCalendar.
◆ events() [1/4]
Event::List Calendar::events | ( | const QDate & | date, |
const QTimeZone & | timeZone = {} , |
||
EventSortField | sortField = EventSortUnsorted , |
||
SortDirection | sortDirection = SortDirectionAscending |
||
) | const |
Returns a sorted, filtered list of all Events which occur on the given date.
The Events are sorted according to sortField and sortDirection.
- Parameters
-
date request filtered Event list for this QDate only. timeZone time zone to interpret start
andend
, or the calendar's default time zone if none is specifiedsortField specifies the EventSortField. sortDirection specifies the SortDirection.
- Returns
- the list of sorted, filtered Events occurring on date.
Definition at line 526 of file calendar.cpp.
◆ events() [2/4]
Event::List Calendar::events | ( | const QDate & | start, |
const QDate & | end, | ||
const QTimeZone & | timeZone = {} , |
||
bool | inclusive = false |
||
) | const |
Returns a filtered list of all Events occurring within a date range.
- Parameters
-
start is the starting date. end is the ending date. timeZone time zone to interpret start
andend
, or the calendar's default time zone if none is specifiedinclusive if true only Events which are completely included within the date range are returned.
- Returns
- the list of filtered Events occurring within the specified date range.
Definition at line 540 of file calendar.cpp.
◆ events() [3/4]
Event::List Calendar::events | ( | const QDateTime & | dt | ) | const |
Returns a filtered list of all Events which occur on the given timestamp.
- Returns
- the list of filtered Events occurring on the specified timestamp.
Definition at line 533 of file calendar.cpp.
◆ events() [4/4]
|
virtual |
Returns a sorted, filtered list of all Events for this Calendar.
- Parameters
-
sortField specifies the EventSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all filtered Events sorted as specified.
Definition at line 547 of file calendar.cpp.
◆ filter()
CalFilter * Calendar::filter | ( | ) | const |
◆ filterChanged
|
signal |
Emitted when setFilter() is called.
- Since
- 4.11
◆ hasValidNotebook()
bool Calendar::hasValidNotebook | ( | const QString & | notebook | ) | const |
Check if calendar knows about the given notebook.
This means that it will be saved by one of the attached storages.
- Parameters
-
notebook notebook uid
- Returns
- true if calendar has valid notebook
Definition at line 376 of file calendar.cpp.
◆ icon()
QIcon KCalendarCore::Calendar::icon | ( | ) | const |
This calendar's icon.
- Since
- 5.85
- See also
- setIconName()
◆ iconChanged
|
signal |
Emitted when the icon name changes.
- Since
- 5.85
- See also
- icon()
◆ id()
QString KCalendarCore::Calendar::id | ( | ) | const |
◆ idChanged
|
signal |
Emitted when the id changes.
- Since
- 5.85
- See also
- id()
◆ incidence()
Incidence::Ptr Calendar::incidence | ( | const QString & | uid, |
const QDateTime & | recurrenceId = {} |
||
) | const |
Returns the Incidence associated with the given unique identifier.
- Parameters
-
uid is a unique identifier string. recurrenceId is possible recurrenceid of incidence, default is null
Definition at line 615 of file calendar.cpp.
◆ incidenceFromSchedulingID()
|
virtual |
Returns the Incidence associated with the given scheduling identifier.
- Parameters
-
sid is a unique scheduling identifier string.
Definition at line 657 of file calendar.cpp.
◆ incidences() [1/3]
|
virtual |
Returns a filtered list of all Incidences for this Calendar.
- Returns
- the list of all filtered Incidences.
Definition at line 280 of file calendar.cpp.
◆ incidences() [2/3]
|
virtual |
Returns a filtered list of all Incidences which occur on the given date.
- Returns
- the list of filtered Incidences occurring on the specified date.
Definition at line 275 of file calendar.cpp.
◆ incidences() [3/3]
|
virtual |
List all notebook incidences in the memory.
- Parameters
-
notebook is the notebook uid.
- Returns
- a list of incidences for the notebook.
Definition at line 473 of file calendar.cpp.
◆ incidencesFromSchedulingID()
|
virtual |
Searches all events and todos for an incidence with this scheduling identifier.
Returns a list of matching results.
- Parameters
-
sid is a unique scheduling identifier string.
Definition at line 647 of file calendar.cpp.
◆ incidenceUpdated()
|
overrideprotectedvirtual |
The Observer interface.
So far not implemented.
- Parameters
-
uid is the UID for the Incidence that has been updated. recurrenceId is possible recurrenceid of incidence.
Implements KCalendarCore::IncidenceBase::IncidenceObserver.
Reimplemented in KCalendarCore::MemoryCalendar.
Definition at line 1043 of file calendar.cpp.
◆ instances()
|
virtual |
Returns an unfiltered list of all exceptions of this recurring incidence.
- Parameters
-
incidence incidence to check
- Returns
- the list of all unfiltered exceptions.
Definition at line 290 of file calendar.cpp.
◆ isAncestorOf()
bool Calendar::isAncestorOf | ( | const Incidence::Ptr & | ancestor, |
const Incidence::Ptr & | incidence | ||
) | const |
Checks if ancestor
is an ancestor of incidence
.
- Parameters
-
ancestor is the incidence we are testing to be an ancestor. incidence is the incidence we are testing to be descended from ancestor
.
Definition at line 938 of file calendar.cpp.
◆ isModified()
bool Calendar::isModified | ( | ) | const |
Determine the calendar's modification status.
- Returns
- true if the calendar has been modified since open or last save.
- See also
- setModified()
Definition at line 1028 of file calendar.cpp.
◆ isSaving()
|
virtual |
Determine if the calendar is currently being saved.
- Returns
- true if the calendar is currently being saved; false otherwise.
Definition at line 1012 of file calendar.cpp.
◆ isVisible() [1/2]
bool Calendar::isVisible | ( | const Incidence::Ptr & | incidence | ) | const |
Check if incidence is visible.
- Parameters
-
incidence is a pointer to the Incidence to check for visibility.
- Returns
- true if incidence is visible, false otherwise
Definition at line 381 of file calendar.cpp.
◆ isVisible() [2/2]
bool Calendar::isVisible | ( | const QString & | notebook | ) | const |
Check if notebook is visible.
- Parameters
-
notebook notebook uid.
- Returns
- true if notebook is visible, false otherwise
Definition at line 398 of file calendar.cpp.
◆ journal()
|
pure virtual |
Returns the Journal associated with the given unique identifier.
- Parameters
-
uid is a unique identifier string. recurrenceId is possible recurrenceId of journal, default is null
Implemented in KCalendarCore::MemoryCalendar.
◆ journalInstances()
|
pure virtual |
Returns a sorted, unfiltered list of all instances for this recurring Journal.
- Parameters
-
journal journal to check for. Caller guarantees it's of type Journal. sortField specifies the JournalSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered journal instances sorted as specified.
Implemented in KCalendarCore::MemoryCalendar.
◆ journals() [1/2]
|
virtual |
Returns a filtered list of all Journals for on the specified date.
- Parameters
-
date request filtered Journals for this QDate only.
- Returns
- the list of filtered Journals for the specified date.
Definition at line 808 of file calendar.cpp.
◆ journals() [2/2]
|
virtual |
Returns a sorted, filtered list of all Journals for this Calendar.
- Parameters
-
sortField specifies the JournalSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all filtered Journals sorted as specified.
Definition at line 801 of file calendar.cpp.
◆ mergeIncidenceList()
|
static |
Create a merged list of Events, Todos, and Journals.
static
- Parameters
-
events is an Event list to merge. todos is a Todo list to merge. journals is a Journal list to merge.
- Returns
- a list of merged Incidences.
Definition at line 1166 of file calendar.cpp.
◆ name()
QString KCalendarCore::Calendar::name | ( | ) | const |
◆ nameChanged
|
signal |
Emitted when the name changes.
- Since
- 5.85
- See also
- name()
◆ notebook() [1/2]
|
virtual |
Get incidence's notebook.
- Parameters
-
incidence incidence
- Returns
- notebook uid
Definition at line 454 of file calendar.cpp.
◆ notebook() [2/2]
Get incidence's notebook.
- Parameters
-
uid is a unique identifier string
- Returns
- notebook uid
Definition at line 463 of file calendar.cpp.
◆ notebooks()
|
virtual |
List all uids of notebooks currently in the memory.
- Returns
- list of uids of notebooks
Definition at line 468 of file calendar.cpp.
◆ notifyIncidenceAboutToBeDeleted()
|
protected |
Let Calendar subclasses notify that they will remove an Incidence.
- Parameters
-
incidence is a pointer to the Incidence object that will be removed.
Definition at line 1105 of file calendar.cpp.
◆ notifyIncidenceAdded()
|
protected |
Let Calendar subclasses notify that they inserted an Incidence.
- Parameters
-
incidence is a pointer to the Incidence object that was inserted.
Definition at line 1066 of file calendar.cpp.
◆ notifyIncidenceAdditionCanceled()
|
protected |
Let Calendar subclasses notify that they canceled addition of an Incidence.
- Parameters
-
incidence is a pointer to the Incidence object that addition as canceled.
Definition at line 1135 of file calendar.cpp.
◆ notifyIncidenceChanged()
|
protected |
Let Calendar subclasses notify that they modified an Incidence.
- Parameters
-
incidence is a pointer to the Incidence object that was modified.
Definition at line 1090 of file calendar.cpp.
◆ notifyIncidenceDeleted()
|
protected |
Let Calendar subclasses notify that they removed an Incidence.
- Parameters
-
incidence is a pointer to the Incidence object that has been removed.
Definition at line 1120 of file calendar.cpp.
◆ owner()
Person KCalendarCore::Calendar::owner | ( | ) | const |
◆ ownerChanged
|
signal |
Emitted when the owner changes.
- Since
- 5.85
- See also
- owner()
◆ productId()
QString KCalendarCore::Calendar::productId | ( | ) | const |
Returns the calendar's Product ID.
- See also
- setProductId()
◆ rawEvents() [1/2]
|
pure virtual |
Returns an unfiltered list of all Events occurring within a date range.
- Parameters
-
start is the starting date end is the ending date timeZone time zone to interpret start
andend
, or the calendar's default time zone if none is specifiedinclusive if true only Events which are completely included within the date range are returned.
- Returns
- the list of unfiltered Events occurring within the specified date range.
Implemented in KCalendarCore::MemoryCalendar.
◆ rawEvents() [2/2]
|
pure virtual |
Returns a sorted, unfiltered list of all Events for this Calendar.
- Parameters
-
sortField specifies the EventSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered Events sorted as specified.
Implemented in KCalendarCore::MemoryCalendar.
◆ rawEventsForDate() [1/2]
|
pure virtual |
Returns a sorted, unfiltered list of all Events which occur on the given date.
The Events are sorted according to sortField and sortDirection.
- Parameters
-
date request unfiltered Event list for this QDate only timeZone time zone to interpret date
, or the calendar's default time zone if none is specifiedsortField specifies the EventSortField sortDirection specifies the SortDirection
- Returns
- the list of sorted, unfiltered Events occurring on
date
Implemented in KCalendarCore::MemoryCalendar.
◆ rawEventsForDate() [2/2]
|
pure virtual |
Returns an unfiltered list of all Events which occur on the given timestamp.
- Returns
- the list of unfiltered Events occurring on the specified timestamp.
- Deprecated:
- since 5.95 use rawEventsForDate(dt.date(), dt.timeZone()) overload instead.
Implemented in KCalendarCore::MemoryCalendar.
◆ rawIncidences()
|
virtual |
Returns an unfiltered list of all Incidences for this Calendar.
- Returns
- the list of all unfiltered Incidences.
Definition at line 285 of file calendar.cpp.
◆ rawJournals()
|
pure virtual |
Returns a sorted, unfiltered list of all Journals for this Calendar.
- Parameters
-
sortField specifies the JournalSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered Journals sorted as specified.
Implemented in KCalendarCore::MemoryCalendar.
◆ rawJournalsForDate()
|
pure virtual |
Returns an unfiltered list of all Journals for on the specified date.
- Parameters
-
date request unfiltered Journals for this QDate only.
- Returns
- the list of unfiltered Journals for the specified date.
Implemented in KCalendarCore::MemoryCalendar.
◆ rawTodos() [1/2]
|
pure virtual |
Returns an unfiltered list of all Todos occurring within a date range.
- Parameters
-
start is the starting date end is the ending date timeZone time zone to interpret start
andend
, or the calendar's default time zone if none is specifiedinclusive if true only Todos which are completely included within the date range are returned.
- Returns
- the list of unfiltered Todos occurring within the specified date range.
Implemented in KCalendarCore::MemoryCalendar.
◆ rawTodos() [2/2]
|
pure virtual |
Returns a sorted, unfiltered list of all Todos for this Calendar.
- Parameters
-
sortField specifies the TodoSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered Todos sorted as specified.
Implemented in KCalendarCore::MemoryCalendar.
◆ rawTodosForDate()
|
pure virtual |
Returns an unfiltered list of all Todos which due on the specified date.
- Parameters
-
date request unfiltered Todos due on this QDate.
- Returns
- the list of unfiltered Todos due on the specified date.
Implemented in KCalendarCore::MemoryCalendar.
◆ registerObserver()
void Calendar::registerObserver | ( | CalendarObserver * | observer | ) |
Registers an Observer for this Calendar.
- Parameters
-
observer is a pointer to an Observer object that will be watching this Calendar.
- See also
- unregisterObserver()
Definition at line 990 of file calendar.cpp.
◆ relations()
Incidence::List Calendar::relations | ( | const QString & | uid | ) | const |
Returns a list of incidences that have a relation of RELTYPE parent to incidence uid
.
- Parameters
-
uid The parent identifier whose children we want to obtain.
Definition at line 949 of file calendar.cpp.
◆ reload()
|
virtual |
Loads the calendar contents from storage.
This requires that the calendar has been previously loaded (initialized).
- Returns
- true if the reload was successful; otherwise false. Base implementation returns true.
Definition at line 1038 of file calendar.cpp.
◆ removeRelations()
|
virtual |
Removes all Relations from an Incidence.
- Parameters
-
incidence is a pointer to the Incidence to have a Relation removed.
Definition at line 864 of file calendar.cpp.
◆ save()
|
virtual |
Syncs changes in memory to persistent storage.
- Returns
- true if the save was successful; false otherwise. Base implementation returns true.
Definition at line 1033 of file calendar.cpp.
◆ setAccessMode()
void Calendar::setAccessMode | ( | const AccessMode | mode | ) |
Set this calendar's AccessMode, i.e.
whether it is writable or read-only.
- Since
- 5.85
- See also
- accessMode()
Definition at line 1399 of file calendar.cpp.
◆ setDefaultNotebook()
bool Calendar::setDefaultNotebook | ( | const QString & | notebook | ) |
set DefaultNotebook information to calendar.
- Parameters
-
notebook notebook uid
- Returns
- true if operation was successful; false otherwise.
Definition at line 361 of file calendar.cpp.
◆ setDeletionTracking()
|
protected |
Enables or disabled deletion tracking.
Default is true.
- Since
- 4.11
Definition at line 1335 of file calendar.cpp.
◆ setFilter()
void Calendar::setFilter | ( | CalFilter * | filter | ) |
◆ setIcon()
void Calendar::setIcon | ( | const QIcon & | icon | ) |
◆ setId()
void Calendar::setId | ( | const QString & | id | ) |
set a unique identifier for this calendar.
- Since
- 5.85
- See also
- id()
Definition at line 1362 of file calendar.cpp.
◆ setModified()
void Calendar::setModified | ( | bool | modified | ) |
Sets if the calendar has been modified.
- Parameters
-
modified is true if the calendar has been modified since open or last save.
- See also
- isModified()
Definition at line 1017 of file calendar.cpp.
◆ setName()
void Calendar::setName | ( | const QString & | name | ) |
Set the user-visible name for this calendar.
- Since
- 5.85
- See also
- name()
Definition at line 1375 of file calendar.cpp.
◆ setNotebook()
|
virtual |
Associate notebook for an incidence.
- Parameters
-
incidence incidence notebook notebook uid
- Returns
- true if the operation was successful; false otherwise.
Definition at line 411 of file calendar.cpp.
◆ setObserversEnabled()
|
protected |
Let Calendar subclasses notify that they enabled an Observer.
- Parameters
-
enabled if true tells the calendar that a subclass has enabled an Observer.
Definition at line 1200 of file calendar.cpp.
◆ setOwner()
void Calendar::setOwner | ( | const Person & | owner | ) |
Sets the owner of the calendar to owner
.
- Parameters
-
owner is a Person object. Must be a non-null pointer.
- See also
- owner()
Definition at line 169 of file calendar.cpp.
◆ setProductId()
void Calendar::setProductId | ( | const QString & | id | ) |
Sets the calendar Product ID to id
.
- Parameters
-
id is a string containing the Product ID.
- See also
- productId() const
Definition at line 1155 of file calendar.cpp.
◆ setTimeZone()
void Calendar::setTimeZone | ( | const QTimeZone & | timeZone | ) |
Sets the default time specification zone used for creating or modifying incidences in the Calendar.
- Parameters
-
timeZone The time zone
Definition at line 178 of file calendar.cpp.
◆ setTimeZoneId()
void Calendar::setTimeZoneId | ( | const QByteArray & | timeZoneId | ) |
Sets the time zone ID used for creating or modifying incidences in the Calendar.
This method has no effect on existing incidences.
- Parameters
-
timeZoneId is a string containing a time zone ID, which is assumed to be valid. The time zone ID is used to set the time zone for viewing Incidence date/times. If no time zone is found, the viewing time specification is set to local time zone. Example: "Europe/Berlin"
- See also
- setTimeZone()
Definition at line 194 of file calendar.cpp.
◆ setupRelations()
|
virtual |
Setup Relations for an Incidence.
- Parameters
-
incidence is a pointer to the Incidence to have a Relation setup.
Definition at line 817 of file calendar.cpp.
◆ shiftTimes()
Shifts the times of all incidences so that they appear at the same clock time as before but in a new time zone.
The shift is done from a viewing time zone rather than from the actual incidence time zone.
For example, shifting an incidence whose start time is 09:00 America/New York, using an old viewing time zone (oldSpec
) of Europe/London, to a new time zone (newSpec
) of Europe/Paris, will result in the time being shifted from 14:00 (which is the London time of the incidence start) to 14:00 Paris time.
- Parameters
-
oldZone the time zone which provides the clock times newZone the new time zone
Definition at line 220 of file calendar.cpp.
◆ sortEvents()
|
static |
Sort a list of Events.
static
- Parameters
-
eventList is a pointer to a list of Events. sortField specifies the EventSortField. sortDirection specifies the SortDirection.
- Returns
- a list of Events sorted as specified.
Definition at line 483 of file calendar.cpp.
◆ sortJournals()
|
static |
Sort a list of Journals.
static
- Parameters
-
journalList is a pointer to a list of Journals. sortField specifies the JournalSortField. sortDirection specifies the SortDirection.
- Returns
- a list of Journals sorted as specified.
Definition at line 769 of file calendar.cpp.
◆ sortTodos()
|
static |
Sort a list of Todos.
static
- Parameters
-
todoList is a pointer to a list of Todos. sortField specifies the TodoSortField. sortDirection specifies the SortDirection.
- Returns
- a list of Todos sorted as specified.
Definition at line 669 of file calendar.cpp.
◆ startBatchAdding()
|
virtual |
Call this to tell the calendar that you're adding a batch of incidences.
So it doesn't, for example, ask the destination for each incidence.
- See also
- endBatchAdding()
Reimplemented in Akonadi::CalendarBase.
Definition at line 1320 of file calendar.cpp.
◆ timeZone()
QTimeZone Calendar::timeZone | ( | ) | const |
Get the time zone used for creating or modifying incidences in the Calendar.
- Returns
- time specification
Definition at line 189 of file calendar.cpp.
◆ timeZoneId()
QByteArray Calendar::timeZoneId | ( | ) | const |
Returns the time zone ID used for creating or modifying incidences in the calendar.
- Returns
- the string containing the time zone ID, or empty string if the creation/modification time specification is not a time zone.
Definition at line 215 of file calendar.cpp.
◆ todo()
|
pure virtual |
Returns the Todo associated with the given unique identifier.
- Parameters
-
uid is a unique identifier string. recurrenceId is possible recurrenceId of todo, default is null
Implemented in KCalendarCore::MemoryCalendar.
◆ todoInstances()
|
pure virtual |
Returns a sorted, unfiltered list of all possible instances for this recurring Todo.
- Parameters
-
todo todo to check for. Caller guarantees it's of type Todo. sortField specifies the TodoSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all unfiltered todo instances sorted as specified.
Implemented in KCalendarCore::MemoryCalendar.
◆ todos() [1/3]
|
virtual |
Returns a filtered list of all Todos which are due on the specified date.
- Parameters
-
date request filtered Todos due on this QDate.
- Returns
- the list of filtered Todos due on the specified date.
Definition at line 754 of file calendar.cpp.
◆ todos() [2/3]
|
virtual |
Returns a filtered list of all Todos occurring within a date range.
- Parameters
-
start is the starting date end is the ending date timeZone time zone to interpret start
andend
, or the calendar's default time zone if none is specifiedinclusive if true only Todos which are completely included within the date range are returned.
- Returns
- the list of filtered Todos occurring within the specified date range.
Definition at line 761 of file calendar.cpp.
◆ todos() [3/3]
|
virtual |
Returns a sorted, filtered list of all Todos for this Calendar.
- Parameters
-
sortField specifies the TodoSortField. sortDirection specifies the SortDirection.
- Returns
- the list of all filtered Todos sorted as specified.
Definition at line 747 of file calendar.cpp.
◆ unregisterObserver()
void Calendar::unregisterObserver | ( | CalendarObserver * | observer | ) |
Unregisters an Observer for this Calendar.
- Parameters
-
observer is a pointer to an Observer object that has been watching this Calendar.
- See also
- registerObserver()
Definition at line 1003 of file calendar.cpp.
◆ updateNotebook()
bool Calendar::updateNotebook | ( | const QString & | notebook, |
bool | isVisible | ||
) |
Update notebook information in calendar.
Is usually called by storages only.
- Parameters
-
notebook notebook uid isVisible notebook visibility
- Returns
- true if operation succeeded
- See also
- isVisible()
Definition at line 335 of file calendar.cpp.
◆ virtual_hook()
|
protectedvirtual |
Reimplemented in KCalendarCore::MemoryCalendar.
Definition at line 1350 of file calendar.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu May 19 2022 03:57:22 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.