![]() |
Главная · Все классы · Основные классы · Классы по группам · Модули · Функции | ![]() |
Описанные ниже члены класса являются частью слоя поддержки Qt 3. Они введены для поддержки старого кода в Qt 4. Мы советуем не использовать их во вновь создаваемом коде.
Константа | Значение | Описание |
---|---|---|
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.
Например, если у вас есть код
QSettings settings; QStringList keys = settings.entryList("cities"); ...
вы можете записать его в виде
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.
Например, если у вас есть код
bool ok; bool grid = settings.readBoolEntry("showGrid", true, &ok);
вы можете записать его в виде
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.
Например, если у вас есть код
bool ok; double pi = settings.readDoubleEntry("pi", 3.141592, &ok);
вы можете записать его в виде
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.
Например, если у вас есть код
bool ok; QString str = settings.readEntry("userName", "administrator", &ok);
вы можете записать его в виде
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.
Например, если у вас есть код
bool ok; QStringList list = settings.readListEntry("recentFiles", &ok);
вы можете записать его в виде
bool ok = settings.contains("recentFiles"); QStringList list = settings.value("recentFiles").toStringList();
Это перегруженная функция, предоставленная для удобства.
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.
Например, если у вас есть код
bool ok; QStringList list = settings.readListEntry("recentFiles", ":", &ok);
вы можете записать его в виде
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.
Например, если у вас есть код
bool ok; int max = settings.readNumEntry("maxConnections", 30, &ok);
вы можете записать его в виде
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).
Например, если у вас есть код
QSettings settings; settings.beginGroup("mainWindow"); settings.beginGroup("leftPanel"); ... settings.resetGroup();
вы можете записать его в виде
QSettings settings; settings.beginGroup("mainWindow"); settings.beginGroup("leftPanel"); ... settings.endGroup(); settings.endGroup();
Это перегруженная функция, предоставленная для удобства.
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.
Например, если у вас есть код
QSettings settings; settings.setPath("twikimaster.com", "Kanooth", QSettings::Global);
вы можете записать его в виде
QSettings settings(QSettings::SystemScope, "twikimaster.com", "Kanooth");
Returns a list of all sub-keys of key.
Use childGroups() instead.
Например, если у вас есть код
QSettings settings; QStringList groups = settings.entryList("cities"); ...
вы можете записать его в виде
QSettings settings; settings.beginGroup("cities"); QStringList groups = settings.childKeys(); ... settings.endGroup();
Sets the value of setting key to value.
Use setValue() instead.
Это перегруженная функция, предоставленная для удобства.
Это перегруженная функция, предоставленная для удобства.
Это перегруженная функция, предоставленная для удобства.
Это перегруженная функция, предоставленная для удобства.
Это перегруженная функция, предоставленная для удобства.
Это перегруженная функция, предоставленная для удобства.
Use setValue(key, value) instead. You don't need separator.
Copyright © 2008 Trolltech | Торговые марки | Qt 4.3.5 |