Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a6711891ce757817bba854bf3f25205a > files > 170

qtjambi-doc-4.3.3-3mdv2008.1.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_09) on Tue Aug 07 16:57:43 CEST 2007 -->
<TITLE>
QSettings
</TITLE>

<META NAME="keywords" CONTENT="com.trolltech.qt.core.QSettings class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="QSettings";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/trolltech/qt/core/QSemaphore.html" title="class in com.trolltech.qt.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/trolltech/qt/core/QSettings.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QSettings.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.trolltech.qt.core</FONT>
<BR>
Class QSettings</H2>
<PRE>
java.lang.Object
  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">com.trolltech.qt.QSignalEmitter</A>
      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">com.trolltech.qt.QtJambiObject</A>
          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">com.trolltech.qt.core.QObject</A>
              <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.trolltech.qt.core.QSettings</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>QSettings</B><DT>extends <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A></DL>
</PRE>

<P>
<p>The <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> class provides persistent platform-independent application settings.</p>
<p>Users normally expect an application to remember its settings (window sizes and positions, options, etc.) across sessions. This information is often stored in the system registry on Windows, and in XML preferences files on Mac OS X. On Unix systems, in the absence of a standard, many applications (including the KDE applications) use INI text files.</p>
<p><a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> is an abstraction around these technologies, enabling you to save and restore application settings in a portable manner. It also supports custom storage formats</tt>.</p>
<p><a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>'s API is based on <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a>, allowing you to save most value-based types, such as <a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a>, <a href="QRect.html"><tt>QRect</tt></a>, and <a href="%2E%2E/gui/QImage.html"><tt>QImage</tt></a>, with the minimum of effort.</p>
<p>If all you need is a non-persistent memory-based structure, consider using QMap&lt;<a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a>, <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a>&gt; instead.</p>
<ul><li><a href="#basic-usage">Basic Usage</a></li>
<li><a href="#qvariant-and-gui-types">QVariant and GUI Types</a></li>
<li><a href="#key-syntax">Key Syntax</a></li>
<li><a href="#fallback-mechanism">Fallback Mechanism</a></li>
<li><a href="#restoring-the-state-of-a-gui-application">Restoring the State of a GUI Application</a></li>
<li><a href="#accessing-settings-from-multiple-threads-or-processes-simultaneously">Accessing Settings from Multiple Threads or Processes Simultaneously</a></li>
<li><a href="#platform-specific-notes">Platform-Specific Notes</a></li>
</ul>
<a name="basic-usage"></a>
<h3>Basic Usage</h3>
<p>When creating a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object, you must pass the name of your company or organization as well as the name of your application. For example, if your product is called Star Runner and your company is called MySoft, you would construct the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object as follows:</p>
<pre>        QSettings settings(&quot;MySoft&quot;, &quot;Star Runner&quot;);</pre>
<p><a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> objects can be created either on the stack or on the heap (i.e&#x2e; using <tt>new</tt>). Constructing and destroying a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object is very fast.</p>
<p>If you use <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> from many places in your application, you might want to specify the organization name and the application name using QCoreApplication::setOrganizationName() and QCoreApplication::setApplicationName(), and then use the default <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> constructor:</p>
<pre>        QCoreApplication::setOrganizationName(&quot;MySoft&quot;);
        QCoreApplication::setOrganizationDomain(&quot;mysoft.com&quot;);
        QCoreApplication::setApplicationName(&quot;Star Runner&quot;);
        ...
        QSettings settings;</pre>
<p>(Here, we also specify the organization's Internet domain. When the Internet domain is set, it is used on Mac OS X instead of the organization name, since Mac OS X applications conventionally use Internet domains to identify themselves. If no domain is set, a fake domain is derived from the organization name. See the <a href="QSettings.html#platform-specific-notes">Platform-Specific Notes</tt></a> below for details.)</p>
<p><a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> stores settings. Each setting consists of a <a href="%2E%2E/porting4.html#qstring"><tt>QString</tt></a> that specifies the setting's name (the <i>key</i>) and a <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a> that stores the data associated with the key. To write a setting, use <a href="QSettings.html#setValue(java.lang.String, java.lang.Object)"><tt>setValue</tt></a>. For example:</p>
<pre>        settings.setValue(&quot;editor/wrapMargin&quot;, 68);</pre>
<p>If there already exists a setting with the same key, the existing value is overwritten by the new value. For efficiency, the changes may not be saved to permanent storage immediately. (You can always call <a href="QSettings.html#sync()"><tt>sync</tt></a> to commit your changes.)</p>
<p>You can get a setting's value back using <a href="QSettings.html#value(java.lang.String, java.lang.Object)"><tt>value</tt></a>:</p>
<pre>        int margin = settings.value(&quot;editor/wrapMargin&quot;).toInt();</pre>
<p>If there is no setting with the specified name, <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> returns a null <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a> (which can be converted to the integer 0). You can specify another default value by passing a second argument to <a href="QSettings.html#value(java.lang.String, java.lang.Object)"><tt>value</tt></a>:</p>
<pre>        int margin = settings.value(&quot;editor/wrapMargin&quot;, 80).toInt();</pre>
<p>To test whether a given key exists, call <a href="QSettings.html#contains(java.lang.String)"><tt>contains</tt></a>. To remove the setting associated with a key, call <a href="QSettings.html#remove(java.lang.String)"><tt>remove</tt></a>. To obtain the list of all keys, call <a href="QSettings.html#allKeys()"><tt>allKeys</tt></a>. To remove all keys, call <a href="QSettings.html#clear()"><tt>clear</tt></a>.</p>
<a name="qvariant-and-gui-types"></a>
<h3>QVariant and GUI Types</h3>
<p>Because <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a> is part of the <tt>QtCore</tt> library, it cannot provide conversion functions to data types such as <a href="%2E%2E/gui/QColor.html"><tt>QColor</tt></a>, <a href="%2E%2E/gui/QImage.html"><tt>QImage</tt></a>, and <a href="%2E%2E/gui/QPixmap.html"><tt>QPixmap</tt></a>, which are part of <tt>QtGui</tt>. In other words, there is no <tt>toColor()</tt>, <tt>toImage()</tt>, or <tt>toPixmap()</tt> functions in <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a>.</p>
<p>Instead, you can use the QVariant::value() or the qVariantValue() template function. For example:</p>
<pre>    QSettings settings(&quot;MySoft&quot;, &quot;Star Runner&quot;);
    QColor color = settings.value(&quot;DataPump/bgcolor&quot;).value&lt;QColor&gt;();</pre>
<p>The inverse conversion (e.g&#x2e;, from <a href="%2E%2E/gui/QColor.html"><tt>QColor</tt></a> to <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a>) is automatic for all data types supported by <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a>, including GUI-related types:</p>
<pre>    QSettings settings(&quot;MySoft&quot;, &quot;Star Runner&quot;);
    QColor color = palette().background().color();
    settings.setValue(&quot;DataPump/bgcolor&quot;, color);</pre>
<p>Custom types registered using qRegisterMetaType() and qRegisterMetaTypeStreamOperators() can be stored using <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>.</p>
<a name="key-syntax"></a>
<h3>Key Syntax</h3>
<p>Setting keys can contain any Unicode characters. The Windows registry and INI files use case-insensitive keys, whereas the Carbon Preferences API on Mac OS X uses case-sensitive keys. To avoid portability problems, follow these two simple rules:</p>
<ol type="1">
<li>Always refer to the same key using the same case. For example, if you refer to a key as &quot;text fonts&quot; in one place in your code, don't refer to it as &quot;Text Fonts&quot; somewhere else.</li>
<li>Avoid key names that are identical except for the case. For example, if you have a key called &quot;<a href="%2E%2E/designer-getting-started.html#mainwindow"><tt>MainWindow</tt></a>&quot;, don't try to save another key as &quot;mainwindow&quot;.</li>
<li>Do not use slashes ('/' and '\') in key names; the backslash character is used to separate sub keys (see below). On windows '\' are converted by <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> to '/', which makes them identical.</li>
</ol>
<p>You can form hierarchical keys using the '/' character as a separator, similar to Unix file paths. For example:</p>
<pre>        settings.setValue(&quot;mainwindow/size&quot;, win-&gt;size());
        settings.setValue(&quot;mainwindow/fullScreen&quot;, win-&gt;isFullScreen());
        settings.setValue(&quot;outputpanel/visible&quot;, panel-&gt;isVisible());</pre>
<p>If you want to save or restore many settings with the same prefix, you can specify the prefix using <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a> and call <a href="QSettings.html#endGroup()"><tt>endGroup</tt></a> at the end. Here's the same example again, but this time using the group mechanism:</p>
<pre>        settings.beginGroup(&quot;mainwindow&quot;);
        settings.setValue(&quot;size&quot;, win-&gt;size());
        settings.setValue(&quot;fullScreen&quot;, win-&gt;isFullScreen());
        settings.endGroup();

        settings.beginGroup(&quot;outputpanel&quot;);
        settings.setValue(&quot;visible&quot;, panel-&gt;isVisible());
        settings.endGroup();</pre>
<p>If a group is set using <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a>, the behavior of most functions changes consequently. Groups can be set recursively.</p>
<p>In addition to groups, <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> also supports an &quot;array&quot; concept. See <a href="QSettings.html#beginReadArray(java.lang.String)"><tt>beginReadArray</tt></a> and <a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a> for details.</p>
<a name="fallback-mechanism"></a>
<h3>Fallback Mechanism</h3>
<p>Let's assume that you have created a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object with the organization name MySoft and the application name Star Runner. When you look up a value, up to four locations are searched in that order:</p>
<ol type="1">
<li>a user-specific location for the Star Runner application</li>
<li>a user-specific location for all applications by MySoft</li>
<li>a system-wide location for the Star Runner application</li>
<li>a system-wide location for all applications by MySoft</li>
</ol>
<p>(See <a href="QSettings.html#platform-specific-notes">Platform-Specific Notes</tt></a> below for information on what these locations are on the different platforms supported by Qt.)</p>
<p>If a key cannot be found in the first location, the search goes on in the second location, and so on. This enables you to store system-wide or organization-wide settings and to override them on a per-user or per-application basis. To turn off this mechanism, call <a href="QSettings.html#setFallbacksEnabled(boolean)"><tt>setFallbacksEnabled</tt></a>(false).</p>
<p>Although keys from all four locations are available for reading, only the first file (the user-specific location for the application at hand) is accessible for writing. To write to any of the other files, omit the application name and/or specify QSettings::SystemScope (as opposed to QSettings::UserScope, the default).</p>
<p>Let's see with an example:</p>
<pre>        QSettings obj1(&quot;MySoft&quot;, &quot;Star Runner&quot;);
        QSettings obj2(&quot;MySoft&quot;);
        QSettings obj3(QSettings::SystemScope, &quot;MySoft&quot;, &quot;Star Runner&quot;);
        QSettings obj4(QSettings::SystemScope, &quot;MySoft&quot;);</pre>
<p>The table below summarizes which <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> objects access which location. &quot;<b>X</b>&quot; means that the location is the main location associated to the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object and is used both for reading and for writing; &quot;o&quot; means that the location is used as a fallback when reading.</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Locations</th><th><tt>obj1</tt></th><th><tt>obj2</tt></th><th><tt>obj3</tt></th><th><tt>obj4</tt></th></tr></thead>
<tr valign="top" class="odd"><td>1. User, Application</td><td><b>X</b></td><td></td><td></td><td></td></tr>
<tr valign="top" class="even"><td>2. User, Organization</td><td>o</td><td><b>X</b></td><td></td><td></td></tr>
<tr valign="top" class="odd"><td>3. System, Application</td><td>o</td><td></td><td><b>X</b></td><td></td></tr>
<tr valign="top" class="even"><td>4. System, Organization</td><td>o</td><td>o</td><td>o</td><td><b>X</b></td></tr>
</table></p>
<p>The beauty of this mechanism is that it works on all platforms supported by Qt and that it still gives you a lot of flexibility, without requiring you to specify any file names or registry paths.</p>
<p>If you want to use INI files on all platforms instead of the native API, you can pass QSettings::IniFormat as the first argument to the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> constructor, followed by the scope, the organization name, and the application name:</p>
<pre>        QSettings settings(QSettings::IniFormat, QSettings::UserScope,
                           &quot;MySoft&quot;, &quot;Star Runner&quot;);</pre>
<p>The Settings Editor</tt> example lets you experiment with different settings location and with fallbacks turned on or off.</p>
<a name="restoring-the-state-of-a-gui-application"></a>
<h3>Restoring the State of a GUI Application</h3>
<p><a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> is often used to store the state of a GUI application. The following example illustrates how to use we will use <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> to save and restore the geometry of an application's main window.</p>
<pre>    void MainWindow::writeSettings()
    {
        QSettings settings(&quot;Moose Soft&quot;, &quot;Clipper&quot;);

        settings.beginGroup(&quot;MainWindow&quot;);
        settings.setValue(&quot;size&quot;, size());
        settings.setValue(&quot;pos&quot;, pos());
        settings.endGroup();
    }

    void MainWindow::readSettings()
    {
        QSettings settings(&quot;Moose Soft&quot;, &quot;Clipper&quot;);

        settings.beginGroup(&quot;MainWindow&quot;);
        resize(settings.value(&quot;size&quot;, QSize(400, 400)).toSize());
        move(settings.value(&quot;pos&quot;, QPoint(200, 200)).toPoint());
        settings.endGroup();
    }</pre>
<p>See <a href="%2E%2E/geometry.html">Window Geometry</tt></a> for a discussion on why it is better to call QWidget::resize() and QWidget::move() rather than QWidget::setGeometry() to restore a window's geometry.</p>
<p>The <tt>readSettings()</tt> and <tt>writeSettings()</tt> functions must be called from the main window's constructor and close event handler as follows:</p>
<pre>    MainWindow::MainWindow()
    {
        ...
        readSettings();
    }

    void MainWindow::closeEvent(QCloseEvent *event)
    {
        if (userReallyWantsToQuit()) {
            writeSettings();
            event-&gt;accept();
        } else {
            event-&gt;ignore();
        }
    }</pre>
<p>See the Application</tt> example for a self-contained example that uses <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>.</p>
<a name="accessing-settings-from-multiple-threads-or-processes-simultaneously"></a>
<h3>Accessing Settings from Multiple Threads or Processes Simultaneously</h3>
<p><a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> is <a href="%2E%2E/threads.html#reentrant">reentrant</tt></a>. This means that you can use distinct <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object in different threads simultaneously. This guarantee stands even when the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> objects refer to the same files on disk (or to the same entries in the system registry). If a setting is modified through one <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object, the change will immediately be visible in any other <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> objects that operate on the same location and that live in the same process.</p>
<p><a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> can safely be used from different processes (which can be different instances of your application running at the same time or different applications altogether) to read and write to the same system locations. It uses advisory file locking and a smart merging algorithm to ensure data integrity. Changes performed by another process aren't visible in the current process until <a href="QSettings.html#sync()"><tt>sync</tt></a> is called.</p>
<a name="platform-specific-notes"></a>
<h3>Platform-Specific Notes</h3>
<a name="locations-where-application-settings-are-stored"></a>
<h4>Locations Where Application Settings Are Stored</h4>
<p>As mentioned in the <a href="QSettings.html#fallback-mechanism">Fallback Mechanism</tt></a> section, <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> stores settings for an application in up to four locations, depending on whether the settings are user-specific or system-wide and whether the the settings are application-specific or organization-wide. For simplicity, we're assuming the organization is called MySoft and the application is called Star Runner.</p>
<p>On Unix systems, if the file format is <a href="QSettings.html#Format-enum"><tt>NativeFormat</tt></a>, the following files are used by default:</p>
<ol type="1">
<li><tt>$HOME/.config/MySoft/Star Runner.conf</tt></li>
<li><tt>$HOME/.config/MySoft.conf</tt></li>
<li><tt>/etc/xdg/MySoft/Star Runner.conf</tt></li>
<li><tt>/etc/xdg/MySoft.conf</tt></li>
</ol>
<p>On Mac OS X versions 10.2 and 10.3, these files are used by default:</p>
<ol type="1">
<li><tt>$HOME/Library/Preferences/com.MySoft.Star Runner.plist</tt></li>
<li><tt>$HOME/Library/Preferences/com.MySoft.plist</tt></li>
<li><tt>/Library/Preferences/com.MySoft.Star Runner.plist</tt></li>
<li><tt>/Library/Preferences/com.MySoft.plist</tt></li>
</ol>
<p>On Windows, <a href="QSettings.html#Format-enum"><tt>NativeFormat</tt></a> settings are stored in the following registry paths:</p>
<ol type="1">
<li><tt>HKEY_CURRENT_USER\Software\MySoft\Star Runner</tt></li>
<li><tt>HKEY_CURRENT_USER\Software\MySoft</tt></li>
<li><tt>HKEY_LOCAL_MACHINE\Software\MySoft\Star Runner</tt></li>
<li><tt>HKEY_LOCAL_MACHINE\Software\MySoft</tt></li>
</ol>
<p>If the file format is <a href="QSettings.html#Format-enum"><tt>IniFormat</tt></a>, the following files are used on Unix and Mac OS X:</p>
<ol type="1">
<li><tt>$HOME/.config/MySoft/Star Runner.ini</tt></li>
<li><tt>$HOME/.config/MySoft.ini</tt></li>
<li><tt>/etc/xdg/MySoft/Star Runner.ini</tt></li>
<li><tt>/etc/xdg/MySoft.ini</tt></li>
</ol>
<p>On Windows, the following files are used:</p>
<ol type="1">
<li><tt>%APPDATA%\MySoft\Star Runner.ini</tt></li>
<li><tt>%APPDATA%\MySoft.ini</tt></li>
<li><tt>%COMMON_APPDATA%\MySoft\Star Runner.ini</tt></li>
<li><tt>%COMMON_APPDATA%\MySoft.ini</tt></li>
</ol>
<p>The <tt>%APPDATA%</tt> path is usually <tt>C:\Documents and Settings\<i>User Name</i>\Application Data</tt>; the <tt>%COMMON_APPDATA%</tt> path is usually <tt>C:\Documents and Settings\All Users\Application Data</tt>.</p>
<p>The paths for the <tt>.ini</tt> and <tt>.conf</tt> files can be changed using <a href="QSettings.html#setPath(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)"><tt>setPath</tt></a>. On Unix and Mac OS X, the user can override them by by setting the <tt>XDG_CONFIG_HOME</tt> environment variable; see <a href="QSettings.html#setPath(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)"><tt>setPath</tt></a> for details.</p>
<a name="accessing-ini-and-plist-files-directly"></a>
<h4>Accessing INI and .plist Files Directly</h4>
<p>Sometimes you do want to access settings stored in a specific file or registry path. On all platforms, if you want to read an INI file directly, you can use the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> constructor that takes a file name as first argument and pass QSettings::IniFormat as second argument. For example:</p>
<pre>    QSettings settings(&quot;/home/petra/misc/myapp.ini&quot;,
                       QSettings::IniFormat);</pre>
<p>You can then use the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object to read and write settings in the file.</p>
<p>On Mac OS X, you can access XML-based <tt>.plist</tt> files by passing QSettings::NativeFormat as second argument. For example:</p>
<pre>    QSettings settings(&quot;/Users/petra/misc/myapp.plist&quot;,
                       QSettings::NativeFormat);</pre>
<a name="accessing-the-windows-registry-directly"></a>
<h4>Accessing the Windows Registry Directly</h4>
<p>On Windows, <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> also lets you access arbitrary entries in the system registry. This is done by constructing a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object with a path in the registry and QSettings::NativeFormat. For example:</p>
<pre>    QSettings settings(&quot;HKEY_CURRENT_USER\\Software\\Microsoft\\Office&quot;,
                       QSettings::NativeFormat);</pre>
<p>All the registry entries that appear under the specified path can be read or written through the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object as usual (using forward slashes instead of backslashes). For example:</p>
<pre>    settings.setValue(&quot;11.0/Outlook/Security/DontTrustInstalledFiles&quot;, 0);</pre>
<p>Note that the backslash character is, as mentioned, used by <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> to separate subkeys. As a result, you cannot read or write windows registry entries that contain slashes or backslashes; you should use a native windows API if you need to do so.</p>
<a name="accessing-common-registry-settings-on-windows"></a>
<h4>Accessing Common Registry Settings on Windows</h4>
<p>On windows, it is possible for a key to have both a value and subkeys. Its default value is accessed by using &quot;Default&quot; or &quot;.&quot; in place of a subkey:</p>
<pre>    settings.setValue(&quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy&quot;, &quot;Milkyway&quot;);
    settings.setValue(&quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Sun&quot;, &quot;OurStar&quot;);
    settings.value(&quot;HKEY_CURRENT_USER\\MySoft\\Star Runner\\Galaxy\\Default&quot;); <span class="comment">// returns &quot;Milkyway&quot;</span></pre>
<p>On other platforms than windows, &quot;Default&quot; and &quot;.&quot; would be treated as regular subkeys.</p>
<a name="platform-limitations"></a>
<h4>Platform Limitations</h4>
<p>While <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> attempts to smooth over the differences between the different supported platforms, there are still a few differences that you should be aware of when porting your application:</p>
<ul>
<li>The Windows system registry has the following limitations: A subkey may not exceed 255 characters, an entry's value may not exceed 16,383 characters, and all the values of a key may not exceed 65,535 characters. One way to work around these limitations is to store the settings using the <a href="QSettings.html#Format-enum"><tt>IniFormat</tt></a> instead of the <a href="QSettings.html#Format-enum"><tt>NativeFormat</tt></a>.</li>
<li>On Mac OS X, <a href="QSettings.html#allKeys()"><tt>allKeys</tt></a> will return some extra keys for global settings that apply to all applications. These keys can be read using <a href="QSettings.html#value(java.lang.String, java.lang.Object)"><tt>value</tt></a> but cannot be changed, only shadowed. Calling <a href="QSettings.html#setFallbacksEnabled(boolean)"><tt>setFallbacksEnabled</tt></a>(false) will hide these global settings.</li>
<li>On Mac OS X, the CFPreferences API used by <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> expects Internet domain names rather than organization names. To provide a uniform API, <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> derives a fake domain name from the organization name (unless the organization name already is a domain name, e.g&#x2e; OpenOffice.org). The algorithm appends &quot;.com&quot; to the company name and replaces spaces and other illegal characters with hyphens. If you want to specify a different domain name, call QCoreApplication::setOrganizationDomain(), QCoreApplication::setOrganizationName(), and QCoreApplication::setApplicationName() in your <tt>main()</tt> function and then use the default <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> constructor. Another solution is to use preprocessor directives, for example:<pre>    #ifdef Q_WS_MAC
        QSettings settings(&quot;grenoullelogique.fr&quot;, &quot;Squash&quot;);
    #else
        QSettings settings(&quot;Grenoulle Logique&quot;, &quot;Squash&quot;);
    #endif</pre>
</li>
</ul>
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a>, 
<a href="%2E%2E/gui/QSessionManager.html"><tt>QSessionManager</tt></a>, 
<CODE>Editor Example</tt></CODE>, 
<a href="%2E%2E/qtjambi-application.html">Application Example</tt></a></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This enum type specifies the storage format used by <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This enum specifies whether settings are user-specific or shared by all users of the same system.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.Status.html" title="enum in com.trolltech.qt.core">QSettings.Status</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The following status values are possible.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="nested_classes_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal0.html" title="class in com.trolltech.qt">QSignalEmitter.Signal0</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="class in com.trolltech.qt">QSignalEmitter.Signal1</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal1.html" title="type parameter in QSignalEmitter.Signal1">A</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="class in com.trolltech.qt">QSignalEmitter.Signal2</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal2.html" title="type parameter in QSignalEmitter.Signal2">B</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="class in com.trolltech.qt">QSignalEmitter.Signal3</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal3.html" title="type parameter in QSignalEmitter.Signal3">C</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="class in com.trolltech.qt">QSignalEmitter.Signal4</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal4.html" title="type parameter in QSignalEmitter.Signal4">D</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="class in com.trolltech.qt">QSignalEmitter.Signal5</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal5.html" title="type parameter in QSignalEmitter.Signal5">E</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="class in com.trolltech.qt">QSignalEmitter.Signal6</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal6.html" title="type parameter in QSignalEmitter.Signal6">F</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="class in com.trolltech.qt">QSignalEmitter.Signal7</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal7.html" title="type parameter in QSignalEmitter.Signal7">G</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="class in com.trolltech.qt">QSignalEmitter.Signal8</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal8.html" title="type parameter in QSignalEmitter.Signal8">H</A>&gt;, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="class in com.trolltech.qt">QSignalEmitter.Signal9</A>&lt;<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">A</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">B</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">C</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">D</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">E</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">F</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">G</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">H</A>,<A HREF="../../../../com/trolltech/qt/QSignalEmitter.Signal9.html" title="type parameter in QSignalEmitter.Signal9">I</A>&gt;</CODE></TD>
</TR>
</TABLE>
&nbsp;

<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings()">QSettings</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(com.trolltech.qt.core.QObject)">QSettings</A></B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing settings of the application and organization set previously with a call to QCoreApplication::setOrganizationName(), QCoreApplication::setOrganizationDomain(), and QCoreApplication::setApplicationName().</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)">QSettings</A></B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
          <A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
          java.lang.String&nbsp;organization)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>format</tt>, <tt>scope</tt>, <tt>organization</tt>, QString(), 0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String)">QSettings</A></B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
          <A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
          java.lang.String&nbsp;organization,
          java.lang.String&nbsp;application)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>format</tt>, <tt>scope</tt>, <tt>organization</tt>, <tt>application</tt>, 0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)">QSettings</A></B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
          <A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
          java.lang.String&nbsp;organization,
          java.lang.String&nbsp;application,
          <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing settings of the application called <tt>application</tt> from the organization called <tt>organization</tt>, and with parent <tt>parent</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String)">QSettings</A></B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
          java.lang.String&nbsp;organization)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>scope</tt>, <tt>organization</tt>, QString(), 0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String)">QSettings</A></B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
          java.lang.String&nbsp;organization,
          java.lang.String&nbsp;application)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>scope</tt>, <tt>organization</tt>, <tt>application</tt>, 0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)">QSettings</A></B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
          java.lang.String&nbsp;organization,
          java.lang.String&nbsp;application,
          <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing settings of the application called <tt>application</tt> from the organization called <tt>organization</tt>, and with parent <tt>parent</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(java.lang.String)">QSettings</A></B>(java.lang.String&nbsp;organization)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>organization</tt>, QString(), 0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(java.lang.String, com.trolltech.qt.core.QSettings.Format)">QSettings</A></B>(java.lang.String&nbsp;fileName,
          <A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>fileName</tt>, <tt>format</tt>, 0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(java.lang.String, com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QObject)">QSettings</A></B>(java.lang.String&nbsp;fileName,
          <A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
          <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing the settings stored in the file called <tt>fileName</tt>, with parent <tt>parent</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(java.lang.String, java.lang.String)">QSettings</A></B>(java.lang.String&nbsp;organization,
          java.lang.String&nbsp;application)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>organization</tt>, <tt>application</tt>, 0).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#QSettings(java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)">QSettings</A></B>(java.lang.String&nbsp;organization,
          java.lang.String&nbsp;application,
          <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing settings of the application called <tt>application</tt> from the organization called <tt>organization</tt>, and with parent <tt>parent</tt>.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#allKeys()">allKeys</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of all keys, including subkeys, that can be read using the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#beginGroup(java.lang.String)">beginGroup</A></B>(java.lang.String&nbsp;prefix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Appends <tt>prefix</tt> to the current group.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#beginReadArray(java.lang.String)">beginReadArray</A></B>(java.lang.String&nbsp;prefix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds <tt>prefix</tt> to the current group and starts reading from an array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#beginWriteArray(java.lang.String)">beginWriteArray</A></B>(java.lang.String&nbsp;prefix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a>(<tt>prefix</tt>, -1).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#beginWriteArray(java.lang.String, int)">beginWriteArray</A></B>(java.lang.String&nbsp;prefix,
                int&nbsp;size)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds <tt>prefix</tt> to the current group and starts writing an array of size <tt>size</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#childGroups()">childGroups</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of all key top-level groups that contain keys that can be read using the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.List&lt;java.lang.String&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#childKeys()">childKeys</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a list of all top-level keys that can be read using the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#clear()">clear</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all entries in the primary location associated to this <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#contains(java.lang.String)">contains</A></B>(java.lang.String&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if there exists a setting called <tt>key</tt>; returns false otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#endArray()">endArray</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the array that was started using <a href="QSettings.html#beginReadArray(java.lang.String)"><tt>beginReadArray</tt></a> or <a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#endGroup()">endGroup</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Resets the group to what it was before the corresponding <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a> call.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#event(com.trolltech.qt.core.QEvent)">event</A></B>(<A HREF="../../../../com/trolltech/qt/core/QEvent.html" title="class in com.trolltech.qt.core">QEvent</A>&nbsp;event)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function is reimplemented for internal reasons.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#fallbacksEnabled()">fallbacksEnabled</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if fallbacks are enabled; returns false otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#fileName()">fileName</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the path where settings written using this <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object are stored.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../../com/trolltech/qt/core/QSettings.html" title="class in com.trolltech.qt.core">QSettings</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#fromNativePointer(com.trolltech.qt.QNativePointer)">fromNativePointer</A></B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A>&nbsp;nativePointer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This function returns the QSettings instance pointed to by nativePointer</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#group()">group</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the current group.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#isWritable()">isWritable</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if settings can be written using this <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object; returns false otherwise.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#remove(java.lang.String)">remove</A></B>(java.lang.String&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the setting <tt>key</tt> and any sub-settings of <tt>key</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#setArrayIndex(int)">setArrayIndex</A></B>(int&nbsp;i)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the current array index to <tt>i</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#setFallbacksEnabled(boolean)">setFallbacksEnabled</A></B>(boolean&nbsp;b)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether fallbacks are enabled to <tt>b</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#setPath(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)">setPath</A></B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
        <A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
        java.lang.String&nbsp;path)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the path used for storing settings for the given <tt>format</tt> and <tt>scope</tt>, to <tt>path</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#setValue(java.lang.String, java.lang.Object)">setValue</A></B>(java.lang.String&nbsp;key,
         java.lang.Object&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the value of setting <tt>key</tt> to <tt>value</tt>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/trolltech/qt/core/QSettings.Status.html" title="enum in com.trolltech.qt.core">QSettings.Status</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#status()">status</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a status code indicating the first error that was met by <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>, or QSettings::NoError if no error occurred.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#sync()">sync</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Writes any unsaved changes to permanent storage, and reloads any settings that have been changed in the meantime by another application.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#value(java.lang.String)">value</A></B>(java.lang.String&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Equivalent to <a href="QSettings.html#value(java.lang.String, java.lang.Object)">value</tt></a>(<tt>key</tt>, QVariant()).</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.Object</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/trolltech/qt/core/QSettings.html#value(java.lang.String, java.lang.Object)">value</A></B>(java.lang.String&nbsp;key,
      java.lang.Object&nbsp;defaultValue)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the value for setting <tt>key</tt>.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.core.QObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.core.<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/core/QObject.html#blockSignals(boolean)">blockSignals</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#childEvent(com.trolltech.qt.core.QChildEvent)">childEvent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#children()">children</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#connectSlotsByName()">connectSlotsByName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#customEvent(com.trolltech.qt.core.QEvent)">customEvent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#disposeLater()">disposeLater</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dumpObjectInfo()">dumpObjectInfo</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dumpObjectTree()">dumpObjectTree</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#dynamicPropertyNames()">dynamicPropertyNames</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#eventFilter(com.trolltech.qt.core.QObject, com.trolltech.qt.core.QEvent)">eventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild()">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild(java.lang.Class)">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChild(java.lang.Class, java.lang.String)">findChild</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren()">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class, com.trolltech.qt.core.QRegExp)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#findChildren(java.lang.Class, java.lang.String)">findChildren</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#installEventFilter(com.trolltech.qt.core.QObject)">installEventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#isWidgetType()">isWidgetType</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#killTimer(int)">killTimer</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#moveToThread(java.lang.Thread)">moveToThread</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#objectName()">objectName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#parent()">parent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#property(java.lang.String)">property</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#removeEventFilter(com.trolltech.qt.core.QObject)">removeEventFilter</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setObjectName(java.lang.String)">setObjectName</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setParent(com.trolltech.qt.core.QObject)">setParent</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#signalsBlocked()">signalsBlocked</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#startTimer(int)">startTimer</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#thread()">thread</A>, <A HREF="../../../../com/trolltech/qt/core/QObject.html#timerEvent(com.trolltech.qt.core.QTimerEvent)">timerEvent</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiObject"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiObject.html" title="class in com.trolltech.qt">QtJambiObject</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiObject.html#dispose()">dispose</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#disposed()">disposed</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#finalize()">finalize</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#reassignNativeResources(com.trolltech.qt.QtJambiObject, java.lang.Class)">reassignNativeResources</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String)">tr</A>, <A HREF="../../../../com/trolltech/qt/QtJambiObject.html#tr(java.lang.String, java.lang.String, int)">tr</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QSignalEmitter"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QSignalEmitter.html" title="class in com.trolltech.qt">QSignalEmitter</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect()">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#disconnect(java.lang.Object)">disconnect</A>, <A HREF="../../../../com/trolltech/qt/QSignalEmitter.html#signalSender()">signalSender</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.trolltech.qt.QtJambiInterface"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface com.trolltech.qt.<A HREF="../../../../com/trolltech/qt/QtJambiInterface.html" title="interface in com.trolltech.qt">QtJambiInterface</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#disableGarbageCollection()">disableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativeId()">nativeId</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#nativePointer()">nativePointer</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#reenableGarbageCollection()">reenableGarbageCollection</A>, <A HREF="../../../../com/trolltech/qt/QtJambiInterface.html#setJavaOwnership()">setJavaOwnership</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="QSettings()"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>()</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(0).
