⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 config.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/libraries/qtopia/config.cpp:300 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Config Class</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="200" align="left" valign="top"><a href="index.html"><img height="27" width="472" src="dochead.png" border="0"></a><br><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qtopia</font>   <a href="index.html">Home</a> - <a href="qtopiaclasses.html">Classes</a> - <a href="qtopiaannotated.html">Annotated</a> - <a href="qtopiafunctions.html">Functions</a> - <a href="qtindex.html">Qt Embedded</a></td><td align="right" valign="top">  <table border="0" cellpadding="0" cellspacing="0" width="137">  <tr>  <td><a href="http://www.trolltech.com/company/about/trolls.html"><img height="100" width="100" src="face.png" border="0"></a></td>  <td><img height="100" width="100" src="qtlogo.png" align="top" border="0"></td>  </tr>  </table></td></tr></table><h1 align=center>Config Class Reference</h1><p>The Config class provides for saving application configuration state.<a href="#details">More...</a><p><tt>#include &lt;<a href="config-h.html">config.h</a>&gt;</tt><p><a href="config-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>enum <a href="#Domain-enum"><b>Domain</b></a> { File, User }</div></li><li><div class=fn><a href="#Config"><b>Config</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name, Domain&nbsp;domain = User )</div></li><li><div class=fn><a href="#~Config"><b>~Config</b></a> ()</div></li><li><div class=fn>bool <a href="#operator-eq-eq"><b>operator==</b></a> ( const&nbsp;Config&nbsp;&amp;&nbsp;other ) const</div></li><li><div class=fn>bool <a href="#operator!-eq"><b>operator!=</b></a> ( const&nbsp;Config&nbsp;&amp;&nbsp;other ) const</div></li><li><div class=fn>bool <a href="#isValid"><b>isValid</b></a> () const</div></li><li><div class=fn>bool <a href="#hasKey"><b>hasKey</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</div></li><li><div class=fn>void <a href="#setGroup"><b>setGroup</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;gname )</div></li><li><div class=fn>void <a href="#writeEntry"><b>writeEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;char&nbsp;*&nbsp;value )</div></li><li><div class=fn>void <a href="#writeEntry-2"><b>writeEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QString&nbsp;&amp;&nbsp;value )</div></li><li><div class=fn>void <a href="#writeEntryCrypt"><b>writeEntryCrypt</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QString&nbsp;&amp;&nbsp;value )</div></li><li><div class=fn>void <a href="#writeEntry-3"><b>writeEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, int&nbsp;num )</div></li><li><div class=fn>void <a href="#writeEntry-4"><b>writeEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QStringList&nbsp;&amp;&nbsp;lst, const&nbsp;QChar&nbsp;&amp;&nbsp;sep )</div></li><li><div class=fn>void <a href="#writeEntry-5"><b>writeEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QStringList&nbsp;&amp;&nbsp;lst )</div></li><li><div class=fn>void <a href="#writeEntry-6"><b>writeEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QByteArray&nbsp;&amp;&nbsp;byteArray )</div></li><li><div class=fn>void <a href="#removeEntry"><b>removeEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key )</div></li><li><div class=fn>QString <a href="#readEntry"><b>readEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QString&nbsp;&amp;&nbsp;deflt = QString::null ) const</div></li><li><div class=fn>QString <a href="#readEntryCrypt"><b>readEntryCrypt</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QString&nbsp;&amp;&nbsp;deflt = QString::null ) const</div></li><li><div class=fn>int <a href="#readNumEntry"><b>readNumEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, int&nbsp;deflt = -1 ) const</div></li><li><div class=fn>bool <a href="#readBoolEntry"><b>readBoolEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, bool&nbsp;deflt = FALSE ) const</div></li><li><div class=fn>QStringList <a href="#readListEntry"><b>readListEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QChar&nbsp;&amp;&nbsp;sep ) const</div></li><li><div class=fn>QStringList <a href="#readListEntry-2"><b>readListEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</div></li><li><div class=fn>QByteArray <a href="#readByteArrayEntry"><b>readByteArrayEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</div></li><li><div class=fn>QByteArray <a href="#readByteArrayEntry-2"><b>readByteArrayEntry</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;key, const&nbsp;QByteArray&nbsp;&amp;&nbsp;dflt ) const</div></li><li><div class=fn>void <a href="#clearGroup"><b>clearGroup</b></a> ()</div></li><li><div class=fn>void <a href="#removeGroup"><b>removeGroup</b></a> ()</div></li><li><div class=fn>void <a href="#removeGroup-2"><b>removeGroup</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;g )</div></li><li><div class=fn>QStringList <a href="#allGroups"><b>allGroups</b></a> () const</div></li></ul><h2>Static Public Members</h2><ul><li><div class=fn>long <a href="#timeStamp"><b>timeStamp</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;name, Domain&nbsp;domain = User )</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2>The Config class provides for saving application configuration state.<p> You should keep a Config in existence only while you do not want othersto be able to change the state. There is no locking currently, but theremay be in the future.<p> Note that in Qtopia before 1.6, the 'const' forms of the read functionswhere not available.<p> <p>See also <a href="qtopiaemb.html">Qtopia Classes</a>.<hr><h2>Member Type Documentation</h2><h3 class=fn><a name="Domain-enum"></a>Config::Domain</h3><ul><li><tt>Config::File</tt><li><tt>Config::User</tt></ul><p> See <a href="#Config">Config</a>() for details.<hr><h2>Member Function Documentation</h2><h3 class=fn><a name="Config"></a>Config::Config ( const&nbsp;QString&nbsp;&amp;&nbsp;name, <a href="config.html#Domain-enum">Domain</a>&nbsp;domain = User )</h3>Constructs a configuration object that will load or create aconfiguration with the given <em>name</em> in the given <em>domain</em>.<p> After construction, call <a href="#setGroup">setGroup</a>() since almost every otherfunction works in terms of the 'current group'.<p> In the default Domain, <em>User</em>, the configuration is user-specific,and the <em>name</em> should not contain "/". This name should be globallyunique.<p> In the File Domain, <em>name</em> is an absolute filename.<h3 class=fn><a name="~Config"></a>Config::~Config ()</h3>Writes any changes to disk and destroys the in-memory object.<h3 class=fn>QStringList <a name="allGroups"></a>Config::allGroups () const</h3>Returns the list of all groups in the Config.<p> First availability: Qtopia 2.0<h3 class=fn>void <a name="clearGroup"></a>Config::clearGroup ()</h3>Removes all entries from the current group.<p> <p>See also <a href="#removeEntry">removeEntry</a>() and <a href="#removeGroup">removeGroup</a>().<h3 class=fn>bool <a name="hasKey"></a>Config::hasKey ( const&nbsp;QString&nbsp;&amp;&nbsp;key ) const</h3>Returns TRUE if the current group has an entry called <em>key</em>;otherwise returns FALSE.<h3 class=fn>bool <a name="isValid"></a>Config::isValid () const</h3>Returns TRUE if the Config is in a valid state; otherwise returnsFALSE.<h3 class=fn>bool <a name="operator!-eq"></a>Config::operator!= ( const&nbsp;<a href="config.html">Config</a>&nbsp;&amp;&nbsp;other ) const</h3><p> Tests for inequality with <em>other</em>. Config objects are equal if theyrefer to the same filename.<p> <p>See also <a href="#operator-eq-eq">operator==</a>().<h3 class=fn>bool <a name="operator-eq-eq"></a>Config::operator== ( const&nbsp;<a href="config.html">Config</a>&nbsp;&amp;&nbsp;other ) const</h3><p> Tests for equality with <em>other</em>. Config objects are equal if theyrefer to the same filename.<p> <p>See also <a href="#operator!-eq">operator!=</a>().<h3 class=fn>bool <a name="readBoolEntry"></a>Config::readBoolEntry ( const&nbsp;QString&nbsp;&amp;&nbsp;key, bool&nbsp;deflt = FALSE ) const</h3>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -