This class provides a calendar storage as an sqlite database. More...
#include <sqlitestorage.h>

Public Types | |
| typedef QSharedPointer< SqliteStorage > | Ptr |
| A shared pointer to a SqliteStorage. | |
| Public Types inherited from mKCal::ExtendedStorage | |
| enum | DeleteAction { MarkDeleted , PurgeDeleted } |
| Action to be performed on save for deleted incidences. More... | |
| typedef QSharedPointer< ExtendedStorage > | Ptr |
| A shared pointer to a ExtendedStorage. | |
Public Slots | |
| void | fileChanged (const QString &path) |
Public Member Functions | |
| SqliteStorage (const ExtendedCalendar::Ptr &cal, const QString &databaseName, bool validateNotebooks=true) | |
Constructs a new SqliteStorage object for Calendar calendar with storage to file databaseName. | |
| SqliteStorage (const ExtendedCalendar::Ptr &cal, bool validateNotebooks=true) | |
Constructs a new SqliteStorage object for Calendar calendar. | |
| virtual | ~SqliteStorage () |
| Destructor. | |
| QString | databaseName () const |
| Returns a string containing the name of the calendar database. | |
| bool | open () |
| bool | load () |
| bool | load (const QString &uid) |
| bool | load (const QDate &start, const QDate &end) |
| bool | loadNotebookIncidences (const QString ¬ebookUid) |
| bool | purgeDeletedIncidences (const KCalendarCore::Incidence::List &list, const QString ¬ebookUid=QString()) |
| bool | save () |
| bool | save (ExtendedStorage::DeleteAction deleteAction) |
| bool | close () |
| void | calendarModified (bool modified, KCalendarCore::Calendar *calendar) |
| void | calendarIncidenceCreated (const KCalendarCore::Incidence::Ptr &incidence) |
| void | calendarIncidenceAdded (const KCalendarCore::Incidence::Ptr &incidence) |
| void | calendarIncidenceChanged (const KCalendarCore::Incidence::Ptr &incidence) |
| void | calendarIncidenceDeleted (const KCalendarCore::Incidence::Ptr &incidence, const KCalendarCore::Calendar *calendar) |
| void | calendarIncidenceAdditionCanceled (const KCalendarCore::Incidence::Ptr &incidence) |
| bool | insertedIncidences (KCalendarCore::Incidence::List *list, const QDateTime &after, const QString ¬ebookUid=QString()) |
| bool | modifiedIncidences (KCalendarCore::Incidence::List *list, const QDateTime &after, const QString ¬ebookUid=QString()) |
| bool | deletedIncidences (KCalendarCore::Incidence::List *list, const QDateTime &after=QDateTime(), const QString ¬ebookUid=QString()) |
| bool | allIncidences (KCalendarCore::Incidence::List *list, const QString ¬ebookUid=QString()) |
| bool | search (const QString &key, QStringList *identifiers, int limit=0) |
| QDateTime | incidenceDeletedDate (const KCalendarCore::Incidence::Ptr &incidence) |
| virtual void | virtual_hook (int id, void *data) |
| Public Member Functions inherited from mKCal::ExtendedStorage | |
| ExtendedStorage (const ExtendedCalendar::Ptr &cal, bool validateNotebooks=true) | |
| Constructs a new ExtendedStorage object. | |
| virtual | ~ExtendedStorage () |
| Destructor. | |
| ExtendedCalendar::Ptr | calendar () const |
| bool | loadSeries (const QString &uid) |
| Load all incidences sharing the same uid into the memory. | |
| bool | load (const QString &uid, const QDateTime &recurrenceId) |
| Load incidence by uid/recid into the memory. | |
| virtual bool | load (const QDate &date) |
| Load incidences at given date into the memory. | |
| virtual bool | loadIncidenceInstance (const QString &instanceIdentifier) |
| Load the incidence matching the given identifier. | |
| void | registerObserver (ExtendedStorageObserver *observer) |
| Registers an Observer for this Storage. | |
| void | unregisterObserver (ExtendedStorageObserver *observer) |
| Unregisters an Observer for this Storage. | |
| bool | addNotebook (const Notebook::Ptr &nb) |
| Add new notebook to the storage. | |
| bool | updateNotebook (const Notebook::Ptr &nb) |
| Update notebook parameters. | |
| bool | deleteNotebook (const Notebook::Ptr &nb) |
| Delete notebook from storage. | |
| bool | setDefaultNotebook (const Notebook::Ptr &nb) |
| setDefaultNotebook to the storage. | |
| Notebook::Ptr | defaultNotebook () |
| defaultNotebook. | |
| Notebook::Ptr | notebook (const QString &uid) const |
| Search for notebook. | |
| Notebook::List | notebooks () |
| List all notebooks. | |
| void | setValidateNotebooks (bool validateNotebooks) |
| Determine if notebooks should be validated in saves and loads. | |
| bool | validateNotebooks () const |
| Returns true if notebooks should be validated in saves and loads. | |
| bool | isValidNotebook (const QString ¬ebookUid) const |
| Returns true if the given notebook is valid for the storage. | |
| Notebook::Ptr | createDefaultNotebook (QString name=QString(), QString color=QString()) |
| Creates and sets a default notebook. | |
Protected Member Functions | |
| bool | loadNotebooks () |
| bool | insertNotebook (const Notebook::Ptr &nb) |
| bool | modifyNotebook (const Notebook::Ptr &nb) |
| bool | eraseNotebook (const Notebook::Ptr &nb) |
| Protected Member Functions inherited from mKCal::ExtendedStorage | |
| bool | getLoadDates (const QDate &start, const QDate &end, QDateTime *loadStart, QDateTime *loadEnd) const |
| void | addLoadedRange (const QDate &start, const QDate &end) const |
| bool | isRecurrenceLoaded () const |
| void | setIsRecurrenceLoaded (bool loaded) |
| void | emitStorageModified (const QString &info) |
| void | emitStorageFinished (bool error, const QString &info) |
| void | emitStorageUpdated (const KCalendarCore::Incidence::List &added, const KCalendarCore::Incidence::List &modified, const KCalendarCore::Incidence::List &deleted) |
This class provides a calendar storage as an sqlite database.
| typedef QSharedPointer<SqliteStorage> mKCal::SqliteStorage::Ptr |
A shared pointer to a SqliteStorage.
|
explicit |
Constructs a new SqliteStorage object for Calendar calendar with storage to file databaseName.
Private class that helps to provide binary compatibility between releases.
| calendar | is a pointer to a valid Calendar object. |
| databaseName | is the name of the database containing the Calendar data. |
| validateNotebooks | set to true for saving only those incidences that belong to an existing notebook of this storage |
|
explicit |
Constructs a new SqliteStorage object for Calendar calendar.
Location of the database is using default location, or is taken from SQLITESTORAGEDB enivronment variable.
| calendar | is a pointer to a valid Calendar object. |
| validateNotebooks | set to true for saving only those incidences that belong to an existing notebook of this storage |
|
virtual |
Destructor.
|
virtual |
|
virtual |
Calendar::CalendarObserver::calendarIncidenceAdded()
Implements mKCal::ExtendedStorage.
|
virtual |
Calendar::CalendarObserver::calendarIncidenceAdditionCanceled()
Implements mKCal::ExtendedStorage.
|
virtual |
Calendar::CalendarObserver::calendarIncidenceChanged()
Implements mKCal::ExtendedStorage.
| void mKCal::SqliteStorage::calendarIncidenceCreated | ( | const KCalendarCore::Incidence::Ptr & | incidence | ) |
Calendar::CalendarObserver::calendarIncidenceCreated()
|
virtual |
Calendar::CalendarObserver::calendarIncidenceDeleted()
Implements mKCal::ExtendedStorage.
|
virtual |
Calendar::CalendarObserver::calendarModified()
Implements mKCal::ExtendedStorage.
|
virtual |
CalStorage::close()
Reimplemented from mKCal::ExtendedStorage.
| QString SqliteStorage::databaseName | ( | ) | const |
Returns a string containing the name of the calendar database.
|
virtual |
|
protectedvirtual |
Implements mKCal::ExtendedStorage.
|
slot |
|
virtual |
|
virtual |
|
protectedvirtual |
Implements mKCal::ExtendedStorage.
|
virtual |
CalStorage::load()
Implements mKCal::ExtendedStorage.
|
virtual |
|
virtual |
|
virtual |
|
protectedvirtual |
Implements mKCal::ExtendedStorage.
|
virtual |
|
protectedvirtual |
Implements mKCal::ExtendedStorage.
|
virtual |
CalStorage::open()
Implements mKCal::ExtendedStorage.
|
virtual |
ExtendedStorage::purgeDeletedIncidences(const KCalCore::Incidence::List &, const QString &)
Implements mKCal::ExtendedStorage.
|
virtual |
CalStorage::save()
Implements mKCal::ExtendedStorage.
|
virtual |
|
virtual |
Implements mKCal::ExtendedStorage.
|
virtual |
1.16.1