Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QOrganizerManagerEngine Class

The QOrganizerManagerEngine class provides the interface to implement functionalities of organizer managers. More...

 #include <QOrganizerManagerEngine>

Inherits: QObject.

Public Functions

QOrganizerManagerEngine(QObject * parent = 0)
virtual bool cancelRequest(QOrganizerAbstractRequest * request)
virtual QOrganizerCollection collection(const QOrganizerCollectionId & collectionId, QOrganizerManager::Error * error)
virtual QList<QOrganizerCollection> collections(QOrganizerManager::Error * error)
virtual QOrganizerCollection defaultCollection(QOrganizerManager::Error * error)
virtual QList<QOrganizerItemId> itemIds(const QOrganizerItemFilter & filter, const QDateTime & startDateTime, const QDateTime & endDateTime, const QList<QOrganizerItemSortOrder> & sortOrders, QOrganizerManager::Error * error)
virtual QList<QOrganizerItem> itemOccurrences(const QOrganizerItem & parentItem, const QDateTime & startDateTime, const QDateTime & endDateTime, int maxCount, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error)
virtual QList<QOrganizerItem> items(const QList<QOrganizerItemId> & itemIds, const QOrganizerItemFetchHint & fetchHint, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error)
virtual QList<QOrganizerItem> items(const QOrganizerItemFilter & filter, const QDateTime & startDateTime, const QDateTime & endDateTime, int maxCount, const QList<QOrganizerItemSortOrder> & sortOrders, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error)
virtual QList<QOrganizerItem> itemsForExport(const QDateTime & startDateTime, const QDateTime & endDateTime, const QOrganizerItemFilter & filter, const QList<QOrganizerItemSortOrder> & sortOrders, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error)
virtual QString managerName() const
virtual QMap<QString, QString> managerParameters() const
QString managerUri() const
virtual bool removeCollection(const QOrganizerCollectionId & collectionId, QOrganizerManager::Error * error)
virtual bool removeItems(const QList<QOrganizerItemId> & itemIds, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error)
virtual bool removeItems(const QList<QOrganizerItem> * items, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error)
virtual void requestDestroyed(QOrganizerAbstractRequest * request)
virtual bool saveCollection(QOrganizerCollection * collection, QOrganizerManager::Error * error)
virtual bool saveItems(QList<QOrganizerItem> * items, const QList<QOrganizerItemDetail::DetailType> & detailMask, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error)
virtual bool startRequest(QOrganizerAbstractRequest * request)
virtual QList<QOrganizerItemFilter::FilterType> supportedFilters() const
virtual QList<QOrganizerItemDetail::DetailType> supportedItemDetails(QOrganizerItemType::ItemType itemType) const
virtual QList<QOrganizerItemType::ItemType> supportedItemTypes() const
virtual bool waitForRequestFinished(QOrganizerAbstractRequest * request, int msecs)
  • 31 public functions inherited from QObject

Signals

void collectionsAdded(const QList<QOrganizerCollectionId> & collectionIds)
void collectionsChanged(const QList<QOrganizerCollectionId> & collectionIds)
void collectionsModified(const QList<QPair<QOrganizerCollectionId, QOrganizerManager::Operation> > & collectionIds)
void collectionsRemoved(const QList<QOrganizerCollectionId> & collectionIds)
void dataChanged()
void itemsAdded(const QList<QOrganizerItemId> & itemIds)
void itemsChanged(const QList<QOrganizerItemId> & itemIds)
void itemsModified(const QList<QPair<QOrganizerItemId, QOrganizerManager::Operation> > & itemIds)
void itemsRemoved(const QList<QOrganizerItemId> & itemIds)

Static Public Members

