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  · 

QGeoTiledMapData Class Reference

The QGeoTiledMapData class is a subclass of QGeoMapData provided to make working with tile based mapping services more convenient. More...

 #include <QGeoTiledMapData>

Inherits: QGeoMapData.

This class was introduced in Qt Mobility 1.1.

Public Functions

QGeoTiledMapData ( QGeoMappingManagerEngine * engine )
virtual ~QGeoTiledMapData ()
virtual QPoint coordinateToWorldReferencePosition ( const QGeoCoordinate & coordinate ) const
void triggerUpdateMapDisplay ( const QRectF & target = QRectF() )
virtual QGeoCoordinate worldReferencePositionToCoordinate ( const QPoint & pixel ) const
QSize worldReferenceSize () const
QPoint worldReferenceViewportCenter () const
QRect worldReferenceViewportRect () const
int zoomFactor () const

Reimplemented Public Functions

virtual QGeoCoordinate center () const
virtual QPointF coordinateToScreenPosition ( const QGeoCoordinate & coordwgs ) const
virtual void fitInViewport ( const QGeoBoundingBox & bounds, bool preserveViewportCenter = false )
virtual QList<QGeoMapObject *> mapObjectsAtScreenPosition ( const QPointF & screenPosition ) const
virtual QList<QGeoMapObject *> mapObjectsInScreenRect ( const QRectF & screenRect ) const
virtual void pan ( int dx, int dy )
virtual QGeoCoordinate screenPositionToCoordinate ( const QPointF & screenPosition ) const
virtual void setCenter ( const QGeoCoordinate & center )
virtual void setConnectivityMode ( QGraphicsGeoMap::ConnectivityMode connectivityMode )
virtual void setMapType ( QGraphicsGeoMap::MapType mapType )
virtual void setWindowSize ( const QSizeF & size )
virtual void setZoomLevel ( qreal zoomLevelf )
virtual QGeoBoundingBox viewport () const
  • 36 public functions inherited from QGeoMapData
  • 29 public functions inherited from QObject

Reimplemented Protected Functions

virtual QGeoMapObjectInfo * createMapObjectInfo ( QGeoMapObject * mapObject )
virtual void paintMap ( QPainter * painter, const QStyleOptionGraphicsItem * option )
virtual void paintObjects ( QPainter * painter, const QStyleOptionGraphicsItem * option )
  • 7 protected functions inherited from QGeoMapData
  • 7 protected functions inherited from QObject

Additional Inherited Members

Detailed Description

The QGeoTiledMapData class is a subclass of QGeoMapData provided to make working with tile based mapping services more convenient.

This class assumes that at a zoom level of z the world is represented as a 2^z by 2^z grid of tiles, and that the Mercator projection is used to map back and forth between coordinate and positions on the map.

Different projections can be provided by reimplementing coordinateToWorldReferencePosition() and worldReferencePositionToCoordinate().

Many of the internal calculations deal with positions as though they are pixel positions on the map at the maximum zoom level. Several functions are provided which expose information about the map and the viewport onto the map in these terms for use with custom QGeoMapObjectInfo subclasses.

These functions include worldReferenceViewportCenter(), worldReferenceSize() and worldReferenceViewportRect().

NOTE: QGeoTiledMapData blocks property change signals from QGeoMapData by calling QGeoMapData::setBlockPropertyChangeSignals() with true. Changing this in QGeoTiledMapData subclasses will cause the signals being emitted at wrong time.

Member Function Documentation

QGeoTiledMapData::QGeoTiledMapData ( QGeoMappingManagerEngine * engine )

Constructs a new tiled map data object, which makes use of the functionality provided by engine.

QGeoTiledMapData::~QGeoTiledMapData () [virtual]

Destroys this tiled map data object.

QGeoCoordinate QGeoTiledMapData::center () const [virtual]

Reimplemented from QGeoMapData::center().

This function was introduced in Qt Mobility 1.1.

See also setCenter().

QPointF QGeoTiledMapData::coordinateToScreenPosition ( const QGeoCoordinate & coordwgs ) const [virtual]

Reimplemented from QGeoMapData::coordinateToScreenPosition().

This function was introduced in Qt Mobility 1.1.

QPoint QGeoTiledMapData::coordinateToWorldReferencePosition ( const QGeoCoordinate & coordinate ) const [virtual]

Converts the coordinate coordinate to a pixel position on the entire map at the maximum zoom level.

The default implementation is based on the Mercator projection.

This function was introduced in Qt Mobility 1.1.

