Detailed Description
The QLandmarkImportRequest class allows a client to asynchronously request that a landmark manager import a set of landmarks.
For a QLandmarkImportRequest, the resultsAvailable() signal will be emitted when landmarks have been successfully imported by the manager. The list of added landmarks may be retrieved by the landmarkIds() function. The resultsAvailable() signal may also be emitted if an overall operational error occurs.
Please see the class documentation for QLandmarkAbstractRequest for more information about the usage of request classes and ownership semantics.
Note that for S60 and Symbian platforms, the waitForFinished() function is not supported for import requests and will always return false.
Member Function Documentation
QLandmarkImportRequest::QLandmarkImportRequest ( QLandmarkManager * manager, QObject * parent = 0 )
Constructs a landmark import request with the given manager parent.
QLandmarkImportRequest::~QLandmarkImportRequest ()
Destroys the request object.
QLandmarkCategoryId QLandmarkImportRequest::categoryId () const
Returns identifier of the category which all landmarks are assigned to if QLandmarkManager::AttachSingleCategory is used as the import option.
See also setCategoryId().
QIODevice * QLandmarkImportRequest::device () const
Returns the device from which landmarks are read.
See also setDevice().
QString QLandmarkImportRequest::fileName () const
If the currently assigned device is a QFile, or if setFileName() has been called, this function returns the name of the file to be read from. In all other cases, it returns an empty string.
See also setFileName() and setDevice().
QString QLandmarkImportRequest::format () const
Returns the expected data format for the import operation. By default no format is set, indicating that the manager will try to automatically detect the format of the import file.
See also setFormat().
QList<QLandmarkId> QLandmarkImportRequest::landmarkIds () const
Returns a list of identifiers of landmarks that have been imported.
void QLandmarkImportRequest::setCategoryId ( const QLandmarkCategoryId & categoryId )
Sets the identifier of the category to which all landmarks are assigned to, if QLandmarkManager::AttachSingleCategory is used as the import option, to categoryId.
See also categoryId().
void QLandmarkImportRequest::setDevice ( QIODevice * device )
Sets the device from which landmarks are read.
See also device().
void QLandmarkImportRequest::setFileName ( const QString & fileName )
Sets the name of the file to be read from to fileName. Internally, QLandmarkImportRequest will create a QFile and use this as the device to import from.
See also fileName() and setDevice().
void QLandmarkImportRequest::setFormat ( const QString & format )
Sets the expected data format for the import operation. If an empty string is set, then during the import, an attempt is made to auto detect the format.
See also format().
Sets the transfer option of the import request. The transfer option defines how categories are treated during the import operation.
See also transferOption().
Returns the transfer option of the import request. The transfer option defines how categories are treated during the import operation. The default option is QLandmarkManager::IncludeCategoryData.
See also setTransferOption().