<P>
</DL>
<HR>

<A NAME="QSettings(com.trolltech.qt.core.QObject)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(<A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing settings of the application and organization set previously with a call to QCoreApplication::setOrganizationName(), QCoreApplication::setOrganizationDomain(), and QCoreApplication::setApplicationName().</p>
<p>The scope is QSettings::UserScope and the format is QSettings::NativeFormat.</p>
<p>The code</p>
<pre>    QSettings settings(&quot;Moose Soft&quot;, &quot;Facturo-Pro&quot;);</pre>
<p>is equivalent to</p>
<pre>    QCoreApplication::setOrganizationName(&quot;Moose Soft&quot;);
    QCoreApplication::setApplicationName(&quot;Facturo-Pro&quot;);
    QSettings settings;</pre>
<p>If QCoreApplication::setOrganizationName() and QCoreApplication::setApplicationName() has not been previously called, the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object will not be able to read or write any settings, and <a href="QSettings.html#status()"><tt>status</tt></a> will return <a href="QSettings.html#Status-enum"><tt>AccessError</tt></a>.</p>
<p>On Mac OS X, if both a name and an Internet domain are specified for the organization, the domain is preferred over the name. On other platforms, the name is preferred over the domain.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><tt>QCoreApplication::setOrganizationName</tt>, 
<tt>QCoreApplication::setOrganizationDomain</tt>, 
<tt>QCoreApplication::setApplicationName</tt></DL>
</DL>
<HR>

