Sophie

Sophie

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

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" />
<!-- qcontactdetails.cpp -->
  <title>Qt Mobility 1.2: QContactTag 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="qtcontacts.html">QtContacts</a></li>
<li>QContactTag</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="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QContactTag Class Reference</h1>
<!-- $$$QContactTag-brief -->
<p>The QContactTag class contains a tag associated with a contact. <a href="#details">More...</a></p>
<!-- @@@QContactTag -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QContactTag&gt;</span></pre><p><b>Inherits: </b><a href="qcontactdetail.html">QContactDetail</a>.</p>
<p>This class was introduced in Qt Mobility 1.0.</p>
<ul>
<li><a href="qcontacttag-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"> void </td><td class="memItemRight bottomAlign"><b><a href="qcontacttag.html#setTag">setTag</a></b> ( const QString &amp; <i>tag</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qcontacttag.html#tag">tag</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qcontactdetail.html#public-functions">QContactDetail</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> const QLatin1Constant </td><td class="memItemRight bottomAlign"><b><a href="qcontacttag.html#DefinitionName-var">DefinitionName</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QLatin1Constant </td><td class="memItemRight bottomAlign"><b><a href="qcontacttag.html#FieldTag-var">FieldTag</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QContactFilter </td><td class="memItemRight bottomAlign"><b><a href="qcontacttag.html#match">match</a></b> ( const QString &amp; <i>subString</i> )</td></tr>
</table>
<a name="details"></a>
<!-- $$$QContactTag-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QContactTag class contains a tag associated with a contact.</p>
<p>Typically the tags associated with a contact will be distinct, although this is usually only enforced when the contact is saved in the manager.</p>
<p>Here is an example of retrieving all the tags for a contact:</p>
<pre class="cpp"> <span class="type"><a href="http://qt.nokia.com/doc/4.7/qset.html">QSet</a></span><span class="operator">&lt;</span><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span><span class="operator">&gt;</span> tags;
 foreach(<span class="keyword">const</span> <span class="type">QContactTag</span><span class="operator">&amp;</span> tag<span class="operator">,</span> contact<span class="operator">.</span>details<span class="operator">&lt;</span><span class="type">QContactTag</span><span class="operator">&gt;</span>()) {
      tags<span class="operator">.</span>insert(tag<span class="operator">.</span>tag());
 }</pre>
<p>Here is an example of checking for a specific tag value:</p>
<pre class="cpp"> <span class="keyword">if</span> (contact<span class="operator">.</span>details<span class="operator">&lt;</span><span class="type">QContactTag</span><span class="operator">&gt;</span>(<span class="type">QContactTag</span><span class="operator">::</span>FieldTag<span class="operator">,</span> <span class="string">&quot;MyTag&quot;</span>)<span class="operator">.</span>count() <span class="operator">&gt;</span> <span class="number">0</span>) {
     <span class="comment">// Do something with it</span>
 }</pre>
<p>This leaf-class has been part of the default schema since version 1.0 of the Qt Mobility project.</p>
</div>
<!-- @@@QContactTag -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$match[overload1]$$$matchconstQString& -->
<h3 class="fn"><a name="match"></a><span class="type"><a href="qcontactfilter.html">QContactFilter</a></span> QContactTag::<span class="name">match</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>subString</i> )<tt> [static]</tt></h3>
<p>Returns a filter suitable for finding contacts which have a tag which contains the specified <i>subString</i>.</p>
<!-- @@@match -->
<!-- $$$setTag[overload1]$$$setTagconstQString& -->
<h3 class="fn"><a name="setTag"></a><span class="type">void</span> QContactTag::<span class="name">setTag</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>tag</i> )</h3>
<p>Sets the tag associated with a contact which is stored in this detail to <i>tag</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qcontacttag.html#tag">tag</a>().</p>
<!-- @@@setTag -->
<!-- $$$tag[overload1]$$$tag -->
<h3 class="fn"><a name="tag"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> QContactTag::<span class="name">tag</span> () const</h3>
<p>Returns the tag associated with a contact which is stored in this detail.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qcontacttag.html#setTag">setTag</a>().</p>
<!-- @@@tag -->
</div>
<div class="vars">
<h2>Member Variable Documentation</h2>
<!-- $$$DefinitionName -->
<h3 class="fn"><a name="DefinitionName-var"></a>const <span class="type"><a href="qlatin1constant.html">QLatin1Constant</a></span> QContactTag::<span class="name">DefinitionName</span></h3>
<p>The string constant for the definition name of <a href="qcontacttag.html">QContactTag</a> details.</p>
<!-- @@@DefinitionName -->
<!-- $$$FieldTag -->
<h3 class="fn"><a name="FieldTag-var"></a>const <span class="type"><a href="qlatin1constant.html">QLatin1Constant</a></span> QContactTag::<span class="name">FieldTag</span></h3>
<p>The field key constant for the value containing the tag.</p>
<p><b>See also </b><a href="qcontacttag.html#tag">tag</a>() and <a href="qcontacttag.html#setTag">setTag</a>().</p>
<!-- @@@FieldTag -->
</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>