diff --git a/DESIGN.html b/DESIGN.html new file mode 100644 index 00000000..8c0c0eff --- /dev/null +++ b/DESIGN.html @@ -0,0 +1,156 @@ + + + + + KAlarm Design Notes + + + + + + + +

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
ResourceTypeQObjectAbstract base class representing an alarm calendar resource. Classes + inherited from this class are accessed via the Resource class, which + encapsulates them.
ResourceRepresents 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.
ResourcesQObjectSingleton class which contains all ResourceType instances. It allows + connection to signals from all resource instances.
ResourceCreatorQObjectBase class to interactively create a resource.
CalendarUpdaterQObjectBase class to update the backend calendar format of a single alarm + calendar.
ResourceSelectDialogQDialogA dialog which shows a list of resources and allows the user to select one.
DataModelA namespace which provides functions independent of which data model + type (Akonadi, etc.) is being used
ResourceDataModelBaseBase class for models containing all calendars and the events + (alarms and templates) within them.
ResourceFilterModelQSortFilterProxyModelProxy 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.
ResourceListModelKDescendantsProxyModelProxy 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.
ResourceCheckListModelKCheckableProxyModelProxy 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.
ResourceFilterCheckListModelQSortFilterProxyModelProxy model providing a checkable resource list, filtered to contain + only one alarm type. The selected alarm type may be changed as + desired.
EventListModelQSortFilterProxyModelProxy filter model providing all events of a specified alarm type + (active alarms, archived alarms or alarm templates), in enabled + resources.
AlarmListModelEventListModelFilter proxy model containing all alarms of specified types (active, + archived, template), in enabled resources.
TemplateListModelEventListModelFilter proxy model containing alarm templates, optionally for specified + alarm action types (display, command, etc.), in enabled + resources.
BirthdayModelAkonadi::ContactsTreeModelProvides the model for all contacts.
BirthdaySortModelQSortFilterProxyModelFilters and sorts contacts for display.
ResourceViewQListViewView for a ResourceFilterCheckListModel.
EventListViewQTreeViewView for an EventListModel.
AlarmListViewEventListViewView showing a list of alarms.
TemplateListViewEventListViewView showing a list of alarm templates.
EventListDelegateQItemDelegateDelegate for an EventListView.
AlarmListDelegateEventListDelegateDelegate for an AlarmListView. Handles editing and display of the alarm + list.
TemplateListDelegateEventListDelegateDelegate 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.
CollectionSearchQObjectFetches 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.
AkonadiResourceMigratorQObjectMigrates KResources alarm calendars from pre-Akonadi versions of + KAlarm, and creates default calendar resources if none exist.
AkonadiResourceCreatorResourceCreatorInteractively creates an Akonadi resource.
AkonadiCalendarUpdaterCalendarUpdaterUpdates the backend calendar format of one Akonadi alarm calendar.
+ +