bool addDefaultSorted(QMultiMap<QDateTime, QOrganizerItem> * defaultSorted, const QOrganizerItem & toAdd)
int addSorted(QList<QOrganizerItem> * sorted, const QOrganizerItem & toAdd, const QList<QOrganizerItemSortOrder> & sortOrders)
QOrganizerItemFilter canonicalizedFilter(const QOrganizerItemFilter & filter)
int compareItem(const QOrganizerItem & a, const QOrganizerItem & b, const QList<QOrganizerItemSortOrder> & sortOrders)
int compareVariant(const QVariant & first, const QVariant & second, Qt::CaseSensitivity sensitivity)
const QOrganizerCollectionEngineId * engineCollectionId(const QOrganizerCollectionId & id)
const QOrganizerItemEngineId * engineItemId(const QOrganizerItemId & id)
QList<QDate> filterByPosition(const QList<QDate> & dates, const QSet<int> positions)
QDate firstDateInNextPeriod(const QDate & date, QOrganizerRecurrenceRule::Frequency frequency, Qt::DayOfWeek firstDayOfWeek)
QDate firstDateInPeriod(const QDate & date, QOrganizerRecurrenceRule::Frequency frequency, Qt::DayOfWeek firstDayOfWeek)
QList<QDateTime> generateDateTimes(const QDateTime & initialDateTime, QOrganizerRecurrenceRule rrule, const QDateTime & periodStart, const QDateTime & periodEnd, int maxCount)
QOrganizerItem generateOccurrence(const QOrganizerItem & parentItem, const QDateTime & rdate)
bool inMultipleOfInterval(const QDate & date, const QDate & initialDate, QOrganizerRecurrenceRule::Frequency frequency, int interval, Qt::DayOfWeek firstDayOfWeek)
void inferMissingCriteria(QOrganizerRecurrenceRule * rrule, const QDate & initialDate)
bool isItemBetweenDates(const QOrganizerItem & item, const QDateTime & startPeriod, const QDateTime & endPeriod)
bool itemHasReccurence(const QOrganizerItem & oi)
bool itemLessThan(const QOrganizerItem & a, const QOrganizerItem & b)
QList<QDate> matchingDates(const QDate & periodStart, const QDate & periodEnd, const QOrganizerRecurrenceRule & rrule)
bool testFilter(const QOrganizerItemFilter & filter, const QOrganizerItem & item)
void updateCollectionFetchRequest(QOrganizerCollectionFetchRequest * req, const QList<QOrganizerCollection> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState)
void updateCollectionRemoveRequest(QOrganizerCollectionRemoveRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState)
void updateCollectionSaveRequest(QOrganizerCollectionSaveRequest * req, const QList<QOrganizerCollection> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState)
void updateItemFetchByIdRequest(QOrganizerItemFetchByIdRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState)
void updateItemFetchForExportRequest(QOrganizerItemFetchForExportRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState)
void updateItemFetchRequest(QOrganizerItemFetchRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState)
void updateItemIdFetchRequest(QOrganizerItemIdFetchRequest * req, const QList<QOrganizerItemId> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState)
void updateItemOccurrenceFetchRequest(QOrganizerItemOccurrenceFetchRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState)
void updateItemRemoveByIdRequest(QOrganizerItemRemoveByIdRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState)
void updateItemRemoveRequest(QOrganizerItemRemoveRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState)
void updateItemSaveRequest(QOrganizerItemSaveRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState)
void updateRequestState(QOrganizerAbstractRequest * req, QOrganizerAbstractRequest::State state)
  • 11 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QOrganizerManagerEngine class provides the interface to implement functionalities of organizer managers.

This class should only be used by backend developers. Instances of this class are provided to QOrganizerManager by a QOrganizerManagerEngineFactory instance, which is loaded from a plugin.

The default implementation of this interface provides a backend doing nothing, so that backend developers only need to reimplement the functionalities needed.

More information on writing a organizer engine plugin is available in the Qt Organizer Manager Engines documentation.

See also QOrganizerManager and QOrganizerManagerEngineFactory.

Member Function Documentation

QOrganizerManagerEngine::QOrganizerManagerEngine(QObject * parent = 0)

Constructs an empty QOrganizerManagerEngine with the given parent.

