KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_field.cpp File Reference
#include <sch_render_settings.h>
#include <scintilla_tricks.h>
#include <netclass.h>
#include <wx/log.h>
#include <wx/menu.h>
#include <advanced_config.h>
#include <base_units.h>
#include <common.h>
#include <sch_edit_frame.h>
#include <plotters/plotter.h>
#include <bitmaps.h>
#include <kiway.h>
#include <settings/color_settings.h>
#include <string_utils.h>
#include <geometry/geometry_utils.h>
#include <trace_helpers.h>
#include <tool/tool_manager.h>
#include <tools/sch_navigate_tool.h>
#include <font/glyph_types.h>
#include <font/outline_font.h>
#include "sim/sim_lib_mgr.h"
#include <properties/property.h>
#include <properties/property_mgr.h>
#include <google/protobuf/any.pb.h>
#include <api/api_utils.h>
#include <api/schematic/schematic_types.pb.h>

Go to the source code of this file.

Classes

struct  SCH_FIELD_DESC
 

Functions

static const std::vector< wxString > & GetKnownNetclassFieldTranslations ()
 Translations of "Net Class" extracted from KiCad's .po catalogs.
 
static FIELD_T sheetFieldId (FIELD_T aId, const wxString &aName)
 A sheet field takes its type from its name, so every path that creates or renames one agrees.
 

Variables

static const std::vector< KICAD_T > labelTypes = { SCH_LABEL_LOCATE_ANY_T }
 
static struct SCH_FIELD_DESC _SCH_FIELD_DESC
 

Function Documentation

◆ GetKnownNetclassFieldTranslations()

static const std::vector< wxString > & GetKnownNetclassFieldTranslations ( )
static

Translations of "Net Class" extracted from KiCad's .po catalogs.

The directive-label net class field used to be saved as _( "Net Class" ) which embedded the UI-language translation into the .kicad_sch file. Files written by a non-English UI lost the untranslated "Netclass" token when re-opened in another language, so the rule resolver could no longer locate the field. We now save the untranslated name, but we still need to recognise the translated form when migrating older / cross-locale files.

Definition at line 61 of file sch_field.cpp.

Referenced by SCH_FIELD::IsNetclassLabelFieldName().

◆ sheetFieldId()

static FIELD_T sheetFieldId ( FIELD_T aId,
const wxString & aName )
static

A sheet field takes its type from its name, so every path that creates or renames one agrees.

Definition at line 294 of file sch_field.cpp.

References GetDefaultFieldName(), SHEET_REF_SUFFIX, SHEET_USER, and UNTRANSLATED.

Referenced by SCH_FIELD::setId(), SCH_FIELD::SetName(), and SCH_FIELD::SetOrdinal().

Variable Documentation

◆ _SCH_FIELD_DESC

struct SCH_FIELD_DESC _SCH_FIELD_DESC
static

◆ labelTypes

const std::vector<KICAD_T> labelTypes = { SCH_LABEL_LOCATE_ANY_T }
static