<A NAME="QSettings(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
                 <A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
                 java.lang.String&nbsp;organization,
                 java.lang.String&nbsp;application)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>format</tt>, <tt>scope</tt>, <tt>organization</tt>, <tt>application</tt>, 0).
<P>
</DL>
<HR>

<A NAME="QSettings(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
                 <A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
                 java.lang.String&nbsp;organization)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>format</tt>, <tt>scope</tt>, <tt>organization</tt>, QString(), 0).
<P>
</DL>
<HR>

<A NAME="QSettings(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
                 <A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
                 java.lang.String&nbsp;organization,
                 java.lang.String&nbsp;application,
                 <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing settings of the application called <tt>application</tt> from the organization called <tt>organization</tt>, and with parent <tt>parent</tt>.</p>
<p>If <tt>scope</tt> is QSettings::UserScope, the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object searches user-specific settings first, before it searches system-wide settings as a fallback. If <tt>scope</tt> is QSettings::SystemScope, the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object ignores user-specific settings and provides access to system-wide settings.</p>
<p>If <tt>format</tt> is QSettings::NativeFormat, the native API is used for storing settings. If <tt>format</tt> is QSettings::IniFormat, the INI format is used.</p>
<p>If no application name is given, the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object will only access the organization-wide <a href="QSettings.html#fallback-mechanism">locations</tt></a>.</p>
<P>
</DL>
<HR>

