KiCad PCB EDA Suite
|
#include <config_params.h>
#include <locale_io.h>
#include <math/util.h>
#include <wx/config.h>
#include <wx/debug.h>
Go to the source code of this file.
Functions | |
void | wxConfigLoadParams (wxConfigBase *aCfg, const std::vector< PARAM_CFG * > &aList, const wxString &aGroup) |
Use aList of PARAM_CFG objects to load configuration values from aCfg. | |
void | wxConfigLoadSetups (wxConfigBase *aCfg, const std::vector< PARAM_CFG * > &aList) |
Use aList of PARAM_CFG object to load configuration values from aCfg. | |
void | wxConfigSaveParams (wxConfigBase *aCfg, const std::vector< PARAM_CFG * > &aList, const wxString &aGroup) |
Write aList of PARAM_CFG objects aCfg. | |
void | wxConfigSaveSetups (wxConfigBase *aCfg, const std::vector< PARAM_CFG * > &aList) |
Writes aList of PARAM_CFG objects to aCfg. | |
void | ConfigBaseWriteDouble (wxConfigBase *aConfig, const wxString &aKey, double aValue) |
A helper function to write doubles in configuration file. | |
void ConfigBaseWriteDouble | ( | wxConfigBase * | aConfig, |
const wxString & | aKey, | ||
double | aValue | ||
) |
A helper function to write doubles in configuration file.
We cannot use wxConfigBase->Write for a double, because this function uses a format with very few digits in mantissa and truncation issues are frequent. We use here a better floating format.
Definition at line 117 of file config_params.cpp.
Referenced by PARAM_CFG_INT_WITH_SCALE::SaveParam(), and PARAM_CFG_DOUBLE::SaveParam().
void wxConfigLoadParams | ( | wxConfigBase * | aCfg, |
const std::vector< PARAM_CFG * > & | aList, | ||
const wxString & | aGroup | ||
) |
Use aList of PARAM_CFG objects to load configuration values from aCfg.
Only elements whose m_Setup field is false will be loaded.
aCfg | where to load from. |
aList | holds some configuration parameters, not all of which will necessarily be loaded. |
aGroup | indicates in which group the value should be saved, unless the PARAM_CFG provides its own group, in which case it will take precedence. aGroup may be empty. |
Definition at line 33 of file config_params.cpp.
void wxConfigLoadSetups | ( | wxConfigBase * | aCfg, |
const std::vector< PARAM_CFG * > & | aList | ||
) |
Use aList of PARAM_CFG object to load configuration values from aCfg.
Only elements whose m_Setup field is true will be loaded.
aCfg | where to load from. |
aList | holds some configuration parameters, not all of which will necessarily be loaded. |
Definition at line 53 of file config_params.cpp.
Referenced by ADVANCED_CFG::loadSettings().
void wxConfigSaveParams | ( | wxConfigBase * | aCfg, |
const std::vector< PARAM_CFG * > & | aList, | ||
const wxString & | aGroup | ||
) |
Write aList of PARAM_CFG objects aCfg.
Only elements with m_Setup set false will be saved, hence the function name.
aCfg | where to save. |
aList | holds some configuration parameters, not all of which will necessarily be saved. |
aGroup | indicates in which group the value should be saved, unless the PARAM_CFG provides its own group, in which case it will take precedence. aGroup may be empty. |
Definition at line 67 of file config_params.cpp.
References PARAM_COMMAND_ERASE.
void wxConfigSaveSetups | ( | wxConfigBase * | aCfg, |
const std::vector< PARAM_CFG * > & | aList | ||
) |
Writes aList of PARAM_CFG objects to aCfg.
Only elements with m_Setup set true will be saved, hence the function name.
aCfg | where to save. |
aList | holds some configuration parameters, not all of which will necessarily be saved. |
Definition at line 95 of file config_params.cpp.
References PARAM_COMMAND_ERASE.