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  · 

QGeoServiceProvider Class Reference

The QGeoServiceProvider class aggregates access to services which provide geographical information. More...

 #include <QGeoServiceProvider>

This class was introduced in Qt Mobility 1.1.

Public Types

enum Error { NoError, NotSupportedError, UnknownParameterError, MissingRequiredParameterError }

Public Functions

QGeoServiceProvider ( const QString & providerName, const QMap<QString, QVariant> & parameters = ( QMap<QString, QVariant )
~QGeoServiceProvider ()
Error error () const
QString errorString () const
QGeoMappingManager * mappingManager () const
QGeoRoutingManager * routingManager () const
QGeoSearchManager * searchManager () const

Static Public Members

QStringList availableServiceProviders ()

Detailed Description

The QGeoServiceProvider class aggregates access to services which provide geographical information.

The Maps and Navigation API allows people to access various kinds of geographical information, including functionality to perform geocoding, routing and the display of maps. The QGeoServiceProvider aggregates the access to a set of these services that are provided by a single vendor.

It is possible to mix and match service providers for the various domains, so that a geocoding manager from one service provider can be used with a geographic routing manager from another service provider.

This is not recommended unless the client is able to verify that the data provided by the different services are compatible, as differences in the underlying data sets could cause serious incongruences between the services.

Subclasses of QGeoServiceProvider guarantee that the different services that they provide are interoperable.

At this point only the Nokia Services plugin is pacakged with Qt Mobility, which is accessible using the provider name "nokia".

Member Type Documentation

enum QGeoServiceProvider::Error

Describes an error related to the loading and setup of a service provider plugin.

ConstantValueDescription
QGeoServiceProvider::NoError0No error has occurred.
QGeoServiceProvider::NotSupportedError1The plugin does not support this functionality.
QGeoServiceProvider::UnknownParameterError2The plugin did not recognise one of the parameters it was given.
QGeoServiceProvider::MissingRequiredParameterError3The plugin did not find one of the parameters it was expecting.

Member Function Documentation

QGeoServiceProvider::QGeoServiceProvider ( const QString & providerName, const QMap<QString, QVariant> & parameters = ( QMap<QString, QVariant )

QGeoServiceProvider::~QGeoServiceProvider ()

Destroys the service provider object.

QStringList QGeoServiceProvider::availableServiceProviders () [static]

Returns a list of names of the available service providers, for use with the QGeoServiceProvider constructors.

Error QGeoServiceProvider::error () const

Returns an error code describing the error which occurred during the last operation that was performed by this class.

This function was introduced in Qt Mobility 1.1.

QString QGeoServiceProvider::errorString () const

Returns a string describing the error which occurred during the last operation that was performed by this class.

This function was introduced in Qt Mobility 1.1.

QGeoMappingManager * QGeoServiceProvider::mappingManager () const

Returns the QGeoMappingManager made available by the service provider.

This function will return 0 if the service provider does not provide any mapping services.

This function will attempt to construct a QGeoMappingManager instance when it is called for the first time. If the attempt is successful the QGeoMappingManager will be cached, otherwise each call of this function will attempt to construct a QGeoMappingManager instance until the construction is successful.

After this function has been called, error() and errorString() will report any errors which occurred during the construction of the QGeoMappingManager.

This function was introduced in Qt Mobility 1.1.

QGeoRoutingManager * QGeoServiceProvider::routingManager () const

Returns the QGeoRoutingManager made available by the service provider.

This function will return 0 if the service provider does not provide any geographic routing services.

This function will attempt to construct a QGeoRoutingManager instance when it is called for the first time. If the attempt is successful the QGeoRoutingManager will be cached, otherwise each call of this function will attempt to construct a QGeoRoutingManager instance until the construction is successful.

After this function has been called, error() and errorString() will report any errors which occurred during the construction of the QGeoRoutingManager.

This function was introduced in Qt Mobility 1.1.

QGeoSearchManager * QGeoServiceProvider::searchManager () const

Returns the QGeoSearchManager made available by the service provider.

This function will return 0 if the service provider does not provide any geocoding services.

This function will attempt to construct a QGeoSearchManager instance when it is called for the first time. If the attempt is successful the QGeoSearchManager will be cached, otherwise each call of this function will attempt to construct a QGeoSearchManager instance until the construction is successful.

After this function has been called, error() and errorString() will report any errors which occurred during the construction of the QGeoSearchManager.

This function was introduced in Qt Mobility 1.1.

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 94
  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. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 45
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 6
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
Page suivante

Le Qt Quarterly au hasard

Logo

Conserver la réactivité de l'IHM

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. 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.2
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