QtMobility Reference Documentation

QGeoPositionInfoSourceFactory Class Reference

The QGeoPositionInfoSourceFactory class is a factory class used as the plugin interface for external providers of positioning data. More...

 #include <QGeoPositionInfoSourceFactory>

This class was introduced in Qt Mobility 1.2.

Public Functions

virtual ~QGeoPositionInfoSourceFactory ()
virtual QGeoPositionInfoSource * positionInfoSource ( QObject * parent ) = 0
virtual QGeoSatelliteInfoSource * satelliteInfoSource ( QObject * parent ) = 0
virtual QString sourceName () const = 0
virtual int sourcePriority () const
virtual int sourceVersion () const = 0

Detailed Description

The QGeoPositionInfoSourceFactory class is a factory class used as the plugin interface for external providers of positioning data.

Implementers must provide a unique combination of sourceName() and sourceVersion() per plugin.

The other functions must be overridden by all plugins, other than sourcePriority() which defaults to returning 0. Higher values of priority will be preferred to lower ones.

Default plugins

Normally, the platform default position source will always overrule any plugin-based position source during a call to createDefaultSource(). However, a limited measure is available where needed to change this behaviour, using a system-wide configuration file.

The configuration file is in the system's default QSettings format, under Nokia/QtLocationPosAndSat (for example, on most Linux variants this is /etc/xdg/Nokia/QtLocationPosAndSat.conf). To set a default plugin source, set the value position.plugin.operator.whitelist to a string of the format "name,filename,hash,size" where name is the same as returned by the plugin's sourceName() function, size is the size of the shared library and hash is the library's SHA1 hash in hex format.

Member Function Documentation

QGeoPositionInfoSourceFactory::~QGeoPositionInfoSourceFactory () [virtual]

Destroys the position info source factory.

QGeoPositionInfoSource * QGeoPositionInfoSourceFactory::positionInfoSource ( QObject * parent ) [pure virtual]

Returns a new QGeoPositionInfoSource associated with this plugin with parent parent . Can also return 0, in which case the factory with the next highest priority will be used instead.

QGeoSatelliteInfoSource * QGeoPositionInfoSourceFactory::satelliteInfoSource ( QObject * parent ) [pure virtual]

Returns a new QGeoSatelliteInfoSource associated with this plugin with parent parent. Can also return 0, in which case the factory with the next highest priority will be used instead.

QString QGeoPositionInfoSourceFactory::sourceName () const [pure virtual]

Returns the string used to identify the position provider behind this implementation.

The combination of sourceName() and sourceVersion() should be unique amongst the plugins.

int QGeoPositionInfoSourceFactory::sourcePriority () const [virtual]

Returns the priority of this factory in the list of available factories. Factories with higher values of priority will be preferred to those with lower values.

int QGeoPositionInfoSourceFactory::sourceVersion () const [pure virtual]

Returns the version of the plugin.

The combination of sourceName() and sourceVersion() should be unique amongst the plugins.

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.