Akonadi::ETMCalendar
#include <etmcalendar.h>

Public Types | |
enum | CollectionColumn { CollectionTitle = 0, CollectionColumnCount } |
using | Ptr = QSharedPointer< ETMCalendar > |
![]() | |
using | Ptr = QSharedPointer< CalendarBase > |
![]() | |
typedef QSharedPointer< MemoryCalendar > | Ptr |
![]() | |
typedef QSharedPointer< Calendar > | Ptr |
Signals | |
void | calendarChanged () |
void | collectionChanged (const Akonadi::Collection &collection, const QSet< QByteArray > &attributeNames) |
void | collectionsAdded (const Akonadi::Collection::List &collection) |
void | collectionsRemoved (const Akonadi::Collection::List &collection) |
![]() | |
void | createFinished (bool success, const QString &errorMessage) |
void | deleteFinished (bool success, const QString &errorMessage) |
void | modifyFinished (bool success, const QString &errorMessage) |
![]() | |
void | accessModeChanged () |
void | filterChanged () |
void | iconChanged () |
void | idChanged () |
void | isLoadingChanged () |
void | nameChanged () |
void | ownerChanged () |
Additional Inherited Members | |
![]() | |
objectName | |
![]() | |
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 Event::List | sortEvents (Event::List &&eventList, EventSortField sortField, SortDirection sortDirection) |
static Journal::List | sortJournals (const Journal::List &journalList, JournalSortField sortField, SortDirection sortDirection) |
static Journal::List | sortJournals (Journal::List &&journalList, JournalSortField sortField, SortDirection sortDirection) |
static Todo::List | sortTodos (const Todo::List &todoList, TodoSortField sortField, SortDirection sortDirection) |
static Todo::List | sortTodos (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) |
![]() | |
typedef | QObjectList |
![]() | |
CalendarBase (CalendarBasePrivate *const d, QObject *parent) | |
![]() | |
void | virtual_hook (int id, void *data) override |
![]() | |
void | appendAlarms (Alarm::List &alarms, const Incidence::Ptr &incidence, const QDateTime &from, const QDateTime &to) const |
void | appendRecurringAlarms (Alarm::List &alarms, const Incidence::Ptr &incidence, const QDateTime &from, const QDateTime &to) const |
void | customPropertyUpdated () override |
bool | deletionTracking () const |
void | notifyIncidenceAboutToBeDeleted (const Incidence::Ptr &incidence) |
void | notifyIncidenceAdded (const Incidence::Ptr &incidence) |
void | notifyIncidenceAdditionCanceled (const Incidence::Ptr &incidence) |
void | notifyIncidenceChanged (const Incidence::Ptr &incidence) |
void | notifyIncidenceDeleted (const Incidence::Ptr &incidence) |
void | setDeletionTracking (bool enable) |
void | setIsLoading (bool isLoading) |
void | setObserversEnabled (bool enabled) |
![]() | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
virtual void | customPropertyUpdate () |
![]() | |
const std::unique_ptr< CalendarBasePrivate > | d_ptr |
Detailed Description
A KCalendarCore::Calendar that uses an EntityTreeModel to populate itself.
All non-idempotent KCalendarCore::Calendar methods interact with Akonadi. If you need a need a non-persistent calendar use FetchJobCalendar.
ETMCalendar allows to be populated with only a subset of your calendar items, by using a KCheckableProxyModel to specify which collections to be used and/or by setting a KCalendarCore::CalFilter.
- See also
- FetchJobCalendar
- CalendarBase
- Since
- 4.11
Definition at line 40 of file etmcalendar.h.
Constructor & Destructor Documentation
◆ ETMCalendar() [1/3]
|
explicit |
Constructs a new ETMCalendar.
Loading begins immediately, asynchronously.
Definition at line 418 of file etmcalendar.cpp.
◆ ETMCalendar() [2/3]
|
explicit |
Constructs a new ETMCalendar that will only load the specified mime types.
Use this ctor to ignore journals or to-dos for example. If no mime types are specified, all mime types will be used.
Definition at line 425 of file etmcalendar.cpp.
◆ ETMCalendar() [3/3]
|
explicit |
Constructs a new ETMCalendar.
This overload exists for optimization reasons, it allows to share an EntityTreeModel across several ETMCalendars to save memory.
Usually when having many ETMCalendars, the only bit that's different is the collection selection. The memory hungry EntityTreeModel is the same, so should be shared.
- Parameters
-
calendar an existing ETMCalendar who's EntityTreeModel is to be used.
- Since
- 4.13
Definition at line 433 of file etmcalendar.cpp.
◆ ~ETMCalendar()
|
overridedefault |
Destroys this ETMCalendar.
Member Function Documentation
◆ alarms()
|
overridevirtual |
Returns all alarms occurring in a specified time interval.
- Parameters
-
from start date of interval to end data of interval excludeBlockedAlarms if true, alarms belonging to blocked collections aren't returned.
Reimplemented from KCalendarCore::MemoryCalendar.
Definition at line 499 of file etmcalendar.cpp.
◆ calendarChanged
|
signal |
Emitted whenever an Item is inserted, removed or modified.
◆ checkableProxyModel()
KCheckableProxyModel * ETMCalendar::checkableProxyModel | ( | ) | const |
Returns the KCheckableProxyModel used to select from which collections should the calendar be populated from.
Definition at line 493 of file etmcalendar.cpp.
◆ collection()
Akonadi::Collection ETMCalendar::collection | ( | Akonadi::Collection::Id | id | ) | const |
Returns the collection having id
.
Use this instead of creating a new collection, the returned collection will have the correct right, name, display name, etc all set.
Definition at line 467 of file etmcalendar.cpp.
◆ collectionChanged
|
signal |
This signal is emitted if a collection has been changed (properties or attributes).
- Parameters
-
collection The changed collection. attributeNames The names of the collection attributes that have been changed.
◆ collectionFilteringEnabled()
bool ETMCalendar::collectionFilteringEnabled | ( | ) | const |
Returns whether collection filtering is enabled.
Default is true.
- See also
- setCollectionFilteringEnabled()
Definition at line 574 of file etmcalendar.cpp.
◆ collectionsAdded
|
signal |
This signal is emitted when one or more collections are added to the ETM.
- Parameters
-
collection non empty list of collections
◆ collectionsRemoved
|
signal |
This signal is emitted when one or more collections are deleted from the ETM.
- Parameters
-
collection non empty list of collections
◆ entityTreeModel()
Akonadi::EntityTreeModel * ETMCalendar::entityTreeModel | ( | ) | const |
Returns the underlying EntityTreeModel.
For most uses, you'll want model() or the KCalendarCore::Calendar interface instead.
It contains every item and collection with calendar mime type, doesn't have KCalendarCore filtering and doesn't honour any collection selection.
This method is exposed for performance reasons only, so you can reuse it, since it's resource savvy.
- See also
- model()
Definition at line 550 of file etmcalendar.cpp.
◆ hasRight() [1/2]
bool ETMCalendar::hasRight | ( | const Akonadi::Item & | item, |
Akonadi::Collection::Right | right | ||
) | const |
Returns true if the collection owning incidence has
righ right
.
Definition at line 478 of file etmcalendar.cpp.
◆ hasRight() [2/2]
bool ETMCalendar::hasRight | ( | const QString & | uid, |
Akonadi::Collection::Right | right | ||
) | const |
This is an overloaded function.
- Parameters
-
uid the identifier for the incidence to check for rights right the access right to check for
- See also
- hasRight()
Definition at line 473 of file etmcalendar.cpp.
◆ model()
QAbstractItemModel * ETMCalendar::model | ( | ) | const |
Convenience method to access the contents of this KCalendarCore::Calendar through a QAIM interface.
Like through calendar interface, the model only items of selected collections. To select or unselect collections, see checkableProxyModel().
Definition at line 487 of file etmcalendar.cpp.
◆ setCollectionFilteringEnabled()
void ETMCalendar::setCollectionFilteringEnabled | ( | bool | enable | ) |
Enable or disable collection filtering.
If true, the calendar will only contain items of selected collections.
- Parameters
-
enable enables collection filtering if set as true
Definition at line 556 of file etmcalendar.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 22 2023 03:51:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.