Detailed Description
The QGeoMappingManagerEngine class provides an interface and convenience methods to implementors of QGeoServiceProvider plugins who want to provides support for displaying and interacting with maps.
Subclasses of QGeoMappingManagerEngine need to provide an implementations of createMapData(). The QGeoMapData instances returned by createMapData() can be used to contain and manage information concerning what a particular QGraphicsGeoMap is viewing.
The functions setSupportedMapTypes(const QList<QGraphicsGeoMap::MapType> &mapTypes), setSupportedConnectivityModes(const QList<QGraphicsGeoMap::ConnectivityMode> &connectivityModes), setMinimumZoomLevel(qreal minimumZoom) and setMaximumZoomLevel(qreal maximumZoom) configure the reported capabilities of the engine.
It is important that this is done before createMapData() or any of the capability reporting functions are used to prevent incorrect or inconsistent behaviour.
Member Function Documentation
QGeoMappingManagerEngine::QGeoMappingManagerEngine ( const QMap<QString, QVariant> & parameters, QObject * parent = 0 )
Constructs a new engine with the specified parent, using parameters to pass any implementation specific data to the engine.
QGeoMappingManagerEngine::~QGeoMappingManagerEngine () [virtual]
Destroys this engine.
QGeoMapData * QGeoMappingManagerEngine::createMapData () [pure virtual]
Returns a new QGeoMapData instance which will be managed by this manager.
A QGeoMapData instance contains and manages the information about what a QGraphicsGeoMap is looking at. A single manager can be used by several QGraphicsGeoMap instances since each instance has an associated QGeoMapData instance.
The QGeoMapData instance can be treated as a kind of session object, or as a model in a model-view-controller architecture, with QGraphicsGeoMap as the view and QGeoMappingManagerEngine as the controller.
Subclasses of QGeoMappingManagerEngine are free to override this function to return subclasses of QGeoMapData in order to customize the map.
QLocale QGeoMappingManagerEngine::locale () const
Returns the locale used to hint to this mapping manager about what language to use for map labels.
See also setLocale().
QString QGeoMappingManagerEngine::managerName () const
Returns the name which this engine implementation uses to distinguish itself from the implementations provided by other plugins.
The combination of managerName() and managerVersion() should be unique amongst plugin implementations.
int QGeoMappingManagerEngine::managerVersion () const
Returns the version of this engine implementation.
The combination of managerName() and managerVersion() should be unique amongst plugin implementations.
qreal QGeoMappingManagerEngine::maximumZoomLevel () const
Returns the maximum zoom level supported by this engine.
Larger values of the zoom level correspond to more detailed views of the map.
See also setMaximumZoomLevel().
qreal QGeoMappingManagerEngine::minimumZoomLevel () const
Returns the minimum zoom level supported by this engine.
Larger values of the zoom level correspond to more detailed views of the map.
See also setMinimumZoomLevel().
void QGeoMappingManagerEngine::setLocale ( const QLocale & locale )
Sets the locale to be used by the this manager to locale.
If this mapping manager supports returning map labels in different languages, they will be returned in the language of locale.
The locale used defaults to the system locale if this is not set.
See also locale().
void QGeoMappingManagerEngine::setMaximumZoomLevel ( qreal maximumZoom ) [protected]
Sets the maximum zoom level supported by this engine to maximumZoom.
Larger values of the zoom level correspond to more detailed views of the map.
Subclasses of QGeoMappingManagerEngine should use this function to ensure maximumZoomLevel() provides accurate information.
See also maximumZoomLevel().
void QGeoMappingManagerEngine::setMinimumZoomLevel ( qreal minimumZoom ) [protected]
Sets the minimum zoom level supported by this engine to minimumZoom.
Larger values of the zoom level correspond to more detailed views of the map.
Subclasses of QGeoMappingManagerEngine should use this function to ensure minimumZoomLevel() provides accurate information.
See also minimumZoomLevel().
void QGeoMappingManagerEngine::setSupportedConnectivityModes ( const QList<QGraphicsGeoMap::ConnectivityMode> & connectivityModes ) [protected]
Sets the list of connectivity modes supported by this engine to connectivityModes.
Subclasses of QGeoMappingManagerEngine should use this function to ensure that supportedConnectivityModes() provides accurate information.
If createMapData does not specify a connectivity mode the first mode from connectivityModes will be used, or QGraphicsGeoMap::NoConnectivity will be used if connectivityModes is empty.
See also supportedConnectivityModes().
void QGeoMappingManagerEngine::setSupportedMapTypes ( const QList<QGraphicsGeoMap::MapType> & mapTypes ) [protected]
Sets the list of map types supported by this engine to mapTypes.
Subclasses of QGeoMappingManagerEngine should use this function to ensure that supportedMapTypes() provides accurate information.
See also supportedMapTypes().
Returns a list of the connectivity modes supported by this engine.
See also setSupportedConnectivityModes().
Returns a list of the map types supported by this engine.
See also setSupportedMapTypes().