IRCConfig Class Reference

This Singleton holds most of Doomseeker IRC configuration in memory. More...

#include <ircconfig.h>

Classes

class  AppearanceCfg
 
class  GeneralCfg
 
class  PersonalCfg
 
class  SoundsCfg
 

Public Member Functions

Iniini ()
 
bool readFromFile ()
 Reads settings from ini file. This file must be previously set by setIniFile() method. More...
 
bool saveToFile ()
 Saves current settings to ini file. This file must be previously set by setIniFile() method. More...
 
bool setIniFile (const QString &filePath)
 Initializes the Ini class instance to point to a file. More...
 

Static Public Member Functions

static IRCConfigconfig ()
 Returns the Singleton. More...
 
static void dispose ()
 Disposes of the Singleton. More...
 

Public Attributes

AppearanceCfg appearance
 
GeneralCfg general
 
PersonalCfg personal
 
SoundsCfg sounds
 

Detailed Description

This Singleton holds most of Doomseeker IRC configuration in memory.

The first time it is instantiated the cfg variables are set to default values. Then they can be either read from or saved to a .ini file. The save is handled internally and external access to the .ini file should remain minimal.

Definition at line 44 of file ircconfig.h.

Member Function Documentation

IRCConfig & IRCConfig::config ( )
static

Returns the Singleton.

Definition at line 45 of file ircconfig.cpp.

void IRCConfig::dispose ( )
static

Disposes of the Singleton.

This will NOT save the current config to a file. It is safe to call even if the config was not initialized first.

Definition at line 55 of file ircconfig.cpp.

bool IRCConfig::readFromFile ( )

Reads settings from ini file. This file must be previously set by setIniFile() method.

Definition at line 113 of file ircconfig.cpp.

bool IRCConfig::saveToFile ( )

Saves current settings to ini file. This file must be previously set by setIniFile() method.

Definition at line 139 of file ircconfig.cpp.

bool IRCConfig::setIniFile ( const QString &  filePath)

Initializes the Ini class instance to point to a file.

This method will properly dispose of the previous ini file. However it will neither save the old ini file or read the new one.

Definition at line 168 of file ircconfig.cpp.


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