File indexing completed on 2024-11-17 04:43:56

0001 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
0002 <html>
0003 <head>
0004   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
0005   <title>KAlarm Design Notes</title>
0006   <meta content="KAlarm" name=description>
0007   <style type="text/css">
0008       body         { font-family: sans-serif }
0009       .eg          { color: green }
0010       .titlerow    { font-size: 1.2em; padding-top: 1em; padding-bottom: 0.5em; font-weight: bold }
0011       td           { vertical-align: top; padding-right: 1em; padding-top: 3px }
0012       th           { vertical-align: top; padding-right: 1em; padding-top: 0.3em; text-align: left }
0013       *#divided    { border: 1px transparent }
0014       tr.divided   { border: 1px transparent }
0015       td.cont      { padding-top: 0 }
0016   </style>
0017 
0018 </head>
0019 
0020 <body>
0021 
0022 <h1>KAlarm Design Notes</h1>
0023 
0024 See the KAlarm calendar design notes (DESIGN-calendar.html) for details of calendar storage.
0025 
0026 <h2>Classes</h2>
0027 
0028 <p>This section summarises some of the C++ classes used to build KAlarm.</p>
0029 
0030 <table>
0031 <tr><th>Class</th><th>Base class</th><th>Description</th></tr>
0032 <tr><td><tt>CollectionSearch</tt></td><td><tt>QObject</tt></td>
0033     <td>Fetches a list of all Akonadi collections which handle a specified mime
0034     type, and then optionally fetches or deletes all Items from them with a
0035     given GID. This class is only used to access KOrganizer collections.</td></tr>
0036 </table>
0037 
0038 <h3>Calendar Resource Classes</h3>
0039 
0040 
0041 <table>
0042 <tr><th>Class</th><th>Base class</th><th>Description</th></tr>
0043 
0044 <tr><td colspan=3><br><b>Generic Resource and Event Classes</b></td></tr>
0045 <tr><td><tt>ResourceType</tt></td><td><tt>QObject</tt></td>
0046     <td>Abstract base class representing an alarm calendar resource. Classes
0047     inherited from this class are accessed via the Resource class, which
0048     encapsulates them.</td></tr>
0049 
0050 <tr><td><tt>Resource</tt></td><td><tt></tt></td>
0051     <td>Represents an alarm calendar resource. Contains a shared pointer to a
0052     ResourceType object. It is designed to be safe to use even if the pointer
0053     to the ResourceType object is null.</td></tr>
0054 
0055 <tr><td><tt>Resources</tt></td><td><tt>QObject</tt></td>
0056     <td>Singleton class which contains all ResourceType instances. It allows
0057     connection to signals from all resource instances.</td></tr>
0058 
0059 <tr><td><tt>ResourceCreator</tt></td><td><tt>QObject</tt></td>
0060     <td>Base class to interactively create a resource.</td></tr>
0061 
0062 <tr><td><tt>CalendarUpdater</tt></td><td><tt>QObject</tt></td>
0063     <td>Base class to update the backend calendar format of a single alarm
0064     calendar.</td></tr>
0065 
0066 <tr><td><tt>ResourceSelectDialog</tt></td><td><tt>QDialog</tt></td>
0067     <td>A dialog which shows a list of resources and allows the user to select one.</td></tr>
0068 
0069 <tr><td><tt>DataModel</tt></td><td><tt></tt></td>
0070     <td>A class which provides functions independent of which data model
0071     type (Akonadi or file resource) is being used</td></tr>
0072 
0073 <tr><td><tt>ResourceDataModelBase</tt></td><td><tt></tt></td>
0074     <td>Base class for models containing all calendars and the events
0075     (alarms and templates) within them.</td></tr>
0076 
0077 <tr><td><tt>ResourceFilterModel</tt></td><td><tt>QSortFilterProxyModel</tt></td>
0078     <td>Proxy filter model providing all calendar resources (not events) of a
0079     specified alarm type (active/archived/template). The selected alarm type
0080     may be changed as desired.</td></tr>
0081 
0082 <tr><td><tt>ResourceListModel</tt></td><td><tt>KDescendantsProxyModel</tt></td>
0083     <td>Proxy model converting the resource tree into a flat
0084     list. The model may be restricted to specified alarm types. It can
0085     optionally be restricted to writable and/or enabled resources.</td></tr>
0086 
0087 <tr><td><tt>ResourceCheckListModel</tt></td><td><tt>KCheckableProxyModel</tt></td>
0088     <td>Proxy model providing a checkable list of all resources.
0089     An alarm type is specified, whereby resources which are enabled for that
0090     alarm type are checked; Resources which do not contain that alarm type,
0091     or which are disabled for that alarm type, are unchecked.</td></tr>
0092 
0093 <tr><td><tt>ResourceFilterCheckListModel</tt></td><td><tt>QSortFilterProxyModel</tt></td>
0094     <td>Proxy model providing a checkable resource list, filtered to contain
0095     only one alarm type. The selected alarm type may be changed as
0096     desired.</td></tr>
0097 
0098 <tr><td><tt>EventListModel</tt></td><td><tt>QSortFilterProxyModel</tt></td>
0099     <td>Proxy filter model providing all events of a specified alarm type
0100     (active alarms, archived alarms or alarm templates), in enabled
0101     resources.</td></tr>
0102 
0103 <tr><td><tt>AlarmListModel</tt></td><td><tt>EventListModel</tt></td>
0104     <td>Filter proxy model containing all alarms of specified types (active,
0105     archived, template), in enabled resources.</td></tr>
0106 
0107 <tr><td><tt>TemplateListModel</tt></td><td><tt>EventListModel</tt></td>
0108     <td>Filter proxy model containing alarm templates, optionally for specified
0109     alarm action types (display, command, etc.), in enabled
0110     resources.</td></tr>
0111 
0112 <tr><td><tt>BirthdayModel</tt></td><td><tt>Akonadi::ContactsTreeModel</tt></td>
0113     <td>Provides the model for all contacts.</td></tr>
0114 
0115 <tr><td><tt>BirthdaySortModel</tt></td><td><tt>QSortFilterProxyModel</tt></td>
0116     <td>Filters and sorts contacts for display.</td></tr>
0117 
0118 <tr><td><tt>ResourceView</tt></td><td><tt>QListView</tt></td>
0119     <td>View for a ResourceFilterCheckListModel.</td></tr>
0120 
0121 <tr><td><tt>EventListView</tt></td><td><tt>QTreeView</tt></td>
0122     <td>View for an EventListModel.</td></tr>
0123 
0124 <tr><td><tt>AlarmListView</tt></td><td><tt>EventListView</tt></td>
0125     <td>View showing a list of alarms.</td></tr>
0126 
0127 <tr><td><tt>TemplateListView</tt></td><td><tt>EventListView</tt></td>
0128     <td>View showing a list of alarm templates.</td></tr>
0129 
0130 <tr><td><tt>EventListDelegate</tt></td><td><tt>QItemDelegate</tt></td>
0131     <td>Delegate for an EventListView.</td></tr>
0132 
0133 <tr><td><tt>AlarmListDelegate</tt></td><td><tt>EventListDelegate</tt></td>
0134     <td>Delegate for an AlarmListView. Handles editing and display of the alarm
0135     list.</td></tr>
0136 
0137 <tr><td><tt>TemplateListDelegate</tt></td><td><tt>EventListDelegate</tt></td>
0138     <td>Delegate for a TemplateListView. Handles editing and display of the
0139     list of alarm templates.</td></tr>
0140 
0141 <tr><td><tt>DirResourceImportDialog</tt></td><td><tt>KAssistantDialog</tt></td>
0142     <td>Dialogue for importing a calendar directory resource. For use when
0143     migrating Akonadi alarm calendars.</td></tr>
0144 
0145 
0146 <tr><td colspan=3><br><b>Akonadi Resource and Event Classes</b></td></tr>
0147 <tr><td><tt>AkonadiDataModel</tt></td><td><tt>Akonadi::EntityTreeModel,<br>ResourceDataModelBase</tt></td>
0148     <td>Contains all KAlarm collections and the items (alarms and templates)
0149     within them.</td></tr>
0150 
0151 <tr><td><tt>AkonadiResource</tt></td><td><tt>ResourceType</tt></td>
0152     <td>An Akonadi calendar resource.</td></tr>
0153 
0154 <tr><td><tt>AkonadiResourceMigrator</tt></td><td><tt>QObject</tt></td>
0155     <td>Migrates KResources alarm calendars from pre-Akonadi versions of
0156     KAlarm, and creates default calendar resources if none exist.</td></tr>
0157 
0158 <tr><td><tt>AkonadiResourceCreator</tt></td><td><tt>ResourceCreator</tt></td>
0159     <td>Interactively creates an Akonadi resource.</td></tr>
0160 
0161 <tr><td><tt>AkonadiCalendarUpdater</tt></td><td><tt>CalendarUpdater</tt></td>
0162     <td>Updates the backend calendar format of one Akonadi alarm calendar.</td></tr>
0163 
0164 
0165 <tr><td colspan=3><br><b>Non-Akonadi Resource and Event Classes</b></td></tr>
0166 <tr><td><tt>FileResourceDataModel</tt></td><td><tt>QAbstractItemModel,<br>ResourceDataModelBase</tt></td>
0167     <td>Model containing all file system calendar resources and the events
0168     (alarms and templates) within them.</td></tr>
0169 
0170 <tr><td><tt>FileResource</tt></td><td><tt>ResourceType</tt></td>
0171     <td>Abstract base class for a file system calendar resource.</td></tr>
0172 
0173 <tr><td><tt>SingleFileResource</tt></td><td><tt>FileResource</tt></td>
0174     <td>A file system calendar resource held in a single file.</td></tr>
0175 
0176 <tr><td><tt>SingleFileResourceConfigDialog</tt></td><td><tt>QDialog</tt></td>
0177     <td>Configuration dialogue for a SingleFileResource resource.</td></tr>
0178 
0179 <tr><td><tt>FileResourceMigrator</tt></td><td><tt>QObject</tt></td>
0180     <td>Migrates Akonadi or KResources alarm calendars from previous versions
0181     of KAlarm, and creates default calendar resources if none exist.</td></tr>
0182 
0183 <tr><td><tt>FileResourceCreator</tt></td><td><tt>ResourceCreator</tt></td>
0184     <td>Interactively creates a file resource.</td></tr>
0185 
0186 <tr><td><tt>FileResourceConfigManager</tt></td><td><tt></tt></td>
0187     <td>Manager for file system resource configuration files. Reads
0188     configuration files and creates resources at startup, and updates
0189     configuration files with resource configuration changes.</td></tr>
0190 
0191 <tr><td><tt>FileResourceSettings</tt></td><td><tt></tt></td>
0192     <td>Encapsulates the configuration settings of a file system resource.</td></tr>
0193 
0194 <tr><td><tt>FileResourceCalendarUpdater</tt></td><td><tt>CalendarUpdater</tt></td>
0195     <td>Updates the backend calendar format of one file resource alarm calendar.</td></tr>
0196 
0197 </table>
0198 
0199 </body>