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 | |
Ini * | ini () |
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 IRCConfig & | config () |
Returns the Singleton. More... | |
static void | dispose () |
Disposes of the Singleton. More... | |
Public Attributes | |
AppearanceCfg | appearance |
GeneralCfg | general |
PersonalCfg | personal |
SoundsCfg | sounds |
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.
|
static |
Returns the Singleton.
Definition at line 45 of file ircconfig.cpp.
|
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 53 of file ircconfig.cpp.
bool IRCConfig::readFromFile | ( | ) |
Reads settings from ini file. This file must be previously set by setIniFile() method.
Definition at line 109 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 133 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 160 of file ircconfig.cpp.