Qt Mobility Reference Documentation

QGeoMappingManagerEngine Class Reference

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. More...

 #include <QGeoMappingManagerEngine>

Public Functions

QGeoMappingManagerEngine ( const QMap<QString, QString> & parameters, QObject * parent = 0 )
virtual ~QGeoMappingManagerEngine ()
virtual QGeoMapData * createMapData ( QGeoMapWidget * widget ) = 0
QString managerName () const
QMap<QString, QString> managerParameters () const
int managerVersion () const
QSize maximumImageSize () const
qreal maximumZoomLevel () const
QSize minimumImageSize () const
qreal minimumZoomLevel () const
virtual void removeMapData ( QGeoMapData * mapData )
QList<QGeoMapWidget::MapType> supportedMapTypes () const

Protected Functions

void setMaximumImageSize ( const QSize & maximumImageSize )
void setMaximumZoomLevel ( qreal maximumZoom )
void setMinimumImageSize ( const QSize & minimumImageSize )
void setMinimumZoomLevel ( qreal minimumZoom )
void setSupportedMapTypes ( const QList<QGeoMapWidget::MapType> & mapTypes )

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() and updateMapImage().

The functions setSupportedMapTypes(const QList<QGeoMapWidget::MapType> &mapTypes), setMinimumZoomLevel(qreal minimumZoom), setMaximumZoomLevel(qreal maximumZoom), setMinimumImageSize(const QSize &minimumSize) and setMaximumImageSize(const QSize &maximumSize) should be used to configure the reported capabilities of the engine.

It is important that this is done before createMapData(), updateMapImage() or any of the capability reporting functions are used to prevent incorrect or inconsistent behaviour.


Member Function Documentation

QGeoMappingManagerEngine::QGeoMappingManagerEngine ( const QMap<QString, QString> & 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 ( QGeoMapWidget * widget ) [pure virtual]

Returns a new QGeoMapData instance for widget which will be managed by this manager.

A QGeoMapData instance contains and manages the information about what a map widget is looking at. A single manager can be used by several widgets since each widget 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 QGeoMapWidget as the view and QGeoMappingManagerEngine as the controller.

Subclasses of QGeoMappingManagerEngine are free to create subclasses of QGeoMapData in order to associate implementation specific data with the created instance..

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.

QMap<QString, QString> QGeoMappingManagerEngine::managerParameters () const

Returns the parameters used in the creation of this engine object.

int QGeoMappingManagerEngine::managerVersion () const

Returns the version of this engine implementation.

The combination of managerName() and managerVersion() should be unique amongst plugin implementations.

QSize QGeoMappingManagerEngine::maximumImageSize () const

Returns the size of the largest map image which is supported by this engine.

An invalid size indicates that this QGeoMappingManagerEngine instance places no restrictions on the maximum size of the map image.

See also setMaximumImageSize().

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().

QSize QGeoMappingManagerEngine::minimumImageSize () const

Returns the size of the smallest map image which is supported by this engine.

An invalid size indicates that this QGeoMappingManagerEngine instance places no restrictions on the minimum size of the map image.

See also setMinimumImageSize().

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::removeMapData ( QGeoMapData * mapData ) [virtual]

Stops this manager from managing mapData.

void QGeoMappingManagerEngine::setMaximumImageSize ( const QSize & maximumImageSize ) [protected]

Sets the size of the largest map image which is supported by this engine.

An invalid size indicates that this engine places no restrictions on the maximum size of the map image.

Subclasses of QGeoMappingManagerEngine should use this function to ensure maximumImageSize() provides accurate information.

See also maximumImageSize().

void QGeoMappingManagerEngine::setMaximumZoomLevel ( qreal maximumZoom ) [protected]

Sets the maximum zoom level supported by this engine.

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::setMinimumImageSize ( const QSize & minimumImageSize ) [protected]

Sets the size of the smallest map image which is supported by this engine.

An invalid size indicates that this engine places no restrictions on the minimum size of the map image.

Subclasses of QGeoMappingManagerEngine should use this function to ensure minimumImageSize() provides accurate information.

See also minimumImageSize().

void QGeoMappingManagerEngine::setMinimumZoomLevel ( qreal minimumZoom ) [protected]

Sets the minimum zoom level supported by this engine.

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::setSupportedMapTypes ( const QList<QGeoMapWidget::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 QGeoMapWidget::MapType and QGeoMappingManagerEngine::supportedMapTypes().

QList<QGeoMapWidget::MapType> QGeoMappingManagerEngine::supportedMapTypes () const

Returns a list of the map types supported by this engine.

See also setSupportedMapTypes().


Copyright © 2009-2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.1.0