Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.trolltech.qt.core
Enum QSettings.Format

    java.lang.Object
      java.lang.Enum<QSettings.Format>
          com.trolltech.qt.core.QSettings.Format

All Implemented Interfaces:
  QtEnumerator, java.io.Serializable, java.lang.Comparable<QSettings.Format>

Enclosing class:
  QSettings

    public static enum QSettings.Format

extends java.lang.Enum<QSettings.Format>
implements QtEnumerator

This enum type specifies the storage format used by `QSettings`.

On Unix, `NativeFormat` and `IniFormat` mean the same thing, except that the file extension is different (`.conf` for `NativeFormat`, `.ini` for `IniFormat`).

The INI file format is a Windows file format that Qt supports on all platforms. In the absence of an INI standard, we try to follow what Microsoft does, with the following exceptions:

- If you store types that `QVariant` can't convert to `QString` (e.g., `QPoint`, `QRect`, and `QSize`), Qt uses an `@`-based syntax to encode the type. For example:

          pos = @Point(100 100)

  To minimize compatibility issues, any `@` that doesn't appear at the first position in the value or that isn't followed by a Qt type (`Point`, `Rect`, `Size`, etc.) is treated as a normal character.

- Although backslash is a special character in INI files, most Windows applications don't escape backslashes (`\`) in file paths:

          windir = C:\Windows

  `QSettings` always treats backslash as a special character and provides no API for reading or writing such entries.

- The INI file format has severe restrictions on the syntax of a key. Qt works around this by using `%` as an escape character in keys. In addition, if you save a top-level setting (a key with no slashes in it, e.g., "someKey"), it will appear in the INI file's "General" section. To avoid overwriting other keys, if you save something using the a key such as "General/someKey", the key will be located in the "%General" section, not in the "General" section.

See Also:
  `registerFormat`, `setPath`

Enum Constant Summary
`CustomFormat1` Internal.
`CustomFormat10` Internal.
`CustomFormat11` Internal.
`CustomFormat12` Internal.
`CustomFormat13` Internal.
`CustomFormat14` Internal.
`CustomFormat15` Internal.
`CustomFormat16` Internal.
`CustomFormat2` Internal.
`CustomFormat3` Internal.
`CustomFormat4` Internal.
`CustomFormat5` Internal.
`CustomFormat6` Internal.
`CustomFormat7` Internal.
`CustomFormat8` Internal.
`CustomFormat9` Internal.
`IniFormat` Store the settings in INI files.
`InvalidFormat` Special value returned by registerFormat().
`NativeFormat` Store the settings using the most appropriate storage format for the platform.

Method Summary
`static QSettings.Format` | `resolve(int value)`
`int` | `value()` This function should return an integer value for the enum values of the enumeration that implements this interface.
`static QSettings.Format` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static QSettings.Format[]` | `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### NativeFormat

    public static final QSettings.Format NativeFormat

  Store the settings using the most appropriate storage format for the platform. On Windows, this means the system registry; on Mac OS X, this means the CFPreferences API; on Unix, this means textual configuration files in INI format.

### IniFormat

    public static final QSettings.Format IniFormat

  Store the settings in INI files.

### InvalidFormat

    public static final QSettings.Format InvalidFormat

  Special value returned by registerFormat().

### CustomFormat1

    public static final QSettings.Format CustomFormat1

  Internal.

### CustomFormat2

    public static final QSettings.Format CustomFormat2

  Internal.

### CustomFormat3

    public static final QSettings.Format CustomFormat3

  Internal.

### CustomFormat4

    public static final QSettings.Format CustomFormat4

  Internal.

### CustomFormat5

    public static final QSettings.Format CustomFormat5

  Internal.

### CustomFormat6

    public static final QSettings.Format CustomFormat6

  Internal.

### CustomFormat7

    public static final QSettings.Format CustomFormat7

  Internal.

### CustomFormat8

    public static final QSettings.Format CustomFormat8

  Internal.

### CustomFormat9

    public static final QSettings.Format CustomFormat9

  Internal.

### CustomFormat10

    public static final QSettings.Format CustomFormat10

  Internal.

### CustomFormat11

    public static final QSettings.Format CustomFormat11

  Internal.

### CustomFormat12

    public static final QSettings.Format CustomFormat12

  Internal.

### CustomFormat13

    public static final QSettings.Format CustomFormat13

  Internal.

### CustomFormat14

    public static final QSettings.Format CustomFormat14

  Internal.

### CustomFormat15

    public static final QSettings.Format CustomFormat15

  Internal.

### CustomFormat16

    public static final QSettings.Format CustomFormat16

  Internal.

Method Detail

### values

    public static final QSettings.Format[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(QSettings.Format c : QSettings.Format.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're declared

### valueOf

    public static QSettings.Format valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name

### value

    public int value()

  Description copied from interface: `QtEnumerator`
  This function should return an integer value for the enum values of the enumeration that implements this interface.

  Specified by:
    `value` in interface `QtEnumerator`

### resolve

    public static QSettings.Format resolve(int value)

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD