|
KiCad PCB EDA Suite
|
Class that handles conversion of various pad 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 | |
| PAD_INFO_FORMATTER (UNITS_PROVIDER &aUnitsProvider, bool aIncludeUnits, BOOL_FORMAT aBoolFormat, REPORTER &aReporter) | |
| wxString | Format (const PAD &aPin, int aFieldId) const |
| void | UpdatePad (PAD &aPad, const wxString &aValue, int aFieldId) const |
| Update the pad 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 pad data fields into strings for display in the UI or serialisation to formats like CSV.
This is the footprint editor partner to PIN_INFO_FORMATTER
Definition at line 247 of file dialog_fp_edit_pad_table.cpp.
|
stronginherited |
| Enumerator | |
|---|---|
| ZERO_ONE | |
| TRUE_FALSE | |
Definition at line 31 of file column_formatter.h.
|
inline |
Definition at line 250 of file dialog_fp_edit_pad_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 256 of file dialog_fp_edit_pad_table.cpp.
References PADSTACK::ALL_LAYERS, DIALOG_FP_EDIT_PAD_TABLE::COL_COUNT, DIALOG_FP_EDIT_PAD_TABLE::COL_DRILL_X, DIALOG_FP_EDIT_PAD_TABLE::COL_DRILL_Y, DIALOG_FP_EDIT_PAD_TABLE::COL_NUMBER, DIALOG_FP_EDIT_PAD_TABLE::COL_P2D_DELAY, DIALOG_FP_EDIT_PAD_TABLE::COL_P2D_LENGTH, DIALOG_FP_EDIT_PAD_TABLE::COL_POS_X, DIALOG_FP_EDIT_PAD_TABLE::COL_POS_Y, DIALOG_FP_EDIT_PAD_TABLE::COL_SHAPE, DIALOG_FP_EDIT_PAD_TABLE::COL_SIZE_X, DIALOG_FP_EDIT_PAD_TABLE::COL_SIZE_Y, DIALOG_FP_EDIT_PAD_TABLE::COL_TYPE, PAD::GetCenter(), PAD::GetDrillSize(), PAD::GetNumber(), PAD::GetPadToDieDelay(), PAD::GetPadToDieLength(), GetPadTypeString(), PAD::GetShape(), PAD::GetSize(), COLUMN_FORMATTER::m_includeUnits, COLUMN_FORMATTER::m_unitsProvider, ShapeToString(), TIME, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DIALOG_FP_EDIT_PAD_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 pad 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 318 of file dialog_fp_edit_pad_table.cpp.
References DIALOG_FP_EDIT_PAD_TABLE::COL_DRILL_X, DIALOG_FP_EDIT_PAD_TABLE::COL_DRILL_Y, DIALOG_FP_EDIT_PAD_TABLE::COL_NUMBER, DIALOG_FP_EDIT_PAD_TABLE::COL_P2D_DELAY, DIALOG_FP_EDIT_PAD_TABLE::COL_P2D_LENGTH, DIALOG_FP_EDIT_PAD_TABLE::COL_POS_X, DIALOG_FP_EDIT_PAD_TABLE::COL_POS_Y, DIALOG_FP_EDIT_PAD_TABLE::COL_SHAPE, DIALOG_FP_EDIT_PAD_TABLE::COL_SIZE_X, DIALOG_FP_EDIT_PAD_TABLE::COL_SIZE_Y, DIALOG_FP_EDIT_PAD_TABLE::COL_TYPE, PADSTACK::ForEachUniqueLayer(), PAD::GetDrillSize(), PAD::GetPosition(), PAD::GetSize(), COLUMN_FORMATTER::m_unitsProvider, PAD::Padstack(), PAD::SetDrillSize(), PAD::SetNumber(), PAD::SetPadToDieDelay(), PAD::SetPadToDieLength(), SetPadTypeFromString(), PAD::SetPosition(), PAD::SetShape(), PAD::SetSize(), ShapeFromString(), TIME, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by DIALOG_FP_EDIT_PAD_TABLE::OnImportButtonClick().
|
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().