<A NAME="QSettings(java.lang.String, java.lang.String)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(java.lang.String&nbsp;organization,
                 java.lang.String&nbsp;application)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>organization</tt>, <tt>application</tt>, 0).
<P>
</DL>
<HR>

<A NAME="QSettings(java.lang.String)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(java.lang.String&nbsp;organization)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>organization</tt>, QString(), 0).
<P>
</DL>
<HR>

<A NAME="QSettings(java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(java.lang.String&nbsp;organization,
                 java.lang.String&nbsp;application,
                 <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing settings of the application called <tt>application</tt> from the organization called <tt>organization</tt>, and with parent <tt>parent</tt>.</p>
<p>Example:</p>
<pre>    QSettings settings(&quot;Moose Tech&quot;, &quot;Facturo-Pro&quot;);</pre>
<p>The scope is QSettings::UserScope and the format is QSettings::NativeFormat.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#fallback-mechanism">Fallback Mechanism</tt></a></DL>
</DL>
<HR>

<A NAME="QSettings(java.lang.String, com.trolltech.qt.core.QSettings.Format)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(java.lang.String&nbsp;fileName,
                 <A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>fileName</tt>, <tt>format</tt>, 0).
<P>
</DL>
<HR>

<A NAME="QSettings(java.lang.String, com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QObject)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(java.lang.String&nbsp;fileName,
                 <A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
                 <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing the settings stored in the file called <tt>fileName</tt>, with parent <tt>parent</tt>. If the file doesn't already exist, it is created.</p>
