Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 50facae208d4a6f280e44a513b104320 > files > 1336

qt-mobility-doc-1.2.0-13.mga5.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdeclarativegeomappolygonobject.cpp -->
  <title>Qt Mobility 1.2: QML MapPolygon Element</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>QtMobility Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="http://qt.nokia.com/doc/4.7/qdeclarativeelements.html">QML Elements</a></li>
<li>QML MapPolygon Element</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<p class="naviNextPrevious headerNavi">
</p><p/>
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QML MapPolygon Element</h1>
<span class="subtitle"></span>
<!-- $$$MapPolygon-brief -->
<p>The MapPolygon element displays a polygon on a map. <a href="#details">More...</a></p>
<!-- @@@MapPolygon -->
<p>This element was introduced in  Mobility 1.2.</p>
<ul>
<li><a href="qml-mappolygon-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-mappolygon.html#border.color-prop">border.color</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-mappolygon.html#border.width-prop">border.width</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-mappolygon.html#color-prop">color</a></b></b> : color</li>
<li class="fn"><b><b><a href="qml-mappolygon.html#path-prop">path</a></b></b> : list&lt;Coordinate&gt;</li>
<li class="fn"><b><b><a href="qml-mappolygon.html#visible-prop">visible</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-mappolygon.html#z-prop">z</a></b></b> : int</li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-mappolygon.html#addCoordinate-method">addCoordinate</a></b></b></li>
<li class="fn"><b><b><a href="qml-mappolygon.html#removeCoordinate-method">removeCoordinate</a></b></b></li>
</ul>
<!-- $$$MapPolygon-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>The polygon is specified in terms of an ordered list of coordinates. Any invalid coordinates in the list will be ignored.</p>
<p>If the list contains less than 3 valid coordinates the polygon will not be displayed.</p>
<p>Simplistic example to illustrate, this element could be defined in Map body:</p>
<pre class="qml"> <span class="type">MapPolygon</span> {
     <span class="name">id</span>: <span class="name">polygon</span>
     <span class="name">color</span>: <span class="string">&quot;blue&quot;</span>
     <span class="type"><a href="qml-coordinate.html">Coordinate</a></span> {
         <span class="name">id</span>: <span class="name">topLeftCoordinate</span>
         <span class="name">latitude</span>: -<span class="number">28.35</span>
         <span class="name">longitude</span>: <span class="number">153.4</span>
     }
     <span class="type"><a href="qml-coordinate.html">Coordinate</a></span> {
         <span class="name">id</span>: <span class="name">rightCoordinate</span>
         <span class="name">latitude</span>: -<span class="number">28.34</span>
         <span class="name">longitude</span>: <span class="number">153.45</span>
     }
     <span class="type"><a href="qml-coordinate.html">Coordinate</a></span> {
         <span class="name">id</span>: <span class="name">bottomLeftCoordinate</span>
         <span class="name">latitude</span>: -<span class="number">28.33</span>
         <span class="name">longitude</span>: <span class="number">153.4</span>
     }
 }</pre>
