📄 class_c_chat_container.html
字号:
<td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><a class="el" href="class_c_chat_container.html#62f20ce3b9dbf13f58455d59c2d67388">ContainsEntries()</a> <dl compact><dt><b>Returns:</b></dt><dd>ETrue if the list view contains entries </dd></dl><p>Definition at line <a class="el" href="_chat_container_8cpp-source.html#l00215">215</a> of file <a class="el" href="_chat_container_8cpp-source.html">ChatContainer.cpp</a>.<p>References <a class="el" href="_chat_container_8h-source.html#l00198">iListBox</a>.<div class="fragment"><pre class="fragment"><a name="l00216"></a>00216 {<a name="l00217"></a>00217 <span class="keywordflow">return</span> <a class="code" href="class_c_chat_container.html#a4fe3028661554d5362654dd3ab592f6">iListBox</a>->Model()->NumberOfItems() != 0;<a name="l00218"></a>00218 }</pre></div><p> </td> </tr></table><a class="anchor" name="2582049f378fb3c4dd54cdf08c24fe75"></a><!-- doxytag: member="CChatContainer::ClearMessageListL" ref="2582049f378fb3c4dd54cdf08c24fe75" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void CChatContainer::ClearMessageListL </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><a class="el" href="class_c_chat_container.html#2582049f378fb3c4dd54cdf08c24fe75">ClearMessageListL()</a> Clear the list of messages. <p>Definition at line <a class="el" href="_chat_container_8cpp-source.html#l00116">116</a> of file <a class="el" href="_chat_container_8cpp-source.html">ChatContainer.cpp</a>.<p>References <a class="el" href="_chat_container_8h-source.html#l00198">iListBox</a>, and <a class="el" href="_chat_container_8h-source.html#l00204">iMessageList</a>.<div class="fragment"><pre class="fragment"><a name="l00117"></a>00117 {<a name="l00118"></a>00118 <a class="code" href="class_c_chat_container.html#6bbe9a7332aad924e2907ed051176a63">iMessageList</a>->Reset();<a name="l00119"></a>00119 <a name="l00120"></a>00120 <a class="code" href="class_c_chat_container.html#a4fe3028661554d5362654dd3ab592f6">iListBox</a>->HandleItemRemovalL();<a name="l00121"></a>00121 <a class="code" href="class_c_chat_container.html#a4fe3028661554d5362654dd3ab592f6">iListBox</a>->Reset();<a name="l00122"></a>00122 <a name="l00123"></a>00123 <span class="comment">// tell the control about the change</span><a name="l00124"></a>00124 <a class="code" href="class_c_chat_container.html#a4fe3028661554d5362654dd3ab592f6">iListBox</a>->HandleItemAdditionL();<a name="l00125"></a>00125 }</pre></div><p> </td> </tr></table><a class="anchor" name="393f496f1908a9338d77ba85d572e22f"></a><!-- doxytag: member="CChatContainer::ShowDataQueryL" ref="393f496f1908a9338d77ba85d572e22f" args="(const TInt aQueryResourceId, const TInt aTextResourceId, const TInt aPromptResoureId, const TInt aMaxLength, const TBool aDisplayFlag, TDes &aText)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void CChatContainer::ShowDataQueryL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TInt </td> <td class="mdname" nowrap> <em>aQueryResourceId</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TInt </td> <td class="mdname" nowrap> <em>aTextResourceId</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TInt </td> <td class="mdname" nowrap> <em>aPromptResoureId</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TInt </td> <td class="mdname" nowrap> <em>aMaxLength</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TBool </td> <td class="mdname" nowrap> <em>aDisplayFlag</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>TDes & </td> <td class="mdname" nowrap> <em>aText</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><a class="el" href="class_c_chat_container.html#393f496f1908a9338d77ba85d572e22f">ShowDataQueryL()</a> Show data query. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aQueryResourceId</em> </td><td>the id of the query </td></tr> <tr><td valign="top"></td><td valign="top"><em>aTextResourceId</em> </td><td>for inial value </td></tr> <tr><td valign="top"></td><td valign="top"><em>aPromptResoureId</em> </td><td>for prompt </td></tr> <tr><td valign="top"></td><td valign="top"><em>aMaxLength</em> </td><td>sets up the length of the character </td></tr> <tr><td valign="top"></td><td valign="top"><em>aDisplayFlag</em> </td><td>sets the query visible </td></tr> <tr><td valign="top"></td><td valign="top"><em>aText</em> </td><td>text to be set to the list </td></tr> </table></dl><p>Definition at line <a class="el" href="_chat_container_8cpp-source.html#l00226">226</a> of file <a class="el" href="_chat_container_8cpp-source.html">ChatContainer.cpp</a>.<p>References <a class="el" href="_chat_container_8h-source.html#l00182">iDisplayDialog</a>, <a class="el" href="_chat_container_8h-source.html#l00198">iListBox</a>, and <a class="el" href="_chat_container_8h-source.html#l00204">iMessageList</a>.<div class="fragment"><pre class="fragment"><a name="l00233"></a>00233 {<a name="l00234"></a>00234 <a name="l00235"></a>00235 <a class="code" href="class_c_chat_container.html#bb5625323d7569160129a2d6855e1819">iDisplayDialog</a> = ETrue;<a name="l00236"></a>00236 <a name="l00237"></a>00237 TBuf<KChatTextBufLength> textData;<a name="l00238"></a>00238 <a name="l00239"></a>00239 <span class="keywordflow">if</span> ( aTextResourceId )<a name="l00240"></a>00240 {<a name="l00241"></a>00241 iCoeEnv->ReadResourceL( textData, aTextResourceId );<a name="l00242"></a>00242 }<a name="l00243"></a>00243 <a name="l00244"></a>00244 CAknTextQueryDialog* dlg = CAknTextQueryDialog::NewL(<a name="l00245"></a>00245 textData, CAknQueryDialog::ENoTone );<a name="l00246"></a>00246 CleanupStack::PushL( dlg );<a name="l00247"></a>00247 <a name="l00248"></a>00248 <span class="keywordflow">if</span> ( aPromptResoureId )<a name="l00249"></a>00249 {<a name="l00250"></a>00250 TBuf<KChatTextBufLength> prompt;<a name="l00251"></a>00251 iCoeEnv->ReadResourceL( prompt, aTextResourceId );<a name="l00252"></a>00252 dlg->SetPromptL( prompt );<a name="l00253"></a>00253 }<a name="l00254"></a>00254 <a name="l00255"></a>00255 <span class="keywordflow">if</span> ( aMaxLength )<a name="l00256"></a>00256 {<a name="l00257"></a>00257 dlg->SetMaxLength( aMaxLength );<a name="l00258"></a>00258 }<a name="l00259"></a>00259 <a name="l00260"></a>00260 CleanupStack::Pop( dlg );<a name="l00261"></a>00261 TBool answer( dlg->ExecuteLD( aQueryResourceId ) );<a name="l00262"></a>00262 <a name="l00263"></a>00263 <span class="keywordflow">if</span> ( aDisplayFlag && answer )<a name="l00264"></a>00264 {<a name="l00265"></a>00265 HBufC* buffer = HBufC::NewLC( KMessageHeaderLen + <a name="l00266"></a>00266 textData.Length() );<a name="l00267"></a>00267 <a name="l00268"></a>00268 buffer->Des().Append( <span class="charliteral">'<'</span> );<a name="l00269"></a>00269 buffer->Des().Append( <span class="charliteral">'\t'</span> );<a name="l00270"></a>00270 buffer->Des().Append( textData );<a name="l00271"></a>00271 <a name="l00272"></a>00272 <span class="comment">// add the message to the list</span><a name="l00273"></a>00273 <a class="code" href="class_c_chat_container.html#6bbe9a7332aad924e2907ed051176a63">iMessageList</a>->AppendL( *buffer );<a name="l00274"></a>00274 CleanupStack::PopAndDestroy( buffer );<a name="l00275"></a>00275 <a name="l00276"></a>00276 <span class="comment">// tell the control about the change</span><a name="l00277"></a>00277 <a class="code" href="class_c_chat_container.html#a4fe3028661554d5362654dd3ab592f6">iListBox</a>->HandleItemAdditionL();<a name="l00278"></a>00278 }<a name="l00279"></a>00279 <a name="l00280"></a>00280 <a class="code" href="class_c_chat_container.html#bb5625323d7569160129a2d6855e1819">iDisplayDialog</a> = EFalse;<a name="l00281"></a>00281 <a name="l00282"></a>00282 <span class="comment">// get message</span><a name="l00283"></a>00283 aText = textData;<a name="l00284"></a>00284 <a name="l00285"></a>00285 DrawNow();<a name="l00286"></a>00286 }</pre></div><p> </td> </tr></table><a class="anchor" name="eacfd2729e76d8c40ad4beed78d3be44"></a><!-- doxytag: member="CChatContainer::LogL" ref="eacfd2729e76d8c40ad4beed78d3be44" args="(const TDesC &aText)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void CChatContainer::LogL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TDesC & </td> <td class="mdname1" valign="top" nowrap> <em>aText</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p><a class="el" href="class_c_chat_container.html#eacfd2729e76d8c40ad4beed78d3be44">LogL()</a> Add an entry to the log. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aText</em> </td><td>the text of the entry </td></tr> </table></dl><p>Implements <a class="el" href="class_m_log.html#70fb5098d98a8b349c056b46102d5de9">MLog</a>.<p>Definition at line <a class="el" href="_chat_container_8cpp-source.html#l00164">164</a> of file <a class="el" href="_chat_container_8cpp-source.html">ChatContainer.cpp</a>.<p>Referenced by <a class="el" href="_chat_container_8cpp-source.html#l00174">LogL()</a>.<div class="fragment"><pre class="fragment"><a name="l00165"></a>00165 {<a name="l00166"></a>00166 <a class="code" href="class_c_chat_container.html#eacfd2729e76d8c40ad4beed78d3be44">LogL</a>( aText, KNullDesC );<a name="l00167"></a>00167 }</pre></div><p> </td> </tr></table><a class="anchor" name="e0be8fe19ff9ccb67c6d1fc41eb73323"></a><!-- doxytag: member="CChatContainer::LogL" ref="e0be8fe19ff9ccb67c6d1fc41eb73323" args="(const TDesC &aText, const TDesC &aExtraText)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void CChatContainer::LogL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">const TDesC & </td> <td class="mdname" nowrap> <em>aText</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>const TDesC & </td> <td class="mdname" nowrap> <em>aExtraText</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [virtual]</code></td> </tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -