OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Config::GameSettings Class Reference

#include <gamesettings.hpp>

Collaboration diagram for Config::GameSettings:

Public Member Functions

 GameSettings (Files::ConfigurationManager &cfg)
 
 ~GameSettings ()
 
QString value (const QString &key, const QString &defaultValue=QString())
 
void setValue (const QString &key, const QString &value)
 
void setMultiValue (const QString &key, const QString &value)
 
void remove (const QString &key)
 
QStringList getDataDirs ()
 
void removeDataDir (const QString &dir)
 
void addDataDir (const QString &dir)
 
QString getDataLocal ()
 
bool hasMaster ()
 
QStringList values (const QString &key, const QStringList &defaultValues=QStringList()) const
 
bool readFile (QTextStream &stream)
 
bool readFile (QTextStream &stream, QMap< QString, QString > &settings)
 
bool readUserFile (QTextStream &stream)
 
bool writeFile (QTextStream &stream)
 
bool writeFileWithComments (QFile &file)
 
void setContentList (const QStringList &fileNames)
 
QStringList getContentList () const
 
void clear ()
 

Private Member Functions

void validatePaths ()
 
bool isOrderedLine (const QString &line) const
 

Private Attributes

Files::ConfigurationManagermCfgMgr
 
QMap< QString, QString > mSettings
 
QMap< QString, QString > mUserSettings
 
QStringList mDataDirs
 
QString mDataLocal
 

Static Private Attributes

static const char sContentKey [] = "content"
 

Constructor & Destructor Documentation

Config::GameSettings::GameSettings ( Files::ConfigurationManager cfg)
Config::GameSettings::~GameSettings ( )

Member Function Documentation

void Config::GameSettings::addDataDir ( const QString &  dir)
inline
void Config::GameSettings::clear ( )
QStringList Config::GameSettings::getContentList ( ) const

Here is the call graph for this function:

Here is the caller graph for this function:

QStringList Config::GameSettings::getDataDirs ( )
inline

Here is the caller graph for this function:

QString Config::GameSettings::getDataLocal ( )
inline
bool Config::GameSettings::hasMaster ( )
bool Config::GameSettings::isOrderedLine ( const QString &  line) const
private
bool Config::GameSettings::readFile ( QTextStream &  stream)
bool Config::GameSettings::readFile ( QTextStream &  stream,
QMap< QString, QString > &  settings 
)
bool Config::GameSettings::readUserFile ( QTextStream &  stream)
void Config::GameSettings::remove ( const QString &  key)
inline
void Config::GameSettings::removeDataDir ( const QString &  dir)
inline
void Config::GameSettings::setContentList ( const QStringList &  fileNames)
void Config::GameSettings::setMultiValue ( const QString &  key,
const QString &  value 
)
inline

Here is the call graph for this function:

void Config::GameSettings::setValue ( const QString &  key,
const QString &  value 
)
inline
void Config::GameSettings::validatePaths ( )
private
QString Config::GameSettings::value ( const QString &  key,
const QString &  defaultValue = QString() 
)
inline
QStringList Config::GameSettings::values ( const QString &  key,
const QStringList &  defaultValues = QStringList() 
) const

Here is the caller graph for this function:

bool Config::GameSettings::writeFile ( QTextStream &  stream)
bool Config::GameSettings::writeFileWithComments ( QFile &  file)

Member Data Documentation

Files::ConfigurationManager& Config::GameSettings::mCfgMgr
private
QStringList Config::GameSettings::mDataDirs
private
QString Config::GameSettings::mDataLocal
private
QMap<QString, QString> Config::GameSettings::mSettings
private
QMap<QString, QString> Config::GameSettings::mUserSettings
private
const char Config::GameSettings::sContentKey = "content"
staticprivate

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