OpenMW
Public Member Functions | Private Member Functions | Private Attributes
CSMSettings::SettingsItem Class Reference

#include <settingsitem.hpp>

List of all members.

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
QStringPairgetValuePair ()
 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

QStringPairmValuePair
QStringList * mValueList
bool mIsMultiValue
QString mDefaultValue

Detailed Description

Represents a setting including metadata (valid values, ranges, defaults, and multivalue status


Constructor & Destructor Documentation

CSMSettings::SettingsItem::SettingsItem ( QString  name,
bool  isMultiValue,
const QString &  defaultValue,
QObject *  parent = 0 
) [inline, explicit]

Member Function Documentation

QStringList* CSMSettings::SettingsItem::getValueList ( ) [inline]

retrieve list of valid values for setting

valuePair used for spin boxes (max / min)

void CSMSettings::SettingsItem::setDefaultValue ( const QString &  value)
void CSMSettings::SettingsItem::setValueList ( QStringList *  valueList) [inline]

write list of valid values for setting

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


Member Data Documentation

QStringList* CSMSettings::SettingsItem::mValueList [private]

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