QGeoMapObjectInfo * QGeoTiledMapData::createMapObjectInfo ( QGeoMapObject * mapObject ) [virtual protected]

Reimplemented from QGeoMapData::createMapObjectInfo().

This function was introduced in Qt Mobility 1.1.

void QGeoTiledMapData::fitInViewport ( const QGeoBoundingBox & bounds, bool preserveViewportCenter = false ) [virtual]

Reimplemented from QGeoMapData::fitInViewport().

This function was introduced in Qt Mobility 1.1.

QList<QGeoMapObject *> QGeoTiledMapData::mapObjectsAtScreenPosition ( const QPointF & screenPosition ) const [virtual]

Reimplemented from QGeoMapData::mapObjectsAtScreenPosition().

This function was introduced in Qt Mobility 1.1.

QList<QGeoMapObject *> QGeoTiledMapData::mapObjectsInScreenRect ( const QRectF & screenRect ) const [virtual]

Reimplemented from QGeoMapData::mapObjectsInScreenRect().

This function was introduced in Qt Mobility 1.1.

void QGeoTiledMapData::paintMap ( QPainter * painter, const QStyleOptionGraphicsItem * option ) [virtual protected]

Reimplemented from QGeoMapData::paintMap().

This function was introduced in Qt Mobility 1.1.

void QGeoTiledMapData::paintObjects ( QPainter * painter, const QStyleOptionGraphicsItem * option ) [virtual protected]

Reimplemented from QGeoMapData::paintObjects().

This function was introduced in Qt Mobility 1.1.

void QGeoTiledMapData::pan ( int dx, int dy ) [virtual]

Reimplemented from QGeoMapData::pan().

This function was introduced in Qt Mobility 1.1.

QGeoCoordinate QGeoTiledMapData::screenPositionToCoordinate ( const QPointF & screenPosition ) const [virtual]

Reimplemented from QGeoMapData::screenPositionToCoordinate().

This function was introduced in Qt Mobility 1.1.

void QGeoTiledMapData::setCenter ( const QGeoCoordinate & center ) [virtual]

Reimplemented from QGeoMapData::setCenter().

This function was introduced in Qt Mobility 1.1.

See also center().

void QGeoTiledMapData::setConnectivityMode ( QGraphicsGeoMap::ConnectivityMode connectivityMode ) [virtual]

Reimplemented from QGeoMapData::setConnectivityMode().

void QGeoTiledMapData::setMapType ( QGraphicsGeoMap::MapType mapType ) [virtual]

Reimplemented from QGeoMapData::setMapType().

This function was introduced in Qt Mobility 1.1.

void QGeoTiledMapData::setWindowSize ( const QSizeF & size ) [virtual]

Reimplemented from QGeoMapData::setWindowSize().

This function was introduced in Qt Mobility 1.1.

void QGeoTiledMapData::setZoomLevel ( qreal zoomLevelf ) [virtual]

Reimplemented from QGeoMapData::setZoomLevel().

This function was introduced in Qt Mobility 1.1.

void QGeoTiledMapData::triggerUpdateMapDisplay ( const QRectF & target = QRectF() )

Forces the map display to update in the region specified by target.

If target is empty the entire map display will be updated.

This function was introduced in Qt Mobility 1.1.

QGeoBoundingBox QGeoTiledMapData::viewport () const [virtual]

Reimplemented from QGeoMapData::viewport().

This function was introduced in Qt Mobility 1.1.

QGeoCoordinate QGeoTiledMapData::worldReferencePositionToCoordinate ( const QPoint & pixel ) const [virtual]

Converts the pixel position pixel on the map to a coordinate.

The pixel position is relative the entire map at the maximum zoom level.

The default implementation is based on the Mercator projection.

This function was introduced in Qt Mobility 1.1.

QSize QGeoTiledMapData::worldReferenceSize () const

Returns the size, in pixels, of the entire map as a pixmap at the maximum zoom level.

This function was introduced in Qt Mobility 1.1.

QPoint QGeoTiledMapData::worldReferenceViewportCenter () const

Returns the center of the viewport, in pixels on the entire map as a pixmap at the maximum zoom level.

This function was introduced in Qt Mobility 1.1.

QRect QGeoTiledMapData::worldReferenceViewportRect () const

Returns the visible screen rectangle, in pixels on the entire map as a pixmap at the maximum zoom level.

This function was introduced in Qt Mobility 1.1.

int QGeoTiledMapData::zoomFactor () const

Returns the ratio between a single pixel on the screen and a pixel on the entire map as a pixmap at the maximum zoom level.

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. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 9
  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

Écrire un périphérique personnalisé d'E/S

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