📄 class_n_o_c_r_utils_1_1_c_layout_form.html
字号:
<td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Creates, executes and destroys the form dialog. This variant is used to ask settings for Block Recognition. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aInfo</em> </td><td>data-structure to store settings </td></tr> <tr><td valign="top"></td><td valign="top"><em>aResourceId</em> </td><td>resource-id of the form-dialog resource </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>status from ExecuteLD() </dd></dl><p>Definition at line <a class="el" href="_layout_form_8cpp-source.html#l00039">39</a> of file <a class="el" href="_layout_form_8cpp-source.html">LayoutForm.cpp</a>.<p>References <a class="el" href="_layout_form_8h-source.html#l00102">CLayoutForm()</a>.<div class="fragment"><pre class="fragment"><a name="l00040"></a>00040 {<a name="l00041"></a>00041 <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html">CLayoutForm</a>* <span class="keyword">self</span> = <span class="keyword">new</span> (ELeave) <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#dcea2120ef0873285457baf6937a9e97">CLayoutForm</a>(NULL, &aInfo);<a name="l00042"></a>00042 CleanupStack::PushL(<span class="keyword">self</span>);<a name="l00043"></a>00043 <span class="keyword">self</span>->ConstructL();<a name="l00044"></a>00044 CleanupStack::Pop(<span class="keyword">self</span>);<a name="l00045"></a>00045 <span class="keywordflow">return</span> <span class="keyword">self</span>->ExecuteLD(aResourceId);<a name="l00046"></a>00046 }</pre></div><p> </td> </tr></table><a class="anchor" name="83db139026b37032575def1cbfb43041"></a><!-- doxytag: member="NOCRUtils::CLayoutForm::ExecuteFormLD" ref="83db139026b37032575def1cbfb43041" args="(TRegionInfo &aInfo, TInt aResourceId)" --><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">TInt CLayoutForm::ExecuteFormLD </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">TRegionInfo & </td> <td class="mdname" nowrap> <em>aInfo</em>, </td> </tr> <tr> <td class="md" nowrap align="right"></td> <td class="md"></td> <td class="md" nowrap>TInt </td> <td class="mdname" nowrap> <em>aResourceId</em></td> </tr> <tr> <td class="md"></td> <td class="md">) </td> <td class="md" colspan="2"><code> [static]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Creates, executes and destroys the form dialog. This variant is used to ask settings for Special Region Recognition. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>aInfo</em> </td><td>data-structure to store settings </td></tr> <tr><td valign="top"></td><td valign="top"><em>aResourceId</em> </td><td>resource-id of the form-dialog resource </td></tr> </table></dl><dl compact><dt><b>Returns:</b></dt><dd>status from ExecuteLD() </dd></dl><p>Definition at line <a class="el" href="_layout_form_8cpp-source.html#l00048">48</a> of file <a class="el" href="_layout_form_8cpp-source.html">LayoutForm.cpp</a>.<p>References <a class="el" href="_layout_form_8h-source.html#l00102">CLayoutForm()</a>.<div class="fragment"><pre class="fragment"><a name="l00049"></a>00049 {<a name="l00050"></a>00050 <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html">CLayoutForm</a>* <span class="keyword">self</span> = <span class="keyword">new</span> (ELeave) <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#dcea2120ef0873285457baf6937a9e97">CLayoutForm</a>(NULL, NULL, &aInfo );<a name="l00051"></a>00051 CleanupStack::PushL(<span class="keyword">self</span>);<a name="l00052"></a>00052 <span class="keyword">self</span>->ConstructL();<a name="l00053"></a>00053 CleanupStack::Pop(<span class="keyword">self</span>);<a name="l00054"></a>00054 <span class="keywordflow">return</span> <span class="keyword">self</span>->ExecuteLD(aResourceId);<a name="l00055"></a>00055 }</pre></div><p> </td> </tr></table><a class="anchor" name="d65e32fb478bc9c86bf796a9d4de2f64"></a><!-- doxytag: member="NOCRUtils::CLayoutForm::OkToExitL" ref="d65e32fb478bc9c86bf796a9d4de2f64" args="(TInt aButtonId)" --><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">TBool CLayoutForm::OkToExitL </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">TInt </td> <td class="mdname1" valign="top" nowrap> <em>aButtonId</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [protected]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>implements a workaround to cause form to exit after pressing Ok <p>Definition at line <a class="el" href="_layout_form_8cpp-source.html#l00157">157</a> of file <a class="el" href="_layout_form_8cpp-source.html">LayoutForm.cpp</a>.<div class="fragment"><pre class="fragment"><a name="l00158"></a>00158 {<a name="l00159"></a>00159 <span class="comment">// our form has only OK-button, but base-class apparently assumes that forms</span><a name="l00160"></a>00160 <span class="comment">// has Options- and Back-buttons. hence, if ok given, we want to exit so</span><a name="l00161"></a>00161 <span class="comment">// we pass Back to the base-class</span><a name="l00162"></a>00162 <span class="comment">//</span><a name="l00163"></a>00163 <span class="keywordflow">if</span> (aButtonId == EAknSoftkeyOk)<a name="l00164"></a>00164 {<a name="l00165"></a>00165 aButtonId = EAknSoftkeyBack;<a name="l00166"></a>00166 }<a name="l00167"></a>00167 <span class="keywordflow">return</span> CAknForm::OkToExitL(aButtonId);<a name="l00168"></a>00168 }</pre></div><p> </td> </tr></table><a class="anchor" name="b90bd30d42503d5f0464e9ff1ce3b830"></a><!-- doxytag: member="NOCRUtils::CLayoutForm::SaveFormDataL" ref="b90bd30d42503d5f0464e9ff1ce3b830" 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">TBool CLayoutForm::SaveFormDataL </td> <td class="md" valign="top">( </td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap><code> [private]</code></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>from CAknForm Normally called by the framework whenever the 'Save' menu item is selected, and by the QuerySaveChangesL method when the user answers yes to the save query. Saves the data from the forms controls, into the data-structures. Note that in this particular form-class data is always implicitly saved without asking the user. <dl compact><dt><b>Returns:</b></dt><dd>always returns ETrue </dd></dl><p>Definition at line <a class="el" href="_layout_form_8cpp-source.html#l00057">57</a> of file <a class="el" href="_layout_form_8cpp-source.html">LayoutForm.cpp</a>.<p>References <a class="el" href="_layout_form_8h-source.html#l00112">iBlock</a>.<div class="fragment"><pre class="fragment"><a name="l00058"></a>00058 {<a name="l00059"></a>00059 CAknPopupFieldText* fieldText = 0;<a name="l00060"></a>00060 <span class="comment">// check, which setting-struct was given in dialog</span><a name="l00061"></a>00061 <span class="keywordflow">if</span> (<a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#20e11952d4df5d2b7e5fdd908f10eeb1">iBlock</a>)<a name="l00062"></a>00062 {<a name="l00063"></a>00063 fieldText = static_cast<CAknPopupFieldText*>(ControlOrNull(EOCRExampleFormLayout));<a name="l00064"></a>00064 <span class="keywordflow">if</span> (fieldText)<a name="l00065"></a>00065 {<a name="l00066"></a>00066 <span class="keywordflow">switch</span> (fieldText->CurrentValueIndex())<a name="l00067"></a>00067 {<a name="l00068"></a>00068 <span class="keywordflow">case</span> 0: <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#20e11952d4df5d2b7e5fdd908f10eeb1">iBlock</a>->iLayout = EOcrLayoutTypeH; <span class="keywordflow">break</span>;<a name="l00069"></a>00069 <span class="keywordflow">case</span> 1: <span class="comment">// fall-through</span><a name="l00070"></a>00070 <span class="keywordflow">default</span>: <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#20e11952d4df5d2b7e5fdd908f10eeb1">iBlock</a>->iLayout = EOcrLayoutTypeV;<a name="l00071"></a>00071 }<a name="l00072"></a>00072 }<a name="l00073"></a>00073 <a name="l00074"></a>00074 fieldText = static_cast<CAknPopupFieldText*>(ControlOrNull(EOCRExampleFormBackground));<a name="l00075"></a>00075 <span class="keywordflow">if</span> (fieldText)<a name="l00076"></a>00076 {<a name="l00077"></a>00077 <span class="keywordflow">switch</span> (fieldText->CurrentValueIndex())<a name="l00078"></a>00078 {<a name="l00079"></a>00079 <span class="keywordflow">case</span> 0: <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#20e11952d4df5d2b7e5fdd908f10eeb1">iBlock</a>->iBackgroundColor = EOcrBackgroundLight; <span class="keywordflow">break</span>;<a name="l00080"></a>00080 <span class="keywordflow">case</span> 1: <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#20e11952d4df5d2b7e5fdd908f10eeb1">iBlock</a>->iBackgroundColor = EOcrBackgroundDark; <span class="keywordflow">break</span>;<a name="l00081"></a>00081 <span class="keywordflow">case</span> 2: <span class="comment">// fall-through</span><a name="l00082"></a>00082 <span class="keywordflow">default</span>: <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#20e11952d4df5d2b7e5fdd908f10eeb1">iBlock</a>->iBackgroundColor = EOcrBackgroundUnknown;<a name="l00083"></a>00083 }<a name="l00084"></a>00084 }<a name="l00085"></a>00085 <a name="l00086"></a>00086 fieldText = static_cast<CAknPopupFieldText*>(ControlOrNull(EOCRExampleFormTextType));<a name="l00087"></a>00087 <span class="keywordflow">if</span> (fieldText)<a name="l00088"></a>00088 {<a name="l00089"></a>00089 <span class="keywordflow">switch</span> (fieldText->CurrentValueIndex())<a name="l00090"></a>00090 {<a name="l00091"></a>00091 <span class="keywordflow">case</span> 0: <a class="code" href="class_n_o_c_r_utils_1_1_c_layout_form.html#20e11952d4df5d2b7e5fdd908f10eeb1">iBlock</a>->iText = EOcrTextMultiLine; <span class="keywordflow">break</span>;<a name="l00092"></a>00092 <span class="keywordflow">case</span> 1: <span class="comment">// fall-through</span>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -