kalarm
#include <akonadimodel.h>
Inherits EntityTreeModel.
Classes | |
struct | Event |
Public Types | |
enum | { TimeColumn = 0, TimeToColumn, RepeatColumn, ColourColumn, TypeColumn, TextColumn, TemplateNameColumn, ColumnCount } |
enum | { EnabledTypesRole = UserRole, BaseColourRole, AlarmTypeRole, IsStandardRole, KeepFormatRole, EnabledRole, StatusRole, AlarmActionsRole, AlarmSubActionRole, ValueRole, SortRole, CommandErrorRole } |
enum | Change { Added, Deleted, Invalidated, Enabled, ReadOnly, AlarmTypes, WrongType, Location, Colour } |
typedef QList< Event > | EventList |
Signals | |
void | collectionAdded (const Akonadi::Collection &) |
void | collectionDeleted (Akonadi::Collection::Id, bool status=true) |
void | collectionModified (Akonadi::Collection::Id, bool status=true) |
void | collectionStatusChanged (const Akonadi::Collection &, AkonadiModel::Change, const QVariant &newValue, bool inserted) |
void | eventChanged (const AkonadiModel::Event &) |
void | eventsAdded (const AkonadiModel::EventList &) |
void | eventsToBeRemoved (const AkonadiModel::EventList &) |
void | itemDone (Akonadi::Item::Id, bool status=true) |
void | migrationCompleted () |
Public Member Functions | |
bool | addEvent (KAEvent &, Akonadi::Collection &) |
bool | addEvents (const KAEvent::List &, Akonadi::Collection &) |
QColor | backgroundColor (Akonadi::Collection &) const |
Akonadi::Collection | collection (const KAEvent &e) const |
Akonadi::Collection | collectionById (Akonadi::Collection::Id) const |
Akonadi::Collection | collectionForItem (Akonadi::Item::Id) const |
QModelIndex | collectionIndex (Akonadi::Collection::Id id) const |
QModelIndex | collectionIndex (const Akonadi::Collection &) const |
virtual QVariant | data (const QModelIndex &, int role=Qt::DisplayRole) const |
bool | deleteEvent (const KAEvent &event) |
bool | deleteEvent (Akonadi::Item::Id itemId) |
QString | displayName (Akonadi::Collection &) const |
KAEvent | event (const Akonadi::Item &item) const |
KAEvent | event (Akonadi::Item::Id) const |
KAEvent | event (const QModelIndex &) const |
QModelIndex | eventIndex (const KAEvent &) |
bool | isCollectionBeingDeleted (Akonadi::Collection::Id) const |
bool | isMigrationCompleted () const |
Akonadi::Item | itemById (Akonadi::Item::Id) const |
QModelIndex | itemIndex (Akonadi::Item::Id id) const |
QModelIndex | itemIndex (const Akonadi::Item &) const |
bool | refresh (Akonadi::Collection &) const |
bool | refresh (Akonadi::Item &) const |
void | reload () |
bool | reloadCollection (const Akonadi::Collection &) |
bool | removeCollection (const Akonadi::Collection &) |
void | setBackgroundColor (Akonadi::Collection &, const QColor &) |
virtual bool | setData (const QModelIndex &, const QVariant &value, int role) |
QString | storageType (const Akonadi::Collection &) const |
QString | tooltip (const Akonadi::Collection &, CalEvent::Types) const |
void | updateCommandError (const KAEvent &) |
bool | updateEvent (KAEvent &event) |
bool | updateEvent (Akonadi::Item::Id oldId, KAEvent &newEvent) |
Static Public Member Functions | |
static QColor | foregroundColor (const Akonadi::Collection &, const QStringList &mimeTypes) |
static QSize | iconSize () |
static AkonadiModel * | instance () |
static bool | isCompatible (const Akonadi::Collection &) |
static int | isWritable (const Akonadi::Collection &) |
static int | isWritable (const Akonadi::Collection &, KACalendar::Compat &format) |
static QString | readOnlyTooltip (const Akonadi::Collection &) |
static CalEvent::Types | types (const Akonadi::Collection &) |
Protected Member Functions | |
virtual int | entityColumnCount (HeaderGroup) const |
virtual QVariant | entityHeaderData (int section, Qt::Orientation, int role, HeaderGroup) const |
Detailed Description
Definition at line 48 of file akonadimodel.h.
Member Typedef Documentation
typedef QList<Event> AkonadiModel::EventList |
Definition at line 85 of file akonadimodel.h.
Member Enumeration Documentation
anonymous enum |
Enumerator | |
---|---|
TimeColumn | |
TimeToColumn | |
RepeatColumn | |
ColourColumn | |
TypeColumn | |
TextColumn | |
TemplateNameColumn | |
ColumnCount |
Definition at line 53 of file akonadimodel.h.
anonymous enum |
Enumerator | |
---|---|
EnabledTypesRole | |
BaseColourRole | |
AlarmTypeRole | |
IsStandardRole | |
KeepFormatRole | |
EnabledRole | |
StatusRole | |
AlarmActionsRole | |
AlarmSubActionRole | |
ValueRole | |
SortRole | |
CommandErrorRole |
Definition at line 59 of file akonadimodel.h.
enum AkonadiModel::Change |
Enumerator | |
---|---|
Added | |
Deleted | |
Invalidated | |
Enabled | |
ReadOnly | |
AlarmTypes | |
WrongType | |
Location | |
Colour |
Definition at line 52 of file akonadimodel.h.
Member Function Documentation
bool AkonadiModel::addEvent | ( | KAEvent & | , |
Akonadi::Collection & | |||
) |
Definition at line 1288 of file akonadimodel.cpp.
bool AkonadiModel::addEvents | ( | const KAEvent::List & | , |
Akonadi::Collection & | |||
) |
Definition at line 1271 of file akonadimodel.cpp.
QColor AkonadiModel::backgroundColor | ( | Akonadi::Collection & | collection | ) | const |
Get the background color for a collection and its alarms.
Definition at line 849 of file akonadimodel.cpp.
|
inline |
Definition at line 124 of file akonadimodel.h.
|
signal |
Signal emitted when a collection has been added to the model.
Collection AkonadiModel::collectionById | ( | Akonadi::Collection::Id | ) | const |
Definition at line 1780 of file akonadimodel.cpp.
|
signal |
Collection AkonadiModel::collectionForItem | ( | Akonadi::Item::Id | ) | const |
Definition at line 1813 of file akonadimodel.cpp.
|
inline |
Definition at line 119 of file akonadimodel.h.
QModelIndex AkonadiModel::collectionIndex | ( | const Akonadi::Collection & | ) | const |
|
signal |
|
signal |
Signal emitted when a collection's enabled or read-only status has changed.
- Parameters
-
inserted true if the reason for the change is that the collection has been inserted into the model
|
virtual |
Definition at line 177 of file akonadimodel.cpp.
bool AkonadiModel::deleteEvent | ( | const KAEvent & | event | ) |
Definition at line 1342 of file akonadimodel.cpp.
bool AkonadiModel::deleteEvent | ( | Akonadi::Item::Id | itemId | ) |
QString AkonadiModel::displayName | ( | Akonadi::Collection & | collection | ) | const |
Return the display name for a collection.
Definition at line 871 of file akonadimodel.cpp.
|
protectedvirtual |
Definition at line 621 of file akonadimodel.cpp.
|
protectedvirtual |
Definition at line 637 of file akonadimodel.cpp.
|
inline |
Return the alarm with the specified unique identifier.
- Returns
- the event, or invalid event if no such event exists.
Definition at line 150 of file akonadimodel.h.
KAEvent AkonadiModel::event | ( | Akonadi::Item::Id | ) | const |
KAEvent AkonadiModel::event | ( | const QModelIndex & | index | ) | const |
Definition at line 1208 of file akonadimodel.cpp.
|
signal |
Signal emitted when an event in the model has changed.
QModelIndex AkonadiModel::eventIndex | ( | const KAEvent & | event | ) |
Definition at line 1154 of file akonadimodel.cpp.
|
signal |
Signal emitted when events have been added to the model.
|
signal |
Signal emitted when events are about to be removed from the model.
|
static |
Get the foreground color for a collection, based on specified mime types.
Definition at line 821 of file akonadimodel.cpp.
|
inlinestatic |
Definition at line 199 of file akonadimodel.h.
|
static |
Definition at line 83 of file akonadimodel.cpp.
bool AkonadiModel::isCollectionBeingDeleted | ( | Akonadi::Collection::Id | ) | const |
Definition at line 1069 of file akonadimodel.cpp.
|
static |
Check whether a collection is stored in the current KAlarm calendar format.
Definition at line 1821 of file akonadimodel.cpp.
bool AkonadiModel::isMigrationCompleted | ( | ) | const |
Return whether calendar migration/creation at initialisation has completed.
Definition at line 169 of file akonadimodel.cpp.
|
static |
Return whether a collection is fully writable, i.e.
with create/delete/change rights and compatible with the current KAlarm calendar format.
- Returns
- 1 = fully writable, 0 = writable except that backend calendar is in an old KAlarm format, -1 = read-only or incompatible format.
Definition at line 1830 of file akonadimodel.cpp.
|
static |
Return whether a collection is fully writable, i.e.
with create/delete/change rights and compatible with the current KAlarm calendar format.
- Parameters
-
format Updated to contain the backend calendar storage format. If read-only, = KACalendar::Current; if unknown format, = KACalendar::Incompatible; otherwise = the backend calendar storage format.
- Returns
- 1 = fully writable, 0 = writable except that backend calendar is in an old KAlarm format, -1 = read-only (if
compat
== KACalendar::Current), or incompatible format otherwise.
Definition at line 1836 of file akonadimodel.cpp.
Item AkonadiModel::itemById | ( | Akonadi::Item::Id | ) | const |
Definition at line 1802 of file akonadimodel.cpp.
|
signal |
|
inline |
Definition at line 142 of file akonadimodel.h.
QModelIndex AkonadiModel::itemIndex | ( | const Akonadi::Item & | ) | const |
|
signal |
Signal emitted when calendar migration/creation has completed.
|
static |
Return the read-only status tooltip for a collection.
A null string is returned if the collection is fully writable.
Definition at line 927 of file akonadimodel.cpp.
bool AkonadiModel::refresh | ( | Akonadi::Collection & | collection | ) | const |
Refresh the specified collection instance with up to date data.
Definition at line 1744 of file akonadimodel.cpp.
bool AkonadiModel::refresh | ( | Akonadi::Item & | item | ) | const |
Refresh the specified item instance with up to date data.
Definition at line 1757 of file akonadimodel.cpp.
void AkonadiModel::reload | ( | ) |
Reload all collections' data from Akonadi storage (not from the backend).
Definition at line 1116 of file akonadimodel.cpp.
bool AkonadiModel::reloadCollection | ( | const Akonadi::Collection & | collection | ) |
Reload a collection's data from Akonadi storage (not from the backend).
Definition at line 1103 of file akonadimodel.cpp.
bool AkonadiModel::removeCollection | ( | const Akonadi::Collection & | collection | ) |
Remove a collection from Akonadi.
The calendar file is not removed.
- Returns
- true if a removal job has been scheduled.
Definition at line 1045 of file akonadimodel.cpp.
void AkonadiModel::setBackgroundColor | ( | Akonadi::Collection & | , |
const QColor & | |||
) |
Set the background color for a collection and its alarms.
Definition at line 838 of file akonadimodel.cpp.
|
virtual |
Definition at line 496 of file akonadimodel.cpp.
QString AkonadiModel::storageType | ( | const Akonadi::Collection & | collection | ) | const |
Return the storage type (file/directory/URL etc.) for a collection.
Definition at line 882 of file akonadimodel.cpp.
QString AkonadiModel::tooltip | ( | const Akonadi::Collection & | , |
CalEvent::Types | |||
) | const |
Get the tooltip for a collection.
The collection's enabled status is evaluated for specified alarm types.
Definition at line 894 of file akonadimodel.cpp.
|
static |
Definition at line 1863 of file akonadimodel.cpp.
void AkonadiModel::updateCommandError | ( | const KAEvent & | event | ) |
To be called when the command error status of an alarm has changed, to set in the Akonadi database and update the visual command error indications.
Definition at line 810 of file akonadimodel.cpp.
bool AkonadiModel::updateEvent | ( | KAEvent & | event | ) |
Definition at line 1315 of file akonadimodel.cpp.
bool AkonadiModel::updateEvent | ( | Akonadi::Item::Id | oldId, |
KAEvent & | newEvent | ||
) |
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.