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  · 

QML MapText Element

The MapText element displays text on a map. More...

  • List of all members, including inherited members
  • Properties

    Detailed Description

    The string text will be drawn offset.x and offset.y pixels away from the on-screen position of coordinate.

    The text will be rendered with font font and color color, and will be aligned according to horizontalAlignment and verticalAlignment.

    If text is empty or coordinate is invalid nothing will be displayed.

    The MapText element is part of the QtMobility.location 1.1 module.

    Property Documentation

    color : color

    This property holds the color used to draw the text.

    The default value is black.


    coordinate : Coordinate

    This property holds the coordinate at which to anchor the text.


    font.bold : bool

    Sets whether the font weight is bold.


    font.capitalization : enumeration

    Sets the capitalization for the text.

    • Font.MixedCase - This is the normal text rendering option where no capitalization change is applied.
    • Font.AllUppercase - This alters the text to be rendered in all uppercase type.
    • Font.AllLowercase - This alters the text to be rendered in all lowercase type.
    • Font.SmallCaps - This alters the text to be rendered in small-caps type.
    • Font.Capitalize - This alters the text to be rendered with the first character of each word as an uppercase character.
     MapText { text: "Hello"; font.capitalization: Font.AllLowercase }

    font.family : string

    Sets the family name of the font.

    The family name is case insensitive and may optionally include a foundry name, e.g. "Helvetica [Cronyx]". If the family is available from more than one foundry and the foundry isn't specified, an arbitrary foundry is chosen. If the family isn't available a family will be set using the font matching algorithm.


    font.italic : bool

    Sets whether the font has an italic style.


    font.letterSpacing : real

    Sets the letter spacing for the font.

    Letter spacing changes the default spacing between individual letters in the font. A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.


    font.pixelSize : int

    Sets the font size in pixels.

    Using this function makes the font device dependent. Use pointSize to set the size of the font in a device independent manner.


    font.pointSize : real

    Sets the font size in points. The point size must be greater than zero.


    font.strikeout : bool

    Sets whether the font has a strikeout style.


    font.underline : bool

    Sets whether the text is underlined.


    font.weight : enumeration

    Sets the font's weight.

    The weight can be one of:

    • Font.Light
    • Font.Normal - the default
    • Font.DemiBold
    • Font.Bold
    • Font.Black
     MapText { text: "Hello"; font.weight: Font.DemiBold }

    font.wordSpacing : real

    Sets the word spacing for the font.

    Word spacing changes the default spacing between individual words. A positive value increases the word spacing by a corresponding amount of pixels, while a negative value decreases the inter-word spacing accordingly.


    horizontalAlignment : enumeration

    verticalAlignment : enumeration

    Sets the horizontal and vertical alignment of the text.

    The alignment is relative to the point offset.x and offset.y pixels away from the on-screen position of coordinate.

    The valid values for horizontalAlignment are MapText.AlignLeft, MapText.AlignRight and MapText.AlignHCenter. The valid values for verticalAlignment are MapText.AlignTop, MapText.AlignBottom and MapText.AlignVCenter.

    The default values are MapText.AlignHCenter and MapText.AlignVCenter respectively.


    offset.x : int

    offset.y : int

    These properties hold the offset from the on-screen position of coordinate at which the text should be displayed.

    They both default to 0.


    selected : bool

    This property holds a boolean corresponding to whether or not the text is selected.


    text : string

    This property holds the text to display.

    The default value is an empty string.


    visible : bool

    This property holds a boolean corresponding to whether or not the text is visible.


    zValue : int

    This property holds the z-value of the text.

    Map objects are drawn in z-value order, and objects with the same z-value will be drawn in insertion order.


    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.

    [0]; s.parentNode.insertBefore(ga, s); })();
    Publicité

    Best Of

    Actualités les plus lues

    Semaine
    Mois
    Année

    Le Qt Developer Network au hasard

    Logo

    Utiliser QML et QtWebKit avec PySide

    Le Qt Developer Network est un réseau de développeurs Qt anglophone, où ils peuvent partager leur expérience sur le framework. 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.1
    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