~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/tutorials-addressbook-fr-part7.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/doc/src/tutorials/addressbook-fr.qdoc -->
 
5
<!-- addressbook-fr.qdoc -->
6
6
<head>
7
 
  <title>Qt 4.5: Carnet d'adresse 7 - Fonctionnalit&#xe9;s avanc&#xe9;es</title>
 
7
  <title>Qt 4.6: Carnet d'adresse 7 - Fonctionnalit&#xe9;s avanc&#xe9;es</title>
8
8
  <link rel="prev" href="tutorials-addressbook-fr-part6.html" />
9
9
  <link rel="contents" href="tutorials-addressbook-fr.html" />
10
10
  <link href="classic.css" rel="stylesheet" type="text/css" />
12
12
<body>
13
13
<table border="0" cellpadding="0" cellspacing="0" width="100%">
14
14
<tr>
15
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
16
 
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
17
 
<td align="right" valign="top" width="230"></td></tr></table><p>
 
15
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
16
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
17
</tr></table><p>
18
18
[Previous: <a href="tutorials-addressbook-fr-part6.html">Chapitre 6</a>]
19
19
[<a href="tutorials-addressbook-fr.html">Sommaire</a>]
20
20
</p>
40
40
<a name="impl-mentation-de-la-classe-addressbook"></a>
41
41
<h2>Impl&#xe9;mentation de la classe AddressBook</h2>
42
42
<p>Dans le constructeur de <tt>AddressBook</tt>, nous connectons le signal <a href="qabstractbutton.html#clicked">clicked()</a> de <tt>exportButton</tt> au slot <tt>exportAsVCard()</tt>. Nous ajoutons aussi ce bouton &#xe0; <tt>buttonLayout1</tt>, le layout responsable du groupe de boutons sur la droite.</p>
43
 
<p>Dans la m&#xe9;thode <tt>exportAsVCard()</tt>, nous commen&#xe7;ons par extraire le nom du contact dans \n name. Nous d&#xe9;clarons <tt>firstname</tt>, <tt>lastName</tt> et <tt>nameList</tt>. Ensuite, nous cherchons la position du premier espace blanc de <tt>name</tt>. Si il y a un espace, nous s&#xe9;parons le nom du contact en <tt>firstName</tt> et <tt>lastName</tt>. Finalement, nous rempla&#xe7;ons l'espace par un underscore (&quot;_&quot;). Si il n'y a pas d'espace, nous supposons que le contact ne comprend que le pr&#xe9;nom.</p>
 
43
<p>Dans la m&#xe9;thode <tt>exportAsVCard()</tt>, nous commen&#xe7;ons par extraire le nom du contact dans \n name. Nous d&#xe9;clarons <tt>firstname</tt>, <tt>lastName</tt> et <tt>nameList</tt>. Ensuite, nous cherchons la position du premier espace blanc de <tt>name</tt>. Si il y a un espace, nous s&#xe9;parons le nom du contact en <tt>firstName</tt> et <tt>lastName</tt>. Finalement, nous rempla&#xe7;ons l'espace par un underscore (&quot;<a href="examples-overview.html">_</a>&quot;). Si il n'y a pas d'espace, nous supposons que le contact ne comprend que le pr&#xe9;nom.</p>
44
44
<pre> void AddressBook::exportAsVCard()
45
45
 {
46
46
     QString name = nameLine-&gt;text();
105
105
</p>
106
106
<p /><address><hr /><div align="center">
107
107
<table width="100%" cellspacing="0" border="0"><tr class="address">
108
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
109
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
110
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
111
 
</tr></table></div></address></body>
 
108
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
109
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
110
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
111
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
112
112
</html>