#include <gedconf.h>
Public Member Functions | |
| ~GedConf () | |
| void | readConfig (const char *pathToFile) |
| void | saveConfig () |
| PluginDirsList | getPluginDirs () |
| void | setPluginDir (const char *pathToDir) |
| void | removePluginDir (const char *pathToDir) |
| MacroList | getMacroList () |
| CommandVector | getCommands (const std::string macroName) |
| void | removeMacro (const std::string macroName) |
| void | addMacro (const char *macroName, const char *commandName, const char *commandParams) |
| std::string | getHelpDir () |
| std::string | getImageDir () |
| void | getFont (std::string &fileName, std::string &dpi, std::string &size) |
Static Public Member Functions | |
| static GedConf * | ptr () |
| static void | destroy () |
Protected Member Functions | |
| GedConf () | |
Definition at line 96 of file gedconf.h.
| GedConf::~GedConf | ( | ) |
| GedConf::GedConf | ( | ) | [inline, protected] |
Singleton can't be allocated static. use GedConf::ptr() method to obtain singleton address.
| static GedConf* GedConf::ptr | ( | ) | [static] |
Access point to singleton.
| static void GedConf::destroy | ( | ) | [static] |
Destroy singleton object. It has no effect, if object is not allocated.
| void GedConf::readConfig | ( | const char * | pathToFile | ) |
Read configuration file incrementally. New nodes replace existing if redefined.
| pathToFile | Path to config file to read. |
| void GedConf::saveConfig | ( | ) |
Save configuration to config file that was opened last. Existing file is replaced.
| PluginDirsList GedConf::getPluginDirs | ( | ) |
Return the list of directories containing plugins.
| void GedConf::setPluginDir | ( | const char * | pathToDir | ) |
Add plugin directory to configuration file opened as last. If there wasn't any opened configuration file, 'ged.conf' is used.
| pathToDir | Path to directory with plugins. |
| void GedConf::removePluginDir | ( | const char * | pathToDir | ) |
Remove plugin directory from last opend configuration file.
| pathToDir | Directory to remove. |
| MacroList GedConf::getMacroList | ( | ) |
Return macro list, empty map if no macro was found.
| CommandVector GedConf::getCommands | ( | const std::string | macroName | ) |
Return vector of commands for desired macro, empty vector if macro wasn't found.
| macroName | Name of the macro. |
| void GedConf::removeMacro | ( | const std::string | macroName | ) |
Remove macro from configuration file. It has no effect if macro isn't from last configuration file.
| macroName | Macro name to remove. |
| void GedConf::addMacro | ( | const char * | macroName, | |
| const char * | commandName, | |||
| const char * | commandParams | |||
| ) |
Add macro or add command to existing macro.
| macroName | Macro name. | |
| commandName | Command name. | |
| commandParams | Command data. |
| std::string GedConf::getHelpDir | ( | ) |
Return help directory. If help directory option is not found, return default help directory '../doc/help'.
| std::string GedConf::getImageDir | ( | ) |
Return images directory. If images directory option is not found, return default help directory 'images'.
| void GedConf::getFont | ( | std::string & | fileName, | |
| std::string & | dpi, | |||
| std::string & | size | |||
| ) |
Return font properties.
| fileName | File containing font. | |
| dpi | Font resolution. | |
| size | Base font size. |
1.5.2