KAlarm Design Notes

See the KAlarm calendar design notes (DESIGN-calendar.html) for details of calendar storage.

Classes

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

ClassBase classDescription
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. This class is only used to access KOrganizer collections.

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 class which provides functions independent of which data model type (Akonadi or file resource) 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.
DirResourceImportDialogKAssistantDialog Dialogue for importing a calendar directory resource. For use when migrating Akonadi alarm calendars.

Akonadi Resource and Event Classes
AkonadiDataModelAkonadi::EntityTreeModel,
ResourceDataModelBase
Contains all KAlarm collections and the items (alarms and templates) within them.
AkonadiResourceResourceType An Akonadi calendar resource.
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.

Non-Akonadi Resource and Event Classes
FileResourceDataModelQAbstractItemModel,
ResourceDataModelBase
Model containing all file system calendar resources and the events (alarms and templates) within them.
FileResourceResourceType Abstract base class for a file system calendar resource.
SingleFileResourceFileResource A file system calendar resource held in a single file.
SingleFileResourceConfigDialogQDialog Configuration dialogue for a SingleFileResource resource.
FileResourceMigratorQObject Migrates Akonadi or KResources alarm calendars from previous versions of KAlarm, and creates default calendar resources if none exist.
FileResourceCreatorResourceCreator Interactively creates a file resource.
FileResourceConfigManager Manager for file system resource configuration files. Reads configuration files and creates resources at startup, and updates configuration files with resource configuration changes.
FileResourceSettings Encapsulates the configuration settings of a file system resource.
FileResourceCalendarUpdaterCalendarUpdater Updates the backend calendar format of one file resource alarm calendar.