The MapText element displays text on a map. More...
This element was introduced in Mobility 1.2.
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.
An example of text item:
MapText { color: "blue" coordinate: landmark.coordinate text: landmark.name font.pointSize: 8 }
The MapText element is part of the QtMobility.location 1.2 module.
color : color |
This property holds the color used to draw the text.
The default value is black.
This property group was introduced in Mobility 1.2.
coordinate : Coordinate |
This property holds the coordinate at which to anchor the text.
This property group was introduced in Mobility 1.2.
font.bold : bool |
Sets whether the font weight is bold.
This property group was introduced in Mobility 1.2.
font.capitalization : enumeration |
Sets the capitalization for the text.
MapText { text: "Hello"; font.capitalization: Font.AllLowercase }
This property group was introduced in Mobility 1.2.
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.
This property group was introduced in Mobility 1.2.
font.italic : bool |
Sets whether the font has an italic style.
This property group was introduced in Mobility 1.2.
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.
This property group was introduced in Mobility 1.2.
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.
This property group was introduced in Mobility 1.2.
font.pointSize : real |
Sets the font size in points. The point size must be greater than zero.
This property group was introduced in Mobility 1.2.
font.strikeout : bool |
Sets whether the font has a strikeout style.
This property group was introduced in Mobility 1.2.
font.underline : bool |
Sets whether the text is underlined.
This property group was introduced in Mobility 1.2.
font.weight : enumeration |
Sets the font's weight.
The weight can be one of:
MapText { text: "Hello"; font.weight: Font.DemiBold }
This property group was introduced in Mobility 1.2.
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.
This property group was introduced in Mobility 1.2.
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.
This property group was introduced in Mobility 1.2.
These properties hold the offset from the on-screen position of coordinate at which the text should be displayed.
They both default to 0.
This property group was introduced in Mobility 1.2.
text : string |
This property holds the text to display.
The default value is an empty string.
This property group was introduced in Mobility 1.2.
visible : bool |
This property holds a boolean corresponding to whether or not the text is visible.
This property group was introduced in Mobility 1.2.
z : 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.
This property group was introduced in Mobility 1.2.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.