Sophie

Sophie

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

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" />
<!-- qgeocoordinate.cpp -->
  <title>Qt Mobility 1.2: QGeoCoordinate 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>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="modules.html">Modules</a></li>
<li><a href="qtlocation.html">QtLocation</a></li>
<li>QGeoCoordinate</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-types">Public Types</a></li>
<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">QGeoCoordinate Class Reference</h1>
<!-- $$$QGeoCoordinate-brief -->
<p>The QGeoCoordinate class defines a geographical position on the surface of the Earth. <a href="#details">More...</a></p>
<!-- @@@QGeoCoordinate -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QGeoCoordinate&gt;</span></pre><p>This class was introduced in Qt Mobility 1.0.</p>
<ul>
<li><a href="qgeocoordinate-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#CoordinateFormat-enum">CoordinateFormat</a></b> { Degrees, DegreesWithHemisphere, DegreesMinutes, DegreesMinutesWithHemisphere, DegreesMinutesSeconds, DegreesMinutesSecondsWithHemisphere }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#CoordinateType-enum">CoordinateType</a></b> { InvalidCoordinate, Coordinate2D, Coordinate3D }</td></tr>
</table>
<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="qgeocoordinate.html#QGeoCoordinate">QGeoCoordinate</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#QGeoCoordinate-2">QGeoCoordinate</a></b> ( double <i>latitude</i>, double <i>longitude</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#QGeoCoordinate-3">QGeoCoordinate</a></b> ( double <i>latitude</i>, double <i>longitude</i>, double <i>altitude</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#QGeoCoordinate-4">QGeoCoordinate</a></b> ( const QGeoCoordinate &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#dtor.QGeoCoordinate">~QGeoCoordinate</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#altitude">altitude</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoCoordinate </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#atDistanceAndAzimuth">atDistanceAndAzimuth</a></b> ( qreal <i>distance</i>, qreal <i>azimuth</i>, qreal <i>distanceUp</i> = 0.0 ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#azimuthTo">azimuthTo</a></b> ( const QGeoCoordinate &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#distanceTo">distanceTo</a></b> ( const QGeoCoordinate &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#latitude">latitude</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> double </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#longitude">longitude</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#setAltitude">setAltitude</a></b> ( double <i>altitude</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#setLatitude">setLatitude</a></b> ( double <i>latitude</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#setLongitude">setLongitude</a></b> ( double <i>longitude</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#toString">toString</a></b> ( CoordinateFormat <i>format</i> = DegreesMinutesSecondsWithHemisphere ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> CoordinateType </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#type">type</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#operator-not-eq">operator!=</a></b> ( const QGeoCoordinate &amp; <i>other</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoCoordinate &amp; </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#operator-eq">operator=</a></b> ( const QGeoCoordinate &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#operator-eq-eq">operator==</a></b> ( const QGeoCoordinate &amp; <i>other</i> ) const</td></tr>
</table>
<a name="related-non-members"></a>
<h2>Related Non-Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#operator-lt-lt-92">operator&lt;&lt;</a></b> ( QDataStream &amp; <i>stream</i>, const QGeoCoordinate &amp; <i>coordinate</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QDataStream &amp; </td><td class="memItemRight bottomAlign"><b><a href="qgeocoordinate.html#operator-gt-gt-81">operator&gt;&gt;</a></b> ( QDataStream &amp; <i>stream</i>, QGeoCoordinate &amp; <i>coordinate</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QGeoCoordinate-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QGeoCoordinate class defines a geographical position on the surface of the Earth.</p>
<p>A QGeoCoordinate is defined by latitude, longitude, and optionally, altitude.</p>
<p>Use <a href="qgeocoordinate.html#type">type</a>() to determine whether a coordinate is a 2D coordinate (has latitude and longitude only) or 3D coordinate (has latitude, longitude and altitude). Use <a href="qgeocoordinate.html#distanceTo">distanceTo</a>() and <a href="qgeocoordinate.html#azimuthTo">azimuthTo</a>() to calculate the distance and bearing between coordinates.</p>
<p>The coordinate values should be specified using the WGS84 datum.</p>
</div>
<!-- @@@QGeoCoordinate -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$CoordinateFormat$$$Degrees$$$DegreesWithHemisphere$$$DegreesMinutes$$$DegreesMinutesWithHemisphere$$$DegreesMinutesSeconds$$$DegreesMinutesSecondsWithHemisphere -->
<h3 class="fn"><a name="CoordinateFormat-enum"></a>enum QGeoCoordinate::<span class="name">CoordinateFormat</span></h3>
<p>Defines the possible formatting options for <a href="qgeocoordinate.html#toString">toString</a>().</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::Degrees</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Returns a string representation of the coordinates in decimal degrees format.</td></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::DegreesWithHemisphere</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Returns a string representation of the coordinates in decimal degrees format, using 'N', 'S', 'E' or 'W' to indicate the hemispheres of the coordinates.</td></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::DegreesMinutes</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Returns a string representation of the coordinates in degrees-minutes format.</td></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::DegreesMinutesWithHemisphere</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">Returns a string representation of the coordinates in degrees-minutes format, using 'N', 'S', 'E' or 'W' to indicate the hemispheres of the coordinates.</td></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::DegreesMinutesSeconds</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Returns a string representation of the coordinates in degrees-minutes-seconds format.</td></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::DegreesMinutesSecondsWithHemisphere</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">Returns a string representation of the coordinates in degrees-minutes-seconds format, using 'N', 'S', 'E' or 'W' to indicate the hemispheres of the coordinates.</td></tr>
</table>
<p><b>See also </b><a href="qgeocoordinate.html#toString">toString</a>().</p>
<!-- @@@CoordinateFormat -->
<!-- $$$CoordinateType$$$InvalidCoordinate$$$Coordinate2D$$$Coordinate3D -->
<h3 class="fn"><a name="CoordinateType-enum"></a>enum QGeoCoordinate::<span class="name">CoordinateType</span></h3>
<p>Defines the types of a coordinate.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::InvalidCoordinate</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">An invalid coordinate. A coordinate is invalid if its latitude or longitude values are invalid.</td></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::Coordinate2D</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">A coordinate with valid latitude and longitude values.</td></tr>
<tr><td class="topAlign"><tt>QGeoCoordinate::Coordinate3D</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">A coordinate with valid latitude and longitude values, and also an altitude value.</td></tr>
</table>
<!-- @@@CoordinateType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGeoCoordinate[overload1]$$$QGeoCoordinate -->
<h3 class="fn"><a name="QGeoCoordinate"></a>QGeoCoordinate::<span class="name">QGeoCoordinate</span> ()</h3>
<p>Constructs a coordinate. The coordinate will be invalid until <a href="qgeocoordinate.html#setLatitude">setLatitude</a>() and <a href="qgeocoordinate.html#setLongitude">setLongitude</a>() have been called.</p>
<!-- @@@QGeoCoordinate -->
<!-- $$$QGeoCoordinate$$$QGeoCoordinatedoubledouble -->
<h3 class="fn"><a name="QGeoCoordinate-2"></a>QGeoCoordinate::<span class="name">QGeoCoordinate</span> ( <span class="type">double</span> <i>latitude</i>, <span class="type">double</span> <i>longitude</i> )</h3>
<p>Constructs a coordinate with the given <i>latitude</i> and <i>longitude</i>.</p>
<p>If the latitude is not between -90 to 90 inclusive, or the longitude is not between -180 to 180 inclusive, none of the values are set and the <a href="qgeocoordinate.html#type">type</a>() will be <a href="qgeocoordinate.html#CoordinateType-enum">QGeoCoordinate::InvalidCoordinate</a>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qgeocoordinate.html#isValid">isValid</a>().</p>
<!-- @@@QGeoCoordinate -->
<!-- $$$QGeoCoordinate$$$QGeoCoordinatedoubledoubledouble -->
<h3 class="fn"><a name="QGeoCoordinate-3"></a>QGeoCoordinate::<span class="name">QGeoCoordinate</span> ( <span class="type">double</span> <i>latitude</i>, <span class="type">double</span> <i>longitude</i>, <span class="type">double</span> <i>altitude</i> )</h3>
<p>Constructs a coordinate with the given <i>latitude</i>, <i>longitude</i> and <i>altitude</i>.</p>
<p>If the latitude is not between -90 to 90 inclusive, or the longitude is not between -180 to 180 inclusive, none of the values are set and the <a href="qgeocoordinate.html#type">type</a>() will be <a href="qgeocoordinate.html#CoordinateType-enum">QGeoCoordinate::InvalidCoordinate</a>.</p>
<p>Note that <i>altitude</i> specifies the metres above sea level.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qgeocoordinate.html#isValid">isValid</a>().</p>
<!-- @@@QGeoCoordinate -->
<!-- $$$QGeoCoordinate$$$QGeoCoordinateconstQGeoCoordinate& -->
<h3 class="fn"><a name="QGeoCoordinate-4"></a>QGeoCoordinate::<span class="name">QGeoCoordinate</span> ( const <span class="type">QGeoCoordinate</span> &amp; <i>other</i> )</h3>
<p>Constructs a coordinate from the contents of <i>other</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@QGeoCoordinate -->
<!-- $$$~QGeoCoordinate[overload1]$$$~QGeoCoordinate -->
<h3 class="fn"><a name="dtor.QGeoCoordinate"></a>QGeoCoordinate::<span class="name">~QGeoCoordinate</span> ()</h3>
<p>Destroys the coordinate object.</p>
<!-- @@@~QGeoCoordinate -->
<!-- $$$altitude[overload1]$$$altitude -->
<h3 class="fn"><a name="altitude"></a><span class="type">double</span> QGeoCoordinate::<span class="name">altitude</span> () const</h3>
<p>Returns the altitude (meters above sea level).</p>
<p>The return value is undefined if the altitude has not been set.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qgeocoordinate.html#setAltitude">setAltitude</a>() and <a href="qgeocoordinate.html#type">type</a>().</p>
<!-- @@@altitude -->
<!-- $$$atDistanceAndAzimuth[overload1]$$$atDistanceAndAzimuthqrealqrealqreal -->
<h3 class="fn"><a name="atDistanceAndAzimuth"></a><span class="type">QGeoCoordinate</span> QGeoCoordinate::<span class="name">atDistanceAndAzimuth</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qtglobal.html#qreal-typedef">qreal</a></span> <i>distance</i>, <span class="type"><a href="http://qt.nokia.com/doc/4.7/qtglobal.html#qreal-typedef">qreal</a></span> <i>azimuth</i>, <span class="type"><a href="http://qt.nokia.com/doc/4.7/qtglobal.html#qreal-typedef">qreal</a></span> <i>distanceUp</i> = 0.0 ) const</h3>
<p>Returns the coordinate that is reached by traveling <i>distance</i> metres from the current coordinate at <i>azimuth</i> (or bearing) along a great-circle. There is an assumption that the Earth is spherical for the purpose of this calculation.</p>
<p>The altitude will have <i>distanceUp</i> added to it.</p>
<p>Returns an invalid coordinate if this coordinate is invalid.</p>
<!-- @@@atDistanceAndAzimuth -->
<!-- $$$azimuthTo[overload1]$$$azimuthToconstQGeoCoordinate& -->
<h3 class="fn"><a name="azimuthTo"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qtglobal.html#qreal-typedef">qreal</a></span> QGeoCoordinate::<span class="name">azimuthTo</span> ( const <span class="type">QGeoCoordinate</span> &amp; <i>other</i> ) const</h3>
<p>Returns the azimuth (or bearing) in degrees from this coordinate to the coordinate specified by <i>other</i>. Altitude is not used in the calculation.</p>
<p>The bearing returned is the bearing from the origin to <i>other</i> along the great-circle between the two coordinates. There is an assumption that the Earth is spherical for the purpose of this calculation.</p>
<p>Returns 0 if the type of this coordinate or the type of <i>other</i> is <a href="qgeocoordinate.html#CoordinateType-enum">QGeoCoordinate::InvalidCoordinate</a>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@azimuthTo -->
<!-- $$$distanceTo[overload1]$$$distanceToconstQGeoCoordinate& -->
<h3 class="fn"><a name="distanceTo"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qtglobal.html#qreal-typedef">qreal</a></span> QGeoCoordinate::<span class="name">distanceTo</span> ( const <span class="type">QGeoCoordinate</span> &amp; <i>other</i> ) const</h3>
<p>Returns the distance (in meters) from this coordinate to the coordinate specified by <i>other</i>. Altitude is not used in the calculation.</p>
<p>This calculation returns the great-circle distance between the two coordinates, with an assumption that the Earth is spherical for the purpose of this calculation.</p>
<p>Returns 0 if the type of this coordinate or the type of <i>other</i> is <a href="qgeocoordinate.html#CoordinateType-enum">QGeoCoordinate::InvalidCoordinate</a>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@distanceTo -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn"><a name="isValid"></a><span class="type">bool</span> QGeoCoordinate::<span class="name">isValid</span> () const</h3>
<p>Returns true if the <a href="qgeocoordinate.html#type">type</a>() is <a href="qgeocoordinate.html#CoordinateType-enum">Coordinate2D</a> or <a href="qgeocoordinate.html#CoordinateType-enum">Coordinate3D</a>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@isValid -->
<!-- $$$latitude[overload1]$$$latitude -->
<h3 class="fn"><a name="latitude"></a><span class="type">double</span> QGeoCoordinate::<span class="name">latitude</span> () const</h3>
<p>Returns the latitude, in decimal degrees. The return value is undefined if the latitude has not been set.</p>
<p>A positive latitude indicates the Northern Hemisphere, and a negative latitude indicates the Southern Hemisphere.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qgeocoordinate.html#setLatitude">setLatitude</a>() and <a href="qgeocoordinate.html#type">type</a>().</p>
<!-- @@@latitude -->
<!-- $$$longitude[overload1]$$$longitude -->
<h3 class="fn"><a name="longitude"></a><span class="type">double</span> QGeoCoordinate::<span class="name">longitude</span> () const</h3>
<p>Returns the longitude, in decimal degrees. The return value is undefined if the longitude has not been set.</p>
<p>A positive longitude indicates the Eastern Hemisphere, and a negative longitude indicates the Western Hemisphere.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qgeocoordinate.html#setLongitude">setLongitude</a>() and <a href="qgeocoordinate.html#type">type</a>().</p>
<!-- @@@longitude -->
<!-- $$$setAltitude[overload1]$$$setAltitudedouble -->
<h3 class="fn"><a name="setAltitude"></a><span class="type">void</span> QGeoCoordinate::<span class="name">setAltitude</span> ( <span class="type">double</span> <i>altitude</i> )</h3>
<p>Sets the altitude (meters above sea level) to <i>altitude</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qgeocoordinate.html#altitude">altitude</a>().</p>
<!-- @@@setAltitude -->
<!-- $$$setLatitude[overload1]$$$setLatitudedouble -->
<h3 class="fn"><a name="setLatitude"></a><span class="type">void</span> QGeoCoordinate::<span class="name">setLatitude</span> ( <span class="type">double</span> <i>latitude</i> )</h3>
<p>Sets the latitude (in decimal degrees) to <i>latitude</i>. The value should be in the WGS84 datum.</p>
<p>To be valid, the latitude must be between -90 to 90 inclusive.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qgeocoordinate.html#latitude">latitude</a>().</p>
<!-- @@@setLatitude -->
<!-- $$$setLongitude[overload1]$$$setLongitudedouble -->
<h3 class="fn"><a name="setLongitude"></a><span class="type">void</span> QGeoCoordinate::<span class="name">setLongitude</span> ( <span class="type">double</span> <i>longitude</i> )</h3>
<p>Sets the longitude (in decimal degrees) to <i>longitude</i>. The value should be in the WGS84 datum.</p>
<p>To be valid, the longitude must be between -180 to 180 inclusive.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qgeocoordinate.html#longitude">longitude</a>().</p>
<!-- @@@setLongitude -->
<!-- $$$toString[overload1]$$$toStringCoordinateFormat -->
<h3 class="fn"><a name="toString"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> QGeoCoordinate::<span class="name">toString</span> ( <span class="type"><a href="qgeocoordinate.html#CoordinateFormat-enum">CoordinateFormat</a></span> <i>format</i> = DegreesMinutesSecondsWithHemisphere ) const</h3>
<p>Returns this coordinate as a string in the specified <i>format</i>.</p>
<p>For example, if this coordinate has a latitude of -27.46758, a longitude of 153.027892 and an altitude of 28.1, these are the strings returned depending on <i>format</i>:</p>
<table class="generic">
<thead><tr class="qt-style"><th ><i>format</i> value</th><th >Returned string</th></tr></thead>
<tr valign="top" class="odd"><td ><a href="qgeocoordinate.html#CoordinateFormat-enum">Degrees</a></td><td >-27.46758°, 153.02789°, 28.1m</td></tr>
<tr valign="top" class="even"><td ><a href="qgeocoordinate.html#CoordinateFormat-enum">DegreesWithHemisphere</a></td><td >27.46758° S, 153.02789° E, 28.1m</td></tr>
<tr valign="top" class="odd"><td ><a href="qgeocoordinate.html#CoordinateFormat-enum">DegreesMinutes</a></td><td >-27° 28.054', 153° 1.673', 28.1m</td></tr>
<tr valign="top" class="even"><td ><a href="qgeocoordinate.html#CoordinateFormat-enum">DegreesMinutesWithHemisphere</a></td><td >27° 28.054 S', 153° 1.673' E, 28.1m</td></tr>
<tr valign="top" class="odd"><td ><a href="qgeocoordinate.html#CoordinateFormat-enum">DegreesMinutesSeconds</a></td><td >-27° 28' 3.2&quot;, 153° 1' 40.4&quot;, 28.1m</td></tr>
<tr valign="top" class="even"><td ><a href="qgeocoordinate.html#CoordinateFormat-enum">DegreesMinutesSecondsWithHemisphere</a></td><td >27° 28' 3.2&quot; S, 153° 1' 40.4&quot; E, 28.1m</td></tr>
</table>
<p>The altitude field is omitted if no altitude is set.</p>
<p>If the coordinate is invalid, an empty string is returned.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@toString -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn"><a name="type"></a><span class="type"><a href="qgeocoordinate.html#CoordinateType-enum">CoordinateType</a></span> QGeoCoordinate::<span class="name">type</span> () const</h3>
<p>Returns the type of this coordinate.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@type -->
<!-- $$$operator!=[overload1]$$$operator!=constQGeoCoordinate& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QGeoCoordinate::<span class="name">operator!=</span> ( const <span class="type">QGeoCoordinate</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if the latitude, longitude or altitude of this coordinate are not the same as those of <i>other</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQGeoCoordinate& -->
<h3 class="fn"><a name="operator-eq"></a><span class="type">QGeoCoordinate</span> &amp; QGeoCoordinate::<span class="name">operator=</span> ( const <span class="type">QGeoCoordinate</span> &amp; <i>other</i> )</h3>
<p>Assigns <i>other</i> to this coordinate and returns a reference to this coordinate.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQGeoCoordinate& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QGeoCoordinate::<span class="name">operator==</span> ( const <span class="type">QGeoCoordinate</span> &amp; <i>other</i> ) const</h3>
<p>Returns true if the latitude, longitude and altitude of this coordinate are the same as those of <i>other</i>.</p>
<p>The longitude will be ignored if the latitude is +/- 90 degrees.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@operator== -->
</div>
<div class="relnonmem">
<h2>Related Non-Members</h2>
<!-- $$$operator<<$$$operator<<QDataStream&constQGeoCoordinate& -->
<h3 class="fn"><a name="operator-lt-lt-92"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&lt;&lt;</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qdatastream.html">QDataStream</a></span> &amp; <i>stream</i>, const <span class="type">QGeoCoordinate</span> &amp; <i>coordinate</i> )</h3>
<p>Writes the given <i>coordinate</i> to the specified <i>stream</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="http://qt.nokia.com/doc/4.7/datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator<< -->
<!-- $$$operator>>$$$operator>>QDataStream&QGeoCoordinate& -->
<h3 class="fn"><a name="operator-gt-gt-81"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qdatastream.html">QDataStream</a></span> &amp; <span class="name">operator&gt;&gt;</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qdatastream.html">QDataStream</a></span> &amp; <i>stream</i>, <span class="type">QGeoCoordinate</span> &amp; <i>coordinate</i> )</h3>
<p>Reads a coordinate from the specified <i>stream</i> into the given <i>coordinate</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="http://qt.nokia.com/doc/4.7/datastreamformat.html">Serializing Qt Data Types</a>.</p>
<!-- @@@operator>> -->
</div>
  <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>