<p>The MapPolygon element is part of the <b>QtMobility.location 1.2</b> module.</p>
<!-- @@@MapPolygon -->
<h2>Property Documentation</h2>
<!-- $$$border.width -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="border.width-prop"></a><span class="name">border.width</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-int.html">int</a></span></p></td></tr><tr valign="top" class="even"><td class="tblQmlPropNode"><p><a name="border.color-prop"></a><span class="name">border.color</span> : <span class="type"><a href="qml-mappolygon.html#color-prop">color</a></span></p></td></tr></table></div><div class="qmldoc"><p>These properties hold the width and color used to draw the border of the circle.</p>
<p>The width is in pixels and is independent of the zoom level of the map.</p>
<p>The default values correspond to a black border with a width of 1 pixel.</p>
<p>For no line, use a width of 0 or a transparent color.</p>
<p>This property group was introduced in  Mobility 1.2.</p>
</div></div><!-- @@@border.width -->
<br/>
<!-- $$$color -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="color-prop"></a><span class="name">color</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-color.html">color</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the color used to fill the circle.</p>
<p>The default value corresponds to a transparent color.</p>
<p>This property group was introduced in  Mobility 1.2.</p>
</div></div><!-- @@@color -->
<br/>
<!-- $$$path -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="path-prop"></a><span class="qmldefault">default</span><span class="name">path</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-list.html">list</a></span>&lt;<span class="type"><a href="qml-coordinate.html">Coordinate</a></span>&gt;</p></td></tr></table></div><div class="qmldoc"><p>This property holds the ordered list of coordinates which define the polygon.</p>
<p>This property group was introduced in  Mobility 1.2.</p>
</div></div><!-- @@@path -->
<br/>
<!-- $$$visible -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="visible-prop"></a><span class="name">visible</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-bool.html">bool</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds a boolean corresponding to whether or not the polygon is visible.</p>
<p>This property group was introduced in  Mobility 1.2.</p>
</div></div><!-- @@@visible -->
<br/>
<!-- $$$z -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="z-prop"></a><span class="name">z</span> : <span class="type"><a href="http://qt.nokia.com/doc/4.7/qml-int.html">int</a></span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the z-value of the polygon.</p>
<p>Map objects are drawn in z-value order, and objects with the same z-value will be drawn in insertion order.</p>
<p>This property group was introduced in  Mobility 1.2.</p>
</div></div><!-- @@@z -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$addCoordinate -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="addCoordinate-method"></a>MapPolygon::<span class="name">addCoordinate</span> ( <span class="type"><a href="qml-coordinate.html">Coordinate</a></span> )</p></td></tr></table></div><div class="qmldoc"><p>Adds coordinate to the path. The resulting path is derived from values at the time of assignment, meaning that later changes in values are not reflected in the path.</p>
<pre class="qml"> <span class="name">onButton1Clicked</span>: {
     <span class="name">polygon</span>.<span class="name">addCoordinate</span>(<span class="name">map</span>.<span class="name">center</span>)
 }</pre>
<p>This documentation was introduced in  Mobility 1.2.</p>
<p><b>See also </b><a href="qml-mappolygon.html#removeCoordinate-method">removeCoordinate</a>.</p>
</div></div><!-- @@@addCoordinate -->
<br/>
<!-- $$$removeCoordinate -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="removeCoordinate-method"></a>MapPolygon::<span class="name">removeCoordinate</span> ( <span class="type"><a href="qml-coordinate.html">Coordinate</a></span> )</p></td></tr></table></div><div class="qmldoc"><p>Remove coordinate from the path. Removed Coordinate is not deleted. If there are multiple instances of the same coordinate, the one added last is removed.</p>
<pre class="qml"> <span class="name">onButton2Clicked</span>: {
     <span class="name">polygon</span>.<span class="name">removeCoordinate</span>(<span class="name">map</span>.<span class="name">center</span>)
 }</pre>
<p>If more finetuned control is needed, one can also iterate and/or use the inherent index property of the path list.</p>
<pre class="qml"> <span class="name">onButton1Clicked</span>: {
     <span class="keyword">for</span> (<span class="keyword">var</span> <span class="name">index</span> = <span class="number">0</span>; <span class="name">index</span> <span class="operator">&lt;</span> <span class="name">polyline</span>.<span class="name">path</span>.<span class="name">length</span>; index++)  {
         <span class="name">console</span>.<span class="name">log</span>(<span class="string">&quot;Index, latitude:&quot;</span> <span class="operator">+</span> <span class="name">index</span> <span class="operator">+</span> <span class="string">&quot; , &quot;</span> <span class="operator">+</span> <span class="name">polyline</span>.<span class="name">path</span>[<span class="name">index</span>].<span class="name">latitude</span>);
     }
     <span class="name">polyline</span>.<span class="name">removeCoordinate</span>(<span class="name">polyline</span>.<span class="name">path</span>[<span class="number">2</span>])
 }</pre>
<p>This documentation was introduced in  Mobility 1.2.</p>
<p><b>See also </b><a href="qml-mappolygon.html#addCoordinate-method">addCoordinate</a>.</p>
</div></div><!-- @@@removeCoordinate -->
<br/>
<p class="naviNextPrevious footerNavi">
</p>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
  <p>
     <acronym title="Copyright">&copy;</acronym> 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.</p>
  <p>
     All other trademarks are property of their respective owners. <a title="Privacy Policy"
     href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
  <br />
  <p>
    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.</p>
  <p>
    Alternatively, this document may be used under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU
    Free Documentation License version 1.3</a>
    as published by the Free Software Foundation.</p>
</div>
</body>
</html>