📄 config.html
字号:
<p> Returns the boolean entry stored (as an integer) using <em>key</em>,defaulting to <em>deflt</em> if there is no entry for the given <em>key</em>.<p> <p>See also <a href="#writeEntry">writeEntry</a>().<h3 class=fn>QByteArray <a name="readByteArrayEntry"></a>Config::readByteArrayEntry ( const QString & key ) const</h3>Returns the QByteArray stored using <em>key</em>. Returns an empty array ifno matching key is found.<p> First availability: Qtopia 1.6<h3 class=fn>QByteArray <a name="readByteArrayEntry-2"></a>Config::readByteArrayEntry ( const QString & key, const QByteArray & dflt ) const</h3>Returns the QByteArray stored using <em>key</em>. Returns <em>dflt</em> ifno matching key is found.<p> First availability: Qtopia 1.6<h3 class=fn>QString <a name="readEntry"></a>Config::readEntry ( const QString & key, const QString & deflt = QString::null ) const</h3><p> Returns the string entry for <em>key</em>, defaulting to <em>deflt</em> if thereis no entry for the given <em>key</em>.<p> <p>See also <a href="#writeEntry">writeEntry</a>().<h3 class=fn>QString <a name="readEntryCrypt"></a>Config::readEntryCrypt ( const QString & key, const QString & deflt = QString::null ) const</h3><p> Returns the unencrypted string entry for the encrypted entry storedusing <em>key</em>, defaulting to <em>deflt</em> if there is no entry for thegiven <em>key</em>.<p> <p>See also <a href="#writeEntryCrypt">writeEntryCrypt</a>().<h3 class=fn>QStringList <a name="readListEntry"></a>Config::readListEntry ( const QString & key, const QChar & sep ) const</h3><p> Returns the string list entry stored using <em>key</em> and with <em>sep</em> asthe separator.<p> These entries are stored as a single string, with each elementseparated by <em>sep</em>.<p> <p>See also <a href="#writeEntry">writeEntry</a>().<h3 class=fn>QStringList <a name="readListEntry-2"></a>Config::readListEntry ( const QString & key ) const</h3>Returns the string list entry stored using <em>key</em> and withthe escaped seperator convention described in writeListEntry().<p> First availability: Qtopia 2.0<h3 class=fn>int <a name="readNumEntry"></a>Config::readNumEntry ( const QString & key, int deflt = -1 ) const</h3><p> Returns the integer entry stored using <em>key</em>, defaulting to <em>deflt</em> if there is no entry for the given <em>key</em>.<p> <p>See also <a href="#writeEntry">writeEntry</a>().<h3 class=fn>void <a name="removeEntry"></a>Config::removeEntry ( const QString & key )</h3>Removes the <em>key</em> entry from the current group. Does nothing ifthere is no such entry.<p> <p>See also <a href="#writeEntry">writeEntry</a>() and <a href="#clearGroup">clearGroup</a>().<h3 class=fn>void <a name="removeGroup"></a>Config::removeGroup ()</h3>Removes the current group (and all its entries).<p> The current group becomes unset.<p> First availability: Qtopia 2.0<h3 class=fn>void <a name="removeGroup-2"></a>Config::removeGroup ( const QString & g )</h3>Removes the current group (and all its entries).<p> The current group becomes unset.<p> First availability: Qtopia 2.0<h3 class=fn>void <a name="setGroup"></a>Config::setGroup ( const QString & gname )</h3>Sets the current group for subsequent reading and writing of entriesto <em>gname</em>. Grouping allows the application to partition thenamespace.<p> This function <em>must</em> be called prior to any reading or writing ofentries.<p> The <em>gname</em> must not be empty.<p> <p>See also <a href="#writeEntry">writeEntry</a>(), <a href="#readEntry">readEntry</a>(), <a href="#readListEntry">readListEntry</a>(), <a href="#readNumEntry">readNumEntry</a>() and <a href="#readBoolEntry">readBoolEntry</a>().<h3 class=fn>long <a name="timeStamp"></a>Config::timeStamp ( const QString & name, <a href="config.html#Domain-enum">Domain</a> domain = User )<tt> [static]</tt></h3>Returns the time stamp for the config identified by <em>name</em>. Thetime stamp represents the time the config was last committed to storage.Returns 0 if there is no time stamp available for the config.<p> A <em>domain</em> can optionally be specified and defaults to User.See <a href="#Config">Config</a>() for details.<p> First availability: Qtopia 2.0<h3 class=fn>void <a name="writeEntry"></a>Config::writeEntry ( const QString & key, const char * value )</h3>Writes a (<em>key</em>, <em>value</em>) entry to the current group.<p> <p>See also <a href="#readEntry">readEntry</a>().<h3 class=fn>void <a name="writeEntry-2"></a>Config::writeEntry ( const QString & key, const QString & value )</h3>Writes a (<em>key</em>, <em>value</em>) entry to the current group.<p> <p>See also <a href="#readEntry">readEntry</a>().<h3 class=fn>void <a name="writeEntry-3"></a>Config::writeEntry ( const QString & key, int num )</h3>Writes a (<em>key</em>, <em>num</em>) entry to the current group.<p> <p>See also <a href="#readNumEntry">readNumEntry</a>() and <a href="#readBoolEntry">readBoolEntry</a>().<h3 class=fn>void <a name="writeEntry-4"></a>Config::writeEntry ( const QString & key, const QStringList & lst, const QChar & sep )</h3>Writes a (<em>key</em>, <em>lst</em>) entry to the current group. The list isseparated by <em>sep</em>, so the strings must not contain that character.<p> <p>See also <a href="#readListEntry">readListEntry</a>().<h3 class=fn>void <a name="writeEntry-5"></a>Config::writeEntry ( const QString & key, const QStringList & lst )</h3>Writes a (<em>key</em>, <em>lst</em>) entry to the current group.<p> The list isseparated by the two characters "^e", and "^" withing the stringsis replaced by "^^", such that the strings may contain any character,including "^".<p> Null strings are also allowed, and are recorded as "^0" in the string.<p> First availability: Qtopia 2.0<p> <p>See also <a href="#readListEntry">readListEntry</a>().<h3 class=fn>void <a name="writeEntry-6"></a>Config::writeEntry ( const QString & key, const QByteArray & byteArray )</h3>Writes a (<em>key</em>, <em>byteArray</em>) entry to the current group. The byteArray is stored asa base64 encoded string.<p> First availability: Qtopia 1.6<h3 class=fn>void <a name="writeEntryCrypt"></a>Config::writeEntryCrypt ( const QString & key, const QString & value )</h3>Writes a weakly encrypted (<em>key</em>, <em>value</em>) entry to the current group.<p> Note that the degree of protection offered by the encryption isonly sufficient to avoid the most casual observation of the configurationfiles.<p> <p>See also <a href="#readEntryCrypt">readEntryCrypt</a>().<!-- eof --><hr><p>This file is part of the <a href="../index.html">Qtopia</a> platform,copyright © 1995-2004<a href="http://www.trolltech.com/">Trolltech</a>, all rights reserved.<p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright © 2001-2004 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align="right"><div align="right">Qtopia version 2.0.0</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -