summaryrefslogtreecommitdiffstats
path: root/doc/html/showrecord_8cpp-source.html
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 15:57:00 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-07-24 15:57:00 -0500
commitb888c7edb54e483ec0e3c2e2ce0eafd73acdcc65 (patch)
tree7ca76d42f66fb21ea08142de9a8d3bf16e597404 /doc/html/showrecord_8cpp-source.html
downloadkshowmail-b888c7edb54e483ec0e3c2e2ce0eafd73acdcc65.tar.gz
kshowmail-b888c7edb54e483ec0e3c2e2ce0eafd73acdcc65.zip
Initial import from kshowmail 3.3.1 sources
Diffstat (limited to 'doc/html/showrecord_8cpp-source.html')
-rw-r--r--doc/html/showrecord_8cpp-source.html580
1 files changed, 580 insertions, 0 deletions
diff --git a/doc/html/showrecord_8cpp-source.html b/doc/html/showrecord_8cpp-source.html
new file mode 100644
index 0000000..ed0fbe4
--- /dev/null
+++ b/doc/html/showrecord_8cpp-source.html
@@ -0,0 +1,580 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>kshowmail: kshowmail/showrecord.cpp Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.5.0 -->
+<div class="tabs">
+ <ul>
+ <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+ <li><a href="namespaces.html"><span>Namespaces</span></a></li>
+ <li><a href="classes.html"><span>Classes</span></a></li>
+ <li id="current"><a href="files.html"><span>Files</span></a></li>
+ <li><a href="dirs.html"><span>Directories</span></a></li>
+ </ul></div>
+<div class="nav">
+<a class="el" href="dir_656923b733374505e0e2f68ecb68d952.html">kshowmail</a></div>
+<h1>showrecord.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/***************************************************************************</span>
+<a name="l00002"></a>00002 <span class="comment"> showrecord.cpp - description</span>
+<a name="l00003"></a>00003 <span class="comment"> -------------------</span>
+<a name="l00004"></a>00004 <span class="comment"> begin : Mon Dec 3 2001</span>
+<a name="l00005"></a>00005 <span class="comment"> copyright : (C) 2001 by Eggert Ehmke</span>
+<a name="l00006"></a>00006 <span class="comment"> email : eggert.ehmke@berlin.de</span>
+<a name="l00007"></a>00007 <span class="comment"> ***************************************************************************/</span>
+<a name="l00008"></a>00008
+<a name="l00009"></a>00009 <span class="comment">/***************************************************************************</span>
+<a name="l00010"></a>00010 <span class="comment"> * *</span>
+<a name="l00011"></a>00011 <span class="comment"> * This program is free software; you can redistribute it and/or modify *</span>
+<a name="l00012"></a>00012 <span class="comment"> * it under the terms of the GNU General Public License as published by *</span>
+<a name="l00013"></a>00013 <span class="comment"> * the Free Software Foundation; either version 2 of the License, or *</span>
+<a name="l00014"></a>00014 <span class="comment"> * (at your option) any later version. *</span>
+<a name="l00015"></a>00015 <span class="comment"> * *</span>
+<a name="l00016"></a>00016 <span class="comment"> ***************************************************************************/</span>
+<a name="l00017"></a>00017
+<a name="l00018"></a>00018 <span class="preprocessor">#include "showrecord.h"</span>
+<a name="l00019"></a>00019
+<a name="l00020"></a>00020 <span class="keywordtype">int</span> <span class="keyword">const</span> <a class="code" href="classShowRecord.html#24f3968b9bd526deb987f3e21f264404">ShowRecord::continueShowHeaders</a>( 0 );
+<a name="l00021"></a>00021 <span class="keywordtype">int</span> <span class="keyword">const</span> <a class="code" href="classShowRecord.html#8f9c8ce1f77c014cd4efcbf65c9b11f5">ShowRecord::cancelShowHeaders</a>( 1 );
+<a name="l00022"></a>00022
+<a name="l00023"></a><a class="code" href="classShowRecord.html#c3088d9306ad23138dcc1212b975f596">00023</a> <a class="code" href="classShowRecord.html#c3088d9306ad23138dcc1212b975f596">ShowRecord::ShowRecord</a>()
+<a name="l00024"></a>00024 {
+<a name="l00025"></a>00025 <span class="comment">//set auto delete to true. This is a function of the parent class, which deletes</span>
+<a name="l00026"></a>00026 <span class="comment">//all items when the list is deleted or cleared.</span>
+<a name="l00027"></a>00027 setAutoDelete( <span class="keyword">true</span> );
+<a name="l00028"></a>00028 }
+<a name="l00029"></a>00029
+<a name="l00030"></a><a class="code" href="classShowRecord.html#bda8f21edf9dbfa07741e37e6f06beeb">00030</a> <a class="code" href="classShowRecord.html#bda8f21edf9dbfa07741e37e6f06beeb">ShowRecord::~ShowRecord</a>()
+<a name="l00031"></a>00031 {
+<a name="l00032"></a>00032 }
+<a name="l00033"></a>00033
+<a name="l00034"></a><a class="code" href="classShowRecord.html#2b0757f2678223ca4e51257766dd64a3">00034</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#2b0757f2678223ca4e51257766dd64a3">ShowRecord::saveOptions</a>( QDomDocument&amp; doc, QDomElement&amp; parent )
+<a name="l00035"></a>00035 {
+<a name="l00036"></a>00036 <span class="comment">//Loop over all mail items</span>
+<a name="l00037"></a>00037 <span class="keywordflow">for</span>( <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* pElem = first(); pElem; pElem = next() )
+<a name="l00038"></a>00038 {
+<a name="l00039"></a>00039 <span class="comment">//call the method of the mail to save it</span>
+<a name="l00040"></a>00040 pElem-&gt;saveOptions( doc, parent );
+<a name="l00041"></a>00041 }
+<a name="l00042"></a>00042 }
+<a name="l00043"></a>00043
+<a name="l00044"></a><a class="code" href="classShowRecord.html#87bd29245b100a9d291856fd0784662f">00044</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#87bd29245b100a9d291856fd0784662f">ShowRecord::readStoredMails</a>( QDomElement&amp; parent )
+<a name="l00045"></a>00045 {
+<a name="l00046"></a>00046 <span class="comment">//clear the list</span>
+<a name="l00047"></a>00047 clear();
+<a name="l00048"></a>00048
+<a name="l00049"></a>00049 <span class="comment">//get first DOM node (mail)</span>
+<a name="l00050"></a>00050 QDomNode n = parent.firstChild();
+<a name="l00051"></a>00051
+<a name="l00052"></a>00052 <span class="comment">//iterate over all mail items stored in the given account</span>
+<a name="l00053"></a>00053 <span class="keywordflow">while</span>( !n.isNull() )
+<a name="l00054"></a>00054 {
+<a name="l00055"></a>00055 <span class="comment">//get element of the current node</span>
+<a name="l00056"></a>00056 QDomElement e = n.toElement();
+<a name="l00057"></a>00057
+<a name="l00058"></a>00058 <span class="comment">//create mail object</span>
+<a name="l00059"></a>00059 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* pElem = <span class="keyword">new</span> <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>();
+<a name="l00060"></a>00060
+<a name="l00061"></a>00061 <span class="comment">//store the currently read mail data in the new object</span>
+<a name="l00062"></a>00062 pElem-&gt;<a class="code" href="classShowRecordElem.html#97952e1293b679abc1891a240bd9e4f1">readOptions</a>( e );
+<a name="l00063"></a>00063
+<a name="l00064"></a>00064 <span class="comment">//store the new mail object in this list</span>
+<a name="l00065"></a>00065 append( pElem );
+<a name="l00066"></a>00066
+<a name="l00067"></a>00067 <span class="comment">//get next DOM node</span>
+<a name="l00068"></a>00068 n = n.nextSibling();
+<a name="l00069"></a>00069 }
+<a name="l00070"></a>00070 }
+<a name="l00071"></a>00071
+<a name="l00072"></a><a class="code" href="classShowRecord.html#781cfc15d342cef7ffea393737636065">00072</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#781cfc15d342cef7ffea393737636065">ShowRecord::applyFilters</a> ()
+<a name="l00073"></a>00073 {
+<a name="l00074"></a>00074 <span class="comment">//Loop over all mails in this list</span>
+<a name="l00075"></a>00075 <span class="keywordflow">for</span>( <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* pElem = first(); pElem; pElem = next() )
+<a name="l00076"></a>00076 {
+<a name="l00077"></a>00077 <span class="comment">//apply the filters to the current mail</span>
+<a name="l00078"></a>00078 pElem-&gt;applyFilters ();
+<a name="l00079"></a>00079 }
+<a name="l00080"></a>00080 }
+<a name="l00081"></a>00081
+<a name="l00082"></a><a class="code" href="classShowRecord.html#e0aeb91afa1bd2ea566ff4dd4dd299d5">00082</a> <span class="keywordtype">bool</span> <a class="code" href="classShowRecord.html#e0aeb91afa1bd2ea566ff4dd4dd299d5">ShowRecord::hasSelectedMails</a>( )
+<a name="l00083"></a>00083 {
+<a name="l00084"></a>00084 <span class="keywordtype">bool</span> selected = <span class="keyword">false</span>; <span class="comment">//TRUE when a selected mail was found</span>
+<a name="l00085"></a>00085 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//mail which we want to check</span>
+<a name="l00086"></a>00086
+<a name="l00087"></a>00087 <span class="comment">//get first mail</span>
+<a name="l00088"></a>00088 mail = first();
+<a name="l00089"></a>00089
+<a name="l00090"></a>00090 <span class="comment">//iterate over all mails until we have found a selected mail</span>
+<a name="l00091"></a>00091 <span class="keywordflow">while</span>( mail != NULL &amp;&amp; !selected )
+<a name="l00092"></a>00092 {
+<a name="l00093"></a>00093 <span class="comment">//check the current mail</span>
+<a name="l00094"></a>00094 selected = mail-&gt;<a class="code" href="classShowRecordElem.html#6987a0066f420f62b5c9ec9d82ed7fb3">isSelected</a>();
+<a name="l00095"></a>00095
+<a name="l00096"></a>00096 <span class="comment">//get next mail</span>
+<a name="l00097"></a>00097 mail = next();
+<a name="l00098"></a>00098 }
+<a name="l00099"></a>00099
+<a name="l00100"></a>00100 <span class="keywordflow">return</span> selected;
+<a name="l00101"></a>00101 }
+<a name="l00102"></a>00102
+<a name="l00103"></a><a class="code" href="classShowRecord.html#417a26f1eea8a1311362633e43ac8bab">00103</a> <a class="code" href="namespaceTypes.html#48fad16d3707caeaf47bb1e8fab4be55">MailNumberList_Type</a> <a class="code" href="classShowRecord.html#417a26f1eea8a1311362633e43ac8bab">ShowRecord::getSelectedMails</a>( )
+<a name="l00104"></a>00104 {
+<a name="l00105"></a>00105 <a class="code" href="namespaceTypes.html#48fad16d3707caeaf47bb1e8fab4be55">MailNumberList_Type</a> list; <span class="comment">//contains the numbers of selected mails</span>
+<a name="l00106"></a>00106 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//mail from which we want to get the number (if selected)</span>
+<a name="l00107"></a>00107 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00108"></a>00108
+<a name="l00109"></a>00109 <span class="comment">//iterate over all mails</span>
+<a name="l00110"></a>00110 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL )
+<a name="l00111"></a>00111 {
+<a name="l00112"></a>00112 <span class="comment">//increment iterator to next mail</span>
+<a name="l00113"></a>00113 ++it;
+<a name="l00114"></a>00114
+<a name="l00115"></a>00115 <span class="comment">//if current mail is selected append its number to the mail number list</span>
+<a name="l00116"></a>00116 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#6987a0066f420f62b5c9ec9d82ed7fb3">isSelected</a>() )
+<a name="l00117"></a>00117 list.append( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() );
+<a name="l00118"></a>00118 }
+<a name="l00119"></a>00119
+<a name="l00120"></a>00120 <span class="keywordflow">return</span> list;
+<a name="l00121"></a>00121 }
+<a name="l00122"></a>00122
+<a name="l00123"></a><a class="code" href="classShowRecord.html#d9075f4c8de5af4b0b5870d1ff71f4ea">00123</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#d9075f4c8de5af4b0b5870d1ff71f4ea">ShowRecord::removeMail</a>( <span class="keywordtype">int</span> number )
+<a name="l00124"></a>00124 {
+<a name="l00125"></a>00125 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00126"></a>00126 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00127"></a>00127
+<a name="l00128"></a>00128 <span class="comment">//looking for the mail with the number 'number'</span>
+<a name="l00129"></a>00129 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL )
+<a name="l00130"></a>00130 {
+<a name="l00131"></a>00131 <span class="comment">//increment iterator to next mail</span>
+<a name="l00132"></a>00132 ++it;
+<a name="l00133"></a>00133
+<a name="l00134"></a>00134 <span class="comment">//if the current mail has the given number, remove it</span>
+<a name="l00135"></a>00135 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() == number )
+<a name="l00136"></a>00136 remove( mail );
+<a name="l00137"></a>00137 }
+<a name="l00138"></a>00138 }
+<a name="l00139"></a>00139
+<a name="l00140"></a><a class="code" href="classShowRecord.html#c78c6981b92a2546d4ee75320aba380d">00140</a> QStringList <a class="code" href="classShowRecord.html#c78c6981b92a2546d4ee75320aba380d">ShowRecord::getSelectedSubjects</a>( )<span class="keyword"> const</span>
+<a name="l00141"></a>00141 <span class="keyword"></span>{
+<a name="l00142"></a>00142 QStringList subjects; <span class="comment">//contains the subjects</span>
+<a name="l00143"></a>00143 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00144"></a>00144 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00145"></a>00145
+<a name="l00146"></a>00146 <span class="comment">//iterate over all mails</span>
+<a name="l00147"></a>00147 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL )
+<a name="l00148"></a>00148 {
+<a name="l00149"></a>00149 <span class="comment">//increment iterator to next mail</span>
+<a name="l00150"></a>00150 ++it;
+<a name="l00151"></a>00151
+<a name="l00152"></a>00152 <span class="comment">//if the mail is selected, append subject to list</span>
+<a name="l00153"></a>00153 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#6987a0066f420f62b5c9ec9d82ed7fb3">isSelected</a>() )
+<a name="l00154"></a>00154 subjects.append( mail-&gt;<a class="code" href="classShowRecordElem.html#b3b6657b842bbd5e4759fe7f55534416">subject</a>() );
+<a name="l00155"></a>00155 }
+<a name="l00156"></a>00156
+<a name="l00157"></a>00157 <span class="keywordflow">return</span> subjects;
+<a name="l00158"></a>00158 }
+<a name="l00159"></a>00159
+<a name="l00160"></a><a class="code" href="classShowRecord.html#51a8d0c91d32e6fdc20cb8f5f2350cac">00160</a> QString <a class="code" href="classShowRecord.html#51a8d0c91d32e6fdc20cb8f5f2350cac">ShowRecord::getSenderOf</a>( <span class="keywordtype">int</span> number )<span class="keyword"> const</span>
+<a name="l00161"></a>00161 <span class="keyword"></span>{
+<a name="l00162"></a>00162 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00163"></a>00163 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00164"></a>00164 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00165"></a>00165 QString sender; <span class="comment">//sender of the wanted mail</span>
+<a name="l00166"></a>00166
+<a name="l00167"></a>00167 <span class="comment">//looking for the mail with the number 'number'</span>
+<a name="l00168"></a>00168 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00169"></a>00169 {
+<a name="l00170"></a>00170 <span class="comment">//increment iterator to next mail</span>
+<a name="l00171"></a>00171 ++it;
+<a name="l00172"></a>00172
+<a name="l00173"></a>00173 <span class="comment">//if the current mail has the given number, remove it</span>
+<a name="l00174"></a>00174 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() == number )
+<a name="l00175"></a>00175 {
+<a name="l00176"></a>00176 sender = mail-&gt;<a class="code" href="classShowRecordElem.html#a4d48b3072adb4f87f56ed2b5e35dbba">from</a>();
+<a name="l00177"></a>00177 found = <span class="keyword">true</span>;
+<a name="l00178"></a>00178 }
+<a name="l00179"></a>00179 }
+<a name="l00180"></a>00180 <span class="keywordflow">return</span> sender;
+<a name="l00181"></a>00181 }
+<a name="l00182"></a>00182
+<a name="l00183"></a><a class="code" href="classShowRecord.html#93c44ad805a67e955b3cfa2518291613">00183</a> QString <a class="code" href="classShowRecord.html#93c44ad805a67e955b3cfa2518291613">ShowRecord::getDateOf</a>( <span class="keywordtype">int</span> number )<span class="keyword"> const</span>
+<a name="l00184"></a>00184 <span class="keyword"></span>{
+<a name="l00185"></a>00185 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00186"></a>00186 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00187"></a>00187 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00188"></a>00188 QString date; <span class="comment">//sent date of the wanted mail</span>
+<a name="l00189"></a>00189
+<a name="l00190"></a>00190 <span class="comment">//looking for the mail with the number 'number'</span>
+<a name="l00191"></a>00191 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00192"></a>00192 {
+<a name="l00193"></a>00193 <span class="comment">//increment iterator to next mail</span>
+<a name="l00194"></a>00194 ++it;
+<a name="l00195"></a>00195
+<a name="l00196"></a>00196 <span class="comment">//if the current mail has the given number, remove it</span>
+<a name="l00197"></a>00197 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() == number )
+<a name="l00198"></a>00198 {
+<a name="l00199"></a>00199 date = mail-&gt;<a class="code" href="classShowRecordElem.html#412ad2a7452c1f5390f2679f1d443292">date</a>();
+<a name="l00200"></a>00200 found = <span class="keyword">true</span>;
+<a name="l00201"></a>00201 }
+<a name="l00202"></a>00202 }
+<a name="l00203"></a>00203 <span class="keywordflow">return</span> date;
+<a name="l00204"></a>00204
+<a name="l00205"></a>00205 }
+<a name="l00206"></a>00206
+<a name="l00207"></a><a class="code" href="classShowRecord.html#b1a6f1fee65db84e5496619c14035539">00207</a> QString <a class="code" href="classShowRecord.html#b1a6f1fee65db84e5496619c14035539">ShowRecord::getSizeOf</a>( <span class="keywordtype">int</span> number )<span class="keyword"> const</span>
+<a name="l00208"></a>00208 <span class="keyword"></span>{
+<a name="l00209"></a>00209 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00210"></a>00210 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00211"></a>00211 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00212"></a>00212 QString size; <span class="comment">//size of the wanted mail</span>
+<a name="l00213"></a>00213
+<a name="l00214"></a>00214 <span class="comment">//looking for the mail with the number 'number'</span>
+<a name="l00215"></a>00215 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00216"></a>00216 {
+<a name="l00217"></a>00217 <span class="comment">//increment iterator to next mail</span>
+<a name="l00218"></a>00218 ++it;
+<a name="l00219"></a>00219
+<a name="l00220"></a>00220 <span class="comment">//if the current mail has the given number, remove it</span>
+<a name="l00221"></a>00221 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() == number )
+<a name="l00222"></a>00222 {
+<a name="l00223"></a>00223 size = mail-&gt;<a class="code" href="classShowRecordElem.html#233ccd75f668ec868ec726120d8c71d9">strSizePrefix</a>();
+<a name="l00224"></a>00224 found = <span class="keyword">true</span>;
+<a name="l00225"></a>00225 }
+<a name="l00226"></a>00226 }
+<a name="l00227"></a>00227 <span class="keywordflow">return</span> size;
+<a name="l00228"></a>00228
+<a name="l00229"></a>00229 }
+<a name="l00230"></a>00230
+<a name="l00231"></a><a class="code" href="classShowRecord.html#38d282950be6217d1488efc720a5f415">00231</a> QString <a class="code" href="classShowRecord.html#38d282950be6217d1488efc720a5f415">ShowRecord::getSubjectOf</a>( <span class="keywordtype">int</span> number )<span class="keyword"> const</span>
+<a name="l00232"></a>00232 <span class="keyword"></span>{
+<a name="l00233"></a>00233 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00234"></a>00234 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00235"></a>00235 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00236"></a>00236 QString subject; <span class="comment">//subject of the wanted mail</span>
+<a name="l00237"></a>00237
+<a name="l00238"></a>00238 <span class="comment">//looking for the mail with the number 'number'</span>
+<a name="l00239"></a>00239 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00240"></a>00240 {
+<a name="l00241"></a>00241 <span class="comment">//increment iterator to next mail</span>
+<a name="l00242"></a>00242 ++it;
+<a name="l00243"></a>00243
+<a name="l00244"></a>00244 <span class="comment">//if the current mail has the given number, get the subject</span>
+<a name="l00245"></a>00245 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() == number )
+<a name="l00246"></a>00246 {
+<a name="l00247"></a>00247 subject = mail-&gt;<a class="code" href="classShowRecordElem.html#b3b6657b842bbd5e4759fe7f55534416">subject</a>();
+<a name="l00248"></a>00248 found = <span class="keyword">true</span>;
+<a name="l00249"></a>00249 }
+<a name="l00250"></a>00250 }
+<a name="l00251"></a>00251 <span class="keywordflow">return</span> subject;
+<a name="l00252"></a>00252
+<a name="l00253"></a>00253 }
+<a name="l00254"></a>00254
+<a name="l00255"></a><a class="code" href="classShowRecord.html#dde4ccc3e28c0d7e233ace3810a28814">00255</a> QString <a class="code" href="classShowRecord.html#dde4ccc3e28c0d7e233ace3810a28814">ShowRecord::decodeMailBody</a>( QByteArray body, <span class="keywordtype">int</span> number, <span class="keywordtype">bool</span> preferHTML )<span class="keyword"> const</span>
+<a name="l00256"></a>00256 <span class="keyword"></span>{
+<a name="l00257"></a>00257 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00258"></a>00258 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00259"></a>00259 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00260"></a>00260 QString mailbody; <span class="comment">//decoded mail</span>
+<a name="l00261"></a>00261
+<a name="l00262"></a>00262 <span class="comment">//looking for the mail with the number 'number'</span>
+<a name="l00263"></a>00263 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00264"></a>00264 {
+<a name="l00265"></a>00265 <span class="comment">//increment iterator to next mail</span>
+<a name="l00266"></a>00266 ++it;
+<a name="l00267"></a>00267
+<a name="l00268"></a>00268 <span class="comment">//if the current mail has the given number, decode the mail</span>
+<a name="l00269"></a>00269 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() == number )
+<a name="l00270"></a>00270 {
+<a name="l00271"></a>00271 mailbody = mail-&gt;<a class="code" href="classShowRecordElem.html#27af244fc090ac05fabde1becb7bf60d">decodeMailBody</a>( body, preferHTML );
+<a name="l00272"></a>00272 found = <span class="keyword">true</span>;
+<a name="l00273"></a>00273 }
+<a name="l00274"></a>00274 }
+<a name="l00275"></a>00275 <span class="keywordflow">return</span> mailbody;
+<a name="l00276"></a>00276
+<a name="l00277"></a>00277 }
+<a name="l00278"></a>00278
+<a name="l00279"></a><a class="code" href="classShowRecord.html#1fca27c3d569bbd1b1d673f2ac847791">00279</a> <span class="keywordtype">bool</span> <a class="code" href="classShowRecord.html#1fca27c3d569bbd1b1d673f2ac847791">ShowRecord::hasMail</a>( QString uid )
+<a name="l00280"></a>00280 {
+<a name="l00281"></a>00281 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00282"></a>00282 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00283"></a>00283 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00284"></a>00284
+<a name="l00285"></a>00285 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00286"></a>00286 {
+<a name="l00287"></a>00287 <span class="comment">//increment iterator to next mail</span>
+<a name="l00288"></a>00288 ++it;
+<a name="l00289"></a>00289
+<a name="l00290"></a>00290 <span class="comment">//compare the uid</span>
+<a name="l00291"></a>00291 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#835e045bf24090c4d6a6a9049c60e94c">uidl</a>() == uid )
+<a name="l00292"></a>00292 {
+<a name="l00293"></a>00293 found = <span class="keyword">true</span>;
+<a name="l00294"></a>00294 }
+<a name="l00295"></a>00295 }
+<a name="l00296"></a>00296 <span class="keywordflow">return</span> found;
+<a name="l00297"></a>00297 }
+<a name="l00298"></a>00298
+<a name="l00299"></a><a class="code" href="classShowRecord.html#97b16a09a5a51b68f7d2b3efb95c80ea">00299</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#97b16a09a5a51b68f7d2b3efb95c80ea">ShowRecord::appendNewMail</a>( <span class="keywordtype">int</span> number, QString uid, <span class="keywordtype">bool</span> isNew )
+<a name="l00300"></a>00300 {
+<a name="l00301"></a>00301 <span class="comment">//create new mail</span>
+<a name="l00302"></a>00302 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* newMail = <span class="keyword">new</span> <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>( number, uid, isNew );
+<a name="l00303"></a>00303
+<a name="l00304"></a>00304 <span class="comment">//append new mail</span>
+<a name="l00305"></a>00305 <span class="keywordflow">if</span>( newMail != NULL )
+<a name="l00306"></a>00306 append( newMail );
+<a name="l00307"></a>00307 }
+<a name="l00308"></a>00308
+<a name="l00309"></a><a class="code" href="classShowRecord.html#1705c73921184eda80bd63f979ef34bc">00309</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#1705c73921184eda80bd63f979ef34bc">ShowRecord::printMailList</a>( )
+<a name="l00310"></a>00310 {
+<a name="l00311"></a>00311 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00312"></a>00312 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00313"></a>00313
+<a name="l00314"></a>00314 <span class="keywordflow">while</span>( ( mail = it.current() ) )
+<a name="l00315"></a>00315 {
+<a name="l00316"></a>00316 <span class="comment">//increment iterator to next mail</span>
+<a name="l00317"></a>00317 ++it;
+<a name="l00318"></a>00318
+<a name="l00319"></a>00319 <span class="comment">//print mail</span>
+<a name="l00320"></a>00320 cout &lt;&lt; mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() &lt;&lt; <span class="stringliteral">" - UID: "</span> &lt;&lt; mail-&gt;<a class="code" href="classShowRecordElem.html#835e045bf24090c4d6a6a9049c60e94c">uidl</a>() &lt;&lt; <span class="stringliteral">"; Size: "</span> &lt;&lt; mail-&gt;<a class="code" href="classShowRecordElem.html#4b4077ca5d47226ccb44b6d8373a4fbd">size</a>() &lt;&lt; <span class="stringliteral">"; Subject: "</span> &lt;&lt; mail-&gt;<a class="code" href="classShowRecordElem.html#b3b6657b842bbd5e4759fe7f55534416">subject</a>() &lt;&lt; <span class="stringliteral">"; New: "</span> &lt;&lt; mail-&gt;<a class="code" href="classShowRecordElem.html#48485d7a0dfef669b6597c865a515290">isNew</a>() &lt;&lt; endl;
+<a name="l00321"></a>00321 }
+<a name="l00322"></a>00322
+<a name="l00323"></a>00323 }
+<a name="l00324"></a>00324
+<a name="l00325"></a><a class="code" href="classShowRecord.html#f3ae42223f76c35b2273119916a82a24">00325</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#f3ae42223f76c35b2273119916a82a24">ShowRecord::setSize</a>( <span class="keywordtype">int</span> number, <span class="keywordtype">long</span> size )
+<a name="l00326"></a>00326 {
+<a name="l00327"></a>00327 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00328"></a>00328 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00329"></a>00329 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00330"></a>00330
+<a name="l00331"></a>00331 <span class="comment">//looking for the mail with the number 'number'</span>
+<a name="l00332"></a>00332 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00333"></a>00333 {
+<a name="l00334"></a>00334 <span class="comment">//increment iterator to next mail</span>
+<a name="l00335"></a>00335 ++it;
+<a name="l00336"></a>00336
+<a name="l00337"></a>00337 <span class="comment">//if the current mail has the given number, decode the mail</span>
+<a name="l00338"></a>00338 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() == number )
+<a name="l00339"></a>00339 {
+<a name="l00340"></a>00340 mail-&gt;<a class="code" href="classShowRecordElem.html#dd22d1f50be46bd9ecbbacec7606b3ed">setSize</a>( size );
+<a name="l00341"></a>00341 found = <span class="keyword">true</span>;
+<a name="l00342"></a>00342 }
+<a name="l00343"></a>00343 }
+<a name="l00344"></a>00344 }
+<a name="l00345"></a>00345
+<a name="l00346"></a><a class="code" href="classShowRecord.html#89fd7edc8c324e8b0ebe6b32f2d30b9d">00346</a> <a class="code" href="namespaceTypes.html#48fad16d3707caeaf47bb1e8fab4be55">Types::MailNumberList_Type</a> <a class="code" href="classShowRecord.html#89fd7edc8c324e8b0ebe6b32f2d30b9d">ShowRecord::getNewMails</a>( )
+<a name="l00347"></a>00347 {
+<a name="l00348"></a>00348 <a class="code" href="namespaceTypes.html#48fad16d3707caeaf47bb1e8fab4be55">MailNumberList_Type</a> list; <span class="comment">//contains the numbers of the new mails</span>
+<a name="l00349"></a>00349 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//mail from which we want to get the number (if new)</span>
+<a name="l00350"></a>00350 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00351"></a>00351
+<a name="l00352"></a>00352 <span class="comment">//iterate over all mails</span>
+<a name="l00353"></a>00353 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL )
+<a name="l00354"></a>00354 {
+<a name="l00355"></a>00355 <span class="comment">//increment iterator to next mail</span>
+<a name="l00356"></a>00356 ++it;
+<a name="l00357"></a>00357
+<a name="l00358"></a>00358 <span class="comment">//if current mail is new append its number to the mail number list</span>
+<a name="l00359"></a>00359 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#48485d7a0dfef669b6597c865a515290">isNew</a>() )
+<a name="l00360"></a>00360 list.append( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() );
+<a name="l00361"></a>00361 }
+<a name="l00362"></a>00362
+<a name="l00363"></a>00363 <span class="keywordflow">return</span> list;
+<a name="l00364"></a>00364 }
+<a name="l00365"></a>00365
+<a name="l00366"></a><a class="code" href="classShowRecord.html#29fe412b8ef3eb2b71bbd93268baaf9a">00366</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#29fe412b8ef3eb2b71bbd93268baaf9a">ShowRecord::setHeader</a>( <span class="keywordtype">int</span> number, QString header )
+<a name="l00367"></a>00367 {
+<a name="l00368"></a>00368 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00369"></a>00369 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00370"></a>00370 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00371"></a>00371
+<a name="l00372"></a>00372 <span class="comment">//looking for the mail with the number 'number'</span>
+<a name="l00373"></a>00373 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00374"></a>00374 {
+<a name="l00375"></a>00375 <span class="comment">//increment iterator to next mail</span>
+<a name="l00376"></a>00376 ++it;
+<a name="l00377"></a>00377
+<a name="l00378"></a>00378 <span class="comment">//if the current mail has the given number, set the header</span>
+<a name="l00379"></a>00379 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() == number )
+<a name="l00380"></a>00380 {
+<a name="l00381"></a>00381 mail-&gt;<a class="code" href="classShowRecordElem.html#28e7072cd68f18e1e07176b9c1bd5f72">setHeader</a>( header );
+<a name="l00382"></a>00382 found = <span class="keyword">true</span>;
+<a name="l00383"></a>00383 }
+<a name="l00384"></a>00384 }
+<a name="l00385"></a>00385 }
+<a name="l00386"></a>00386
+<a name="l00387"></a><a class="code" href="classShowRecord.html#ae03febb272198c00851b4e46be68b83">00387</a> QStringList <a class="code" href="classShowRecord.html#ae03febb272198c00851b4e46be68b83">ShowRecord::getUIDsOfOldMails</a>( )
+<a name="l00388"></a>00388 {
+<a name="l00389"></a>00389 QStringList list; <span class="comment">//contains the UIDs of the old mails</span>
+<a name="l00390"></a>00390 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//mail from which we want to get the uid (if old)</span>
+<a name="l00391"></a>00391 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00392"></a>00392
+<a name="l00393"></a>00393 <span class="comment">//iterate over all mails</span>
+<a name="l00394"></a>00394 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL )
+<a name="l00395"></a>00395 {
+<a name="l00396"></a>00396 <span class="comment">//increment iterator to next mail</span>
+<a name="l00397"></a>00397 ++it;
+<a name="l00398"></a>00398
+<a name="l00399"></a>00399 <span class="comment">//if current mail is new append its number to the mail number list</span>
+<a name="l00400"></a>00400 <span class="keywordflow">if</span>( !mail-&gt;<a class="code" href="classShowRecordElem.html#48485d7a0dfef669b6597c865a515290">isNew</a>() )
+<a name="l00401"></a>00401 list.append( mail-&gt;<a class="code" href="classShowRecordElem.html#835e045bf24090c4d6a6a9049c60e94c">uidl</a>() );
+<a name="l00402"></a>00402 }
+<a name="l00403"></a>00403
+<a name="l00404"></a>00404 <span class="keywordflow">return</span> list;
+<a name="l00405"></a>00405 }
+<a name="l00406"></a>00406
+<a name="l00407"></a><a class="code" href="classShowRecord.html#15ef001ed312f642b8cd8cf2619ecfb4">00407</a> QString <a class="code" href="classShowRecord.html#15ef001ed312f642b8cd8cf2619ecfb4">ShowRecord::getHeaderOf</a>( QString uid )
+<a name="l00408"></a>00408 {
+<a name="l00409"></a>00409 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00410"></a>00410 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00411"></a>00411 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00412"></a>00412 QString header; <span class="comment">//header of the wanted mail</span>
+<a name="l00413"></a>00413
+<a name="l00414"></a>00414 <span class="comment">//looking for the mail with the UID 'uid'</span>
+<a name="l00415"></a>00415 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00416"></a>00416 {
+<a name="l00417"></a>00417 <span class="comment">//increment iterator to next mail</span>
+<a name="l00418"></a>00418 ++it;
+<a name="l00419"></a>00419
+<a name="l00420"></a>00420 <span class="comment">//if the current mail has the given uid, get the header</span>
+<a name="l00421"></a>00421 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#835e045bf24090c4d6a6a9049c60e94c">uidl</a>() == uid )
+<a name="l00422"></a>00422 {
+<a name="l00423"></a>00423 header = mail-&gt;<a class="code" href="classShowRecordElem.html#dd5d842c1abdd13fa03ac4a3f2f11150">header</a>();
+<a name="l00424"></a>00424 found = <span class="keyword">true</span>;
+<a name="l00425"></a>00425 }
+<a name="l00426"></a>00426 }
+<a name="l00427"></a>00427 <span class="keywordflow">return</span> header;
+<a name="l00428"></a>00428 }
+<a name="l00429"></a>00429
+<a name="l00430"></a><a class="code" href="classShowRecord.html#230b5d25e61a0aa76a9adf852bf73d98">00430</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#29fe412b8ef3eb2b71bbd93268baaf9a">ShowRecord::setHeader</a>( QString uid, QString header )
+<a name="l00431"></a>00431 {
+<a name="l00432"></a>00432 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00433"></a>00433 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00434"></a>00434 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00435"></a>00435
+<a name="l00436"></a>00436 <span class="comment">//looking for the mail with the UID 'uid'</span>
+<a name="l00437"></a>00437 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00438"></a>00438 {
+<a name="l00439"></a>00439 <span class="comment">//increment iterator to next mail</span>
+<a name="l00440"></a>00440 ++it;
+<a name="l00441"></a>00441
+<a name="l00442"></a>00442 <span class="comment">//if the current mail has the given UID, set the header</span>
+<a name="l00443"></a>00443 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#835e045bf24090c4d6a6a9049c60e94c">uidl</a>() == uid )
+<a name="l00444"></a>00444 {
+<a name="l00445"></a>00445 mail-&gt;<a class="code" href="classShowRecordElem.html#28e7072cd68f18e1e07176b9c1bd5f72">setHeader</a>( header );
+<a name="l00446"></a>00446 found = <span class="keyword">true</span>;
+<a name="l00447"></a>00447 }
+<a name="l00448"></a>00448 }
+<a name="l00449"></a>00449 }
+<a name="l00450"></a>00450
+<a name="l00451"></a><a class="code" href="classShowRecord.html#fb2d493f52927c18ccc35352d2d2b115">00451</a> <span class="keywordtype">int</span> <a class="code" href="classShowRecord.html#fb2d493f52927c18ccc35352d2d2b115">ShowRecord::getNumberNewMails</a>( )
+<a name="l00452"></a>00452 {
+<a name="l00453"></a>00453 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00454"></a>00454 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00455"></a>00455 <span class="keywordtype">int</span> number = 0; <span class="comment">//number of new mails</span>
+<a name="l00456"></a>00456
+<a name="l00457"></a>00457 <span class="keywordflow">while</span>( ( mail = it.current() ) )
+<a name="l00458"></a>00458 {
+<a name="l00459"></a>00459 <span class="comment">//increment iterator to next mail</span>
+<a name="l00460"></a>00460 ++it;
+<a name="l00461"></a>00461
+<a name="l00462"></a>00462 <span class="comment">//increment number, if this mail is new</span>
+<a name="l00463"></a>00463 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#48485d7a0dfef669b6597c865a515290">isNew</a>() )
+<a name="l00464"></a>00464 number++;
+<a name="l00465"></a>00465 }
+<a name="l00466"></a>00466
+<a name="l00467"></a>00467 <span class="keywordflow">return</span> number;
+<a name="l00468"></a>00468 }
+<a name="l00469"></a>00469
+<a name="l00470"></a><a class="code" href="classShowRecord.html#5fc0413079f9cfc5b32c36812f643c0a">00470</a> <span class="keywordtype">int</span> <a class="code" href="classShowRecord.html#5fc0413079f9cfc5b32c36812f643c0a">ShowRecord::getNumberMails</a>( )
+<a name="l00471"></a>00471 {
+<a name="l00472"></a>00472 <span class="keywordflow">return</span> count();
+<a name="l00473"></a>00473 }
+<a name="l00474"></a>00474
+<a name="l00475"></a><a class="code" href="classShowRecord.html#c6c9d9e7e23f57006d2d573442a144b5">00475</a> <span class="keywordtype">long</span> <a class="code" href="classShowRecord.html#c6c9d9e7e23f57006d2d573442a144b5">ShowRecord::getTotalSize</a>( )
+<a name="l00476"></a>00476 {
+<a name="l00477"></a>00477 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00478"></a>00478 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00479"></a>00479 <span class="keywordtype">long</span> size = 0; <span class="comment">//total size of all mails</span>
+<a name="l00480"></a>00480
+<a name="l00481"></a>00481 <span class="keywordflow">while</span>( ( mail = it.current() ) )
+<a name="l00482"></a>00482 {
+<a name="l00483"></a>00483 <span class="comment">//increment iterator to next mail</span>
+<a name="l00484"></a>00484 ++it;
+<a name="l00485"></a>00485
+<a name="l00486"></a>00486 size += mail-&gt;<a class="code" href="classShowRecordElem.html#4b4077ca5d47226ccb44b6d8373a4fbd">size</a>();
+<a name="l00487"></a>00487 }
+<a name="l00488"></a>00488
+<a name="l00489"></a>00489 <span class="keywordflow">return</span> size;
+<a name="l00490"></a>00490 }
+<a name="l00491"></a>00491
+<a name="l00492"></a><a class="code" href="classShowRecord.html#7124760f6dffce82cf267276f4c0d015">00492</a> <span class="keywordtype">void</span> <a class="code" href="classShowRecord.html#7124760f6dffce82cf267276f4c0d015">ShowRecord::fillMailListView</a>( <a class="code" href="classKshowmailView.html">KshowmailView</a> * view, QString &amp; account )
+<a name="l00493"></a>00493 {
+<a name="l00494"></a>00494 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00495"></a>00495 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00496"></a>00496
+<a name="l00497"></a>00497 <span class="comment">//iterate over all mails and order the mail to create a list view item</span>
+<a name="l00498"></a>00498 <span class="keywordflow">while</span>( ( mail = it.current() ) )
+<a name="l00499"></a>00499 {
+<a name="l00500"></a>00500 <span class="comment">//increment iterator to next mail</span>
+<a name="l00501"></a>00501 ++it;
+<a name="l00502"></a>00502
+<a name="l00503"></a>00503 <span class="comment">//insert list view item</span>
+<a name="l00504"></a>00504 QString number = QString( <span class="stringliteral">"%1"</span> ).arg( mail-&gt;<a class="code" href="classShowRecordElem.html#62999d75baf9a6bff999c8621a419926">number</a>() );
+<a name="l00505"></a>00505 QString from = mail-&gt;<a class="code" href="classShowRecordElem.html#a4d48b3072adb4f87f56ed2b5e35dbba">from</a>();
+<a name="l00506"></a>00506 QString to = mail-&gt;<a class="code" href="classShowRecordElem.html#759a16f3424defc71b4cfd762b156fd1">to</a>();
+<a name="l00507"></a>00507 QString subject = mail-&gt;<a class="code" href="classShowRecordElem.html#b3b6657b842bbd5e4759fe7f55534416">subject</a>();
+<a name="l00508"></a>00508 QString date = mail-&gt;<a class="code" href="classShowRecordElem.html#412ad2a7452c1f5390f2679f1d443292">date</a>();
+<a name="l00509"></a>00509 QString size = QString( <span class="stringliteral">"%1"</span> ).arg( mail-&gt;<a class="code" href="classShowRecordElem.html#4b4077ca5d47226ccb44b6d8373a4fbd">size</a>() );
+<a name="l00510"></a>00510 QString content = mail-&gt;<a class="code" href="classShowRecordElem.html#8d655afdb7350fd4a27b551da7a8a797">content</a>();
+<a name="l00511"></a>00511 QString state = mail-&gt;<a class="code" href="classShowRecordElem.html#f00398057086a7fbee1205c5d0f605a2">state</a>();
+<a name="l00512"></a>00512 QString time = mail-&gt;<a class="code" href="classShowRecordElem.html#0e554cd8f1e67b3e448054e8c6fdc91c">strUnixTime</a>();
+<a name="l00513"></a>00513 mail-&gt;<a class="code" href="classShowRecordElem.html#e7f2ca5eb9a9bc95266a4f83f78cd76e">setViewItem</a>( view-&gt;<a class="code" href="classKshowmailView.html#8330c6f139457ae5dd1510efb3f665e4">insertMail</a>( number, account, from, to, subject, date, size, content, state, time ) );
+<a name="l00514"></a>00514 }
+<a name="l00515"></a>00515
+<a name="l00516"></a>00516 }
+<a name="l00517"></a>00517
+<a name="l00518"></a><a class="code" href="classShowRecord.html#89005d433c577ed0e412c6314400cc31">00518</a> <span class="keywordtype">int</span> <a class="code" href="classShowRecord.html#89005d433c577ed0e412c6314400cc31">ShowRecord::showSelectedHeaders</a>( QString&amp; account )
+<a name="l00519"></a>00519 {
+<a name="l00520"></a>00520 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00521"></a>00521 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00522"></a>00522 <span class="keywordtype">int</span> showNextHeader = <a class="code" href="classShowRecordElem.html#2b5bdb3ed3f940614135b9c9f1f13eb6">ShowRecordElem::continueShowHeaders</a>; <span class="comment">//return value of ShowRecordElem::showHeader()</span>
+<a name="l00523"></a>00523
+<a name="l00524"></a>00524 <span class="keywordflow">while</span>( ( mail = it.current() ) &amp;&amp; showNextHeader == <a class="code" href="classShowRecordElem.html#2b5bdb3ed3f940614135b9c9f1f13eb6">ShowRecordElem::continueShowHeaders</a> )
+<a name="l00525"></a>00525 {
+<a name="l00526"></a>00526 <span class="comment">//increment iterator to next mail</span>
+<a name="l00527"></a>00527 ++it;
+<a name="l00528"></a>00528
+<a name="l00529"></a>00529 <span class="comment">//order the mail to show its header</span>
+<a name="l00530"></a>00530 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#6987a0066f420f62b5c9ec9d82ed7fb3">isSelected</a>() )
+<a name="l00531"></a>00531 showNextHeader = mail-&gt;<a class="code" href="classShowRecordElem.html#62792e6386e65ac0050f2e02963254b0">showHeader</a>( account );
+<a name="l00532"></a>00532 }
+<a name="l00533"></a>00533
+<a name="l00534"></a>00534 <span class="keywordflow">return</span> showNextHeader == <a class="code" href="classShowRecordElem.html#2b5bdb3ed3f940614135b9c9f1f13eb6">ShowRecordElem::continueShowHeaders</a> ? <a class="code" href="classShowRecord.html#24f3968b9bd526deb987f3e21f264404">ShowRecord::continueShowHeaders</a> : <a class="code" href="classShowRecord.html#8f9c8ce1f77c014cd4efcbf65c9b11f5">ShowRecord::cancelShowHeaders</a>;
+<a name="l00535"></a>00535 }
+<a name="l00536"></a>00536
+<a name="l00537"></a><a class="code" href="classShowRecord.html#89b22dcaa5ff6f47121150b7d25939d0">00537</a> <span class="keywordtype">bool</span> <a class="code" href="classShowRecord.html#89b22dcaa5ff6f47121150b7d25939d0">ShowRecord::isNew</a>( QString uid )<span class="keyword"> const</span>
+<a name="l00538"></a>00538 <span class="keyword"></span>{
+<a name="l00539"></a>00539 QPtrListIterator&lt;ShowRecordElem&gt; it( *<span class="keyword">this</span> ); <span class="comment">//iterator for the mail list</span>
+<a name="l00540"></a>00540 <a class="code" href="classShowRecordElem.html">ShowRecordElem</a>* mail; <span class="comment">//current mail</span>
+<a name="l00541"></a>00541 <span class="keywordtype">bool</span> found = <span class="keyword">false</span>; <span class="comment">//True, when the wanted mail was found</span>
+<a name="l00542"></a>00542 <span class="keywordtype">bool</span> newMail = <span class="keyword">false</span>; <span class="comment">//at time we have not found it, therefore the return value is false</span>
+<a name="l00543"></a>00543
+<a name="l00544"></a>00544 <span class="keywordflow">while</span>( ( mail = it.current() ) != NULL &amp;&amp; !found )
+<a name="l00545"></a>00545 {
+<a name="l00546"></a>00546 <span class="comment">//increment iterator to next mail</span>
+<a name="l00547"></a>00547 ++it;
+<a name="l00548"></a>00548
+<a name="l00549"></a>00549 <span class="comment">//compare the uid</span>
+<a name="l00550"></a>00550 <span class="keywordflow">if</span>( mail-&gt;<a class="code" href="classShowRecordElem.html#835e045bf24090c4d6a6a9049c60e94c">uidl</a>() == uid )
+<a name="l00551"></a>00551 {
+<a name="l00552"></a>00552 found = <span class="keyword">true</span>;
+<a name="l00553"></a>00553 newMail = mail-&gt;<a class="code" href="classShowRecordElem.html#48485d7a0dfef669b6597c865a515290">isNew</a>();
+<a name="l00554"></a>00554 }
+<a name="l00555"></a>00555 }
+<a name="l00556"></a>00556
+<a name="l00557"></a>00557 <span class="keywordflow">return</span> newMail;
+<a name="l00558"></a>00558 }
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Thu Jul 5 19:36:07 2007 for kshowmail by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.0 </small></address>
+</body>
+</html>