Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 2c21526e2a037dc4eaceb3895021e482 > files > 145

qtlocation5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qquickgeomapgesturearea.cpp -->
  <title>MapPinchEvent QML Type | Qt Location 5.12.6</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td >Qt 5.12</td><td ><a href="qtlocation-index.html">Qt Location</a></td><td ><a href="qtlocation-qmlmodule.html">QML Types</a></td><td >MapPinchEvent QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtlocation-index.html">Qt 5.12.6 Reference Documentation</a></td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<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="#details">Detailed Description</a></li>
<li class="level2"><a href="#example-usage">Example Usage</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">MapPinchEvent QML Type</h1>
<span class="subtitle"></span>
<!-- $$$MapPinchEvent-brief -->
<p><a href="qml-qtlocation-mappinchevent.html">MapPinchEvent</a> type provides basic information about pinch event. <a href="#details">More...</a></p>
<!-- @@@MapPinchEvent -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtLocation 5.12</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  QtLocation 5.0</td></tr></table></div><ul>
<li><a href="qml-qtlocation-mappinchevent-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-mappinchevent.html#accepted-prop">accepted</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtlocation-mappinchevent.html#angle-prop">angle</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtlocation-mappinchevent.html#center-prop">center</a></b></b> : QPoint</li>
<li class="fn"><b><b><a href="qml-qtlocation-mappinchevent.html#point1-prop">point1</a></b></b> : QPoint</li>
<li class="fn"><b><b><a href="qml-qtlocation-mappinchevent.html#point2-prop">point2</a></b></b> : QPoint</li>
<li class="fn"><b><b><a href="qml-qtlocation-mappinchevent.html#pointCount-prop">pointCount</a></b></b> : int</li>
</ul>
<!-- $$$MapPinchEvent-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p><a href="qml-qtlocation-mappinchevent.html">MapPinchEvent</a> type provides basic information about pinch event. They are present in handlers of MapPinch (for example pinchStarted/pinchUpdated). Events are only guaranteed to be valid for the duration of the handler.</p>
<p>Except for the <a href="qml-qtlocation-mappinchevent.html#accepted-prop">accepted</a> property, all properties are read-only.</p>
<a name="example-usage"></a>
<h3 id="example-usage">Example Usage</h3>
<p>The following example enables the pinch gesture on a map and reacts to the finished event.</p>
<pre class="cpp">

  Map {
      id: map
      gesture<span class="operator">.</span>enabled: <span class="keyword">true</span>
      gesture<span class="operator">.</span>onPinchFinished:{
          var coordinate1 <span class="operator">=</span> map<span class="operator">.</span>toCoordinate(gesture<span class="operator">.</span>point1)
          var coordinate2 <span class="operator">=</span> map<span class="operator">.</span>toCoordinate(gesture<span class="operator">.</span>point2)
          console<span class="operator">.</span>log(<span class="string">&quot;Pinch started at:&quot;</span>)
          console<span class="operator">.</span>log(<span class="string">&quot;        Points (&quot;</span> <span class="operator">+</span> gesture<span class="operator">.</span>point1<span class="operator">.</span>x <span class="operator">+</span> <span class="string">&quot;, &quot;</span> <span class="operator">+</span> gesture<span class="operator">.</span>point1<span class="operator">.</span>y <span class="operator">+</span> <span class="string">&quot;) - (&quot;</span> <span class="operator">+</span> gesture<span class="operator">.</span>point2<span class="operator">.</span>x <span class="operator">+</span> <span class="string">&quot;, &quot;</span> <span class="operator">+</span> gesture<span class="operator">.</span>point2<span class="operator">.</span>y <span class="operator">+</span> <span class="string">&quot;)&quot;</span>)
          console<span class="operator">.</span>log(<span class="string">&quot;   Coordinates (&quot;</span> <span class="operator">+</span> coordinate1<span class="operator">.</span>latitude <span class="operator">+</span> <span class="string">&quot;, &quot;</span> <span class="operator">+</span> coordinate1<span class="operator">.</span>longitude <span class="operator">+</span> <span class="string">&quot;) - (&quot;</span> <span class="operator">+</span> coordinate2<span class="operator">.</span>latitude <span class="operator">+</span> <span class="string">&quot;, &quot;</span> <span class="operator">+</span> coordinate2<span class="operator">.</span>longitude <span class="operator">+</span> <span class="string">&quot;)&quot;</span>)
      }
  }

</pre>
<!-- @@@MapPinchEvent -->
<h2>Property Documentation</h2>
<!-- $$$accepted -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="accepted-prop">
<td class="tblQmlPropNode"><p>
<a name="accepted-prop"></a><span class="name">accepted</span> : <span class="type">bool</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>Setting this property to false in the <code>MapPinch::onPinchStarted</code> handler will result in no further pinch events being generated, and the gesture ignored.</p>
</div></div><!-- @@@accepted -->
<br/>
<!-- $$$angle -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="angle-prop">
<td class="tblQmlPropNode"><p>
<a name="angle-prop"></a><span class="name">angle</span> : <span class="type">real</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This read-only property holds the current angle between the two points in the range -180 to 180. Positive values for the angles mean counter-clockwise while negative values mean the clockwise direction. Zero degrees is at the 3 o'clock position.</p>
</div></div><!-- @@@angle -->
<br/>
<!-- $$$center -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="center-prop">
<td class="tblQmlPropNode"><p>
<a name="center-prop"></a><span class="name">center</span> : <span class="type">QPoint</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This read-only property holds the current center point.</p>
</div></div><!-- @@@center -->
<br/>
<!-- $$$point1 -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="point1-prop">
<td class="tblQmlPropNode"><p>
<a name="point1-prop"></a><span class="name">point1</span> : <span class="type">QPoint</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>These read-only properties hold the actual touch points generating the pinch. The points are not in any particular order.</p>
</div></div><!-- @@@point1 -->
<br/>
<!-- $$$point2 -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="point2-prop">
<td class="tblQmlPropNode"><p>
<a name="point2-prop"></a><span class="name">point2</span> : <span class="type">QPoint</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>These read-only properties hold the actual touch points generating the pinch. The points are not in any particular order.</p>
</div></div><!-- @@@point2 -->
<br/>
<!-- $$$pointCount -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="pointCount-prop">
<td class="tblQmlPropNode"><p>
<a name="pointCount-prop"></a><span class="name">pointCount</span> : <span class="type">int</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This read-only property holds the number of points currently touched. The MapPinch will not react until two touch points have initiated a gesture, but will remain active until all touch points have been released.</p>
</div></div><!-- @@@pointCount -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed 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.<br/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>