<p>If <tt>format</tt> is QSettings::NativeFormat, the meaning of <tt>fileName</tt> depends on the platform. On Unix, <tt>fileName</tt> is the name of an INI file. On Mac OS X, <tt>fileName</tt> is the name of a <tt>.plist</tt> file. On Windows, <tt>fileName</tt> is a path in the system registry.</p>
<p>If <tt>format</tt> is QSettings::IniFormat, <tt>fileName</tt> is the name of an INI file.</p>
<P>
<DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#fileName()"><tt>fileName</tt></a></DL>
</DL>
<HR>

<A NAME="QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
                 java.lang.String&nbsp;organization,
                 java.lang.String&nbsp;application)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>scope</tt>, <tt>organization</tt>, <tt>application</tt>, 0).
<P>
</DL>
<HR>

<A NAME="QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
                 java.lang.String&nbsp;organization)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>(<tt>scope</tt>, <tt>organization</tt>, QString(), 0).
<P>
</DL>
<HR>

<A NAME="QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><!-- --></A><H3>
QSettings</H3>
<PRE>
public <B>QSettings</B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
                 java.lang.String&nbsp;organization,
                 java.lang.String&nbsp;application,
                 <A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A>&nbsp;parent)</PRE>
<DL>
<DD><p>Constructs a <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object for accessing settings of the application called <tt>application</tt> from the organization called <tt>organization</tt>, and with parent <tt>parent</tt>.</p>
<p>If <tt>scope</tt> is QSettings::UserScope, the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object searches user-specific settings first, before it searches system-wide settings as a fallback. If <tt>scope</tt> is QSettings::SystemScope, the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object ignores user-specific settings and provides access to system-wide settings.</p>
<p>The storage format is always QSettings::NativeFormat.</p>
<p>If no application name is given, the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object will only access the organization-wide <a href="QSettings.html#fallback-mechanism">locations</tt></a>.</p>
<P>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="allKeys()"><!-- --></A><H3>
allKeys</H3>
<PRE>
public final java.util.List&lt;java.lang.String&gt; <B>allKeys</B>()</PRE>
<DL>
<DD><p>Returns a list of all keys, including subkeys, that can be read using the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object.</p>
<p>Example:</p>
<pre>    QSettings settings;
    settings.setValue(&quot;fridge/color&quot;, Qt::white);
    settings.setValue(&quot;fridge/size&quot;, QSize(32, 96));
    settings.setValue(&quot;sofa&quot;, true);
    settings.setValue(&quot;tv&quot;, false);

    QStringList keys = settings.allKeys();
