Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 2c21526e2a037dc4eaceb3895021e482 > files > 115

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" />
<!-- qdeclarativecontactdetail.cpp -->
  <title>ContactDetail 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 >ContactDetail 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="#examples">Examples</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">ContactDetail QML Type</h1>
<span class="subtitle"></span>
<!-- $$$ContactDetail-brief -->
<p>The <a href="qml-qtlocation-contactdetail.html">ContactDetail</a> type holds a contact detail such as a phone number or a website address. <a href="#details">More...</a></p>
<!-- @@@ContactDetail -->
<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.5</td></tr></table></div><ul>
<li><a href="qml-qtlocation-contactdetail-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-contactdetail.html#contactDetail-prop">contactDetail</a></b></b> : QPlaceContactDetail</li>
<li class="fn"><b><b><a href="qml-qtlocation-contactdetail.html#label-prop">label</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtlocation-contactdetail.html#value-prop">value</a></b></b> : string</li>
</ul>
<!-- $$$ContactDetail-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>The <a href="qml-qtlocation-contactdetail.html">ContactDetail</a> provides a single detail on how one could contact a <a href="qml-qtlocation-place.html">Place</a>. The <a href="qml-qtlocation-contactdetail.html">ContactDetail</a> consists of a <a href="qml-qtlocation-contactdetail.html#label-prop">label</a>, which is a localized string describing the contact method, and a <a href="qml-qtlocation-contactdetail.html#value-prop">value</a> representing the actual contact detail.</p>
<a name="examples"></a>
<h2 id="examples">Examples</h2>
<p>The following example demonstrates how to assign a single phone number to a place in JavaScript:</p>
<pre class="qml">

  function writeSingle() {
      var phoneNumber = Qt.createQmlObject('import QtLocation 5.3; ContactDetail {}', place);
      phoneNumber.label = "Phone";
      phoneNumber.value = "555-5555"
      place.contactDetails.phone = phoneNumber;
  }

</pre>
<p>The following demonstrates how to assign multiple phone numbers to a place in JavaScript:</p>
<pre class="qml">

  function writeMultiple() {
      var bob = Qt.createQmlObject('import QtLocation 5.3; ContactDetail {}', place);
      bob.label = "Bob";
      bob.value = "555-5555"

      var alice = Qt.createQmlObject('import QtLocation 5.3; ContactDetail {}', place);
      alice.label = "Alice";
      alice.value = "555-8745"

      var numbers = new Array();
      numbers.push(bob);
      numbers.push(alice);

      place.contactDetails.phone = numbers;
  }

</pre>
<p>Note, due to limitations of the QQmlPropertyMap, it is not possible to declaratively specify the contact details in QML, it can only be accomplished via JavaScript.</p>
<!-- @@@ContactDetail -->
<h2>Property Documentation</h2>
<!-- $$$contactDetail -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="contactDetail-prop">
<td class="tblQmlPropNode"><p>
<a name="contactDetail-prop"></a><span class="name">contactDetail</span> : <span class="type">QPlaceContactDetail</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>For details on how to use this property to interface between C++ and QML see &quot;<a href="location-cpp-qml.html#contactdetail-qdeclarativecontactdetail">Interfaces between C++ and QML Code</a>&quot;.</p>
</div></div><!-- @@@contactDetail -->
<br/>
<!-- $$$label -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="label-prop">
<td class="tblQmlPropNode"><p>
<a name="label-prop"></a><span class="name">label</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds a label describing the contact detail.</p>
<p>The label can potentially be localized. The language is dependent on the entity that sets it, typically this is the <a href="location-places-qml.html#plugin">Plugin</a>. The <a href="qml-qtlocation-plugin.html#locales-prop">Plugin::locales</a> property defines what language is used.</p>
</div></div><!-- @@@label -->
<br/>
<!-- $$$value -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="value-prop">
<td class="tblQmlPropNode"><p>
<a name="value-prop"></a><span class="name">value</span> : <span class="type">string</span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the value of the contact detail which may be a phone number, an email address, a website url and so on.</p>
</div></div><!-- @@@value -->
<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>