- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

# QSettings Class Reference

Search for all occurrences

## Detailed Description

Definition at line 73 of file qsettings.h.

`#include <qsettings.h>`

Inheritance diagram for QSettings:
[legend]

List of all members.

## Public Types
enum | Status { NoError = 0, AccessError, FormatError }
enum | Format { NativeFormat, IniFormat, InvalidFormat = 16, CustomFormat1, CustomFormat2, CustomFormat3, CustomFormat4, CustomFormat5, CustomFormat6, CustomFormat7, CustomFormat8, CustomFormat9, CustomFormat10, CustomFormat11, CustomFormat12, CustomFormat13, CustomFormat14, CustomFormat15, CustomFormat16 }
enum | Scope { UserScope, SystemScope }
typedef QMap< QString, QVariant > | SettingsMap
typedef bool(* | ReadFunc )(QIODevice &device, SettingsMap &map)
typedef bool(* | WriteFunc )(QIODevice &device, const SettingsMap &map)
## Public Member Functions
| QSettings (const QString &organization, const QString &application=QString(), QObject *parent=0)
| QSettings (Scope scope, const QString &organization, const QString &application=QString(), QObject *parent=0)
| QSettings (Format format, Scope scope, const QString &organization, const QString &application=QString(), QObject *parent=0)
| QSettings (const QString &fileName, Format format, QObject *parent=0)
| QSettings (QObject *parent=0)
| ~QSettings ()
void | clear ()
void | sync ()
Status | status () const
void | beginGroup (const QString &prefix)
void | endGroup ()
QString | group () const
int | beginReadArray (const QString &prefix)
void | beginWriteArray (const QString &prefix, int size=-1)
void | endArray ()
void | setArrayIndex (int i)
QStringList | allKeys () const
QStringList | childKeys () const
QStringList | childGroups () const
bool | isWritable () const
void | setValue (const QString &key, const QVariant &value)
QVariant | value (const QString &key, const QVariant &defaultValue=QVariant()) const
void | remove (const QString &key)
bool | contains (const QString &key) const
void | setFallbacksEnabled (bool b)
bool | fallbacksEnabled () const
QString | fileName () const
Format | format () const
Scope | scope () const
QString | organizationName () const
QString | applicationName () const
void | setIniCodec (QTextCodec *codec)
void | setIniCodec (const char *codecName)
QTextCodec * | iniCodec () const
## Static Public Member Functions
static void | setDefaultFormat (Format format)
static Format | defaultFormat ()
static void | setSystemIniPath (const QString &dir)
static void | setUserIniPath (const QString &dir)
static void | setPath (Format format, Scope scope, const QString &path)
static Format | registerFormat (const QString &extension, ReadFunc readFunc, WriteFunc writeFunc, Qt::CaseSensitivity caseSensitivity=Qt::CaseSensitive)
## Protected Member Functions
bool | event (QEvent *event)

## Member Typedef Documentation

typedef QMap<QString, QVariant> SettingsMap

Search for all occurrences

Definition at line 190 of file qsettings.h.

typedef bool(* ReadFunc)(QIODevice &device, SettingsMap &map)

Search for all occurrences

Definition at line 191 of file qsettings.h.

typedef bool(* WriteFunc)(QIODevice &device, const SettingsMap &map)

Search for all occurrences

Definition at line 192 of file qsettings.h.

## Member Enumeration Documentation

enum Status

Search for all occurrences

Enumerator:

  NoError | Search for all occurrences
  AccessError | Search for all occurrences
  FormatError | Search for all occurrences

Definition at line 86 of file qsettings.h.

                    {
            NoError = 0,
            AccessError,
            FormatError
        };

enum Format

Search for all occurrences

Enumerator:

  NativeFormat | Search for all occurrences
  IniFormat | Search for all occurrences
  InvalidFormat | Search for all occurrences
  CustomFormat1 | Search for all occurrences
  CustomFormat2 | Search for all occurrences
  CustomFormat3 | Search for all occurrences
  CustomFormat4 | Search for all occurrences
  CustomFormat5 | Search for all occurrences
  CustomFormat6 | Search for all occurrences
  CustomFormat7 | Search for all occurrences
  CustomFormat8 | Search for all occurrences
  CustomFormat9 | Search for all occurrences
  CustomFormat10 | Search for all occurrences
  CustomFormat11 | Search for all occurrences
  CustomFormat12 | Search for all occurrences
  CustomFormat13 | Search for all occurrences
  CustomFormat14 | Search for all occurrences
  CustomFormat15 | Search for all occurrences
  CustomFormat16 | Search for all occurrences