bool QOrganizerManagerEngine::addDefaultSorted(QMultiMap<QDateTime, QOrganizerItem> * defaultSorted, const QOrganizerItem & toAdd) [static]

Insert toAdd to the defaultSorted map. If toAdd does not have valid start or end date, returns false and does not insert toAdd to defaultSorted map.

This function provides default sorting, which should be used for sorting fetch results, if no sort order was defined for the fetch. The default sorting algorithm is to sort based on start time of an item. If start time does not exist, end time or due time is used instead. For allday events, time 00:00 is used for sorting purposes. Items with no start or end time are last in the sorting order.

This function sorts items using QMultiMap, where QDateTime is used as a key. To get a sorted list of items, QMultiMap::values function should be called and items without start and end date added to the end of the list.

int QOrganizerManagerEngine::addSorted(QList<QOrganizerItem> * sorted, const QOrganizerItem & toAdd, const QList<QOrganizerItemSortOrder> & sortOrders) [static]

Insert toAdd to the sorted list, according to the provided sortOrders. The index where toAdd is inserted is returned.

The first one in the sortOrders list has the highest priority.

bool QOrganizerManagerEngine::cancelRequest(QOrganizerAbstractRequest * request) [virtual]

This function is called when the client tries to cancel the given asynchronous request. Returns true if the request is calcelled successfully, or false otherwise.

QOrganizerItemFilter QOrganizerManagerEngine::canonicalizedFilter(const QOrganizerItemFilter & filter) [static]

Given an input filter, returns the canonical version of the filter.

Some of the following transformations may be applied:

