KiCad PCB EDA Suite
|
Configuration for integers with unit conversion. More...
#include <config_params.h>
Public Member Functions | |
PARAM_CFG_INT_WITH_SCALE (const wxString &ident, int *ptparam, int default_val=0, int min=std::numeric_limits< int >::min(), int max=std::numeric_limits< int >::max(), const wxChar *group=nullptr, double aBiu2cfgunit=1.0, const wxString &legacy_ident=wxEmptyString) | |
PARAM_CFG_INT_WITH_SCALE (bool insetup, const wxString &ident, int *ptparam, int default_val=0, int min=std::numeric_limits< int >::min(), int max=std::numeric_limits< int >::max(), const wxChar *group=nullptr, double aBiu2cfgunit=1.0, const wxString &legacy_ident=wxEmptyString) | |
virtual void | ReadParam (wxConfigBase *aConfig) const override |
Read the value of the parameter stored in aConfig. | |
virtual void | SaveParam (wxConfigBase *aConfig) const override |
Save the value of the parameter stored in aConfig. | |
Public Attributes | |
double | m_BIU_to_cfgunit |
the factor to convert the saved value in internal value | |
int * | m_Pt_param |
Pointer to the parameter value. | |
int | m_Min |
int | m_Max |
Minimum and maximum values of the param type. | |
int | m_Default |
The default value of the parameter. | |
wxString | m_Ident |
Keyword in config data. | |
paramcfg_id | m_Type |
Type of parameter. | |
wxString | m_Group |
Group name (this is like a path in the config data) | |
bool | m_Setup |
Install or Project based parameter, true == install. | |
wxString | m_Ident_legacy |
Configuration for integers with unit conversion.
Mainly used to store an integer value in millimeters (or inches) and retrieve it in internal units. The stored value is a floating number.
Definition at line 142 of file config_params.h.
PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE | ( | const wxString & | ident, |
int * | ptparam, | ||
int | default_val = 0 , |
||
int | min = std::numeric_limits<int>::min() , |
||
int | max = std::numeric_limits<int>::max() , |
||
const wxChar * | group = nullptr , |
||
double | aBiu2cfgunit = 1.0 , |
||
const wxString & | legacy_ident = wxEmptyString |
||
) |
Definition at line 190 of file config_params.cpp.
References m_BIU_to_cfgunit, PARAM_CFG::m_Type, and PARAM_INT_WITH_SCALE.
PARAM_CFG_INT_WITH_SCALE::PARAM_CFG_INT_WITH_SCALE | ( | bool | insetup, |
const wxString & | ident, | ||
int * | ptparam, | ||
int | default_val = 0 , |
||
int | min = std::numeric_limits<int>::min() , |
||
int | max = std::numeric_limits<int>::max() , |
||
const wxChar * | group = nullptr , |
||
double | aBiu2cfgunit = 1.0 , |
||
const wxString & | legacy_ident = wxEmptyString |
||
) |
Definition at line 201 of file config_params.cpp.
References m_BIU_to_cfgunit, PARAM_CFG::m_Type, and PARAM_INT_WITH_SCALE.
|
overridevirtual |
Read the value of the parameter stored in aConfig.
aConfig | the wxConfigBase that holds the parameter. |
Reimplemented from PARAM_CFG_INT.
Definition at line 212 of file config_params.cpp.
References KiROUND(), m_BIU_to_cfgunit, PARAM_CFG_INT::m_Default, PARAM_CFG::m_Ident, PARAM_CFG::m_Ident_legacy, PARAM_CFG_INT::m_Max, PARAM_CFG_INT::m_Min, and PARAM_CFG_INT::m_Pt_param.
|
overridevirtual |
Save the value of the parameter stored in aConfig.
aConfig | the wxConfigBase that can store the parameter. |
Reimplemented from PARAM_CFG_INT.
Definition at line 230 of file config_params.cpp.
References ConfigBaseWriteDouble(), m_BIU_to_cfgunit, PARAM_CFG::m_Ident, and PARAM_CFG_INT::m_Pt_param.
double PARAM_CFG_INT_WITH_SCALE::m_BIU_to_cfgunit |
the factor to convert the saved value in internal value
Definition at line 161 of file config_params.h.
Referenced by PARAM_CFG_INT_WITH_SCALE(), ReadParam(), and SaveParam().
|
inherited |
The default value of the parameter.
Definition at line 133 of file config_params.h.
Referenced by PARAM_CFG_INT::PARAM_CFG_INT(), PARAM_CFG_INT::ReadParam(), and ReadParam().
|
inherited |
Group name (this is like a path in the config data)
Definition at line 102 of file config_params.h.
Referenced by PARAM_CFG::PARAM_CFG().
|
inherited |
Keyword in config data.
Definition at line 100 of file config_params.h.
Referenced by dumpParamCfg(), PARAM_CFG::PARAM_CFG(), PARAM_CFG_INT::ReadParam(), ReadParam(), PARAM_CFG_DOUBLE::ReadParam(), PARAM_CFG_BOOL::ReadParam(), PARAM_CFG_WXSTRING::ReadParam(), PARAM_CFG_WXSTRING_SET::ReadParam(), PARAM_CFG_FILENAME::ReadParam(), PARAM_CFG_LIBNAME_LIST::ReadParam(), PARAM_CFG_INT::SaveParam(), SaveParam(), PARAM_CFG_DOUBLE::SaveParam(), PARAM_CFG_BOOL::SaveParam(), PARAM_CFG_WXSTRING::SaveParam(), PARAM_CFG_WXSTRING_SET::SaveParam(), PARAM_CFG_FILENAME::SaveParam(), and PARAM_CFG_LIBNAME_LIST::SaveParam().
|
inherited |
Definition at line 107 of file config_params.h.
Referenced by PARAM_CFG::PARAM_CFG(), PARAM_CFG_INT::ReadParam(), ReadParam(), and PARAM_CFG_BOOL::ReadParam().
|
inherited |
Minimum and maximum values of the param type.
Definition at line 132 of file config_params.h.
Referenced by PARAM_CFG_INT::PARAM_CFG_INT(), PARAM_CFG_INT::ReadParam(), and ReadParam().
|
inherited |
Definition at line 132 of file config_params.h.
Referenced by PARAM_CFG_INT::PARAM_CFG_INT(), PARAM_CFG_INT::ReadParam(), and ReadParam().
|
inherited |
Pointer to the parameter value.
Definition at line 131 of file config_params.h.
Referenced by PARAM_CFG_INT::PARAM_CFG_INT(), PARAM_CFG_INT::ReadParam(), ReadParam(), PARAM_CFG_INT::SaveParam(), and SaveParam().
|
inherited |
Install or Project based parameter, true == install.
Definition at line 103 of file config_params.h.
Referenced by PARAM_CFG::PARAM_CFG(), PARAM_CFG_BOOL::PARAM_CFG_BOOL(), PARAM_CFG_DOUBLE::PARAM_CFG_DOUBLE(), PARAM_CFG_INT::PARAM_CFG_INT(), PARAM_CFG_WXSTRING::PARAM_CFG_WXSTRING(), and PARAM_CFG_WXSTRING_SET::PARAM_CFG_WXSTRING_SET().
|
inherited |
Type of parameter.
Definition at line 101 of file config_params.h.
Referenced by dumpParamCfg(), PARAM_CFG::PARAM_CFG(), and PARAM_CFG_INT_WITH_SCALE().