This file is indexed.

/usr/share/qt5/doc/qtlocation/qml-qtlocation-mapmousearea.html is in qtlocation5-doc-html 5.2.1-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" />
<!-- qdeclarativegeomapmousearea.cpp -->
  <title>MapMouseArea | QtLocation 5.2</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.2</li>
<li><a href="qtlocation-index.html">Qt Location</a></li>
<li><a href="qtlocation-qmlmodule.html">QML Types</a></li>
<li>MapMouseArea</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<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="#signals">Signals</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#example-usage">Example Usage</a></li>
<li class="level2"><a href="#limitations">Limitations</a></li>
</ul>
</div>
<h1 class="title">MapMouseArea</h1>
<span class="subtitle"></span>
<!-- $$$MapMouseArea-brief -->
<p>The MapMouseArea item enables simple mouse handling. <a href="#details">More...</a></p>
<!-- @@@MapMouseArea -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> </b><tt>import QtLocation 5.0</tt></td></tr></table><ul>
<li><a href="qml-qtlocation-mapmousearea-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-qtlocation-mapmousearea.html#acceptedButtons-prop">acceptedButtons</a></b></b> : Qt::MouseButtons</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#containsMouse-prop">containsMouse</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#enabled-prop">enabled</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#mouseX-prop">mouseX</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#mouseY-prop">mouseY</a></b></b> : real</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#pressed-prop">pressed</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#pressedButtons-prop">pressedButtons</a></b></b> : MouseButton</li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#onClicked-signal">onClicked</a></b></b>(MapMouseEvent <i>mouse</i>)</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#onDoubleClicked-signal">onDoubleClicked</a></b></b>(MapMouseEvent <i>mouse</i>)</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#onEntered-signal">onEntered</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#onExited-signal">onExited</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#onPositionChanged-signal">onPositionChanged</a></b></b>(MapMouseEvent <i>mouse</i>)</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#onPressAndHold-signal">onPressAndHold</a></b></b>(MapMouseEvent <i>mouse</i>)</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#onPressed-signal">onPressed</a></b></b>(MapMouseEvent <i>mouse</i>)</li>
<li class="fn"><b><b><a href="qml-qtlocation-mapmousearea.html#onReleased-signal">onReleased</a></b></b>(MapMouseEvent <i>mouse</i>)</li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn">coordinate <b><b><a href="qml-qtlocation-mapmousearea.html#mouseToCoordinate-method">mouseToCoordinate</a></b></b>(MouseEvent <i>event</i>)</li>
</ul>
<!-- $$$MapMouseArea-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>Like a standard Qt Quick MouseArea, the MapMouseArea provides mouse handling for an item. Creating a normal Qt Quick MouseArea inside a map object type (for example <a href="qml-qtlocation-mappolygon.html">MapPolygon</a>) will result in undefined behavior due to the way in which Map objects are rendered, so MapMouseArea exists to provide this functionality instead.</p>
<p>The only exception to this is the <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a>, which can have normal MouseArea objects defined within the sourceItem. See the documentation for <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a> for more details.</p>
<p>MapMouseArea objects should only ever be used within a map object, such as a <a href="qml-qtlocation-mappolygon.html">MapPolygon</a> or <a href="qml-qtlocation-mapquickitem.html">MapQuickItem</a>, and never within another Qt Quick component.</p>
<p>The <a href="qml-qtlocation-mapmousearea.html#enabled-prop">enabled</a> property of the MapMouseArea is used to enable and disable mouse handling for the proxied item. When disabled, the mouse area becomes transparent to mouse events.</p>
<p>The <a href="qml-qtlocation-mapmousearea.html#pressed-prop">pressed</a> read-only property indicates whether or not the user is holding down a mouse button over the mouse area. This property is often used in bindings between properties in a user interface.</p>
<p>Information about the mouse position and button clicks are provided via signals for which event handler properties are defined. The most commonly used handlers involve handling mouse presses and clicks: <a href="qml-qtlocation-mapmousearea.html#onClicked-signal">onClicked</a>, <a href="qml-qtlocation-mapmousearea.html#onDoubleClicked-signal">onDoubleClicked</a>, <a href="qml-qtlocation-mapmousearea.html#onPressed-signal">onPressed</a> and <a href="qml-qtlocation-mapmousearea.html#onReleased-signal">onReleased</a>.</p>
<a name="example-usage"></a>
<h3>Example Usage</h3>
<p>The following example shows a map containing a <a href="qml-qtlocation-mapcircle.html">MapCircle</a> object. When the user clicks the <a href="qml-qtlocation-mapcircle.html">MapCircle</a>, a message is printed to the console.</p>
<pre class="cpp">Map {
    MapCircle {
        center {
            latitude: <span class="operator">-</span><span class="number">27.5</span>
            longitude: <span class="number">153</span>
        }
        radius: <span class="number">100</span>

        MapMouseArea {
            anchors<span class="operator">.</span>fill: parent

            onClicked: {
                console<span class="operator">.</span>log(<span class="string">&quot;You clicked the circle!&quot;</span>);
            }
        }
    }
}</pre>
<a name="limitations"></a>
<h3>Limitations</h3>
<p>Some important limitations apply to the use of a MapMouseArea:</p>
<ul>
<li>The mouse event is guaranteed only to be valid for the duration of the signal handler (for example <a href="qml-qtlocation-mapmousearea.html#onPositionChanged-signal">onPositionChanged</a>, <a href="qml-qtlocation-mapmousearea.html#onClicked-signal">onClicked</a>). Consequently the mouse event itself should not be stored. The main reason for this is to optimize memory usage; we do not want to allocate heap memory every time the mouse moves.</li>
<li>Nested mouse areas are not supported (MapMouseArea { MapMouseArea {} }.</li>
<li>If two or more MapMouseAreas overlap, the declaration order is significant (not for example 'z' value).</li>
<li>Only one MapMouseArea per MapItem is supported, and it always fills the whole MapItem.</li>
</ul>
<p><b>See also </b><a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a>.</p>
<!-- @@@MapMouseArea -->
<h2>Property Documentation</h2>
<!-- $$$acceptedButtons -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="acceptedButtons-prop"></a><span class="name">acceptedButtons</span> : <span class="type">Qt::MouseButtons</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the mouse buttons that the mouse area reacts to.</p>
<p>The available buttons are:</p>
<ul>
<li>Qt.LeftButton</li>
<li>Qt.RightButton</li>
<li>Qt.MiddleButton</li>
</ul>
<p>To accept more than one button the flags can be combined with the &quot;|&quot; (or) operator:</p>
<pre class="cpp">MapMouseArea { acceptedButtons: <span class="type">Qt</span><span class="operator">.</span>LeftButton <span class="operator">|</span> <span class="type">Qt</span><span class="operator">.</span>RightButton }</pre>
<p>The default value is <tt>Qt.LeftButton</tt>.</p>
</div></div><!-- @@@acceptedButtons -->
<br/>
<!-- $$$containsMouse -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="containsMouse-prop"></a><span class="name">containsMouse</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the mouse is currently inside the mouse area.</p>
<p><b>Warning:</b> This property is not updated if the area moves under the mouse: <i>containsMouse</i> will not change. In addition, containsMouse will only be valid when the mouse is pressed.</p>
</div></div><!-- @@@containsMouse -->
<br/>
<!-- $$$enabled -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="enabled-prop"></a><span class="name">enabled</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the item accepts mouse events.</p>
<p>By default, this property is true.</p>
</div></div><!-- @@@enabled -->
<br/>
<!-- $$$mouseX -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="mouseX-prop"></a><span class="name">mouseX</span> : <span class="type">real</span></p></td></tr></table></div><div class="qmldoc"><p>These properties hold the screen coordinates of the mouse cursor.</p>
<p>These properties will only be valid while a button is pressed, and will remain valid as long as the button is held down even if the mouse is moved outside the area.</p>
<p>The screen coordinates are relative to the <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a>.</p>
</div></div><!-- @@@mouseX -->
<br/>
<!-- $$$mouseY -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="mouseY-prop"></a><span class="name">mouseY</span> : <span class="type">real</span></p></td></tr></table></div><div class="qmldoc"><p>These properties hold the screen coordinates of the mouse cursor.</p>
<p>These properties will only be valid while a button is pressed, and will remain valid as long as the button is held down even if the mouse is moved outside the area.</p>
<p>The screen coordinates are relative to the <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a>.</p>
</div></div><!-- @@@mouseY -->
<br/>
<!-- $$$pressed -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="pressed-prop"></a><span class="name">pressed</span> : <span class="type">bool</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds whether the mouse area is currently pressed.</p>
</div></div><!-- @@@pressed -->
<br/>
<!-- $$$pressedButtons -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="pressedButtons-prop"></a><span class="name">pressedButtons</span> : <span class="type">MouseButton</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the mouse buttons currently pressed.</p>
<p>It contains a bitwise combination of:</p>
<ul>
<li>Qt.LeftButton</li>
<li>Qt.RightButton</li>
<li>Qt.MiddleButton</li>
</ul>
<p><b>See also </b><a href="qml-qtlocation-mapmousearea.html#acceptedButtons-prop">acceptedButtons</a>.</p>
</div></div><!-- @@@pressedButtons -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$onClicked -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onClicked-signal"></a><span class="name">onClicked</span>(<span class="type"><a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a></span><i> mouse</i>)</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when there is a click. A click is defined as a press followed by a release, both inside the <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a> (pressing, moving outside the <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a>, and then moving back inside and releasing is also considered a click).</p>
<p>The <a href="qml-qtlocation-mapmouseevent.html">mouse</a> parameter provides information about the click, including the x and y position of the release of the click.</p>
<p>The <a href="qml-qtlocation-mapmouseevent.html">accepted</a> property of the <a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a> parameter is ignored in this handler.</p>
</div></div><!-- @@@onClicked -->
<br/>
<!-- $$$onDoubleClicked -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onDoubleClicked-signal"></a><span class="name">onDoubleClicked</span>(<span class="type"><a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a></span><i> mouse</i>)</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when there is a double-click (a press followed by a release followed by a press).</p>
<p>The <a href="qml-qtlocation-mapmouseevent.html">mouse</a> parameter provides information about the click, including the x and y position of the release of the click.</p>
<p>If the <a href="qml-qtlocation-mapmouseevent.html">accepted</a> property of the <a href="qml-qtlocation-mapmouseevent.html">mouse</a> parameter is set to false in the handler, the <a href="qml-qtlocation-mapmousearea.html#onPressed-signal">onPressed</a>/<a href="qml-qtlocation-mapmousearea.html#onReleased-signal">onReleased</a>/<a href="qml-qtlocation-mapmousearea.html#onClicked-signal">onClicked</a> handlers will be called for the second click; otherwise they are suppressed. The accepted property defaults to true.</p>
</div></div><!-- @@@onDoubleClicked -->
<br/>
<!-- $$$onEntered -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onEntered-signal"></a><span class="name">onEntered</span>()</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when the mouse enters the mouse area.</p>
<p>The onEntered handler is only called while a button is pressed.</p>
<p><b>See also </b><a href="qml-qtlocation-mapmousearea.html#onExited-signal">onExited</a>.</p>
</div></div><!-- @@@onEntered -->
<br/>
<!-- $$$onExited -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onExited-signal"></a><span class="name">onExited</span>()</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when the mouse exits the mouse area.</p>
<p>The onExited handler is only called while a button is pressed.</p>
<p><b>See also </b><a href="qml-qtlocation-mapmousearea.html#onEntered-signal">onEntered</a>.</p>
</div></div><!-- @@@onExited -->
<br/>
<!-- $$$onPositionChanged -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onPositionChanged-signal"></a><span class="name">onPositionChanged</span>(<span class="type"><a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a></span><i> mouse</i>)</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when the mouse position changes.</p>
<p>The <a href="qml-qtlocation-mapmouseevent.html">mouse</a> parameter provides information about the mouse, including the x and y position, and any buttons currently pressed.</p>
<p>The <i>accepted</i> property of the <a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a> parameter is ignored in this handler.</p>
<p>The onPositionChanged handler is only called while a button is pressed.</p>
</div></div><!-- @@@onPositionChanged -->
<br/>
<!-- $$$onPressAndHold -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onPressAndHold-signal"></a><span class="name">onPressAndHold</span>(<span class="type"><a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a></span><i> mouse</i>)</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when there is a long press (currently 800ms). The <a href="qml-qtlocation-mapmouseevent.html">mouse</a> parameter provides information about the press, including the x and y position of the press, and which button is pressed.</p>
<p>The <i>accepted</i> property of the <a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a> parameter is ignored in this handler.</p>
</div></div><!-- @@@onPressAndHold -->
<br/>
<!-- $$$onPressed -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onPressed-signal"></a><span class="name">onPressed</span>(<span class="type"><a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a></span><i> mouse</i>)</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when there is a press.</p>
<p>The <a href="qml-qtlocation-mapmouseevent.html">mouse</a> parameter provides information about the press, including the x and y position and which button was pressed.</p>
<p>The <a href="qml-qtlocation-mapmouseevent.html">accepted</a> property of the <a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a> parameter determines whether this <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a> will handle the press and all future mouse events until release. The default is to accept the event and not allow other <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a> beneath this one to handle the event. If <a href="qml-qtlocation-mapmouseevent.html">accepted</a> is set to false, no further events will be sent to this <a href="qml-qtlocation-mapmousearea.html">MapMouseArea</a> until the button is next pressed.</p>
</div></div><!-- @@@onPressed -->
<br/>
<!-- $$$onReleased -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="onReleased-signal"></a><span class="name">onReleased</span>(<span class="type"><a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a></span><i> mouse</i>)</p></td></tr></table></div><div class="qmldoc"><p>This handler is called when there is a release. The <a href="qml-qtlocation-mapmouseevent.html">mouse</a> parameter provides information about the click, including the x and y position of the release of the click.</p>
<p>The <a href="qml-qtlocation-mapmouseevent.html">accepted</a> property of the <a href="qml-qtlocation-mapmouseevent.html">MapMouseEvent</a> parameter is ignored in this handler.</p>
</div></div><!-- @@@onReleased -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$mouseToCoordinate -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="mouseToCoordinate-method"></a><span class="type">coordinate</span> <span class="name">mouseToCoordinate</span>(<span class="type">MouseEvent</span><i> event</i>)</p></td></tr></table></div><div class="qmldoc"><p>Converts the <i>event</i>'s coordinates to geo coordinates.</p>
</div></div><!-- @@@mouseToCoordinate -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
   subsidiaries. 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>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>