OpenMW
|
#include <settingsitem.hpp>
Public Member Functions | |
SettingsItem (QString name, bool isMultiValue, const QString &defaultValue, QObject *parent=0) | |
bool | updateItem (const QStringList *values) |
bool | updateItem (const QString &value) |
bool | updateItem (int valueListIndex) |
QStringList * | getValueList () |
retrieve list of valid values for setting | |
void | setValueList (QStringList *valueList) |
write list of valid values for setting | |
QStringPair * | getValuePair () |
valuePair used for spin boxes (max / min) | |
void | setValuePair (QStringPair valuePair) |
set value range (spinbox / integer use) | |
bool | isMultivalue () |
void | setDefaultValue (const QString &value) |
QString | getDefaultValue () const |
Private Member Functions | |
bool | validate (const QString &value) |
Private Attributes | |
QStringPair * | mValuePair |
QStringList * | mValueList |
bool | mIsMultiValue |
QString | mDefaultValue |
Represents a setting including metadata (valid values, ranges, defaults, and multivalue status
CSMSettings::SettingsItem::SettingsItem | ( | QString | name, |
bool | isMultiValue, | ||
const QString & | defaultValue, | ||
QObject * | parent = 0 |
||
) | [inline, explicit] |
QString CSMSettings::SettingsItem::getDefaultValue | ( | ) | const |
QStringList* CSMSettings::SettingsItem::getValueList | ( | ) | [inline] |
retrieve list of valid values for setting
QStringPair* CSMSettings::SettingsItem::getValuePair | ( | ) | [inline] |
valuePair used for spin boxes (max / min)
bool CSMSettings::SettingsItem::isMultivalue | ( | ) | [inline] |
void CSMSettings::SettingsItem::setDefaultValue | ( | const QString & | value | ) |
void CSMSettings::SettingsItem::setValueList | ( | QStringList * | valueList | ) | [inline] |
write list of valid values for setting
void CSMSettings::SettingsItem::setValuePair | ( | QStringPair | valuePair | ) | [inline] |
set value range (spinbox / integer use)
bool CSMSettings::SettingsItem::updateItem | ( | const QStringList * | values | ) |
updateItem overloads for updating setting value provided a list of values (multi-valued), a specific value or an index value corresponding to the mValueList
bool CSMSettings::SettingsItem::updateItem | ( | const QString & | value | ) |
bool CSMSettings::SettingsItem::updateItem | ( | int | valueListIndex | ) |
bool CSMSettings::SettingsItem::validate | ( | const QString & | value | ) | [private] |
Verifies that the supplied value is one of the following: 1. Within the limits of the value pair (min / max) 2. One of the values indicated in the value list
QString CSMSettings::SettingsItem::mDefaultValue [private] |
bool CSMSettings::SettingsItem::mIsMultiValue [private] |
QStringList* CSMSettings::SettingsItem::mValueList [private] |
QStringPair* CSMSettings::SettingsItem::mValuePair [private] |