<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>TQSettings Class Reference</h1>
<p>The TQSettings class provides persistent platform-independent application settings.
Inserts <em>path</em> into the settings search path. The semantics of <em>path</em> depends on the system <em>s</em>. It is usually easier and better to
use <ahref="#setPath">setPath</a>() instead of this function.
<p> When <em>s</em> is <em>Windows</em> and the execution environment is <em>not</em>
Windows the function does nothing. Similarly when <em>s</em> is <em>Unix</em> and
the execution environment is <em>not</em> Unix the function does nothing.
<p> When <em>s</em> is <em>Windows</em>, and the execution environment is Windows, the
search path list will be used as the first subfolder of the "Software"
folder in the registry.
<p> When reading settings the folders are searched forwards from the
first folder (listed below) to the last, returning the first
settings found, and ignoring any folders for which the user doesn't
<p> Reads the entry specified by <em>key</em>, and returns a bool, or the
default value, <em>def</em>, if the entry couldn't be read.
If <em>ok</em> is non-null, *ok is set to TRUE if the key was read, FALSE
otherwise.
<p><p>See also <ahref="#readEntry">readEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#writeEntry">writeEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
<p> Reads the entry specified by <em>key</em>, and returns a double, or the
default value, <em>def</em>, if the entry couldn't be read.
If <em>ok</em> is non-null, *ok is set to TRUE if the key was read, FALSE
otherwise.
<p><p>See also <ahref="#readEntry">readEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), <ahref="#writeEntry">writeEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
<p> Reads the entry specified by <em>key</em>, and returns a <ahref="qstring.html">TQString</a>, or the
default value, <em>def</em>, if the entry couldn't be read.
If <em>ok</em> is non-null, *ok is set to TRUE if the key was read, FALSE
otherwise.
<p><p>See also <ahref="#readListEntry">readListEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), <ahref="#writeEntry">writeEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
Reads the entry specified by <em>key</em> as a string. If <em>ok</em> is not
0, <em>*ok</em> is set to TRUE if the key was read, otherwise <em>*ok</em> is
set to FALSE.
<p> Note that if you want to iterate over the list, you should iterate
over a copy, e.g.
<pre>
<ahref="qstringlist.html">TQStringList</a> list = mySettings.readListEntry( "recentfiles" );
TQStringList::Iterator it = list.<ahref="qvaluelist.html#begin">begin</a>();
while( it != list.<ahref="qvaluelist.html#end">end</a>() ) {
myProcessing( *it );
++it;
}
</pre>
<p><p>See also <ahref="#readEntry">readEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), <ahref="#writeEntry">writeEntry</a>(), <ahref="#removeEntry">removeEntry</a>(), and <ahref="qstringlist.html#split">TQStringList::split</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Reads the entry specified by <em>key</em> as a string. The <em>separator</em>
is used to create a <ahref="qstringlist.html">TQStringList</a> by calling <ahref="qstringlist.html#split">TQStringList::split</a>(<em>separator</em>, entry). If <em>ok</em> is not 0: <em>*ok</em> is set to TRUE
if the key was read, otherwise <em>*ok</em> is set to FALSE.
<p><b>Warning:</b> As the documentation states, TQStringList::split() will
omit empty strings from the list. Because of this, it is
impossible to retrieve identical list data with this function. We
recommend using the <ahref="#readListEntry">readListEntry</a>() and <ahref="#writeEntry">writeEntry</a>() overloads
that do not take a <em>separator</em> argument.
<p> Note that if you want to iterate over the list, you should iterate
over a copy, e.g.
<pre>
<ahref="qstringlist.html">TQStringList</a> list = mySettings.readListEntry( "size", " " );
TQStringList::Iterator it = list.<ahref="qvaluelist.html#begin">begin</a>();
while( it != list.<ahref="qvaluelist.html#end">end</a>() ) {
myProcessing( *it );
++it;
}
</pre>
<p><p>See also <ahref="#readEntry">readEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), <ahref="#writeEntry">writeEntry</a>(), <ahref="#removeEntry">removeEntry</a>(), and <ahref="qstringlist.html#split">TQStringList::split</a>().
<p> Reads the entry specified by <em>key</em>, and returns an integer, or the
default value, <em>def</em>, if the entry couldn't be read.
If <em>ok</em> is non-null, *ok is set to TRUE if the key was read, FALSE
otherwise.
<p><p>See also <ahref="#readEntry">readEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), <ahref="#writeEntry">writeEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
two components (e.g., "/foo/bar"). This limitation does not apply to
TQt 4.
<p><p>See also <ahref="#readListEntry">readListEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Writes the double entry <em>value</em> into key <em>key</em>. The <em>key</em> is
created if it doesn't exist. Any previous value is overwritten by <em>value</em>.
<p> If an error occurs the settings are left unchanged and FALSE is
returned; otherwise TRUE is returned.
<p><p>See also <ahref="#readListEntry">readListEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Writes the integer entry <em>value</em> into key <em>key</em>. The <em>key</em> is
created if it doesn't exist. Any previous value is overwritten by <em>value</em>.
<p> If an error occurs the settings are left unchanged and FALSE is
returned; otherwise TRUE is returned.
<p><p>See also <ahref="#readListEntry">readListEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Writes the string entry <em>value</em> into key <em>key</em>. The <em>key</em> is
created if it doesn't exist. Any previous value is overwritten by <em>value</em>. If <em>value</em> is an empty string or a null string the key's
value will be an empty string.
<p> If an error occurs the settings are left unchanged and FALSE is
returned; otherwise TRUE is returned.
<p><p>See also <ahref="#readListEntry">readListEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> Writes the string list entry <em>value</em> into key <em>key</em>. The <em>key</em>
is created if it doesn't exist. Any previous value is overwritten
by <em>value</em>.
<p> If an error occurs the settings are left unchanged and FALSE is
returned; otherwise returns TRUE.
<p><p>See also <ahref="#readListEntry">readListEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), and <ahref="#removeEntry">removeEntry</a>().
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p><b>This function is obsolete.</b> It is provided to keep old source working. We strongly advise against using it in new code.
<p> Writes the string list entry <em>value</em> into key <em>key</em>. The <em>key</em>
is created if it doesn't exist. Any previous value is overwritten
by <em>value</em>. The list is stored as a sequence of strings separated
by <em>separator</em> (using <ahref="qstringlist.html#join">TQStringList::join</a>()), so none of the
strings in the list should contain the separator. If the list is
empty or null the key's value will be an empty string.
<p><b>Warning:</b> The list should not contain empty or null strings, as
<ahref="#readListEntry">readListEntry</a>() will use <ahref="qstringlist.html#split">TQStringList::split</a>() to recreate the
list. As the documentation states, TQStringList::split() will omit
empty strings from the list. Because of this, it is impossible to
retrieve identical list data that is stored with this function.
We recommend using the <ahref="#writeEntry">writeEntry</a>() and readListEntry() overloads
that do not take a <em>separator</em> argument.
<p> If an error occurs the settings are left unchanged and FALSE is
returned; otherwise returns TRUE.
<p><p>See also <ahref="#readListEntry">readListEntry</a>(), <ahref="#readNumEntry">readNumEntry</a>(), <ahref="#readDoubleEntry">readDoubleEntry</a>(), <ahref="#readBoolEntry">readBoolEntry</a>(), <ahref="#removeEntry">removeEntry</a>(), and <ahref="qstringlist.html#join">TQStringList::join</a>().
<!-- eof -->
<hr><p>
This file is part of the <ahref="index.html">TQt toolkit</a>.