|
KiCad PCB EDA Suite
|
A database library table will be mapped to a sub-library provided by the database library entry in the KiCad symbol/footprint library table. More...
#include <database_lib_settings.h>
Public Attributes | |
| std::string | name |
| KiCad library nickname (will form part of the LIB_ID) | |
| std::string | table |
| Database table to pull content from. | |
| std::string | key_col |
| Unique key column name (will form part of the LIB_ID) | |
| std::string | symbols_col |
| Column name containing KiCad symbol refs. | |
| std::string | footprints_col |
| Column name containing KiCad footprint refs. | |
| std::string | pins_col |
| Column name containing JSON pin assignments (optional) | |
| MAPPABLE_SYMBOL_PROPERTIES | properties |
| std::vector< DATABASE_FIELD_MAPPING > | fields |
| nlohmann::json | source |
| Raw JSON as loaded; untouched keys are written back verbatim. | |
A database library table will be mapped to a sub-library provided by the database library entry in the KiCad symbol/footprint library table.
A single database library config file (managed by this class) may contain more than one table mapping, and each will have its own nickname.
The LIB_ID for parts placed from this library will be constructed from the nickname of the database library itself, plus the nickname of the particular sub-library and the value of the key column for the placed part.
For example, if a database library is configured with the nickname "PartsDB" and it provides a table called "Capacitors", with key_col set to "Part Number", the LIB_ID for a capacitor placed from this table will look something like PartsDB-Capacitors:CAP-001
Definition at line 98 of file database_lib_settings.h.
| std::vector<DATABASE_FIELD_MAPPING> DATABASE_LIB_TABLE::fields |
Definition at line 108 of file database_lib_settings.h.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::autofillColumns(), SCH_IO_DATABASE::connect(), DIALOG_DATABASE_LIB_SETTINGS::fieldForColumn(), findField(), DIALOG_DATABASE_LIB_SETTINGS::loadFields(), SCH_IO_DATABASE::loadSymbolFromRow(), DIALOG_DATABASE_LIB_SETTINGS::OnAddField(), DIALOG_DATABASE_LIB_SETTINGS::OnAddUnmappedColumns(), DIALOG_DATABASE_LIB_SETTINGS::OnDataLabelRightClick(), DIALOG_DATABASE_LIB_SETTINGS::OnFieldCellChanged(), DIALOG_DATABASE_LIB_SETTINGS::swapFields(), and DATABASE_LIB_SETTINGS::tableToJson().
| std::string DATABASE_LIB_TABLE::footprints_col |
Column name containing KiCad footprint refs.
Definition at line 104 of file database_lib_settings.h.
Referenced by SCH_IO_DATABASE::connect(), SCH_IO_DATABASE::loadSymbolFromRow(), and DATABASE_LIB_SETTINGS::tableToJson().
| std::string DATABASE_LIB_TABLE::key_col |
Unique key column name (will form part of the LIB_ID)
Definition at line 102 of file database_lib_settings.h.
Referenced by SCH_IO_DATABASE::connect(), SCH_IO_DATABASE::SymbolNameForRow(), DATABASE_LIB_SETTINGS::tableToJson(), DIALOG_DATABASE_LIB_SETTINGS::updateColumnWarnings(), and DIALOG_DATABASE_LIB_SETTINGS::updatePreview().
| std::string DATABASE_LIB_TABLE::name |
KiCad library nickname (will form part of the LIB_ID)
Definition at line 100 of file database_lib_settings.h.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::autofillColumns(), DIALOG_DATABASE_LIB_SETTINGS::autofillTable(), displayName(), SCH_IO_DATABASE::GetSubLibraryNames(), DIALOG_DATABASE_LIB_SETTINGS::loadLibrary(), SCH_IO_DATABASE::LoadSymbol(), SCH_IO_DATABASE::loadSymbolFromRow(), DIALOG_DATABASE_LIB_SETTINGS::storeLibrary(), SCH_IO_DATABASE::SymbolNameForRow(), DATABASE_LIB_SETTINGS::tableToJson(), and DIALOG_DATABASE_LIB_SETTINGS::updateSymbolExample().
| std::string DATABASE_LIB_TABLE::pins_col |
Column name containing JSON pin assignments (optional)
Definition at line 105 of file database_lib_settings.h.
Referenced by SCH_IO_DATABASE::connect(), SCH_IO_DATABASE::loadSymbolFromRow(), and DATABASE_LIB_SETTINGS::tableToJson().
| MAPPABLE_SYMBOL_PROPERTIES DATABASE_LIB_TABLE::properties |
Definition at line 107 of file database_lib_settings.h.
Referenced by SCH_IO_DATABASE::connect(), SCH_IO_DATABASE::loadSymbolFromRow(), and DATABASE_LIB_SETTINGS::tableToJson().
| nlohmann::json DATABASE_LIB_TABLE::source |
Raw JSON as loaded; untouched keys are written back verbatim.
Definition at line 110 of file database_lib_settings.h.
Referenced by DATABASE_LIB_SETTINGS::tableToJson().
| std::string DATABASE_LIB_TABLE::symbols_col |
Column name containing KiCad symbol refs.
Definition at line 103 of file database_lib_settings.h.
Referenced by SCH_IO_DATABASE::connect(), SCH_IO_DATABASE::loadSymbolFromRow(), and DATABASE_LIB_SETTINGS::tableToJson().
| std::string DATABASE_LIB_TABLE::table |
Database table to pull content from.
Definition at line 101 of file database_lib_settings.h.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::autofillColumns(), DIALOG_DATABASE_LIB_SETTINGS::autofillTable(), SCH_IO_DATABASE::connect(), DIALOG_DATABASE_LIB_SETTINGS::loadColumnChoices(), DIALOG_DATABASE_LIB_SETTINGS::loadDataGrid(), DIALOG_DATABASE_LIB_SETTINGS::loadLibrary(), DIALOG_DATABASE_LIB_SETTINGS::OnAddUnmappedColumns(), DIALOG_DATABASE_LIB_SETTINGS::OnDataLabelRightClick(), DIALOG_DATABASE_LIB_SETTINGS::OnTableChanged(), DIALOG_DATABASE_LIB_SETTINGS::storeLibrary(), DATABASE_LIB_SETTINGS::tableToJson(), DIALOG_DATABASE_LIB_SETTINGS::updateColumnWarnings(), DIALOG_DATABASE_LIB_SETTINGS::updateDataLabels(), DIALOG_DATABASE_LIB_SETTINGS::updatePreview(), DIALOG_DATABASE_LIB_SETTINGS::updateSymbolExample(), and DIALOG_DATABASE_LIB_SETTINGS::updateTableWarning().