Definition at line 92 of file qsettings.h.

                    {
            NativeFormat,
            IniFormat,

            InvalidFormat = 16,
            CustomFormat1,
            CustomFormat2,
            CustomFormat3,
            CustomFormat4,
            CustomFormat5,
            CustomFormat6,
            CustomFormat7,
            CustomFormat8,
            CustomFormat9,
            CustomFormat10,
            CustomFormat11,
            CustomFormat12,
            CustomFormat13,
            CustomFormat14,
            CustomFormat15,
            CustomFormat16
        };

enum Scope

Search for all occurrences

Enumerator:

  UserScope | Search for all occurrences
  SystemScope | Search for all occurrences

Definition at line 115 of file qsettings.h.

                   {
            UserScope,
            SystemScope
    #ifdef QT3_SUPPORT
            ,
            User = UserScope,
            Global = SystemScope
    #endif
        };

## Constructor & Destructor Documentation

QSettings | ( | const QString & | organization,
|  | const QString & | application = `QString()`,
|  | QObject * | parent = `0`
| ) |  | `[explicit]`

QSettings | ( | Scope | scope,
|  | const QString & | organization,
|  | const QString & | application = `QString()`,
|  | QObject * | parent = `0`
| ) |  |

QSettings | ( | Format | format,
|  | Scope | scope,
|  | const QString & | organization,
|  | const QString & | application = `QString()`,
|  | QObject * | parent = `0`
| ) |  |

QSettings | ( | const QString & | fileName,
|  | Format | format,
|  | QObject * | parent = `0`
| ) |  |

QSettings | ( | QObject * | parent = `0` | ) | `[explicit]`

~QSettings | ( |  | ) |

## Member Function Documentation

void clear | ( |  | ) |

Search for all occurrences

void sync | ( |  | ) |

Search for all occurrences

Status status | ( |  | ) | const

Search for all occurrences

void beginGroup | ( | const QString & | prefix | ) |

Search for all occurrences

void endGroup | ( |  | ) |

Search for all occurrences

QString group | ( |  | ) | const

Search for all occurrences

int beginReadArray | ( | const QString & | prefix | ) |

Search for all occurrences

void beginWriteArray | ( | const QString & | prefix,
|  | int | size = `-1`
| ) |  |

Search for all occurrences

void endArray | ( |  | ) |

Search for all occurrences

void setArrayIndex | ( | int | i | ) |

Search for all occurrences

QStringList allKeys | ( |  | ) | const

Search for all occurrences

QStringList childKeys | ( |  | ) | const

Search for all occurrences

QStringList childGroups | ( |  | ) | const

Search for all occurrences

bool isWritable | ( |  | ) | const

Search for all occurrences

void setValue | ( | const QString & | key,
|  | const QVariant & | value
| ) |  |

Search for all occurrences

QVariant value | ( | const QString & | key,
|  | const QVariant & | defaultValue = `QVariant()`
| ) |  | const

Search for all occurrences

void remove | ( | const QString & | key | ) |

Search for all occurrences

bool contains | ( | const QString & | key | ) | const

Search for all occurrences

void setFallbacksEnabled | ( | bool | b | ) |

Search for all occurrences

bool fallbacksEnabled | ( |  | ) | const

Search for all occurrences

QString fileName | ( |  | ) | const

Search for all occurrences

Format format | ( |  | ) | const

Search for all occurrences

Scope scope | ( |  | ) | const

Search for all occurrences

QString organizationName | ( |  | ) | const

Search for all occurrences

QString applicationName | ( |  | ) | const

Search for all occurrences

void setIniCodec | ( | QTextCodec * | codec | ) |

Search for all occurrences

void setIniCodec | ( | const char * | codecName | ) |

Search for all occurrences

QTextCodec* iniCodec | ( |  | ) | const

Search for all occurrences

static void setDefaultFormat | ( | Format | format | ) | `[static]`

Search for all occurrences

static Format defaultFormat | ( |  | ) | `[static]`

Search for all occurrences

static void setSystemIniPath | ( | const QString & | dir | ) | `[static]`

Search for all occurrences

static void setUserIniPath | ( | const QString & | dir | ) | `[static]`

Search for all occurrences

static void setPath | ( | Format | format,
|  | Scope | scope,
|  | const QString & | path
| ) |  | `[static]`

Search for all occurrences

static Format registerFormat | ( | const QString & | extension,
|  | ReadFunc | readFunc,
|  | WriteFunc | writeFunc,
|  | Qt::CaseSensitivity | caseSensitivity = `Qt::CaseSensitive`
| ) |  | `[static]`

Search for all occurrences

bool event | ( | QEvent * | event | ) | `[protected, virtual]`

Search for all occurrences

Reimplemented from QObject.

The documentation for this class was generated from the following file:

- QtCore/qsettings.h

QSettings QSettings QSettings QSettings QSettings QSettings QSettings QSettings QSettings QSettings
QSettings QSettings QSettings QSettings QSettings QSettings QSettings QSettings QSettings QSettings