<span class="comment">    // keys: [&quot;fridge/color&quot;, &quot;fridge/size&quot;, &quot;sofa&quot;, &quot;tv&quot;]</span></pre>
<p>If a group is set using <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a>, only the keys in the group are returned, without the group prefix:</p>
<pre>    settings.beginGroup(&quot;fridge&quot;);
    keys = settings.allKeys();
<span class="comment">    // keys: [&quot;color&quot;, &quot;size&quot;]</span></pre>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#childGroups()"><tt>childGroups</tt></a>, 
<a href="QSettings.html#childKeys()"><tt>childKeys</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="beginGroup(java.lang.String)"><!-- --></A><H3>
beginGroup</H3>
<PRE>
public final void <B>beginGroup</B>(java.lang.String&nbsp;prefix)</PRE>
<DL>
<DD><p>Appends <tt>prefix</tt> to the current group.</p>
<p>The current group is automatically prepended to all keys specified to <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>. In addition, query functions such as <a href="QSettings.html#childGroups()"><tt>childGroups</tt></a>, <a href="QSettings.html#childKeys()"><tt>childKeys</tt></a>, and <a href="QSettings.html#allKeys()"><tt>allKeys</tt></a> are based on the group. By default, no group is set.</p>
<p>Groups are useful to avoid typing in the same setting paths over and over. For example:</p>
<pre>    settings.beginGroup(&quot;mainwindow&quot;);
    settings.setValue(&quot;size&quot;, win-&gt;size());
    settings.setValue(&quot;fullScreen&quot;, win-&gt;isFullScreen());
    settings.endGroup();

    settings.beginGroup(&quot;outputpanel&quot;);
    settings.setValue(&quot;visible&quot;, panel-&gt;isVisible());
    settings.endGroup();</pre>
<p>This will set the value of three settings:</p>
<ul>
<li><tt>mainwindow/size</tt></li>
<li><tt>mainwindow/fullScreen</tt></li>
<li><tt>outputpanel/visible</tt></li>
</ul>
<p>Call <a href="QSettings.html#endGroup()"><tt>endGroup</tt></a> to reset the current group to what it was before the corresponding <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a> call. Groups can be nested.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#endGroup()"><tt>endGroup</tt></a>, 
<a href="QSettings.html#group()"><tt>group</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="beginReadArray(java.lang.String)"><!-- --></A><H3>
beginReadArray</H3>
<PRE>
public final int <B>beginReadArray</B>(java.lang.String&nbsp;prefix)</PRE>
<DL>
<DD><p>Adds <tt>prefix</tt> to the current group and starts reading from an array. Returns the size of the array.</p>
<p>Example:</p>
<pre>    struct Login {
        QString userName;
        QString password;
    };
    QList&lt;Login&gt; logins;
    ...

    QSettings settings;
    int size = settings.beginReadArray(&quot;logins&quot;);
    for (int i = 0; i &lt; size; ++i) {
        settings.setArrayIndex(i);
        Login login;
        login.userName = settings.value(&quot;userName&quot;);
        login.password = settings.value(&quot;password&quot;);
        logins.append(login);
    }
    settings.endArray();</pre>
<p>Use <a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a> to write the array in the first place.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a>, 
<a href="QSettings.html#endArray()"><tt>endArray</tt></a>, 
<a href="QSettings.html#setArrayIndex(int)"><tt>setArrayIndex</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="beginWriteArray(java.lang.String)"><!-- --></A><H3>
beginWriteArray</H3>
<PRE>
public final void <B>beginWriteArray</B>(java.lang.String&nbsp;prefix)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a>(<tt>prefix</tt>, -1).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="beginWriteArray(java.lang.String, int)"><!-- --></A><H3>
beginWriteArray</H3>
<PRE>
public final void <B>beginWriteArray</B>(java.lang.String&nbsp;prefix,
                                  int&nbsp;size)</PRE>
<DL>
<DD><p>Adds <tt>prefix</tt> to the current group and starts writing an array of size <tt>size</tt>. If <tt>size</tt> is -1 (the default), it is automatically determined based on the indexes of the entries written.</p>
<p>If you have many occurrences of a certain set of keys, you can use arrays to make your life easier. For example, let's suppose that you want to save a variable-length list of user names and passwords. You could then write:</p>
<pre>    struct Login {
        QString userName;
        QString password;
    };
    QList&lt;Login&gt; logins;
    ...

    QSettings settings;
    settings.beginWriteArray(&quot;logins&quot;);
    for (int i = 0; i &lt; logins.size(); ++i) {
        settings.setArrayIndex(i);
        settings.setValue(&quot;userName&quot;, list.at(i).userName);
        settings.setValue(&quot;password&quot;, list.at(i).password);
    }
    settings.endArray();</pre>
<p>The generated keys will have the form</p>
<ul>
<li><tt>logins/1/userName</tt></li>
<li><tt>logins/1/password</tt></li>
<li><tt>logins/2/userName</tt></li>
<li><tt>logins/2/password</tt></li>
<li><tt>logins/3/userName</tt></li>
<li><tt>logins/3/password</tt></li>
<li>...</li>
</ul>
<p>To read back an array, use <a href="QSettings.html#beginReadArray(java.lang.String)"><tt>beginReadArray</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#beginReadArray(java.lang.String)"><tt>beginReadArray</tt></a>, 
<a href="QSettings.html#endArray()"><tt>endArray</tt></a>, 
<a href="QSettings.html#setArrayIndex(int)"><tt>setArrayIndex</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="childGroups()"><!-- --></A><H3>
childGroups</H3>
<PRE>
public final java.util.List&lt;java.lang.String&gt; <B>childGroups</B>()</PRE>
<DL>
<DD><p>Returns a list of all key top-level groups that contain keys that can be read using the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object.</p>
<p>Example:</p>
<pre>    QSettings settings;
    settings.setValue(&quot;fridge/color&quot;, Qt::white);
    settings.setValue(&quot;fridge/size&quot;, QSize(32, 96));
    settings.setValue(&quot;sofa&quot;, true);
    settings.setValue(&quot;tv&quot;, false);

    QStringList groups = settings.childGroups();
<span class="comment">    // group: [&quot;fridge&quot;]</span></pre>
<p>If a group is set using <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a>, the first-level keys in that group are returned, without the group prefix.</p>
<pre>    settings.beginGroup(&quot;fridge&quot;);
    groups = settings.childGroups();
<span class="comment">    // groups: []</span></pre>
<p>You can navigate through the entire setting hierarchy using <a href="QSettings.html#childKeys()"><tt>childKeys</tt></a> and <a href="QSettings.html#childGroups()"><tt>childGroups</tt></a> recursively.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#childKeys()"><tt>childKeys</tt></a>, 
<a href="QSettings.html#allKeys()"><tt>allKeys</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="childKeys()"><!-- --></A><H3>
childKeys</H3>
<PRE>
public final java.util.List&lt;java.lang.String&gt; <B>childKeys</B>()</PRE>
<DL>
<DD><p>Returns a list of all top-level keys that can be read using the <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object.</p>
<p>Example:</p>
<pre>    QSettings settings;
    settings.setValue(&quot;fridge/color&quot;, Qt::white);
    settings.setValue(&quot;fridge/size&quot;, QSize(32, 96));
    settings.setValue(&quot;sofa&quot;, true);
    settings.setValue(&quot;tv&quot;, false);

    QStringList keys = settings.childKeys();
<span class="comment">    // keys: [&quot;sofa&quot;, &quot;tv&quot;]</span></pre>
<p>If a group is set using <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a>, the top-level keys in that group are returned, without the group prefix:</p>
<pre>    settings.beginGroup(&quot;fridge&quot;);
    keys = settings.childKeys();
