KAlarm Design Notes

See the KAlarmCal design notes (kalarmcal/DESIGN.html) for details of calendar storage.

Classes

This section summarises some of the C++ classes used to build KAlarm.

Calendar Resource Classes

ClassBase classDescription

Generic Resource and Event Classes
ResourceTypeQObject Abstract base class representing an alarm calendar resource. Classes inherited from this class are accessed via the Resource class, which encapsulates them.
Resource Represents an alarm calendar resource. Contains a shared pointer to a ResourceType object. It is designed to be safe to use even if the pointer to the ResourceType object is null.
ResourcesQObject Singleton class which contains all ResourceType instances. It allows connection to signals from all resource instances.
ResourceCreatorQObject Base class to interactively create a resource.
CalendarUpdaterQObject Base class to update the backend calendar format of a single alarm calendar.
ResourceSelectDialogQDialog A dialog which shows a list of resources and allows the user to select one.
DataModel A namespace which provides functions independent of which data model type (Akonadi, etc.) is being used
ResourceDataModelBase Base class for models containing all calendars and the events (alarms and templates) within them.
ResourceFilterModelQSortFilterProxyModel Proxy filter model providing all calendar resources (not events) of a specified alarm type (active/archived/template). The selected alarm type may be changed as desired.
ResourceListModelKDescendantsProxyModel Proxy model converting the resource tree into a flat list. The model may be restricted to specified alarm types. It can optionally be restricted to writable and/or enabled resources.
ResourceCheckListModelKCheckableProxyModel Proxy model providing a checkable list of all resources. An alarm type is specified, whereby resources which are enabled for that alarm type are checked; Resources which do not contain that alarm type, or which are disabled for that alarm type, are unchecked.
ResourceFilterCheckListModelQSortFilterProxyModel Proxy model providing a checkable resource list, filtered to contain only one alarm type. The selected alarm type may be changed as desired.
EventListModelQSortFilterProxyModel Proxy filter model providing all events of a specified alarm type (active alarms, archived alarms or alarm templates), in enabled resources.
AlarmListModelEventListModel Filter proxy model containing all alarms of specified types (active, archived, template), in enabled resources.
TemplateListModelEventListModel Filter proxy model containing alarm templates, optionally for specified alarm action types (display, command, etc.), in enabled resources.
BirthdayModelAkonadi::ContactsTreeModel Provides the model for all contacts.
BirthdaySortModelQSortFilterProxyModel Filters and sorts contacts for display.
ResourceViewQListView View for a ResourceFilterCheckListModel.
EventListViewQTreeView View for an EventListModel.
AlarmListViewEventListView View showing a list of alarms.
TemplateListViewEventListView View showing a list of alarm templates.
EventListDelegateQItemDelegate Delegate for an EventListView.
AlarmListDelegateEventListDelegate Delegate for an AlarmListView. Handles editing and display of the alarm list.
TemplateListDelegateEventListDelegate Delegate for a TemplateListView. Handles editing and display of the list of alarm templates.

Akonadi Resource and Event Classes
AkonadiDataModelAkonadi::EntityTreeModel,
ResourceDataModelBase
Contains all KAlarm collections and the items (alarms and templates) within them.
CollectionSearchQObject Fetches a list of all Akonadi collections which handle a specified mime type, and then optionally fetches or deletes all Items from them with a given GID.
AkonadiResourceMigratorQObject Migrates KResources alarm calendars from pre-Akonadi versions of KAlarm, and creates default calendar resources if none exist.
AkonadiResourceCreatorResourceCreator Interactively creates an Akonadi resource.
AkonadiCalendarUpdaterCalendarUpdater Updates the backend calendar format of one Akonadi alarm calendar.