KiCad PCB EDA Suite
Loading...
Searching...
No Matches
template_fieldnames.h File Reference
#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_FIELDNAMETEMPLATE_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)
 

Macro Definition Documentation

◆ DO_TRANSLATE

#define DO_TRANSLATE   true

Definition at line 55 of file template_fieldnames.h.

Typedef Documentation

◆ TEMPLATE_FIELDNAMES

typedef std::vector< TEMPLATE_FIELDNAME > TEMPLATE_FIELDNAMES

Definition at line 132 of file template_fieldnames.h.

Enumeration Type Documentation

◆ 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.

Function Documentation

◆ GetCanonicalFieldName()

◆ GetDefaultFieldName()

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.

Parameters
aFieldNdxThe field number index, > 0.
aTranslateForHIIf 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().

◆ GetUserFieldName()