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  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QLandmarkManagerEngine Class Reference

The QLandmarkManagerEngine class provides the interface for all implementations of the landmark manager backend functionality. More...

 #include <QLandmarkManagerEngine>

Inherits QObject.

Public Functions

QLandmarkManagerEngine ()
virtual ~QLandmarkManagerEngine ()
virtual bool cancelRequest ( QLandmarkAbstractRequest * request ) = 0
virtual QList<QLandmarkCategory> categories ( const QList<QLandmarkCategoryId> & categoryIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QList<QLandmarkCategory> categories ( int limit, int offset, const QLandmarkNameSort & nameSort, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QLandmarkCategory category ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QList<QLandmarkCategoryId> categoryIds ( int limit, int offset, const QLandmarkNameSort & nameSort, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool exportLandmarks ( QIODevice * device, const QString & format, const QList<QLandmarkId> & landmarkIds, QLandmarkManager::TransferOption option, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QLandmarkManager::SupportLevel filterSupportLevel ( const QLandmarkFilter & filter, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool importLandmarks ( QIODevice * device, const QString & format, QLandmarkManager::TransferOption option, const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool isFeatureSupported ( QLandmarkManager::ManagerFeature feature, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool isReadOnly ( QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool isReadOnly ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool isReadOnly ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QLandmark landmark ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QList<QLandmarkId> landmarkIds ( const QLandmarkFilter & filter, int limit, int offset, const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QList<QLandmark> landmarks ( const QList<QLandmarkId> & landmarkIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QList<QLandmark> landmarks ( const QLandmarkFilter & filter, int limit, int offset, const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QString managerName () const = 0
virtual QMap<QString, QString> managerParameters () const = 0
QString managerUri () const
virtual int managerVersion () const = 0
virtual bool removeCategory ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool removeLandmark ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool removeLandmarks ( const QList<QLandmarkId> & landmarkIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual void requestDestroyed ( QLandmarkAbstractRequest * request ) = 0
virtual bool saveCategory ( QLandmarkCategory * category, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool saveLandmark ( QLandmark * landmark, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual bool saveLandmarks ( QList<QLandmark> * landmarks, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) = 0
virtual QStringList searchableLandmarkAttributeKeys ( QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual QLandmarkManager::SupportLevel sortOrderSupportLevel ( const QLandmarkSortOrder & sortOrder, QLandmarkManager::Error * error, QString * errorString ) const = 0
virtual bool startRequest ( QLandmarkAbstractRequest * request ) = 0
virtual QStringList supportedFormats ( QLandmarkManager::TransferOperation operation, QLandmarkManager::Error * error, QString * errorString ) const
virtual bool waitForRequestFinished ( QLandmarkAbstractRequest * request, int msecs ) = 0
  • 29 public functions inherited from QObject

Signals

void categoriesAdded ( const QList<QLandmarkCategoryId> & categoryIds )
void categoriesChanged ( const QList<QLandmarkCategoryId> & categoryIds )
void categoriesRemoved ( const QList<QLandmarkCategoryId> & categoryIds )
void dataChanged ()
void landmarksAdded ( const QList<QLandmarkId> & landmarkIds )
void landmarksChanged ( const QList<QLandmarkId> & landmarkIds )
void landmarksRemoved ( const QList<QLandmarkId> & landmarkIds )

Static Public Members

void addSorted ( QList<QLandmark> * sorted, const QLandmark & landmark, const QList<QLandmarkSortOrder> & sortOrders )
int compareLandmark ( const QLandmark & a, const QLandmark & b, const QList<QLandmarkSortOrder> & sortOrders )
int compareName ( const QLandmark & a, const QLandmark & b, const QLandmarkNameSort & nameSort )
QList<QLandmarkId> sortLandmarks ( const QList<QLandmark> & landmarks, const QList<QLandmarkSortOrder> & sortOrders )
bool testFilter ( const QLandmarkFilter & filter, const QLandmark & landmark )
void updateLandmarkCategoryFetchByIdRequest ( QLandmarkCategoryFetchByIdRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkCategoryFetchRequest ( QLandmarkCategoryFetchRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkCategoryIdFetchRequest ( QLandmarkCategoryIdFetchRequest * req, const QList<QLandmarkCategoryId> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkCategoryRemoveRequest ( QLandmarkCategoryRemoveRequest * req, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkCategorySaveRequest ( QLandmarkCategorySaveRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkExportRequest ( QLandmarkExportRequest * req, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkFetchByIdRequest ( QLandmarkFetchByIdRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkFetchRequest ( QLandmarkFetchRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkIdFetchRequest ( QLandmarkIdFetchRequest * req, const QList<QLandmarkId> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkImportRequest ( QLandmarkImportRequest * req, const QList<QLandmarkId> & ids, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState )
void updateLandmarkRemoveRequest ( QLandmarkRemoveRequest * req, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateLandmarkSaveRequest ( QLandmarkSaveRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState )
void updateRequestState ( QLandmarkAbstractRequest * req, QLandmarkAbstractRequest::State state )
  • 4 static public members inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QLandmarkManagerEngine class provides the interface for all implementations of the landmark manager backend functionality.

Instances of this class are usually provided by QLandmarkManagerEngineFactory, which is loaded from a plugin.

Member Function Documentation

QLandmarkManagerEngine::QLandmarkManagerEngine ()

Constructs a landmark manager engine.

QLandmarkManagerEngine::~QLandmarkManagerEngine () [virtual]

Destructor.

void QLandmarkManagerEngine::addSorted ( QList<QLandmark> * sorted, const QLandmark & landmark, const QList<QLandmarkSortOrder> & sortOrders ) [static]

Performs an insertion sort landmark into the sorted list, according to the provided sortOrders list. The first QLandmarkSortOrder in the list has the highest priority; if the landmark is deemed equal to another in the sorted list, the second QLandmarkSortOrder in the list is used (and so on until either the landmark is inserted or there are no more sort order objects in the list).

bool QLandmarkManagerEngine::cancelRequest ( QLandmarkAbstractRequest * request ) [pure virtual]

Asks the manager engine to cancel the given request which was previously started and is currently in a cancellable state. Returns true if cancelation of the request was started successfully, otherwise returns false.

See also startRequest() and QLandmarkAbstractRequest::cancel().

QList<QLandmarkCategory> QLandmarkManagerEngine::categories ( const QList<QLandmarkCategoryId> & categoryIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of categories which match the given categoryIds. The engine will populate errorMap (the map of indices of the categoryIds list to errors) for the indexes where the category could not be retrieved.

Overall operation errors are stored in error and errorString. error is set to QLandmarkManager::NoError, if all categories were successfully retrieved.

QList<QLandmarkCategory> QLandmarkManagerEngine::categories ( int limit, int offset, const QLandmarkNameSort & nameSort, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of categories. The limit defines the maximum number of categories to return and the offset defines the index offset of the first category. A limit of -1 means all categories should be returned. The returned categories ordered according to the gien nameSort.

void QLandmarkManagerEngine::categoriesAdded ( const QList<QLandmarkCategoryId> & categoryIds ) [signal]

This signal is emitted some time after a set of categories has been added to the datastore managed by this engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have added the landmarks, the exact timing cannot be determined.

There may be one or more category identifiers in the categoryIds list.

See also dataChanged(), categoriesChanged(), and categoriesRemoved().

void QLandmarkManagerEngine::categoriesChanged ( const QList<QLandmarkCategoryId> & categoryIds ) [signal]

This signal is emitted some time after a set of categories have been modified in the datastore managed by the engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have modified the categories, the timing cannot be determined.

There may be one ore more category identifiers in the categoryIds list.

See also dataChanged(), categoriesAdded(), and categoriesRemoved().

void QLandmarkManagerEngine::categoriesRemoved ( const QList<QLandmarkCategoryId> & categoryIds ) [signal]

This signal is emitted some time after a set of categories have been removed from the datastore managed by this engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have removed the categories, the timing cannot be determined.

There may be one ore more category identifiers in the categoryIds list.

See also dataChanged(), categoriesAdded(), and categoriesChanged().

QLandmarkCategory QLandmarkManagerEngine::category ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the category in the datastore identified by categoryId.

Any errors encountered are stored in error and errorString. A QLandmarkManager::CategoryDoesNotExist error is set if the category could not be found.

QList<QLandmarkCategoryId> QLandmarkManagerEngine::categoryIds ( int limit, int offset, const QLandmarkNameSort & nameSort, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of category identifiers The limit defines the maximum number of IDs to return and the offset defines the index offset of the first ID. A limit of -1 means IDs for all categories should be returned. Any error which occurs will be saved in error and errorString. The identifiers are returned in order according to the given nameSort.

int QLandmarkManagerEngine::compareLandmark ( const QLandmark & a, const QLandmark & b, const QList<QLandmarkSortOrder> & sortOrders ) [static]

Compares two landmarks (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 QLandmarkManagerEngine::compareName ( const QLandmark & a, const QLandmark & b, const QLandmarkNameSort & nameSort ) [static]

Compares two landmarks (a and b) by name.

Returns a negative number if a should appear before b according to the nameSort, a positive number if a should appear after b according to the nameSort, and zero if the two are unable to be sorted.

Assuming an ascending order sort, an integer less than, equal to, or greater than zero is returned if a is less than, equal to or greater than b.

nameSort specifies whether an ascending or descending order is used and whether the sort is case sensitive or not.

void QLandmarkManagerEngine::dataChanged () [signal]

This signal is emitted some time after changes occur to the datastore managed by this engine, and the engine is unable to precisely determine which changes occurred, or if the engine considers the changes to be radical enough to require clients to reload all data.

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

As it is possible that other processes (or other devices) may have caused the changes, the timing can not be determined.

See also landmarksAdded(), landmarksChanged(), landmarksRemoved(), categoriesAdded(), categoriesChanged(), and categoriesRemoved().

bool QLandmarkManagerEngine::exportLandmarks ( QIODevice * device, const QString & format, const QList<QLandmarkId> & landmarkIds, QLandmarkManager::TransferOption option, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Writes landmarks to the given device. The landmarks will be written according to the specified format. If landmarkIds is empty, then all landmarks will be exported, otherwise only those landmarks that match landmarkIds will be exported.

The option can be used to control whether categories will be exported or not. Note that the AttachSingleCategory option has no meaning during export and the manager will export as if option was IncludeCategoryData. Also, be aware that some file formats may not support categories at all and for these formats, the option is always treated as if it was ExcludeCategoryData.

Returns true if all specified landmarks were successfully exported, otherwise returns false.

Overall operation errors are stored in error and errorString.

QLandmarkManager::SupportLevel QLandmarkManagerEngine::filterSupportLevel ( const QLandmarkFilter & filter, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the support level the manager engine provides for the given filter. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::importLandmarks ( QIODevice * device, const QString & format, QLandmarkManager::TransferOption option, const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Reads landmarks from the given device and saves them. The data from the device is expected to adhere to the provided format. If no format is provided, the manager engine tries to autodetect the format.

The option can be used to control whether categories in the imported file will be added during the import. If the AttachSingleCategory option is used, then all the landmarks in the import file are assigned to the category identified by categoryId, in all other circumstances categoryId is ignored. If categoryId doesn't exist when using AttachSingleCategory, QLandmarkManager::CategoryDoesNotExist error is returned. Note that some file formats may not support categories at all.

Returns true if all landmarks could be imported, otherwise returns false.

Overall operational errors are stored in error and errorString.

bool QLandmarkManagerEngine::isFeatureSupported ( QLandmarkManager::ManagerFeature feature, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns true if the manager engine supports the given feature, otherwise returns false; Errors are stored in error and errorString.

bool QLandmarkManagerEngine::isReadOnly ( QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns true if the manager engine is exclusively read only. Meaning landmarks and categories cannot be added, modified or removed. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::isReadOnly ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns true if the landmark identified by landmarkId considered read-only by the manager engine.

If the landmarkId does not refer to an existing landmark, it is considered writable unless the manager engine is exclusively read-only. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::isReadOnly ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns true if the category identified by categoryId is considered read-only by the manager engine.

If categoryId does not refer to an existing category, it is considered writable unless the manager engine is exclusively read-only. Errors are stored in error and errorString.

QLandmark QLandmarkManagerEngine::landmark ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the landmark in the datastore identified by landmarkId.

Any errors encountered are:stored in error and errorString. The error is set to QLandmarkManager::LandmarkDoesNotExistError if the landmark could not be found.

QList<QLandmarkId> QLandmarkManagerEngine::landmarkIds ( const QLandmarkFilter & filter, int limit, int offset, const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of landmark identifiers which match the given filter and are sorted according to the given sortOrders. The limit defines the maximum number of landmark IDs to return and the offset defines the index offset of the first landmark ID. A limit of -1 means that IDs of all matching landmarks should be returned.

Any error which occurs will be saved in error and errorString.

QList<QLandmark> QLandmarkManagerEngine::landmarks ( const QList<QLandmarkId> & landmarkIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of landmarks which match the given landmarkIds. The engine will populate errorMap (the map of indices of the landmarkIds list to errors) for the indexes where the landmark could not be retrieved.

Overall operation errors are stored in error and errorString. error is set to QLandmarkManager::NoError, all landmarks were successfully retrieved.

QList<QLandmark> QLandmarkManagerEngine::landmarks ( const QLandmarkFilter & filter, int limit, int offset, const QList<QLandmarkSortOrder> & sortOrders, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns a list of landmarks which match the given filter and are sorted according to the sortOrders. The limit defines the maximum number of landmarks to return and the offset defines the index offset of the first landmark. A limit of -1 means all matching landmarks should be returned.

Overall operation errors are stored in error and errorString.

void QLandmarkManagerEngine::landmarksAdded ( const QList<QLandmarkId> & landmarkIds ) [signal]

This signal is emitted some time after a set of landmarks has been added to the datastore managed by the engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have added the landmarks, the exact timing cannot be determined.

There may be one or more landmark identifiers in the landmarkIds list.

See also dataChanged(), landmarksChanged(), and landmarksRemoved().

void QLandmarkManagerEngine::landmarksChanged ( const QList<QLandmarkId> & landmarkIds ) [signal]

This signal is emitted some time after a set of landmarks have been modified in the datastore managed by this engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have modified the landmarks, the timing cannot be determined.

Note that removal of a category will not trigger a landmarksChanged signal for landmarks belonging to that category.

There may be one ore more landmark identifiers in the landmarkIds list.

See also dataChanged(), landmarksAdded(), and landmarksRemoved().

void QLandmarkManagerEngine::landmarksRemoved ( const QList<QLandmarkId> & landmarkIds ) [signal]

This signal is emitted some time after a set of landmarks have been removed from the datastore managed by this engine and where the dataChanged() signal was not emitted for those changes. As it is possible that other processes(or other devices) may have removed the landmarks, the timing cannot be determined.

There may be one ore more landmark identifiers in the landmarkIds list.

See also dataChanged(), landmarksAdded(), and landmarksChanged().

QString QLandmarkManagerEngine::managerName () const [pure virtual]

Returns the manager name for this QLandmarkManagerEngine

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

Returns the parameters with which this engine was constructed. Note that the engine may have discarded unused or invalid parameters at the time of construction, and these will not be returned.

QString QLandmarkManagerEngine::managerUri () const

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

int QLandmarkManagerEngine::managerVersion () const [pure virtual]

Returns the engine backend implementation version number

bool QLandmarkManagerEngine::removeCategory ( const QLandmarkCategoryId & categoryId, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Removes the category identified by categoryId from the datastore.

Returns true if the category was removed successfully, otherwise returnse false.

The engine emits the appropriate signals to inform clients of changes to the datastore resulting from this operation

Overall operational errors are stored in error and errorString.

bool QLandmarkManagerEngine::removeLandmark ( const QLandmarkId & landmarkId, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Remove the landmark identified by landmarkId from the datastore.

Returns true if the landmark was removed successfully, otherwise returnse false.

The engine emits the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Any errors encountered during this operation should be stored to error and errorString.

bool QLandmarkManagerEngine::removeLandmarks ( const QList<QLandmarkId> & landmarkIds, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Removes every landmark whose identifier is contained in the list of landmarkIds. Returns true if all landmarks were removed successfully, otherwise false.

The engine populates errorMap (the map of indices of the landmarkIds list to errors) for every index for which the landmark could not be removed.

The engine also emits the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Overall operation errors are stored in error and errorString. error is set to QLandmarkManager::NoError, if all landmarks were successfully removed.

See also QLandmarkManagerEngine::removeLandmark().

void QLandmarkManagerEngine::requestDestroyed ( QLandmarkAbstractRequest * request ) [pure virtual]

Notifies the manager engine that the given request has been destroyed.

bool QLandmarkManagerEngine::saveCategory ( QLandmarkCategory * category, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Adds the given category to the datastore if category has a default-constructed identifier, or an identifier with the manager URI set to the URI of this manager and an empty id.

If the manager URI of the identifier of the category is neither empty nor equal to the URI of this manager, or the id member of the identifier is not empty, but does not exist in the manager, the operation should fail and error should be set to QLandmarkManager::CategoryDoesNotExistError.

Alternatively, the function should update the existing category in the datastore if category has a non-empty id and currently exists within the datastore.

Returns false on failure or true on success. On successful save of a category with an invalid id, it should be assigned a valid id and have its manager URI set to the URI of this manager.

The engine returns the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Overall operations errors should be stored in error and errorString.

bool QLandmarkManagerEngine::saveLandmark ( QLandmark * landmark, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Adds the given landmark to the datastore if landmark has a default-constructed identifer, or an identifier with the manager URI set to the URI of this manager and an empty id.

If the manager URI of the identifier of the landmark is neither empty nor equal to the URI of this manager, or the id member of the identifier is not empty, but does not exist in the manager, the operation will fail and and error will be set to QLandmarkManager::LandmarkDoesNotExistError.

Alternatively, the function will update the existing landmark in the datastore if landmark has a non-empty id and currently exists within the datastore.

Returns false on failure or true on success. On successful save of a landmark with an empty id, it will be assigned a valid id and have its manager URI set to the URI of this manager.

The engine must emit the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Any errors encountered during this operation should be stored in error and errorString.

bool QLandmarkManagerEngine::saveLandmarks ( QList<QLandmark> * landmarks, QMap<int, QLandmarkManager::Error> * errorMap, QLandmarkManager::Error * error, QString * errorString ) [pure virtual]

Adds the list of landmarks to the datastore. Returns true if the landmarks were saved successfully, otherwise returns false.

The engine will populate errorMap (the map of indices of the landmarks list to errors) for every index for which the landmark could not be saved.

For each newly saved landmark that was successful, the identifier of the landmark will be updated with a new value.

The engine emits the appropriate signals to inform clients of changes to the datastore resulting from this operation.

Overall operation errors are stored in error and errorString. error is set to QLandmarkManager::NoError, if all landmarks were successfully saved.

See also QLandmarkManagerEngine::saveLandmark().

QStringList QLandmarkManagerEngine::searchableLandmarkAttributeKeys ( QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the list of landmark attribute keys that may be used in a QLandmarkAttributeFilter. Errors are stored in error and errorString.

QList<QLandmarkId> QLandmarkManagerEngine::sortLandmarks ( const QList<QLandmark> & landmarks, const QList<QLandmarkSortOrder> & sortOrders ) [static]

Sorts the given list of landmarks according to the provided sortOrders

QLandmarkManager::SupportLevel QLandmarkManagerEngine::sortOrderSupportLevel ( const QLandmarkSortOrder & sortOrder, QLandmarkManager::Error * error, QString * errorString ) const [pure virtual]

Returns the support level the manager engine provides for the given sortOrder. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::startRequest ( QLandmarkAbstractRequest * request ) [pure virtual]

Asks the manager engine to begin the given request which is currently in a re(startable) state.

Returns true if the request was started successfully, else returns false.

See also QLandmarkAbstractRequest::start().

QStringList QLandmarkManagerEngine::supportedFormats ( QLandmarkManager::TransferOperation operation, QLandmarkManager::Error * error, QString * errorString ) const [virtual]

Returns the supported file formats for the given transfer operation, i.e. import or export. Errors are stored in error and errorString.

bool QLandmarkManagerEngine::testFilter ( const QLandmarkFilter & filter, const QLandmark & landmark ) [static]

Returns true if the supplied landmark matches the supplied filter.

void QLandmarkManagerEngine::updateLandmarkCategoryFetchByIdRequest ( QLandmarkCategoryFetchByIdRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkCategoryFetchByIdRequest req with the latest result, and operation error and errorString, and map of input index to individual errors, 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 QLandmarkManagerEngine::updateLandmarkCategoryFetchRequest ( QLandmarkCategoryFetchRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkCategoryFetchRequest req with the latest result, and operation error and errorString. 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 QLandmarkManagerEngine::updateLandmarkCategoryIdFetchRequest ( QLandmarkCategoryIdFetchRequest * req, const QList<QLandmarkCategoryId> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkCategoryIdFetchRequest req with the latest result, and operation error and errorString. 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 QLandmarkManagerEngine::updateLandmarkCategoryRemoveRequest ( QLandmarkCategoryRemoveRequest * req, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkCategoryRemoveRequest req with the operation error and errorString and map of input index to individual errors, 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 QLandmarkManagerEngine::updateLandmarkCategorySaveRequest ( QLandmarkCategorySaveRequest * req, const QList<QLandmarkCategory> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkSaveCategoryRequest req with the latest result, operation error error and errorString, and map of input index to individual errors, 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 QLandmarkManagerEngine::updateLandmarkExportRequest ( QLandmarkExportRequest * req, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkExportRequest req with the operation error and errorString. In addition the state of the request is changed to newState.

It then causes the request to emit its resultsAvailable() signal to notify the 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 QLandmarkManagerEngine::updateLandmarkFetchByIdRequest ( QLandmarkFetchByIdRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkFetchByIdRequest req with the latest result, operation error and errorString and map of input index to individual errors, 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 QLandmarkManagerEngine::updateLandmarkFetchRequest ( QLandmarkFetchRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkFetchRequest req with the latest result, and operation error and errorString. 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 QLandmarkManagerEngine::updateLandmarkIdFetchRequest ( QLandmarkIdFetchRequest * req, const QList<QLandmarkId> & result, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkIdFetchRequest req with the latest result, and operation error and errorString. 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 QLandmarkManagerEngine::updateLandmarkImportRequest ( QLandmarkImportRequest * req, const QList<QLandmarkId> & ids, QLandmarkManager::Error error, const QString & errorString, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkImportRequest req with the operation error and errorString. In addition the state of the request is changed to newState. This function may also be used to update the ids of the landmarks which have been imported.

It then causes the request to emit its resultsAvailable() signal to notify the 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 QLandmarkManagerEngine::updateLandmarkRemoveRequest ( QLandmarkRemoveRequest * req, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkRemoveRequest req with the operation error and errorString and map of input index to individual errors, 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 QLandmarkManagerEngine::updateLandmarkSaveRequest ( QLandmarkSaveRequest * req, const QList<QLandmark> & result, QLandmarkManager::Error error, const QString & errorString, const QMap<int, QLandmarkManager::Error> & errorMap, QLandmarkAbstractRequest::State newState ) [static]

Updates the given QLandmarkSaveRequest req with the latest result, operation error and errorString, and map of input index to individual errors, 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 QLandmarkManagerEngine::updateRequestState ( QLandmarkAbstractRequest * req, QLandmarkAbstractRequest::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 QLandmarkManagerEngine::waitForRequestFinished ( QLandmarkAbstractRequest * request, int msecs ) [pure virtual]

Blocks until the manager engine has completed the given request which was previously started, or until msecs milliseconds have passed. Returns true if the request was completed, and false if the request was not in the QLandmarkAbstractRequest::Active state, no progress could be reported or if the engine does not support waitForFinished functionality.

See also startRequest().

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.

[0]; s.parentNode.insertBefore(ga, s); })();
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 93
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 40
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 6
Page suivante

Le Qt Labs au hasard

Logo

Génération de contenu dans des threads

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

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 qtmobility-1.1
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