QPlaceManagerEngine Class

The QPlaceManagerEngine class provides an interface for implementers of QGeoServiceProvider plugins who want to provide access to place functionality. More...

Header: #include <QPlaceManagerEngine>
qmake: QT += location
Since: Qt 5.6
Inherits: QObject

Public Functions

QPlaceManagerEngine(const QVariantMap &parameters, QObject *parent = nullptr)
virtual ~QPlaceManagerEngine()
virtual QPlaceCategory category(const QString &categoryId) const
virtual QList<QPlaceCategory> childCategories(const QString &parentId) const
virtual QStringList childCategoryIds(const QString &categoryId) const
virtual QPlace compatiblePlace(const QPlace &original) const
virtual QUrl constructIconUrl(const QPlaceIcon &icon, const QSize &size) const
virtual QPlaceContentReply *getPlaceContent(const QPlaceContentRequest &request)
virtual QPlaceDetailsReply *getPlaceDetails(const QString &placeId)
virtual QPlaceReply *initializeCategories()
virtual QList<QLocale> locales() const
QString managerName() const
int managerVersion() const
virtual QPlaceMatchReply *matchingPlaces(const QPlaceMatchRequest &request)
virtual QString parentCategoryId(const QString &categoryId) const
virtual QPlaceIdReply *removeCategory(const QString &categoryId)
virtual QPlaceIdReply *removePlace(const QString &placeId)
virtual QPlaceIdReply *saveCategory(const QPlaceCategory &category, const QString &parentId)
virtual QPlaceIdReply *savePlace(const QPlace &place)
virtual QPlaceSearchReply *search(const QPlaceSearchRequest &request)
virtual QPlaceSearchSuggestionReply *searchSuggestions(const QPlaceSearchRequest &request)
virtual void setLocales(const QList<QLocale> &locales)
  • 34 public functions inherited from QObject

Signals

void categoryAdded(const QPlaceCategory &category, const QString &parentCategoryId)
void categoryRemoved(const QString &categoryId, const QString &parentCategoryId)
void categoryUpdated(const QPlaceCategory &category, const QString &parentCategoryId)
void dataChanged()
void error(QPlaceReply *, QPlaceReply::Error error, const QString &errorString = QString())
void finished(QPlaceReply *reply)
void placeAdded(const QString &placeId)
void placeRemoved(const QString &placeId)
void placeUpdated(const QString &placeId)

Protected Functions

QPlaceManager *manager() const
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QPlaceManagerEngine class provides an interface for implementers of QGeoServiceProvider plugins who want to provide access to place functionality.

Application developers need not concern themselves with the QPlaceManagerEngine. Backend implementers however will need to derive from QPlaceManagerEngine and provide implementations for the abstract virtual functions.

For more information on writing a backend see the Places Backend documentation.

See also QPlaceManager.

Member Function Documentation

QPlaceManagerEngine::QPlaceManagerEngine(const QVariantMap &parameters, QObject *parent = nullptr)

Constructs a new engine with the specified parent, using parameters to pass any implementation specific data to the engine.

[virtual] QPlaceManagerEngine::~QPlaceManagerEngine()

Destroys this engine.

[virtual] QPlaceCategory QPlaceManagerEngine::category(const QString &categoryId) const

Returns the category corresponding to the given categoryId.

[signal] void QPlaceManagerEngine::categoryAdded(const QPlaceCategory &category, const QString &parentCategoryId)

[signal] void QPlaceManagerEngine::categoryRemoved(const QString &categoryId, const QString &parentCategoryId)

[signal] void QPlaceManagerEngine::categoryUpdated(const QPlaceCategory &category, const QString &parentCategoryId)

[virtual] QList<QPlaceCategory> QPlaceManagerEngine::childCategories(const QString &parentId) const

Returns a list of categories that are children of the category corresponding to parentId. If parentId is empty, all the top level categories are returned.

[virtual] QStringList QPlaceManagerEngine::childCategoryIds(const QString &categoryId) const

Returns the child category identifiers of the category corresponding to categoryId. If categoryId is empty then all top level category identifiers are returned.

