Sophie

Sophie

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

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" />
<!-- qcontactrelationshipfilter.cpp -->
  <title>Qt Mobility 1.2: QContactRelationshipFilter 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>QContactRelationshipFilter</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="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QContactRelationshipFilter Class Reference</h1>
<!-- $$$QContactRelationshipFilter-brief -->
<p>The QContactRelationshipFilter class provides a filter based around relationship criteria. <a href="#details">More...</a></p>
<!-- @@@QContactRelationshipFilter -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QContactRelationshipFilter&gt;</span></pre><p><b>Inherits: </b><a href="qcontactfilter.html">QContactFilter</a>.</p>
<p>This class was introduced in Qt Mobility 1.0.</p>
<ul>
<li><a href="qcontactrelationshipfilter-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="qcontactrelationshipfilter.html#QContactRelationshipFilter">QContactRelationshipFilter</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qcontactrelationshipfilter.html#QContactRelationshipFilter-2">QContactRelationshipFilter</a></b> ( const QContactFilter &amp; <i>other</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QContactId </td><td class="memItemRight bottomAlign"><b><a href="qcontactrelationshipfilter.html#relatedContactId">relatedContactId</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QContactRelationship::Role </td><td class="memItemRight bottomAlign"><b><a href="qcontactrelationshipfilter.html#relatedContactRole">relatedContactRole</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qcontactrelationshipfilter.html#relationshipType">relationshipType</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcontactrelationshipfilter.html#setRelatedContactId">setRelatedContactId</a></b> ( const QContactId &amp; <i>relatedContactId</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcontactrelationshipfilter.html#setRelatedContactRole">setRelatedContactRole</a></b> ( QContactRelationship::Role <i>relatedContactRole</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qcontactrelationshipfilter.html#setRelationshipType">setRelationshipType</a></b> ( const QString &amp; <i>relationshipType</i> )</td></tr>
</table>
<ul>
<li class="fn">4 public functions inherited from <a href="qcontactfilter.html#public-functions">QContactFilter</a></li>
</ul>
<a name="details"></a>
<!-- $$$QContactRelationshipFilter-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QContactRelationshipFilter class provides a filter based around relationship criteria.</p>
<p>It may be used to select contacts which are involved in relationships which are of a certain type, or which involve certain contacts.</p>
<p>One common use-case might be to select the contacts which are a member of a particular group. This use-case may be met with the following filter:</p>
<pre class="cpp"> <span class="type">QContactRelationshipFilter</span> groupFilter;                               <span class="comment">// select all contacts which are involved</span>
 groupFilter<span class="operator">.</span><a href="qcontactrelationshipfilter.html#setRelationshipType">setRelationshipType</a>(<span class="type"><a href="qcontactrelationship.html">QContactRelationship</a></span><span class="operator">::</span>HasMember);     <span class="comment">// in a group relationship</span>
 groupFilter<span class="operator">.</span><a href="qcontactrelationshipfilter.html#setRelatedContactId">setRelatedContactId</a>(groupContact<span class="operator">.</span>id());                   <span class="comment">// with the group contact</span>
 groupFilter<span class="operator">.</span><a href="qcontactrelationshipfilter.html#setRelatedContactRole">setRelatedContactRole</a>(<span class="type"><a href="qcontactrelationship.html">QContactRelationship</a></span><span class="operator">::</span>First); <span class="comment">// where the group contact is the first participant</span></pre>
<p>Another common use-case might be to select the groups which a particular contact is a member of. This use-case may be met with the following filter:</p>
<pre class="cpp"> <span class="type">QContactRelationshipFilter</span> whichGroupsFilter;                                 <span class="comment">// select all contacts which are involved</span>
 whichGroupsFilter<span class="operator">.</span><a href="qcontactrelationshipfilter.html#setRelationshipType">setRelationshipType</a>(<span class="type"><a href="qcontactrelationship.html">QContactRelationship</a></span><span class="operator">::</span>HasMember); <span class="comment">// in a group relationship</span>
 whichGroupsFilter<span class="operator">.</span><a href="qcontactrelationshipfilter.html#setRelatedContactId">setRelatedContactId</a>(particularContact<span class="operator">.</span>id());                <span class="comment">// with the particular contact</span>
 whichGroupsFilter<span class="operator">.</span><a href="qcontactrelationshipfilter.html#setRelatedContactRole">setRelatedContactRole</a>(<span class="type"><a href="qcontactrelationship.html">QContactRelationship</a></span><span class="operator">::</span>Second);  <span class="comment">// where the particular contact is the second participant</span></pre>
