|
KiCad PCB EDA Suite
|
Class that handles conversion of various pin data fields into strings for display in the UI or serialisation to formats like CSV. More...
Public Types | |
| enum class | BOOL_FORMAT { ZERO_ONE , TRUE_FALSE } |
Public Member Functions | |
| PIN_INFO_FORMATTER (UNITS_PROVIDER &aUnitsProvider, bool aIncludeUnits, BOOL_FORMAT aBoolFormat, REPORTER &aReporter) | |
| wxString | Format (const SCH_PIN &aPin, int aFieldId) const |
| void | UpdatePin (SCH_PIN &aPin, const wxString &aValue, int aFieldId, const LIB_SYMBOL &aSymbol) const |
| Update the pin from the given col/string. | |
Protected Member Functions | |
| wxString | stringFromBool (bool aValue) const |
| bool | boolFromString (const wxString &aValue, REPORTER &aReporter) const |
Protected Attributes | |
| UNITS_PROVIDER & | m_unitsProvider |
| bool | m_includeUnits |
| BOOL_FORMAT | m_boolFormat |
| REPORTER & | m_reporter |
Class that handles conversion of various pin data fields into strings for display in the UI or serialisation to formats like CSV.
Definition at line 98 of file dialog_lib_edit_pin_table.cpp.
|
stronginherited |
| Enumerator | |
|---|---|
| ZERO_ONE | |
| TRUE_FALSE | |
Definition at line 31 of file column_formatter.h.
|
inline |
Definition at line 101 of file dialog_lib_edit_pin_table.cpp.
References COLUMN_FORMATTER::COLUMN_FORMATTER().
|
protectedinherited |
Definition at line 54 of file column_formatter.cpp.
References _, BOOL_FALSE, BOOL_TRUE, MatchTranslationOrNative(), REPORTER::Report(), and RPT_SEVERITY_ERROR.
Referenced by PIN_INFO_FORMATTER::UpdatePin().
|
inline |
Definition at line 107 of file dialog_lib_edit_pin_table.cpp.
References COL_BODY_STYLE, COL_LENGTH, COL_NAME, COL_NAME_SIZE, COL_NUMBER, COL_NUMBER_SIZE, COL_ORIENTATION, COL_POSX, COL_POSY, COL_SHAPE, COL_TYPE, COL_UNIT, COL_VISIBLE, DEMORGAN_ALL, SCH_ITEM::GetBodyStyle(), SCH_ITEM::GetBodyStyleDescription(), SCH_PIN::GetLength(), SCH_PIN::GetName(), SCH_PIN::GetNameTextSize(), SCH_PIN::GetNumber(), SCH_PIN::GetNumberTextSize(), SCH_PIN::GetOrientation(), SCH_ITEM::GetParentSymbol(), SCH_PIN::GetPosition(), SCH_PIN::GetShape(), SCH_PIN::GetType(), SCH_ITEM::GetUnit(), SCH_ITEM::GetUnitDisplayName(), index, SCH_PIN::IsVisible(), COLUMN_FORMATTER::m_includeUnits, COLUMN_FORMATTER::m_unitsProvider, PinOrientationIndex(), PinOrientationNames(), PinShapeNames(), PinTypeNames(), COLUMN_FORMATTER::stringFromBool(), UNITS_ALL, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PIN_TABLE_DATA_MODEL::GetValue(), and DIALOG_LIB_EDIT_PIN_TABLE::OnExportButtonClick().
|
protectedinherited |
Definition at line 38 of file column_formatter.cpp.
References BOOL_FALSE, BOOL_TRUE, m_boolFormat, TRUE_FALSE, and ZERO_ONE.
Referenced by PIN_INFO_FORMATTER::Format().
|
inline |
Update the pin from the given col/string.
How much this should follow the format is debatable, but for now it's fairly permissive (e.g. bools import as 0/1 and no/yes).
Definition at line 187 of file dialog_lib_edit_pin_table.cpp.
References COLUMN_FORMATTER::boolFromString(), SCH_PIN::ChangeLength(), COL_BODY_STYLE, COL_LENGTH, COL_NAME, COL_NAME_SIZE, COL_NUMBER, COL_NUMBER_SIZE, COL_ORIENTATION, COL_POSX, COL_POSY, COL_SHAPE, COL_TYPE, COL_UNIT, COL_VISIBLE, DEMORGAN_ALL, LIB_SYMBOL::GetBodyStyleCount(), SCH_ITEM::GetBodyStyleDescription(), SCH_ITEM::GetParentSymbol(), SCH_PIN::GetPosition(), LIB_SYMBOL::GetUnitCount(), SCH_ITEM::GetUnitDisplayName(), COLUMN_FORMATTER::m_reporter, COLUMN_FORMATTER::m_unitsProvider, MatchTranslationOrNative(), PinOrientationNames(), PinShapeNames(), PinTypeNames(), SCH_ITEM::SetBodyStyle(), SCH_PIN::SetName(), SCH_PIN::SetNameTextSize(), SCH_PIN::SetNumber(), SCH_PIN::SetNumberTextSize(), SCH_PIN::SetOrientation(), SCH_PIN::SetPosition(), SCH_PIN::SetShape(), SCH_PIN::SetType(), SCH_ITEM::SetUnit(), SCH_PIN::SetVisible(), UNITS_ALL, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DIALOG_LIB_EDIT_PIN_TABLE::OnImportButtonClick(), and PIN_TABLE_DATA_MODEL::SetValue().
|
protectedinherited |
Definition at line 55 of file column_formatter.h.
Referenced by COLUMN_FORMATTER(), and stringFromBool().
|
protectedinherited |
Definition at line 54 of file column_formatter.h.
Referenced by COLUMN_FORMATTER(), PAD_INFO_FORMATTER::Format(), and PIN_INFO_FORMATTER::Format().
|
protectedinherited |
Definition at line 56 of file column_formatter.h.
Referenced by COLUMN_FORMATTER(), and PIN_INFO_FORMATTER::UpdatePin().
|
protectedinherited |
Definition at line 53 of file column_formatter.h.
Referenced by COLUMN_FORMATTER(), PAD_INFO_FORMATTER::Format(), PIN_INFO_FORMATTER::Format(), PAD_INFO_FORMATTER::UpdatePad(), and PIN_INFO_FORMATTER::UpdatePin().