[virtual] QPlace QPlaceManagerEngine::compatiblePlace(const QPlace &original) const

Returns a pruned or modified version of the original place which is suitable to be saved by the manager engine.

Only place details that are supported by this manager is present in the modified version. Manager specific data such as the place id, is not copied over from the original.

[virtual] QUrl QPlaceManagerEngine::constructIconUrl(const QPlaceIcon &icon, const QSize &size) const

QUrl QPlaceManagerEngine::constructIconUrl(const QPlaceIcon &icon, const QSize &size)

Constructs an icon url from a given icon, size. The URL of the icon image that most closely matches the given parameters is returned.

[signal] void QPlaceManagerEngine::dataChanged()

[signal] void QPlaceManagerEngine::error(QPlaceReply *, QPlaceReply::Error error, const QString &errorString = QString())

[signal] void QPlaceManagerEngine::finished(QPlaceReply *reply)

[virtual] QPlaceContentReply *QPlaceManagerEngine::getPlaceContent(const QPlaceContentRequest &request)

Retrieves content for a place according to the parameters specified in request.

[virtual] QPlaceDetailsReply *QPlaceManagerEngine::getPlaceDetails(const QString &placeId)

Retrieves details of place corresponding to the given placeId.

[virtual] QPlaceReply *QPlaceManagerEngine::initializeCategories()

Initializes the categories of the manager engine.

[virtual] QList<QLocale> QPlaceManagerEngine::locales() const

Returns a list of preferred locales. The locales are used as a hint to the manager engine for what language place and category details should be returned in.

If the first specified locale cannot be accommodated, the manager engine falls back to the next and so forth.

Support for locales may vary from provider to provider. For those that do support it, by default, the global default locale will be used. If the manager engine has no locales assigned to it, it implicitly uses the global default locale. For engines that do not support locales, the locale list is always empty.

See also setLocales().

[protected] QPlaceManager *QPlaceManagerEngine::manager() const

Returns the manager instance used to create this engine.

QString QPlaceManagerEngine::managerName() const

Returns the name which this engine implementation uses to distinguish itself from the implementations provided by other plugins.

The manager name is automatically set to be the same as the QGeoServiceProviderFactory::providerName().

int QPlaceManagerEngine::managerVersion() const

Returns the version of this engine implementation.

The manager version is automatically set to be the same as the QGeoServiceProviderFactory::providerVersion().

[virtual] QPlaceMatchReply *QPlaceManagerEngine::matchingPlaces(const QPlaceMatchRequest &request)

Returns a reply which contains a list of places which correspond/match those specified in request.

[virtual] QString QPlaceManagerEngine::parentCategoryId(const QString &categoryId) const

Returns the parent category identifier of the category corresponding to categoryId.

[signal] void QPlaceManagerEngine::placeAdded(const QString &placeId)

[signal] void QPlaceManagerEngine::placeRemoved(const QString &placeId)

[signal] void QPlaceManagerEngine::placeUpdated(const QString &placeId)

[virtual] QPlaceIdReply *QPlaceManagerEngine::removeCategory(const QString &categoryId)

Removes the category corresponding to categoryId from the manager engine's datastore.

[virtual] QPlaceIdReply *QPlaceManagerEngine::removePlace(const QString &placeId)

Removes the place corresponding to placeId from the manager engine's datastore.

[virtual] QPlaceIdReply *QPlaceManagerEngine::saveCategory(const QPlaceCategory &category, const QString &parentId)

Saves a category that is a child of the category specified by parentId. An empty parentId means category is saved as a top level category.

[virtual] QPlaceIdReply *QPlaceManagerEngine::savePlace(const QPlace &place)

Saves a specified place to the manager engine's datastore.

Searches for places according to the parameters specified in request.

[virtual] QPlaceSearchSuggestionReply *QPlaceManagerEngine::searchSuggestions(const QPlaceSearchRequest &request)

Requests a set of search term suggestions according to the parameters specified in request.

[virtual] void QPlaceManagerEngine::setLocales(const QList<QLocale> &locales)

Set the list of preferred locales.

See also locales().