Akonadi Calendar
etmcalendar.cpp
83 connect(mETM.data(), &EntityTreeModel::collectionPopulated, this, &ETMCalendarPrivate::onCollectionPopulated);
84 connect(mETM.data(), &QAbstractItemModel::rowsInserted, this, &ETMCalendarPrivate::onRowsInserted);
85 connect(mETM.data(), &QAbstractItemModel::dataChanged, this, &ETMCalendarPrivate::onDataChanged);
87 connect(mETM.data(), &QAbstractItemModel::rowsRemoved, this, &ETMCalendarPrivate::onRowsRemoved);
89 connect(mFilteredETM, &QAbstractItemModel::dataChanged, this, &ETMCalendarPrivate::onDataChangedInFilteredModel);
90 connect(mFilteredETM, &QAbstractItemModel::layoutChanged, this, &ETMCalendarPrivate::onLayoutChangedInFilteredModel);
91 connect(mFilteredETM, &QAbstractItemModel::modelReset, this, &ETMCalendarPrivate::onModelResetInFilteredModel);
92 connect(mFilteredETM, &QAbstractItemModel::rowsInserted, this, &ETMCalendarPrivate::onRowsInsertedInFilteredModel);
93 connect(mFilteredETM, &QAbstractItemModel::rowsAboutToBeRemoved, this, &ETMCalendarPrivate::onRowsAboutToBeRemovedInFilteredModel);
99 void ETMCalendarPrivate::onCollectionChanged(const Akonadi::Collection &collection, const QSet<QByteArray> &attributeNames)
210 Akonadi::Item::List ETMCalendarPrivate::itemsFromModel(const QAbstractItemModel *model, const QModelIndex &parentIndex, int start, int end)
232 Akonadi::Collection::List ETMCalendarPrivate::collectionsFromModel(const QAbstractItemModel *model, const QModelIndex &parentIndex, int start, int end)
256 item.setParentCollection(idx.data(Akonadi::EntityTreeModel::ParentCollectionRole).value<Akonadi::Collection>());
286 const Akonadi::Collection::List collections = collectionsFromModel(mETM.data(), index, start, end);
306 const Akonadi::Collection::List collections = collectionsFromModel(mETM.data(), index, start, end);
316 void ETMCalendarPrivate::onDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
330 void ETMCalendarPrivate::onRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destinationParent, int destinationRow)
352 void ETMCalendarPrivate::onDataChangedInFilteredModel(const QModelIndex &topLeft, const QModelIndex &bottomRight)
377 IncidenceBase::Ptr existingIncidence = q->incidence(newIncidence->uid(), newIncidence->recurrenceId());
380 // We don't know about this one because it was discarded, for example because of not having DTSTART
388 // We set the payload so that the internal incidence pointer and the one in mItemById stay the same
390 updatedItem.setPayload<KCalendarCore::Incidence::Ptr>(existingIncidence.staticCast<KCalendarCore::Incidence>());
398 // The item changed it's UID, update our maps, the Google resource changes the UID when we create incidences.
403 void ETMCalendarPrivate::onRowsInsertedInFilteredModel(const QModelIndex &index, int start, int end)
408 void ETMCalendarPrivate::onRowsAboutToBeRemovedInFilteredModel(const QModelIndex &index, int start, int end)
453 qOverload<const Akonadi::Collection &, const QSet<QByteArray> &>(&Akonadi::Monitor::collectionChanged),
499 KCalendarCore::Alarm::List ETMCalendar::alarms(const QDateTime &from, const QDateTime &to, bool excludeBlockedAlarms) const
bool isValid() const
Incidence::Ptr incidence(const QString &uid, const QDateTime &recurrenceId={}) const
ItemListHeaders
void appendAlarms(Alarm::List &alarms, const Incidence::Ptr &incidence, const QDateTime &from, const QDateTime &to) const
bool collectionFilteringEnabled() const
Returns whether collection filtering is enabled.
Definition: etmcalendar.cpp:574
bool isEverythingBlocked() const
Returns whether all alarms are blocked or not.
Definition: blockalarmsattribute.cpp:79
void modelReset()
QString number(int n, int base)
AKONADICORE_EXPORT Collection fromIndex(const QModelIndex &index)
virtual int rowCount(const QModelIndex &parent) const const=0
CaseInsensitive
QModelIndex sibling(int row, int column) const const
void collectionChanged(const Akonadi::Collection &collection)
virtual void setModel(QAbstractItemModel *model) override
CanChangeItem
QVector::iterator begin()
static QLatin1String todoMimeType()
int column() const const
T value() const const
void layoutChanged(const QList< QPersistentModelIndex > &parents, QAbstractItemModel::LayoutChangeHint hint)
Q_SCRIPTABLE Q_NOREPLY void start()
KCheckableProxyModel * checkableProxyModel() const
Returns the KCheckableProxyModel used to select from which collections should the calendar be populat...
Definition: etmcalendar.cpp:493
void setParentCollection(const Collection &parent)
Id id() const
void push_back(const T &value)
KCalendarCore::Alarm::List alarms(const QDateTime &from, const QDateTime &to, bool excludeBlockedAlarms=false) const override
Returns all alarms occurring in a specified time interval.
Definition: etmcalendar.cpp:499
void fetchFullPayload(bool fetch=true)
AKONADI_CALENDAR_EXPORT KCalendarCore::Incidence::Ptr incidence(const Akonadi::Item &item)
Returns the incidence from an Akonadi item, or a null pointer if the item has no such payload.
Definition: calendarutils.cpp:26
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool hasPayload() const
bool hasAttribute() const
void collectionPopulated(Akonadi::Collection::Id collectionId)
void reserve(int alloc)
void rowsMoved(const QModelIndex &parent, int start, int end, const QModelIndex &destination, int row)
QVariant data(int role) const const
Collection::Id storageCollectionId() const
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector< int > &roles)
QHashIterator::Item next()
static QLatin1String eventMimeType()
A KCalendarCore::Calendar that uses an EntityTreeModel to populate itself.
Definition: etmcalendar.h:40
const T * attribute() const
void appendRecurringAlarms(Alarm::List &alarms, const Incidence::Ptr &incidence, const QDateTime &from, const QDateTime &to) const
void setCollectionFilteringEnabled(bool enable)
Enable or disable collection filtering.
Definition: etmcalendar.cpp:556
bool isEmpty() const const
Akonadi::Collection collection(Akonadi::Collection::Id) const
Returns the collection having id.
Definition: etmcalendar.cpp:467
Rights rights() const
bool isValid() const const
static Collection root()
bool contains(const T &value) const const
NeedsAction
void show()
bool hasNext() const const
int row() const const
void rowsAboutToBeRemoved(const QModelIndex &parent, int first, int last)
QVector::iterator end()
static QLatin1String journalMimeType()
QAction * clear(const QObject *recvr, const char *slot, QObject *parent)
Id id() const
void rowsInserted(const QModelIndex &parent, int first, int last)
void rowsRemoved(const QModelIndex &parent, int first, int last)
Akonadi::EntityTreeModel * entityTreeModel() const
Returns the underlying EntityTreeModel.
Definition: etmcalendar.cpp:550
bool hasRight(const Akonadi::Item &item, Akonadi::Collection::Right right) const
Returns true if the collection owning incidence has righ right.
Definition: etmcalendar.cpp:478
QVector::iterator erase(QVector::iterator begin, QVector::iterator end)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
QAbstractItemModel * model() const
Convenience method to access the contents of this KCalendarCore::Calendar through a QAIM interface.
Definition: etmcalendar.cpp:487
bool isValid() const
void setPayload(const T &p)
An Attribute that marks that alarms from a calendar collection are blocked.
Definition: blockalarmsattribute.h:31
T payload() const
Akonadi::Item item(const QString &uid) const
Returns the Item containing the incidence with uid uid or an invalid Item if the incidence isn't foun...
Definition: calendarbase.cpp:407
ParentCollectionRole
qint64 Id
const QList< QKeySequence > & end()
Q_D(Todo)
FreeBusyManager::Singleton.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 03:52:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 03:52:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.