<span class="comment">    // keys: [&quot;color&quot;, &quot;size&quot;]</span></pre>
<p>You can navigate through the entire setting hierarchy using <a href="QSettings.html#childKeys()"><tt>childKeys</tt></a> and <a href="QSettings.html#childGroups()"><tt>childGroups</tt></a> recursively.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#childGroups()"><tt>childGroups</tt></a>, 
<a href="QSettings.html#allKeys()"><tt>allKeys</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="clear()"><!-- --></A><H3>
clear</H3>
<PRE>
public final void <B>clear</B>()</PRE>
<DL>
<DD><p>Removes all entries in the primary location associated to this <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object.</p>
<p>Entries in fallback locations are not removed.</p>
<p>If you only want to remove the entries in the current <a href="QSettings.html#group()"><tt>group</tt></a>, use remove(&quot;&quot;) instead.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#remove(java.lang.String)"><tt>remove</tt></a>, 
<a href="QSettings.html#setFallbacksEnabled(boolean)"><tt>setFallbacksEnabled</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="contains(java.lang.String)"><!-- --></A><H3>
contains</H3>
<PRE>
public final boolean <B>contains</B>(java.lang.String&nbsp;key)</PRE>
<DL>
<DD><p>Returns true if there exists a setting called <tt>key</tt>; returns false otherwise.</p>
<p>If a group is set using <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a>, <tt>key</tt> is taken to be relative to that group.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#value(java.lang.String, java.lang.Object)"><tt>value</tt></a>, 
<a href="QSettings.html#setValue(java.lang.String, java.lang.Object)"><tt>setValue</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="endArray()"><!-- --></A><H3>
endArray</H3>
<PRE>
public final void <B>endArray</B>()</PRE>
<DL>
<DD><p>Closes the array that was started using <a href="QSettings.html#beginReadArray(java.lang.String)"><tt>beginReadArray</tt></a> or <a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a>.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#beginReadArray(java.lang.String)"><tt>beginReadArray</tt></a>, 
<a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="endGroup()"><!-- --></A><H3>
endGroup</H3>
<PRE>
public final void <B>endGroup</B>()</PRE>
<DL>
<DD><p>Resets the group to what it was before the corresponding <a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a> call.</p>
<p>Example:</p>
<pre>    settings.beginGroup(&quot;alpha&quot;);
<span class="comment">    // settings.group() == &quot;alpha&quot;</span>

    settings.beginGroup(&quot;beta&quot;);
<span class="comment">    // settings.group() == &quot;alpha/beta&quot;</span>

    settings.endGroup();
<span class="comment">    // settings.group() == &quot;alpha&quot;</span>

    settings.endGroup();
<span class="comment">    // settings.group() == &quot;&quot;</span></pre>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a>, 
<a href="QSettings.html#group()"><tt>group</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="fallbacksEnabled()"><!-- --></A><H3>
fallbacksEnabled</H3>
<PRE>
public final boolean <B>fallbacksEnabled</B>()</PRE>
<DL>
<DD><p>Returns true if fallbacks are enabled; returns false otherwise.</p>
<p>By default, fallbacks are enabled.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#setFallbacksEnabled(boolean)"><tt>setFallbacksEnabled</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="fileName()"><!-- --></A><H3>
fileName</H3>
<PRE>
public final java.lang.String <B>fileName</B>()</PRE>
<DL>
<DD><p>Returns the path where settings written using this <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object are stored.</p>
<p>On Windows, if the format is QSettings::NativeFormat, the return value is a system registry path, not a file path.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#isWritable()"><tt>isWritable</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="group()"><!-- --></A><H3>
group</H3>
<PRE>
public final java.lang.String <B>group</B>()</PRE>
<DL>
<DD><p>Returns the current group.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#beginGroup(java.lang.String)"><tt>beginGroup</tt></a>, 
<a href="QSettings.html#endGroup()"><tt>endGroup</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="isWritable()"><!-- --></A><H3>
isWritable</H3>
<PRE>
public final boolean <B>isWritable</B>()</PRE>
<DL>
<DD><p>Returns true if settings can be written using this <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> object; returns false otherwise.</p>
<p>One reason why <a href="QSettings.html#isWritable()"><tt>isWritable</tt></a> might return false is if <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> operates on a read-only file.</p>
<p><b>Warning:</b> This function is not perfectly reliable, because the file permissions can change at any time.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#fileName()"><tt>fileName</tt></a>, 
<a href="QSettings.html#status()"><tt>status</tt></a>, 
<a href="QSettings.html#sync()"><tt>sync</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="remove(java.lang.String)"><!-- --></A><H3>
remove</H3>
<PRE>
public final void <B>remove</B>(java.lang.String&nbsp;key)</PRE>
<DL>
<DD><p>Removes the setting <tt>key</tt> and any sub-settings of <tt>key</tt>.</p>
<p>Example:</p>
<pre>    QSettings settings;
    settings.setValue(&quot;ape&quot;);
    settings.setValue(&quot;monkey&quot;, 1);
    settings.setValue(&quot;monkey/sea&quot;, 2);
    settings.setValue(&quot;monkey/doe&quot;, 4);

    settings.remove(&quot;monkey&quot;);
    QStringList keys = settings.allKeys();
<span class="comment">    // keys: [&quot;ape&quot;]</span></pre>
<p>Be aware that if one of the fallback locations contains a setting with the same key, that setting will be visible after calling <a href="QSettings.html#remove(java.lang.String)"><tt>remove</tt></a>.</p>
<p>If <tt>key</tt> is an empty string, all keys in the current <a href="QSettings.html#group()"><tt>group</tt></a> are removed. For example:</p>
<pre>    QSettings settings;
    settings.setValue(&quot;ape&quot;);
    settings.setValue(&quot;monkey&quot;, 1);
    settings.setValue(&quot;monkey/sea&quot;, 2);
    settings.setValue(&quot;monkey/doe&quot;, 4);

    settings.beginGroup(&quot;monkey&quot;);
    settings.remove(&quot;&quot;);
    settings.endGroup();

    QStringList keys = settings.allKeys();
<span class="comment">    // keys: [&quot;ape&quot;]</span></pre>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#setValue(java.lang.String, java.lang.Object)"><tt>setValue</tt></a>, 
<a href="QSettings.html#value(java.lang.String, java.lang.Object)"><tt>value</tt></a>, 
<a href="QSettings.html#contains(java.lang.String)"><tt>contains</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setArrayIndex(int)"><!-- --></A><H3>
setArrayIndex</H3>
<PRE>
public final void <B>setArrayIndex</B>(int&nbsp;i)</PRE>
<DL>
<DD><p>Sets the current array index to <tt>i</tt>. Calls to functions such as <a href="QSettings.html#setValue(java.lang.String, java.lang.Object)"><tt>setValue</tt></a>, <a href="QSettings.html#value(java.lang.String, java.lang.Object)"><tt>value</tt></a>, <a href="QSettings.html#remove(java.lang.String)"><tt>remove</tt></a>, and <a href="QSettings.html#contains(java.lang.String)"><tt>contains</tt></a> will operate on the array entry at that index.</p>
<p>You must call <a href="QSettings.html#beginReadArray(java.lang.String)"><tt>beginReadArray</tt></a> or <a href="QSettings.html#beginWriteArray(java.lang.String, int)"><tt>beginWriteArray</tt></a> before you can call this function.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setFallbacksEnabled(boolean)"><!-- --></A><H3>
setFallbacksEnabled</H3>
<PRE>
public final void <B>setFallbacksEnabled</B>(boolean&nbsp;b)</PRE>
<DL>
<DD><p>Sets whether fallbacks are enabled to <tt>b</tt>.</p>
<p>By default, fallbacks are enabled.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#fallbacksEnabled()"><tt>fallbacksEnabled</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="setValue(java.lang.String, java.lang.Object)"><!-- --></A><H3>
setValue</H3>
<PRE>
public final void <B>setValue</B>(java.lang.String&nbsp;key,
                           java.lang.Object&nbsp;value)</PRE>
<DL>
<DD><p>Sets the value of setting <tt>key</tt> to <tt>value</tt>.</p>
<p>If the key already exists, the previous value is overwritten.</p>
<p>Example:</p>
<pre>    QSettings settings;
    settings.setValue(&quot;interval&quot;, 30);
    settings.value(&quot;interval&quot;).toInt();     <span class="comment">// returns 30</span>

    settings.setValue(&quot;interval&quot;, 6.55);
    settings.value(&quot;interval&quot;).toDouble();  <span class="comment">// returns 6.55</span></pre>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#value(java.lang.String, java.lang.Object)"><tt>value</tt></a>, 
