Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.
Constant | Value | Description |
---|---|---|
QSettings::Unix | 0 | Unix systems (X11 and Qtopia Core) |
QSettings::Windows | 1 | Microsoft Windows systems |
QSettings::Mac | 2 | Mac OS X systems |
See also insertSearchPath() and removeSearchPath().
Returns a list of all sub-keys of key.
Use childKeys() instead.
For example, if you have code like
QSettings settings; QStringList keys = settings.entryList("cities"); ...
you can rewrite it as
QSettings settings; settings.beginGroup("cities"); QStringList keys = settings.childKeys(); ... settings.endGroup();
This function is implemented as a no-op. It is provided for source compatibility with Qt 3. The new QSettings class has no concept of "search path".
Returns the value for setting key converted to a bool. If the setting doesn't exist, returns defaultValue.
If ok is not 0, *ok is set to true if the key exists, otherwise *ok is set to false.
Use value() instead.
For example, if you have code like
bool ok; bool grid = settings.readBoolEntry("showGrid", true, &ok);
you can rewrite it as
bool ok = settings.contains("showGrid"); bool grid = settings.value("showGrid", true).toBool();
Returns the value for setting key converted to a double. If the setting doesn't exist, returns defaultValue.
If ok is not 0, *ok is set to true if the key exists, otherwise *ok is set to false.
Use value() instead.
For example, if you have code like
bool ok; double pi = settings.readDoubleEntry("pi", 3.141592, &ok);
you can rewrite it as
bool ok = settings.contains("pi"); double pi = settings.value("pi", 3.141592).toDouble();
Returns the value for setting key converted to a QString. If the setting doesn't exist, returns defaultValue.
If ok is not 0, *ok is set to true if the key exists, otherwise *ok is set to false.
Use value() instead.
For example, if you have code like
bool ok; QString str = settings.readEntry("userName", "administrator", &ok);
you can rewrite it as
bool ok = settings.contains("userName"); QString str = settings.value("userName", "administrator").toString();
Returns the value of setting key converted to a QStringList.
If ok is not 0, *ok is set to true if the key exists, otherwise *ok is set to false.
Use value() instead.
For example, if you have code like
bool ok; QStringList list = settings.readListEntry("recentFiles", &ok);
you can rewrite it as
bool ok = settings.contains("recentFiles"); QStringList list = settings.value("recentFiles").toStringList();
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Returns the value of setting key converted to a QStringList. separator is ignored.
If ok is not 0, *ok is set to true if the key exists, otherwise *ok is set to false.
Use value() instead.
For example, if you have code like
bool ok; QStringList list = settings.readListEntry("recentFiles", ":", &ok);
you can rewrite it as
bool ok = settings.contains("recentFiles"); QStringList list = settings.value("recentFiles").toStringList();
Returns the value for setting key converted to an int. If the setting doesn't exist, returns defaultValue.
If ok is not 0, *ok is set to true if the key exists, otherwise *ok is set to false.
Use value() instead.
For example, if you have code like
bool ok; int max = settings.readNumEntry("maxConnections", 30, &ok);
you can rewrite it as
bool ok = settings.contains("maxConnections"); int max = settings.value("maxConnections", 30).toInt();
Use remove() instead.
This function is implemented as a no-op. It is provided for source compatibility with Qt 3. The new QSettings class has no concept of "search path".
Sets the current group to be the empty string.
Use endGroup() instead (possibly multiple times).
For example, if you have code like
QSettings settings; settings.beginGroup("mainWindow"); settings.beginGroup("leftPanel"); ... settings.resetGroup();
you can rewrite it as
QSettings settings; settings.beginGroup("mainWindow"); settings.beginGroup("leftPanel"); ... settings.endGroup(); settings.endGroup();
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Specifies the organization, application, and scope to use by the QSettings object.
Use the appropriate constructor instead, with QSettings::UserScope instead of QSettings::User and QSettings::SystemScope instead of QSettings::Global.
For example, if you have code like
QSettings settings; settings.setPath("twikimaster.com", "Kanooth", QSettings::Global);
you can rewrite it as
QSettings settings(QSettings::SystemScope, "twikimaster.com", "Kanooth");
Returns a list of all sub-keys of key.
Use childGroups() instead.
For example, if you have code like
QSettings settings; QStringList groups = settings.entryList("cities"); ...
you can rewrite it as
QSettings settings; settings.beginGroup("cities"); QStringList groups = settings.childKeys(); ... settings.endGroup();
Sets the value of setting key to value.
Use setValue() instead.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
Use setValue(key, value) instead. You don't need separator.
Copyright © 2005 Trolltech | Trademarks | Qt 4.1.0 |