QOrganizerCollection QOrganizerManagerEngine::collection(const QOrganizerCollectionId & collectionId, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to fetch a collection based on its ID. Any errors encountered during this operation should be stored to error. If the given collectionId does not specify a valid collection, error will be set to QOrganizerManager::DoesNotExistError.

QList<QOrganizerCollection> QOrganizerManagerEngine::collections(QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to fetch all the collections managed by this backend. Any errors encountered during this operation should be stored to error.

void QOrganizerManagerEngine::collectionsAdded(const QList<QOrganizerCollectionId> & collectionIds) [signal]

This signal should be emitted at some point once the collections identified by collectionIds have been added to the backend.

This signal should not be emitted if the dataChanged() signal was previously emitted for these changes.

See also dataChanged().

void QOrganizerManagerEngine::collectionsChanged(const QList<QOrganizerCollectionId> & collectionIds) [signal]

This signal should be emitted at some point once the collections identified by collectionIds have been changed in the backend.

This signal should not be emitted if items in the collections have been added, modified, or removed.

This signal should not be emitted if the dataChanged() signal was previously emitted for these changes.

See also dataChanged().

void QOrganizerManagerEngine::collectionsModified(const QList<QPair<QOrganizerCollectionId, QOrganizerManager::Operation> > & collectionIds) [signal]

This signal should be emitted at some point once the collections identified by collectionIds have been modified in the backend.

This signal should not be emitted if the dataChanged() signal was previously emitted for these changes.

See also dataChanged().

void QOrganizerManagerEngine::collectionsRemoved(const QList<QOrganizerCollectionId> & collectionIds) [signal]

This signal should be emitted at some point once the collections identified by collectionIds have been removed from the backend.

This signal should not be emitted if the dataChanged() signal was previously emitted for these changes.

See also dataChanged().

int QOrganizerManagerEngine::compareItem(const QOrganizerItem & a, const QOrganizerItem & b, const QList<QOrganizerItemSortOrder> & sortOrders) [static]

Compares two organizer items (a and b) using the given list of sortOrders. Returns a negative number if a should appear before b according to the sort order, a positive number if a should appear after b according to the sort order, and zero if the two are unable to be sorted.

int QOrganizerManagerEngine::compareVariant(const QVariant & first, const QVariant & second, Qt::CaseSensitivity sensitivity) [static]

Compares first against second. If the types are strings (QVariant::String(obsolete)), the sensitivity argument controls case sensitivity when comparing.

Returns: <0 if first is less than second 0 if first is equal to second >0 if first is greater than second.

The results are undefined if the variants are different types, or cannot be compared.

void QOrganizerManagerEngine::dataChanged() [signal]

This signal should be emitted if the internal state of the plugin changes, and it is unable to determine the changes which occurred, or if it considers the changes to be radical enough to require clients to reload all data.

If this signal is emitted, no other signals will be emitted for the associated changes.

See also itemsAdded(), itemsChanged(), and itemsRemoved().

QOrganizerCollection QOrganizerManagerEngine::defaultCollection(QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to fetch the default collection. Any errors encountered during this operation should be stored to error.

const QOrganizerCollectionEngineId * QOrganizerManagerEngine::engineCollectionId(const QOrganizerCollectionId & id) [static]

Returns the engine ID from the given collection id.

The caller does not take ownership of the pointer, and should not delete returned id or undefined behavior may occur.

const QOrganizerItemEngineId * QOrganizerManagerEngine::engineItemId(const QOrganizerItemId & id) [static]

Returns the engine ID from the given item id.

The caller does not take ownership of the pointer, and should not delete returned id or undefined behavior may occur.

QList<QDate> QOrganizerManagerEngine::filterByPosition(const QList<QDate> & dates, const QSet<int> positions) [static]

Returns a list of dates from dates which are at the indices specified by positions. For positive values in positions, the values represent a 1-based index into dates. For negative values, they represent indices counting from the end of dates (eg. -1 means the last value of dates).

QDate QOrganizerManagerEngine::firstDateInNextPeriod(const QDate & date, QOrganizerRecurrenceRule::Frequency frequency, Qt::DayOfWeek firstDayOfWeek) [static]

Returns the date which is the first date of the next calendar period after date specified by frequency. eg. if frequency is Monthly, then this returns the first day of the next month. If frequency is Weekly, then it returns the first firstDayOfWeek after date.

QDate QOrganizerManagerEngine::firstDateInPeriod(const QDate & date, QOrganizerRecurrenceRule::Frequency frequency, Qt::DayOfWeek firstDayOfWeek) [static]

Returns the date which is the first date of the calendar period that date resides in. eg. if the frequency is Monthly, then this returns the first day of date's month. If the frequency is Weekly, then it returns the first day of date's week, considering the week to start on firstDayOfWeek

QList<QDateTime> QOrganizerManagerEngine::generateDateTimes(const QDateTime & initialDateTime, QOrganizerRecurrenceRule rrule, const QDateTime & periodStart, const QDateTime & periodEnd, int maxCount) [static]

Generates all start times for recurrence rrule during the given time period. The time period is defined by periodStart and periodEnd. initialDateTime is the start time of the event, which defines the first start time for rrule. maxCount can be used to limit the amount of generated start times.

QOrganizerItem QOrganizerManagerEngine::generateOccurrence(const QOrganizerItem & parentItem, const QDateTime & rdate) [static]

Generates a new occurrence for parentItem. All parentItem details, except for QOrganizerItemType and QOrganizerItemRecurrence copied to the occurrence. Occurrence start date is set to the date given in rdate. End date is modified accordingly. Occurrence's QOrganizerItemParent detail contains the id of parentItem and the original date given in rdate.

bool QOrganizerManagerEngine::inMultipleOfInterval(const QDate & date, const QDate & initialDate, QOrganizerRecurrenceRule::Frequency frequency, int interval, Qt::DayOfWeek firstDayOfWeek) [static]

Returns true if the calendar period (specified by frequency) of date is an interval multiple of periods ahead of the calendar period of initialDate. For Weekly frequencies, firstDayOfWeek is used to determine when the week boundary is. eg. If frequency is Monthly and interval is 3, then true is returned iff date is in the same month as initialDate, in a month 3 months ahead, 6 months ahead, etc.

void QOrganizerManagerEngine::inferMissingCriteria(QOrganizerRecurrenceRule * rrule, const QDate & initialDate) [static]

Determines if rrule is underspecified and if so, fills in missing information based on initialDate.

bool QOrganizerManagerEngine::isItemBetweenDates(const QOrganizerItem & item, const QDateTime & startPeriod, const QDateTime & endPeriod) [static]

Returns true if the given item (or an occurrence of the item) occurs within the range specified by the startPeriod and the endPeriod, inclusive. A default-constructed startPeriod signifies that the lower bound of the range is infinitely small (i.e., will match anything up to the endPeriod) and a default-constructed endPeriod signifies that the upper bound of the range is infinitely large (i.e., will match anything which occurs after the startPeriod).

bool QOrganizerManagerEngine::itemHasReccurence(const QOrganizerItem & oi) [static]

Returns true if the given organizer item oi has any recurrence.

QList<QOrganizerItemId> QOrganizerManagerEngine::itemIds(const QOrganizerItemFilter & filter, const QDateTime & startDateTime, const QDateTime & endDateTime, const QList<QOrganizerItemSortOrder> & sortOrders, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to fetch organizer item IDs.

This function is supposed to return a list of item IDs of persisted organizer items that match the given filter, sorted according to the given list of sortOrders, for any item which occurs (or has an occurrence which occurs) in the range specified by the given startDateTime and endDateTime, inclusive. Any error which occurs should be saved in error.

A default-constructed (invalid) startDateTime specifies an open start date time (matches anything which occurs up until the endDateTime), and a default-constructed (invalid) endDateTime specifies an open end date time (matches anything which occurs after the startDateTime). If both the startDateTime and endDateTime are invalid, this function will return the IDs of all items which match the filter criteria.

It's up to the backend to decide how filters are supported.

bool QOrganizerManagerEngine::itemLessThan(const QOrganizerItem & a, const QOrganizerItem & b) [static]

Returns true if and only if a is temporally less than b. Items with an earlier date are temporally less than items with a later date, or items with no date. All day items are temporally less than non-all day items on the same date. For events and todos, the start date is used, or if null, the end date is used. This function defines a total ordering suitable for use in a sort function.

QList<QOrganizerItem> QOrganizerManagerEngine::itemOccurrences(const QOrganizerItem & parentItem, const QDateTime & startDateTime, const QDateTime & endDateTime, int maxCount, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to fetch occurrences of the given parent item.

This function is supposed to return a list of a maximum of maxCount organizer item instances which are occurrences of the given parentItem recurring item, which occur between the given startDateTime and the given endDateTime date, inclusive. Any error which occurs should be saved in error.

A default-constructed (invalid) startDateTime specifies an open start date time (matches anything which occurs up until the endDateTime), and a default-constructed (invalid) endDateTime specifies an open end date time (matches anything which occurs after the startDateTime). If both the startDateTime and endDateTime are invalid, this function will return the IDs of all items.

It's up to the backend to decide how many occurrences are returned if the given maxCount is negative.

It's up to the backend to decide if fetch hint is supported. If supported, only the details defined by fetchHint will be fetched.

QList<QOrganizerItem> QOrganizerManagerEngine::items(const QList<QOrganizerItemId> & itemIds, const QOrganizerItemFetchHint & fetchHint, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to fetch organizer items by their IDs itemIds.

The items fetched by the backend should have a one-to-one correspondence to the IDs passed into this class. That is, the nth item in the returned list should have an ID which is equal to the nth ID in the list of IDs. Any invalid ID should correspond to an empty QOrganizerItem.

It's up to the backend to decide if fetch hint is supported. If supported, only the details defined by fetchHint will be fetched.

Any operation error which occurs should be saved in error. And the per-input errors should be stored in errorMap.

QList<QOrganizerItem> QOrganizerManagerEngine::items(const QOrganizerItemFilter & filter, const QDateTime & startDateTime, const QDateTime & endDateTime, int maxCount, const QList<QOrganizerItemSortOrder> & sortOrders, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to fetch organizer items.

This function is supposed to return a list of a maximum of maxCount organizer items and occurrences that match the given filter, which occur in the range specified by the given startDateTime and endDateTime, inclusive, and sorted according to the given list of sortOrders. Any operation error which occurs should be saved in error.

A default-constructed (invalid) startDateTime specifies an open start date time (matches anything which occurs up until the endDateTime), and a default-constructed (invalid) endDateTime specifies an open end date time (matches anything which occurs after the startDateTime). If both the startDateTime and endDateTime are invalid, this function will return the IDs of all items which match the filter criteria.

If no sort order is provided, the list is returned sorted by date.

It's up to the backend to decide how many items should be returned if maxCount is negative.

It's up to the backend to decide if filter and fetch hint are supported.

void QOrganizerManagerEngine::itemsAdded(const QList<QOrganizerItemId> & itemIds) [signal]

This signal should be emitted at some point once the items identified by itemIds have been added to the backend.

This signal should not be emitted if the dataChanged() signal was previously emitted for these changes.

See also dataChanged().

void QOrganizerManagerEngine::itemsChanged(const QList<QOrganizerItemId> & itemIds) [signal]

This signal should be emitted at some point once the items identified by itemIds have been modified in the backend.

This signal should not be emitted if the dataChanged() signal was previously emitted for these changes.

See also dataChanged().

QList<QOrganizerItem> QOrganizerManagerEngine::itemsForExport(const QDateTime & startDateTime, const QDateTime & endDateTime, const QOrganizerItemFilter & filter, const QList<QOrganizerItemSortOrder> & sortOrders, const QOrganizerItemFetchHint & fetchHint, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to fetch organizer items for export.

This function is supposed to return a list of organizer items that match the given filter, sorted according to the given list of sortOrders, for any item which occurs (or has an occurrence which occurs) in the range specified by the given startDateTime and endDateTime, inclusive. Any operation error which occurs should be saved in error.

Note that event occurrences and TODO occurrences should only be returned when they represent an exceptional occurrence (i.e. the client has specifically saved the occurrence in the backend).

A default-constructed (invalid) startDateTime specifies an open start date time (matches anything which occurs up until the endDateTime), and a default-constructed (invalid) endDateTime specifies an open end date time (matches anything which occurs after the startDateTime). If both the startDateTime and endDateTime are invalid, this function will return the IDs of all items which match the filter criteria.

It's up to the backend to decide if filter and fetch hint are supported. If the fetch hint is supported, only the details defined by fetchHint will be fetched.

void QOrganizerManagerEngine::itemsModified(const QList<QPair<QOrganizerItemId, QOrganizerManager::Operation> > & itemIds) [signal]

This signal should be emitted at some point once the items identified by itemIds have been modified in the backend.

This signal should not be emitted if the dataChanged() signal was previously emitted for these changes.

See also dataChanged().

void QOrganizerManagerEngine::itemsRemoved(const QList<QOrganizerItemId> & itemIds) [signal]

This signal should be emitted at some point once the items identified by itemIds have been removed from the backend.

This signal should not be emitted if the dataChanged() signal was previously emitted for these changes.

See also dataChanged().

QString QOrganizerManagerEngine::managerName() const [virtual]

This function should be reimplemented to return the name of this backend. The default implementation returns the name "invalid".

QMap<QString, QString> QOrganizerManagerEngine::managerParameters() const [virtual]

This function should be reimplemented to return the parameters used in when constructing this backend. The default implementation returns an empty QMap.

If certain paramters are invalid, or discarded by the backend, they should not be returned.

QString QOrganizerManagerEngine::managerUri() const

Returns the unique URI of this manager, which is built from the manager name and the parameters used to construct it.

QList<QDate> QOrganizerManagerEngine::matchingDates(const QDate & periodStart, const QDate & periodEnd, const QOrganizerRecurrenceRule & rrule) [static]

Returns a list of dates between periodStart (inclusive) and periodEnd (inclusive) which match the rrule. Only daysOfWeek, daysOfMonth, daysOfYear, weeksOfYear and months from the rrule are matched.

bool QOrganizerManagerEngine::removeCollection(const QOrganizerCollectionId & collectionId, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to remove a collection.

This function is supposed to remove the collection identified by the given collectionId, and all items in the collection. Returns true on success, or false otherwise. Any errors encountered during this operation should be stored to error.

Note that removing the default collection should not be allowed and should result a QOrganizerManager::PermissionsError error.

bool QOrganizerManagerEngine::removeItems(const QList<QOrganizerItemId> & itemIds, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to remove organizer items.

This function is supposed to remove all the items whose ID is contained in the given list of itemIds, and all the occurrences whose parent ID is containd in the itemIds. If the list contains ids which do not identify a valid item in the manager error will be set to QOrganizerManager::DoesNotExist. Returns true if all the items and occurrences are successfully removed, or false otherwise.

Any error which occurs should be saved in error, and per-input errors for the operation should be stored in errorMap.

bool QOrganizerManagerEngine::removeItems(const QList<QOrganizerItem> * items, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to remove organizer items.

This function is supposed to remove all the items in the given list of items, and all the occurrences whose parent is containd in the items. If item in the list is a generated occurrence, an exception date is added to the parent item. If the list contains ids which do not identify a valid item in the manager error will be set to QOrganizerManager::DoesNotExist. Returns true if all the items and occurrences are successfully removed, or false otherwise.

Any error which occurs should be saved in error, and per-input errors for the operation should be stored in errorMap.

void QOrganizerManagerEngine::requestDestroyed(QOrganizerAbstractRequest * request) [virtual]

This function is called when the given request has been destroyed by the client.

When this function is called, it means for the backend:

  • The client doesn't care about the request any more. The engine can still complete it, but completion is not required.
  • It can't reliably access any properties of the request pointer any more. The pointer will be invalid once this function returns.

Note that since the request may run in another thread, this function should be blocked until the worker thread gets fully notified.

bool QOrganizerManagerEngine::saveCollection(QOrganizerCollection * collection, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to save a collection.

This function is supposed to save the given collection to the backend, and returns true on success or false otherwise. Any errors encountered during this operation should be stored to error.

A new collection will be created in the backend store if the collection ID of it is null. Otherwise, an existing collection with the same ID will be updated. If the given collection ID does not exist in the backend, it will result a QOrganizerManager::DoesNotExistError error.

Note that upon successful saving, the backend may update the collection, e.g. collection ID for newly saved collections.

bool QOrganizerManagerEngine::saveItems(QList<QOrganizerItem> * items, const QList<QOrganizerItemDetail::DetailType> & detailMask, QMap<int, QOrganizerManager::Error> * errorMap, QOrganizerManager::Error * error) [virtual]

This function should be reimplemented to support synchronous calls to save organizer items.

This function is supposed to save the given list of items to the backend, and returns true on success or false otherwise.

A new organizer item will be created in the backend store if the item ID of it is null. Otherwise, an existing item with the same ID will be updated. If the given item ID does not exist in the backend, it will result a QOrganizerManager::DoesNotExistError error.

If the collection ID of the item is null, it will be saved to the default collection. If the given collection ID doesn't exist, the saving will fail and error will be set to QOrganizerManager::InvalidCollectionError.

If the detailMask is empty, only the details currently existing in the item will be saved. Otherwise, only details masked by the detailMask will be saved or updated, others are kept untouched. It's useful to avoid information loss if the items are retrieved with a fetch hint.

Note that upon successful saving, the backend may update the item, e.g. item ID for newly saved items, GUID, timestamp, version, etc.

Any error which occurs should be saved in error, and per-input errors for the operation should be stored in errorMap.

bool QOrganizerManagerEngine::startRequest(QOrganizerAbstractRequest * request) [virtual]

This function is called when the client tries to start the given asynchronous request. Returns true if the request is started successfully, or false otherwise.

Note that the request is supposed to run in an asynchronous manner that this function should return as soon as possible. Therefore, it the operation would last sometime, a worker thread should be used to queue and process the request. In such cases, backend should be aware that the request may be deleted by the client, and requestDestroyed() function will be called.

QList<QOrganizerItemFilter::FilterType> QOrganizerManagerEngine::supportedFilters() const [virtual]

This function should be reimplemented to return the list of filters supported by this backend. The default implementation returns an empty list.

QList<QOrganizerItemDetail::DetailType> QOrganizerManagerEngine::supportedItemDetails(QOrganizerItemType::ItemType itemType) const [virtual]

This function should be reimplemented to return the list of details supported by this backend for the given itemType. The default implementation returns an empty list.

QList<QOrganizerItemType::ItemType> QOrganizerManagerEngine::supportedItemTypes() const [virtual]

This function should be reimplemented to return the list of item types supported by this backend. The default implementation returns an empty list.

bool QOrganizerManagerEngine::testFilter(const QOrganizerItemFilter & filter, const QOrganizerItem & item) [static]

Returns true if the supplied item item matches the supplied filter filter.

This function will test each condition in the filter, possibly recursing.

void QOrganizerManagerEngine::updateCollectionFetchRequest(QOrganizerCollectionFetchRequest * req, const QList<QOrganizerCollection> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerCollectionFetchRequest req with the latest results result and an operation error error. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress. If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateCollectionRemoveRequest(QOrganizerCollectionRemoveRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerCollectionRemoveRequest req with the operation error error, and map of input index to individual error errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress. If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateCollectionSaveRequest(QOrganizerCollectionSaveRequest * req, const QList<QOrganizerCollection> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerCollectionSaveRequest req with the latest results result, operation error error, and map of input index to individual error errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress. If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateItemFetchByIdRequest(QOrganizerItemFetchByIdRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerItemFetchByIdRequest req with the latest results result, and operation error error, and map of input index to individual error errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateItemFetchForExportRequest(QOrganizerItemFetchForExportRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerItemFetchForExportRequest req with the latest results result, and operation error error. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateItemFetchRequest(QOrganizerItemFetchRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerItemFetchRequest req with the latest results result, and operation error error. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateItemIdFetchRequest(QOrganizerItemIdFetchRequest * req, const QList<QOrganizerItemId> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerItemIdFetchRequest req with the latest results result, and operation error error. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateItemOccurrenceFetchRequest(QOrganizerItemOccurrenceFetchRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerItemOccurrenceFetchRequest req with the latest results result, and operation error error. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateItemRemoveByIdRequest(QOrganizerItemRemoveByIdRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerItemRemoveByIdRequest req with the operation error error, and map of input index to individual error errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateItemRemoveRequest(QOrganizerItemRemoveRequest * req, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerItemRemoveRequest req with the operation error error, and map of input index to individual error errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateItemSaveRequest(QOrganizerItemSaveRequest * req, const QList<QOrganizerItem> & result, QOrganizerManager::Error error, const QMap<int, QOrganizerManager::Error> & errorMap, QOrganizerAbstractRequest::State newState) [static]

Updates the given QOrganizerItemSaveRequest req with the latest results result, operation error error, and map of input index to individual error errorMap. In addition, the state of the request will be changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify clients of the request progress.

If the new request state is different from the previous state, the stateChanged() signal will also be emitted from the request.

void QOrganizerManagerEngine::updateRequestState(QOrganizerAbstractRequest * req, QOrganizerAbstractRequest::State state) [static]

Updates the given asynchronous request req by setting the new state of the request. If the new state is different, the stateChanged() signal will be emitted by the request.

bool QOrganizerManagerEngine::waitForRequestFinished(QOrganizerAbstractRequest * request, int msecs) [virtual]

This function is called when the client wants to be blocked until the given request is completed, or until msecs milliseconds have passed. Returns true when the request is completed, or false otherwise.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web