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  · 

QGeoMapRectangleObject Class Reference

The QGeoMapRectangleObject class is a QGeoMapObject used to draw a rectangular region on a map. More...

 #include <QGeoMapRectangleObject>

Inherits: QGeoMapObject.

This class was introduced in Qt Mobility 1.1.

Properties

Public Functions

QGeoMapRectangleObject ()
QGeoMapRectangleObject ( const QGeoBoundingBox & boundingBox )
QGeoMapRectangleObject ( const QGeoCoordinate & topLeft, const QGeoCoordinate & bottomRight )
~QGeoMapRectangleObject ()
QGeoCoordinate bottomRight () const
QGeoBoundingBox bounds () const
QBrush brush () const
QPen pen () const
void setBottomRight ( const QGeoCoordinate & bottomRight )
void setBounds ( const QGeoBoundingBox & bounds )
void setBrush ( const QBrush & brush )
void setPen ( const QPen & pen )
void setTopLeft ( const QGeoCoordinate & topLeft )
QGeoCoordinate topLeft () const

Reimplemented Public Functions

virtual QGeoMapObject::Type type () const

Signals

void bottomRightChanged ( const QGeoCoordinate & bottomRight )
void brushChanged ( const QBrush & brush )
void penChanged ( const QPen & pen )
void topLeftChanged ( const QGeoCoordinate & topLeft )

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 3 protected functions inherited from QGeoMapObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QGeoMapRectangleObject class is a QGeoMapObject used to draw a rectangular region on a map.

The rectangle is specified by either a valid QGeoBoundingBox instance or a pair of valid QGeoCoordinate instances which represent the top left and bottom right coordinates of the rectangle respectively.

Property Documentation

bottomRight : QGeoCoordinate

This property holds the bottom right coordinate of the rectangle to be drawn by this rectangle object.

The default value of this property is an invalid coordinate. While the value of this property is invalid the rectangle object will not be displayed.

This property was introduced in Qt Mobility 1.1.

Access functions:

QGeoCoordinate bottomRight () const
void setBottomRight ( const QGeoCoordinate & bottomRight )

Notifier signal:

void bottomRightChanged ( const QGeoCoordinate & bottomRight )

brush : QBrush

This property holds the brush that will be used to draw this object.

The brush is used to fill in rectangle.

The outline around the perimeter of the rectangle is drawn using the QGeoMapRectangleObject::pen property.

This property was introduced in Qt Mobility 1.1.

Access functions:

QBrush brush () const
void setBrush ( const QBrush & brush )

Notifier signal:

void brushChanged ( const QBrush & brush )

pen : QPen

This property holds the pen that will be used to draw this object.

The pen is used to draw an outline around the rectangle. The rectangle is filled using the QGeoMapRectangleObject::brush property.

The pen will be treated as a cosmetic pen, which means that the width of the pen will be independent of the zoom level of the map.

This property was introduced in Qt Mobility 1.1.

Access functions:

QPen pen () const
void setPen ( const QPen & pen )

Notifier signal:

void penChanged ( const QPen & pen )

topLeft : QGeoCoordinate

This property holds the top left coordinate of the rectangle to be drawn by this rectangle object.

The default value of this property is an invalid coordinate. While the value of this property is invalid the rectangle object will not be displayed.

This property was introduced in Qt Mobility 1.1.

Access functions:

QGeoCoordinate topLeft () const
void setTopLeft ( const QGeoCoordinate & topLeft )

Notifier signal:

void topLeftChanged ( const QGeoCoordinate & topLeft )

Member Function Documentation

QGeoMapRectangleObject::QGeoMapRectangleObject ()

Constructs a new rectangle object.

QGeoMapRectangleObject::QGeoMapRectangleObject ( const QGeoBoundingBox & boundingBox )

Constructs a new rectangle object based on the bounding box boundingBox.

This function was introduced in Qt Mobility 1.1.

QGeoMapRectangleObject::QGeoMapRectangleObject ( const QGeoCoordinate & topLeft, const QGeoCoordinate & bottomRight )

Constructs a new rectangle object with the top left coordinate at topLeft and the bottom right coordinate at bottomRight.

This function was introduced in Qt Mobility 1.1.

QGeoMapRectangleObject::~QGeoMapRectangleObject ()

Destroys this rectangle object.

void QGeoMapRectangleObject::bottomRightChanged ( const QGeoCoordinate & bottomRight ) [signal]

This signal is emitted when the bottom right coordinate of this rectangle object has changed.

The new value is bottomRight.

This function was introduced in Qt Mobility 1.1.

QGeoBoundingBox QGeoMapRectangleObject::bounds () const

Returns a QGeoBoundingBox instance which corresponds to the rectangle that will be drawn by this object.

This is equivalent to

 QGeoMapRectangleObject *object;
 // setup object
 QGeoBoundingBox(object->topLeft(), object->bottomRight());

This function was introduced in Qt Mobility 1.1.

See also setBounds().

void QGeoMapRectangleObject::brushChanged ( const QBrush & brush ) [signal]

This signal is emitted when the brush used to fill in the interior of this rectangle object has changed.

The new value is brush.

This function was introduced in Qt Mobility 1.1.

void QGeoMapRectangleObject::penChanged ( const QPen & pen ) [signal]

This signal is emitted when the pen used to draw the perimeter of this rectangle object has changed.

The new value is pen.

This function was introduced in Qt Mobility 1.1.

void QGeoMapRectangleObject::setBounds ( const QGeoBoundingBox & bounds )

Sets the rectangle that will be drawn by this object to bounds.

This is equivalent to

 QGeoMapRectangleObject *object;
 // setup object
 object->setTopLeft(bounds.topLeft());
 object->setBottomRight(bounds.bottomRight());

This function was introduced in Qt Mobility 1.1.

See also bounds().

void QGeoMapRectangleObject::topLeftChanged ( const QGeoCoordinate & topLeft ) [signal]

This signal is emitted when the top left coordinate of this rectangle object has changed.

The new value is topLeft.

This function was introduced in Qt Mobility 1.1.

QGeoMapObject::Type QGeoMapRectangleObject::type () const [virtual]

Reimplemented from QGeoMapObject::type().

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 ? 43
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 9
Page suivante

Le Qt Labs au hasard

Logo

QMake et au-delà, le retour

Les Qt Labs sont les laboratoires des développeurs de Qt, où ils peuvent partager des impressions sur le framework, son utilisation, ce que pourrait être son futur. 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