</div>
<!-- @@@QContactRelationshipFilter -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QContactRelationshipFilter[overload1]$$$QContactRelationshipFilter -->
<h3 class="fn"><a name="QContactRelationshipFilter"></a>QContactRelationshipFilter::<span class="name">QContactRelationshipFilter</span> ()</h3>
<p>Constructs a new relationship filter</p>
<!-- @@@QContactRelationshipFilter -->
<!-- $$$QContactRelationshipFilter$$$QContactRelationshipFilterconstQContactFilter& -->
<h3 class="fn"><a name="QContactRelationshipFilter-2"></a>QContactRelationshipFilter::<span class="name">QContactRelationshipFilter</span> ( const <span class="type"><a href="qcontactfilter.html">QContactFilter</a></span> &amp; <i>other</i> )</h3>
<p>Constructs a copy of <i>other</i> if possible, else constructs a new <a href="qcontactrelationshipfilter.html">QContactRelationshipFilter</a>. *</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@QContactRelationshipFilter -->
<!-- $$$relatedContactId[overload1]$$$relatedContactId -->
<h3 class="fn"><a name="relatedContactId"></a><span class="type"><a href="qcontactid.html">QContactId</a></span> QContactRelationshipFilter::<span class="name">relatedContactId</span> () const</h3>
<p>Returns the id of the contact with whom the tested contact must have a relationship in order for the tested contact to match this filter</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qcontactrelationshipfilter.html#setRelatedContactId">setRelatedContactId</a>().</p>
<!-- @@@relatedContactId -->
<!-- $$$relatedContactRole[overload1]$$$relatedContactRole -->
<h3 class="fn"><a name="relatedContactRole"></a><span class="type"><a href="qcontactrelationship.html#Role-enum">QContactRelationship::Role</a></span> QContactRelationshipFilter::<span class="name">relatedContactRole</span> () const</h3>
<p>Returns the role in the relationship with the tested contact that the related contact must play in order for the tested contact to match this filter</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qcontactrelationshipfilter.html#setRelatedContactRole">setRelatedContactRole</a>().</p>
<!-- @@@relatedContactRole -->
<!-- $$$relationshipType[overload1]$$$relationshipType -->
<h3 class="fn"><a name="relationshipType"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> QContactRelationshipFilter::<span class="name">relationshipType</span> () const</h3>
<p>Returns the type of relationship that a contact must have in order to match the filter</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qcontactrelationshipfilter.html#setRelationshipType">setRelationshipType</a>().</p>
<!-- @@@relationshipType -->
<!-- $$$setRelatedContactId[overload1]$$$setRelatedContactIdconstQContactId& -->
<h3 class="fn"><a name="setRelatedContactId"></a><span class="type">void</span> QContactRelationshipFilter::<span class="name">setRelatedContactId</span> ( const <span class="type"><a href="qcontactid.html">QContactId</a></span> &amp; <i>relatedContactId</i> )</h3>
<p>Sets the id of the contact with whom the tested contact must have a relationship in order for the tested contact to match this filter to be <i>relatedContactId</i></p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qcontactrelationshipfilter.html#relatedContactId">relatedContactId</a>().</p>
<!-- @@@setRelatedContactId -->
<!-- $$$setRelatedContactRole[overload1]$$$setRelatedContactRoleQContactRelationship::Role -->
<h3 class="fn"><a name="setRelatedContactRole"></a><span class="type">void</span> QContactRelationshipFilter::<span class="name">setRelatedContactRole</span> ( <span class="type"><a href="qcontactrelationship.html#Role-enum">QContactRelationship::Role</a></span> <i>relatedContactRole</i> )</h3>
<p>Sets the role in the relationship with the tested contact that the related contact must play in order for the tested contact to match this filter to be <i>relatedContactRole</i></p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qcontactrelationshipfilter.html#relatedContactRole">relatedContactRole</a>().</p>
<!-- @@@setRelatedContactRole -->
<!-- $$$setRelationshipType[overload1]$$$setRelationshipTypeconstQString& -->
<h3 class="fn"><a name="setRelationshipType"></a><span class="type">void</span> QContactRelationshipFilter::<span class="name">setRelationshipType</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>relationshipType</i> )</h3>
<p>Sets the type of relationship which a contact must have in order to match this filter to <i>relationshipType</i></p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qcontactrelationshipfilter.html#relationshipType">relationshipType</a>().</p>
<!-- @@@setRelationshipType -->
</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>