<a href="QSettings.html#remove(java.lang.String)"><tt>remove</tt></a>, 
<a href="QSettings.html#contains(java.lang.String)"><tt>contains</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="status()"><!-- --></A><H3>
status</H3>
<PRE>
public final <A HREF="../../../../com/trolltech/qt/core/QSettings.Status.html" title="enum in com.trolltech.qt.core">QSettings.Status</A> <B>status</B>()</PRE>
<DL>
<DD><p>Returns a status code indicating the first error that was met by <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a>, or QSettings::NoError if no error occurred.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="sync()"><!-- --></A><H3>
sync</H3>
<PRE>
public final void <B>sync</B>()</PRE>
<DL>
<DD><p>Writes any unsaved changes to permanent storage, and reloads any settings that have been changed in the meantime by another application.</p>
<p>Unless you use <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> as a communication mechanism between different processes, you normally don't need to call this function.</p>
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="value(java.lang.String)"><!-- --></A><H3>
value</H3>
<PRE>
public final java.lang.Object <B>value</B>(java.lang.String&nbsp;key)</PRE>
<DL>
<DD><p>Equivalent to <a href="QSettings.html#value(java.lang.String, java.lang.Object)">value</tt></a>(<tt>key</tt>, QVariant()).
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="value(java.lang.String, java.lang.Object)"><!-- --></A><H3>
value</H3>
<PRE>
public final java.lang.Object <B>value</B>(java.lang.String&nbsp;key,
                                    java.lang.Object&nbsp;defaultValue)</PRE>
<DL>
<DD><p>Returns the value for setting <tt>key</tt>. If the setting doesn't exist, returns <tt>defaultValue</tt>.</p>
<p>If no default value is specified, a default <a href="%2E%2E/porting4.html#qvariant"><tt>QVariant</tt></a> is returned.</p>
<p>Example:</p>
<pre>    QSettings settings;
    settings.setValue(&quot;animal/snake&quot;, 58);
    settings.value(&quot;animal/snake&quot;, 1024).toInt();   <span class="comment">// returns 58</span>
    settings.value(&quot;animal/zebra&quot;, 1024).toInt();   <span class="comment">// returns 1024</span>
    settings.value(&quot;animal/zebra&quot;).toInt();         <span class="comment">// returns 0</span></pre>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QSettings.html#setValue(java.lang.String, java.lang.Object)"><tt>setValue</tt></a>, 
<a href="QSettings.html#contains(java.lang.String)"><tt>contains</tt></a>, 
<a href="QSettings.html#remove(java.lang.String)"><tt>remove</tt></a></DL>
</DD>
</DL>
<HR>

<A NAME="event(com.trolltech.qt.core.QEvent)"><!-- --></A><H3>
event</H3>
<PRE>
public boolean <B>event</B>(<A HREF="../../../../com/trolltech/qt/core/QEvent.html" title="class in com.trolltech.qt.core">QEvent</A>&nbsp;event)</PRE>
<DL>
<DD><p>This function is reimplemented for internal reasons.</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="../../../../com/trolltech/qt/core/QObject.html#event(com.trolltech.qt.core.QEvent)">event</A></CODE> in class <CODE><A HREF="../../../../com/trolltech/qt/core/QObject.html" title="class in com.trolltech.qt.core">QObject</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><a href="QObject.html#installEventFilter(com.trolltech.qt.core.QObject)"><tt>installEventFilter</tt></a>, 
<a href="QObject.html#timerEvent(com.trolltech.qt.core.QTimerEvent)"><tt>timerEvent</tt></a>, 
<tt>QApplication::sendEvent</tt>, 
<tt>QApplication::postEvent</tt>, 
<tt>QWidget::event</tt></DL>
</DD>
</DL>
<HR>

<A NAME="setPath(com.trolltech.qt.core.QSettings.Format, com.trolltech.qt.core.QSettings.Scope, java.lang.String)"><!-- --></A><H3>
setPath</H3>
<PRE>
public static void <B>setPath</B>(<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core">QSettings.Format</A>&nbsp;format,
                           <A HREF="../../../../com/trolltech/qt/core/QSettings.Scope.html" title="enum in com.trolltech.qt.core">QSettings.Scope</A>&nbsp;scope,
                           java.lang.String&nbsp;path)</PRE>
<DL>
<DD><p>Sets the path used for storing settings for the given <tt>format</tt> and <tt>scope</tt>, to <tt>path</tt>. The <tt>format</tt> can be a custom format.</p>
<p>The table below summarizes the default values:</p>
<p><table align="center" cellpadding="2" cellspacing="1" border="0">
<thead><tr valign="top" class="qt-style"><th>Platform</th><th>Format</th><th>Scope</th><th>Path</th></tr></thead>
<tr valign="top" class="odd"><td rowspan="2">Windows</td><td rowspan="2"><a href="QSettings.html#Format-enum"><tt>IniFormat</tt></a></td><td><a href="QSettings.html#Scope-enum"><tt>UserScope</tt></a></td><td><tt>%APPDATA%</tt></td></tr>
<tr valign="top" class="even"><td><a href="QSettings.html#Scope-enum"><tt>SystemScope</tt></a></td><td><tt>%COMMON_APPDATA%</tt></td></tr>
<tr valign="top" class="odd"><td rowspan="2">Unix</td><td rowspan="2"><a href="QSettings.html#Format-enum"><tt>NativeFormat</tt></a>, <a href="QSettings.html#Format-enum"><tt>IniFormat</tt></a></td><td><a href="QSettings.html#Scope-enum"><tt>UserScope</tt></a></td><td><tt>$HOME/.config</tt></td></tr>
<tr valign="top" class="even"><td><a href="QSettings.html#Scope-enum"><tt>SystemScope</tt></a></td><td><tt>/etc/xdg</tt></td></tr>
<tr valign="top" class="odd"><td rowspan="2">Mac OS X</td><td rowspan="2"><a href="QSettings.html#Format-enum"><tt>IniFormat</tt></a></td><td><a href="QSettings.html#Scope-enum"><tt>UserScope</tt></a></td><td><tt>$HOME/.config</tt></td></tr>
<tr valign="top" class="even"><td><a href="QSettings.html#Scope-enum"><tt>SystemScope</tt></a></td><td><tt>/etc/xdg</tt></td></tr>
</table></p>
<p>The default <a href="QSettings.html#Scope-enum"><tt>UserScope</tt></a> paths on Unix and Mac OS X (<tt>$HOME/.config</tt>) can be overridden by the user by setting the <tt>XDG_CONFIG_HOME</tt> environment variable. The default <a href="QSettings.html#Scope-enum"><tt>SystemScope</tt></a> paths on Unix and Mac OS X (<tt>/etc/xdg</tt>) can be overridden when building the Qt library using the <tt>configure</tt> script's <tt>--sysconfdir</tt> flag (see <a href="QLibraryInfo.html"><tt>QLibraryInfo</tt></a> for details).</p>
<p>Setting the <a href="QSettings.html#Format-enum"><tt>NativeFormat</tt></a> paths on Windows and Mac OS X has no effect.</p>
<p><b>Warning:</b> This function doesn't affect existing <a href="QSettings.html#QSettings(com.trolltech.qt.core.QSettings.Scope, java.lang.String, java.lang.String, com.trolltech.qt.core.QObject)"><tt>QSettings</tt></a> objects.</p>
<P>
<DD><DL>
<DT><B>See Also:</B><DD><tt>registerFormat</tt></DL>
</DD>
</DL>
<HR>

<A NAME="fromNativePointer(com.trolltech.qt.QNativePointer)"><!-- --></A><H3>
fromNativePointer</H3>
<PRE>
public static <A HREF="../../../../com/trolltech/qt/core/QSettings.html" title="class in com.trolltech.qt.core">QSettings</A> <B>fromNativePointer</B>(<A HREF="../../../../com/trolltech/qt/QNativePointer.html" title="class in com.trolltech.qt">QNativePointer</A>&nbsp;nativePointer)</PRE>
<DL>
<DD>This function returns the QSettings instance pointed to by nativePointer
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>nativePointer</CODE> - the QNativePointer of which object should be returned.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/trolltech/qt/core/QSemaphore.html" title="class in com.trolltech.qt.core"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/trolltech/qt/core/QSettings.Format.html" title="enum in com.trolltech.qt.core"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html?com/trolltech/qt/core/QSettings.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="QSettings.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>

</BODY>
</HTML>