KiCad PCB EDA Suite
|
#include <wx/string.h>
Go to the source code of this file.
Classes | |
struct | TEMPLATE_FIELDNAME |
Hold a name of a symbol's field, field value, and default visibility. More... | |
class | TEMPLATES |
Macros | |
#define | DO_TRANSLATE true |
Typedefs | |
typedef std::vector< TEMPLATE_FIELDNAME > | TEMPLATE_FIELDNAMES |
Enumerations | |
enum | MANDATORY_FIELD_T { INVALID_FIELD = -1 , REFERENCE_FIELD = 0 , VALUE_FIELD , FOOTPRINT_FIELD , DATASHEET_FIELD , DESCRIPTION_FIELD , MANDATORY_FIELDS } |
The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hold. More... | |
Functions | |
wxString | GetDefaultFieldName (int aFieldNdx, bool aTranslateForHI) |
Return a default symbol field name for field aFieldNdx for all components. | |
wxString | GetUserFieldName (int aFieldNdx, bool aTranslateForHI) |
wxString | GetCanonicalFieldName (int idx) |
#define DO_TRANSLATE true |
Definition at line 55 of file template_fieldnames.h.
typedef std::vector< TEMPLATE_FIELDNAME > TEMPLATE_FIELDNAMES |
Definition at line 132 of file template_fieldnames.h.
enum MANDATORY_FIELD_T |
The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hold.
The first fields are fixed fields and are defined by MANDATORY_FIELDS. After that come an unlimited number of user defined fields, only some of which have indices defined here.
Enumerator | |
---|---|
INVALID_FIELD | The field ID hasn't been set yet; field is invalid. |
REFERENCE_FIELD | Field Reference of part, i.e. "IC21". |
VALUE_FIELD | Field Value of part, i.e. "3.3K". |
FOOTPRINT_FIELD | Field Name Module PCB, i.e. "16DIP300". |
DATASHEET_FIELD | name of datasheet |
DESCRIPTION_FIELD | Field Description of part, i.e. "1/4W 1% Metal Film Resistor". |
MANDATORY_FIELDS | The first 5 are mandatory, and must be instantiated in SCH_COMPONENT, LIB_PART, and FOOTPRINT constructors. |
Definition at line 40 of file template_fieldnames.h.
|
inline |
Definition at line 71 of file template_fieldnames.h.
References DO_TRANSLATE, GetDefaultFieldName(), and MANDATORY_FIELDS.
Referenced by NETLIST_EXPORTER_XML::addSymbolFields(), TEMPLATES::AddTemplateFieldName(), FIELDS_EDITOR_GRID_DATA_MODEL::ApplyBomPreset(), BACK_ANNOTATE::applyChangelist(), FIELDS_EDITOR_GRID_DATA_MODEL::ColIsReference(), FIELDS_EDITOR_GRID_DATA_MODEL::ColIsValue(), SCH_FIELD::GetCanonicalName(), PCB_FIELD::GetCanonicalName(), SCH_FIELD::GetName(), PCB_FIELD::GetName(), PCB_FIELD::GetTextTypeDescription(), FIELDS_EDITOR_GRID_DATA_MODEL::groupMatch(), SCH_SYMBOL::Init(), EESCHEMA_JOBS_HANDLER::JobExportBom(), SCH_IO_KICAD_LEGACY_LIB_CACHE::loadField(), DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames(), DIALOG_CHANGE_SYMBOLS::onOkButtonClicked(), SCH_IO_KICAD_SEXPR_PARSER::parseProperty(), SCH_IO_KICAD_SEXPR_PARSER::parseSchField(), SCH_IO_KICAD_SEXPR_LIB_CACHE::saveField(), DIALOG_SYMBOL_FIELDS_TABLE::SetupColumnProperties(), and BOARD_NETLIST_UPDATER::updateFootprintParameters().
wxString GetDefaultFieldName | ( | int | aFieldNdx, |
bool | aTranslateForHI | ||
) |
Return a default symbol field name for field aFieldNdx for all components.
These field names are not modifiable but template field names are.
aFieldNdx | The field number index, > 0. |
aTranslateForHI | If true, return the translated field name, else get the canonical name (defualt). Translation is intended only for dialogs |
Definition at line 49 of file template_fieldnames.cpp.
References _, DATASHEET_CANONICAL, DATASHEET_FIELD, DESCRIPTION_CANONICAL, DESCRIPTION_FIELD, FOOTPRINT_CANONICAL, FOOTPRINT_FIELD, GetUserFieldName(), REFERENCE_CANONICAL, REFERENCE_FIELD, s_CanonicalDatasheet(), s_CanonicalDescription(), s_CanonicalFootprint(), s_CanonicalReference(), s_CanonicalValue(), VALUE_CANONICAL, and VALUE_FIELD.
Referenced by DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_UPDATE_SYMBOL_FIELDS::DIALOG_UPDATE_SYMBOL_FIELDS(), SCH_EDIT_TOOL::editFieldText(), GetCanonicalFieldName(), SCH_FIELD::GetName(), FIELDS_GRID_TABLE::GetValue(), EESCHEMA_JOBS_HANDLER::JobExportBom(), DIALOG_SYMBOL_FIELDS_TABLE::LoadFieldNames(), SCH_IO_KICAD_LEGACY::loadSymbol(), and SCH_FIELD::SCH_FIELD().
wxString GetUserFieldName | ( | int | aFieldNdx, |
bool | aTranslateForHI | ||
) |
Definition at line 78 of file template_fieldnames.cpp.
References _, and USER_FIELD_CANONICAL.
Referenced by GetDefaultFieldName(), PCB_FIELD::GetName(), DIALOG_FOOTPRINT_PROPERTIES::OnAddField(), DIALOG_SYMBOL_PROPERTIES::OnAddField(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField(), and SCH_IO_KICAD_LEGACY_LIB_CACHE::saveField().