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 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
|
<?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" />
<!-- qpoint.cpp -->
<title>Qt 4.8: QPointF Class Reference</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>Qt 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="modules.html">Modules</a></li>
<li><a href="qtcore.html">QtCore</a></li>
<li>QPointF</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#related-non-members">Related Non-Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QPointF Class Reference</h1>
<!-- $$$QPointF-brief -->
<p>The QPointF class defines a point in the plane using floating point precision. <a href="#details">More...</a></p>
<!-- @@@QPointF -->
<pre class="cpp"> <span class="preprocessor">#include <QPointF></span></pre><ul>
<li><a href="qpointf-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#QPointF">QPointF</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#QPointF-2">QPointF</a></b> ( const QPoint & <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#QPointF-3">QPointF</a></b> ( qreal <i>x</i>, qreal <i>y</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#isNull">isNull</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#manhattanLength">manhattanLength</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal & </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#rx">rx</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal & </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#ry">ry</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#setX">setX</a></b> ( qreal <i>x</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#setY">setY</a></b> ( qreal <i>y</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPoint </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#toPoint">toPoint</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#x">x</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#y">y</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF & </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-2a-eq">operator*=</a></b> ( qreal <i>factor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF & </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-2b-eq">operator+=</a></b> ( const QPointF & <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF & </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator--eq">operator-=</a></b> ( const QPointF & <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QPointF & </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-2f-eq">operator/=</a></b> ( qreal <i>divisor</i> )</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-not-eq-16">operator!=</a></b> ( const QPointF & <i>p1</i>, const QPointF & <i>p2</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QPointF </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-2a-60">operator*</a></b> ( qreal <i>factor</i>, const QPointF & <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QPointF </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-2a-18">operator*</a></b> ( const QPointF & <i>point</i>, qreal <i>factor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QPointF </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-2b-8">operator+</a></b> ( const QPointF & <i>p1</i>, const QPointF & <i>p2</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QPointF </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator--7">operator-</a></b> ( const QPointF & <i>p1</i>, const QPointF & <i>p2</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QPointF </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator--23">operator-</a></b> ( const QPointF & <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QPointF </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-2f-4">operator/</a></b> ( const QPointF & <i>point</i>, qreal <i>divisor</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream & </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-lt-lt-42">operator<<</a></b> ( QDataStream & <i>stream</i>, const QPointF & <i>point</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-eq-eq-21">operator==</a></b> ( const QPointF & <i>p1</i>, const QPointF & <i>p2</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream & </td><td class="memItemRight bottomAlign"><b><a href="qpointf.html#operator-gt-gt-23">operator>></a></b> ( QDataStream & <i>stream</i>, QPointF & <i>point</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QPointF-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QPointF class defines a point in the plane using floating point precision.</p>
<p>A point is specified by a x coordinate and an y coordinate which can be accessed using the <a href="qpointf.html#x">x</a>() and <a href="qpointf.html#y">y</a>() functions. The coordinates of the point are specified using floating point numbers for accuracy. The <a href="qpointf.html#isNull">isNull</a>() function returns true if both x and y are set to 0.0. The coordinates can be set (or altered) using the <a href="qpointf.html#setX">setX</a>() and <a href="qpointf.html#setY">setY</a>() functions, or alternatively the <a href="qpointf.html#rx">rx</a>() and <a href="qpointf.html#ry">ry</a>() functions which return references to the coordinates (allowing direct manipulation).</p>
<p>Given a point <i>p</i>, the following statements are all equivalent:</p>
<pre class="cpp"> <span class="type">QPointF</span> p;
p<span class="operator">.</span><a href="qpointf.html#setX">setX</a>(p<span class="operator">.</span>x() <span class="operator">+</span> <span class="number">1.0</span>);
p <span class="operator">+</span><span class="operator">=</span> <span class="type">QPointF</span>(<span class="number">1.0</span><span class="operator">,</span> <span class="number">0.0</span>);
p<span class="operator">.</span><a href="qpointf.html#rx">rx</a>()<span class="operator">+</span><span class="operator">+</span>;</pre>
<p>A QPointF object can also be used as a vector: Addition and subtraction are defined as for vectors (each component is added separately). A QPointF object can also be divided or multiplied by an <tt>int</tt> or a <tt>qreal</tt>.</p>
<p>In addition, the QPointF class provides a constructor converting a <a href="qpoint.html">QPoint</a> object into a QPointF object, and a corresponding <a href="qpointf.html#toPoint">toPoint</a>() function which returns a <a href="qpoint.html">QPoint</a> copy of <i>this</i> point. Finally, QPointF objects can be streamed as well as compared.</p>
</div>
<p><b>See also </b><a href="qpoint.html">QPoint</a> and <a href="qpolygonf.html">QPolygonF</a>.</p>
<!-- @@@QPointF -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QPointF[overload1]$$$QPointF -->
<h3 class="fn"><a name="QPointF"></a>QPointF::<span class="name">QPointF</span> ()</h3>
<p>Constructs a null point, i.e. with coordinates (0.0, 0.0)</p>
<p><b>See also </b><a href="qpointf.html#isNull">isNull</a>().</p>
<!-- @@@QPointF -->
<!-- $$$QPointF$$$QPointFconstQPoint& -->
<h3 class="fn"><a name="QPointF-2"></a>QPointF::<span class="name">QPointF</span> ( const <span class="type"><a href="qpoint.html">QPoint</a></span> & <i>point</i> )</h3>
<p>Constructs a copy of the given <i>point</i>.</p>
<p><b>See also </b><a href="qpointf.html#toPoint">toPoint</a>().</p>
<!-- @@@QPointF -->
<!-- $$$QPointF$$$QPointFqrealqreal -->
<h3 class="fn"><a name="QPointF-3"></a>QPointF::<span class="name">QPointF</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i> )</h3>
<p>Constructs a point with the given coordinates (<i>x</i>, <i>y</i>).</p>
<p><b>See also </b><a href="qpointf.html#setX">setX</a>() and <a href="qpointf.html#setY">setY</a>().</p>
<!-- @@@QPointF -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a><span class="type">bool</span> QPointF::<span class="name">isNull</span> () const</h3>
<p>Returns true if both the x and y coordinates are set to +0.0; otherwise returns false.</p>
<p><b>Note:</b> Since this function treats +0.0 and -0.0 differently, points with zero-valued coordinates where either or both values have a negative sign are not defined to be null points.</p>
<!-- @@@isNull -->
<!-- $$$manhattanLength[overload1]$$$manhattanLength -->
<h3 class="fn"><a name="manhattanLength"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QPointF::<span class="name">manhattanLength</span> () const</h3>
<p>Returns the sum of the absolute values of <a href="qpointf.html#x">x</a>() and <a href="qpointf.html#y">y</a>(), traditionally known as the "Manhattan length" of the vector from the origin to the point.</p>
<p>This function was introduced in Qt 4.6.</p>
<p><b>See also </b><a href="qpoint.html#manhattanLength">QPoint::manhattanLength</a>().</p>
<!-- @@@manhattanLength -->
<!-- $$$rx[overload1]$$$rx -->
<h3 class="fn"><a name="rx"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> & QPointF::<span class="name">rx</span> ()</h3>
<p>Returns a reference to the x coordinate of this point.</p>
<p>Using a reference makes it possible to directly manipulate x. For example:</p>
<pre class="cpp"> <span class="type"><a href="qpointf.html">QPointF</a></span> p(<span class="number">1.1</span><span class="operator">,</span> <span class="number">2.5</span>);
p<span class="operator">.</span>rx()<span class="operator">-</span><span class="operator">-</span>; <span class="comment">// p becomes (0.1, 2.5)</span></pre>
<p><b>See also </b><a href="qpointf.html#x">x</a>() and <a href="qpointf.html#setX">setX</a>().</p>
<!-- @@@rx -->
<!-- $$$ry[overload1]$$$ry -->
<h3 class="fn"><a name="ry"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> & QPointF::<span class="name">ry</span> ()</h3>
<p>Returns a reference to the y coordinate of this point.</p>
<p>Using a reference makes it possible to directly manipulate y. For example:</p>
<pre class="cpp"> <span class="type"><a href="qpointf.html">QPointF</a></span> p(<span class="number">1.1</span><span class="operator">,</span> <span class="number">2.5</span>);
p<span class="operator">.</span>ry()<span class="operator">+</span><span class="operator">+</span>; <span class="comment">// p becomes (1.1, 3.5)</span></pre>
<p><b>See also </b><a href="qpointf.html#y">y</a>() and <a href="qpointf.html#setY">setY</a>().</p>
<!-- @@@ry -->
<!-- $$$setX[overload1]$$$setXqreal -->
<h3 class="fn"><a name="setX"></a><span class="type">void</span> QPointF::<span class="name">setX</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>x</i> )</h3>
<p>Sets the x coordinate of this point to the given <i>x</i> coordinate.</p>
<p><b>See also </b><a href="qpointf.html#x">x</a>() and <a href="qpointf.html#setY">setY</a>().</p>
<!-- @@@setX -->
<!-- $$$setY[overload1]$$$setYqreal -->
<h3 class="fn"><a name="setY"></a><span class="type">void</span> QPointF::<span class="name">setY</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>y</i> )</h3>
<p>Sets the y coordinate of this point to the given <i>y</i> coordinate.</p>
<p><b>See also </b><a href="qpointf.html#y">y</a>() and <a href="qpointf.html#setX">setX</a>().</p>
<!-- @@@setY -->
<!-- $$$toPoint[overload1]$$$toPoint -->
<h3 class="fn"><a name="toPoint"></a><span class="type"><a href="qpoint.html">QPoint</a></span> QPointF::<span class="name">toPoint</span> () const</h3>
<p>Rounds the coordinates of this point to the nearest integer, and returns a <a href="qpoint.html">QPoint</a> object with the rounded coordinates.</p>
<p><b>See also </b><a href="qpointf.html#QPointF">QPointF</a>().</p>
<!-- @@@toPoint -->
<!-- $$$x[overload1]$$$x -->
<h3 class="fn"><a name="x"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QPointF::<span class="name">x</span> () const</h3>
<p>Returns the x-coordinate of this point.</p>
<p><b>See also </b><a href="qpointf.html#setX">setX</a>() and <a href="qpointf.html#rx">rx</a>().</p>
<!-- @@@x -->
<!-- $$$y[overload1]$$$y -->
<h3 class="fn"><a name="y"></a><span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> QPointF::<span class="name">y</span> () const</h3>
<p>Returns the y-coordinate of this point.</p>
<p><b>See also </b><a href="qpointf.html#setY">setY</a>() and <a href="qpointf.html#ry">ry</a>().</p>
<!-- @@@y -->
<!-- $$$operator*=[overload1]$$$operator*=qreal -->
<h3 class="fn"><a name="operator-2a-eq"></a><span class="type">QPointF</span> & QPointF::<span class="name">operator*=</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>factor</i> )</h3>
<p>Multiplies this point's coordinates by the given <i>factor</i>, and returns a reference to this point. For example:</p>
<pre class="cpp"> <span class="type"><a href="qpointf.html">QPointF</a></span> p(<span class="operator">-</span><span class="number">1.1</span><span class="operator">,</span> <span class="number">4.1</span>);
p <span class="operator">*</span><span class="operator">=</span> <span class="number">2.5</span>; <span class="comment">// p becomes (-2.75, 10.25)</span></pre>
<p><b>See also </b><a href="qpointf.html#operator-2f-eq">operator/=</a>().</p>
<!-- @@@operator*= -->
<!-- $$$operator+=[overload1]$$$operator+=constQPointF& -->
<h3 class="fn"><a name="operator-2b-eq"></a><span class="type">QPointF</span> & QPointF::<span class="name">operator+=</span> ( const <span class="type">QPointF</span> & <i>point</i> )</h3>
<p>Adds the given <i>point</i> to this point and returns a reference to this point. For example:</p>
<pre class="cpp"> <span class="type"><a href="qpointf.html">QPointF</a></span> p( <span class="number">3.1</span><span class="operator">,</span> <span class="number">7.1</span>);
<span class="type"><a href="qpointf.html">QPointF</a></span> q(<span class="operator">-</span><span class="number">1.0</span><span class="operator">,</span> <span class="number">4.1</span>);
p <span class="operator">+</span><span class="operator">=</span> q; <span class="comment">// p becomes (2.1, 11.2)</span></pre>
<p><b>See also </b><a href="qpointf.html#operator--eq">operator-=</a>().</p>
<!-- @@@operator+= -->
<!-- $$$operator-=[overload1]$$$operator-=constQPointF& -->
<h3 class="fn"><a name="operator--eq"></a><span class="type">QPointF</span> & QPointF::<span class="name">operator-=</span> ( const <span class="type">QPointF</span> & <i>point</i> )</h3>
<p>Subtracts the given <i>point</i> from this point and returns a reference to this point. For example:</p>
<pre class="cpp"> <span class="type"><a href="qpointf.html">QPointF</a></span> p( <span class="number">3.1</span><span class="operator">,</span> <span class="number">7.1</span>);
<span class="type"><a href="qpointf.html">QPointF</a></span> q(<span class="operator">-</span><span class="number">1.0</span><span class="operator">,</span> <span class="number">4.1</span>);
p <span class="operator">-</span><span class="operator">=</span> q; <span class="comment">// p becomes (4.1, 3.0)</span></pre>
<p><b>See also </b><a href="qpointf.html#operator-2b-eq">operator+=</a>().</p>
<!-- @@@operator-= -->
<!-- $$$operator/=[overload1]$$$operator/=qreal -->
<h3 class="fn"><a name="operator-2f-eq"></a><span class="type">QPointF</span> & QPointF::<span class="name">operator/=</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>divisor</i> )</h3>
<p>Divides both x and y by the given <i>divisor</i>, and returns a reference to this point. For example:</p>
<pre class="cpp"> <span class="type"><a href="qpointf.html">QPointF</a></span> p(<span class="operator">-</span><span class="number">2.75</span><span class="operator">,</span> <span class="number">10.25</span>);
p <span class="operator">/</span><span class="operator">=</span> <span class="number">2.5</span>; <span class="comment">// p becomes (-1.1, 4.1)</span></pre>
<p><b>See also </b><a href="qpointf.html#operator-2a-eq">operator*=</a>().</p>
<!-- @@@operator/= -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator!=$$$operator!=constQPointF&constQPointF& -->
<h3 class="fn"><a name="operator-not-eq-16"></a><span class="type">bool</span> <span class="name">operator!=</span> ( const <span class="type">QPointF</span> & <i>p1</i>, const <span class="type">QPointF</span> & <i>p2</i> )</h3>
<p>Returns true if <i>p1</i> is not equal to <i>p2</i>; otherwise returns false.</p>
<!-- @@@operator!= -->
<!-- $$$operator*$$$operator*qrealconstQPointF& -->
<h3 class="fn"><a name="operator-2a-60"></a>const <span class="type">QPointF</span> <span class="name">operator*</span> ( <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>factor</i>, const <span class="type">QPointF</span> & <i>point</i> )</h3>
<p>This is an overloaded function.</p>
<p>Returns a copy of the given <i>point</i>, multiplied by the given <i>factor</i>.</p>
<!-- @@@operator* -->
<!-- $$$operator*$$$operator*constQPointF&qreal -->
<h3 class="fn"><a name="operator-2a-18"></a>const <span class="type">QPointF</span> <span class="name">operator*</span> ( const <span class="type">QPointF</span> & <i>point</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>factor</i> )</h3>
<p>Returns a copy of the given <i>point</i>, multiplied by the given <i>factor</i>.</p>
<p><b>See also </b><a href="qpointf.html#operator-2a-eq">QPointF::operator*=</a>().</p>
<!-- @@@operator* -->
<!-- $$$operator+$$$operator+constQPointF&constQPointF& -->
<h3 class="fn"><a name="operator-2b-8"></a>const <span class="type">QPointF</span> <span class="name">operator+</span> ( const <span class="type">QPointF</span> & <i>p1</i>, const <span class="type">QPointF</span> & <i>p2</i> )</h3>
<p>Returns a <a href="qpointf.html">QPointF</a> object that is the sum of the given points, <i>p1</i> and <i>p2</i>; each component is added separately.</p>
<p><b>See also </b><a href="qpointf.html#operator-2b-eq">QPointF::operator+=</a>().</p>
<!-- @@@operator+ -->
<!-- $$$operator-$$$operator-constQPointF&constQPointF& -->
<h3 class="fn"><a name="operator--7"></a>const <span class="type">QPointF</span> <span class="name">operator-</span> ( const <span class="type">QPointF</span> & <i>p1</i>, const <span class="type">QPointF</span> & <i>p2</i> )</h3>
<p>Returns a <a href="qpointf.html">QPointF</a> object that is formed by subtracting <i>p2</i> from <i>p1</i>; each component is subtracted separately.</p>
<p><b>See also </b><a href="qpointf.html#operator--eq">QPointF::operator-=</a>().</p>
<!-- @@@operator- -->
<!-- $$$operator-$$$operator-constQPointF& -->
<h3 class="fn"><a name="operator--23"></a>const <span class="type">QPointF</span> <span class="name">operator-</span> ( const <span class="type">QPointF</span> & <i>point</i> )</h3>
<p>This is an overloaded function.</p>
<p>Returns a <a href="qpointf.html">QPointF</a> object that is formed by changing the sign of both components of the given <i>point</i>.</p>
<p>Equivalent to <tt>QPointF(0,0) - point</tt>.</p>
<!-- @@@operator- -->
<!-- $$$operator/$$$operator/constQPointF&qreal -->
<h3 class="fn"><a name="operator-2f-4"></a>const <span class="type">QPointF</span> <span class="name">operator/</span> ( const <span class="type">QPointF</span> & <i>point</i>, <span class="type"><a href="qtglobal.html#qreal-typedef">qreal</a></span> <i>divisor</i> )</h3>
<p>Returns the <a href="qpointf.html">QPointF</a> object formed by dividing both components of the given <i>point</i> by the given <i>divisor</i>.</p>
<p><b>See also </b><a href="qpointf.html#operator-2f-eq">QPointF::operator/=</a>().</p>
<!-- @@@operator/ -->
<!-- $$$operator<<$$$operator<<QDataStream&constQPointF& -->
<h3 class="fn"><a name="operator-lt-lt-42"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> & <span class="name">operator<<</span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> & <i>stream</i>, const <span class="type">QPointF</span> & <i>point</i> )</h3>
<p>Writes the given <i>point</i> to the given <i>stream</i> and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator==$$$operator==constQPointF&constQPointF& -->
<h3 class="fn"><a name="operator-eq-eq-21"></a><span class="type">bool</span> <span class="name">operator==</span> ( const <span class="type">QPointF</span> & <i>p1</i>, const <span class="type">QPointF</span> & <i>p2</i> )</h3>
<p>Returns true if <i>p1</i> is equal to <i>p2</i>; otherwise returns false.</p>
<!-- @@@operator== -->
<!-- $$$operator>>$$$operator>>QDataStream&QPointF& -->
<h3 class="fn"><a name="operator-gt-gt-23"></a><span class="type"><a href="qdatastream.html">QDataStream</a></span> & <span class="name">operator>></span> ( <span class="type"><a href="qdatastream.html">QDataStream</a></span> & <i>stream</i>, <span class="type">QPointF</span> & <i>point</i> )</h3>
<p>Reads a point from the given <i>stream</i> into the given <i>point</i> and returns a reference to the stream.</p>
<p><b>See also </b><a href="datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator>> -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
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.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
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. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|