|
KiCad PCB EDA Suite
|
#include <algorithm>#include <set>#include <wx/app.h>#include <wx/display.h>#include <wx/filedlg.h>#include <wx/filename.h>#include <wx/menu.h>#include <wx/regex.h>#include <wx/settings.h>#include <wx/stdpaths.h>#include <wx/utils.h>#include <bitmaps.h>#include <confirm.h>#include <core/kicad_algo.h>#include <database/database_autofill.h>#include <database/database_lib_settings.h>#include <dialogs/dialog_database_lib_settings.h>#include <eda_draw_frame.h>#include <eeschema_settings.h>#include <grid_tricks.h>#include <i18n_utility.h>#include <kiplatform/ui.h>#include <lib_symbol.h>#include <pgm_base.h>#include <reporter.h>#include <sch_io/database/sch_io_database.h>#include <thread_pool.h>#include <scoped_set_reset.h>#include <settings/json_settings_internals.h>#include <settings/common_settings.h>#include <settings/settings_manager.h>#include <string_utils.h>#include <widgets/db_lib_preview_panel.h>#include <widgets/grid_combobox.h>#include <widgets/std_bitmap_button.h>#include <widgets/wx_grid.h>#include <widgets/wx_infobar.h>#include <wildcards_and_files_ext.h>Go to the source code of this file.
Classes | |
| struct | AUTOFILL_FIELD |
| A symbol field that autofill maps from a like-named column. More... | |
Enumerations | |
| enum | FIELD_COLUMNS { FIELD_COL_COLUMN = 0 , FIELD_COL_NAME , FIELD_COL_VISIBLE_ON_ADD , FIELD_COL_VISIBLE_IN_CHOOSER , FIELD_COL_SHOW_NAME , FIELD_COL_INHERIT } |
Functions | |
| static void | relayoutPage (wxScrolledWindow *aPage) |
| Re-lays out a scrolled page and refits its scroll area after its contents change size. | |
| template<typename MAP> | |
| static bool | isAutofilled (const MAP &aAutofilled, const typename MAP::key_type &aKey, const std::string &aValue) |
| True if autofill wrote aValue for aKey and the user has not changed it since. | |
| static wxString | displayName (const DATABASE_LIB_TABLE &aTable) |
| static wxString | describeFailure (const DATABASE_CONNECTION &aConn, const DATABASE_SOURCE &aSource) |
| static const std::vector< AUTOFILL_FIELD > & | autofillFields () |
| static std::string | fieldChoiceId (const char *aFieldName) |
| static DB_AUTOFILL::ROLE | autofillRole (const std::string &aChoiceId, const std::vector< wxString > &aTerms) |
| static DATABASE_FIELD_MAPPING * | findField (DATABASE_LIB_TABLE &aLib, const char *aName) |
Variables | |
| static constexpr size_t | PREVIEW_ROW_LIMIT = 200 |
| Rows read for the Data page and preview; enough to judge a mapping without loading a whole table. | |
| static constexpr int | PREVIEW_MIN_WIDTH_DIP = 450 |
| Narrowest the preview next to the settings can be before its tree columns are cut off. | |
| static constexpr int | PREVIEW_DEBOUNCE_MS = 750 |
| Delay after the last edit before the preview is rebuilt. | |
| enum FIELD_COLUMNS |
| Enumerator | |
|---|---|
| FIELD_COL_COLUMN | |
| FIELD_COL_NAME | |
| FIELD_COL_VISIBLE_ON_ADD | |
| FIELD_COL_VISIBLE_IN_CHOOSER | |
| FIELD_COL_SHOW_NAME | |
| FIELD_COL_INHERIT | |
Definition at line 90 of file dialog_database_lib_settings.cpp.
|
static |
Definition at line 148 of file dialog_database_lib_settings.cpp.
References _HKI.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::autofillColumns(), and DIALOG_DATABASE_LIB_SETTINGS::OnFieldCellChanged().
|
static |
Definition at line 165 of file dialog_database_lib_settings.cpp.
References GetAppSettings(), DB_AUTOFILL::ROLE::remembered, and DB_AUTOFILL::ROLE::terms.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::autofillColumns().
|
static |
Definition at line 107 of file dialog_database_lib_settings.cpp.
References _, DATABASE_CONNECTION::ClassifyFailure(), DATABASE_SOURCE::connection_string, DATABASE_SOURCE::dsn, From_UTF8(), DATABASE_CONNECTION::GetLastError(), DATABASE_CONNECTION::GetLastState(), and DATABASE_SOURCE::timeout.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::onConnectFinished().
|
static |
Definition at line 101 of file dialog_database_lib_settings.cpp.
References _, From_UTF8(), and DATABASE_LIB_TABLE::name.
Referenced by RULE_EDITOR_DIALOG_BASE::appendRuleTreeItem(), RHI_VULKAN_DEVICE::CreateSurface(), LIB_SYMBOL::Deserialize(), ALLEGRO::LAYER_MAPPER::FinalizeLayers(), DIALOG_DATABASE_LIB_SETTINGS::loadLibraryList(), DIALOG_DATABASE_LIB_SETTINGS::OnLibraryChanged(), ORCAD_CONVERTER::placePowerSymbol(), DIALOG_GIT_SWITCH::PopulateBranchList(), ORCAD_CONVERTER::prepareGlobalNetNames(), SCH_EDIT_FRAME::RefreshNetNavigator(), LIB_SYMBOL::Serialize(), PANEL_FP_PROPERTIES_3D_MODEL::set3DModelRow(), SIMULATOR_FRAME_UI::ToggleSmithChart(), DIALOG_DATABASE_LIB_SETTINGS::updateDataLabels(), and DIALOG_DATABASE_LIB_SETTINGS::updatePreview().
|
static |
Definition at line 159 of file dialog_database_lib_settings.cpp.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::autofillColumns(), and DIALOG_DATABASE_LIB_SETTINGS::OnFieldCellChanged().
|
static |
Definition at line 187 of file dialog_database_lib_settings.cpp.
References DATABASE_LIB_TABLE::fields, and DATABASE_FIELD_MAPPING::name.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::autofillColumns(), PADS_SCH::PADS_SCH_SCHEMATIC_BUILDER::CreateTitleBlock(), findField(), and SCH_CONNECTIVITY::LIBRARY_SYMBOL_FACT::Matches().
|
static |
True if autofill wrote aValue for aKey and the user has not changed it since.
Definition at line 82 of file dialog_database_lib_settings.cpp.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::autofillColumns(), and DIALOG_DATABASE_LIB_SETTINGS::updateAutofillStyle().
|
static |
Re-lays out a scrolled page and refits its scroll area after its contents change size.
Definition at line 73 of file dialog_database_lib_settings.cpp.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::loadLibrary(), DIALOG_DATABASE_LIB_SETTINGS::setConnectionStatus(), DIALOG_DATABASE_LIB_SETTINGS::updateDsnDriver(), DIALOG_DATABASE_LIB_SETTINGS::updateLibraryListHints(), DIALOG_DATABASE_LIB_SETTINGS::updateSourceControls(), and DIALOG_DATABASE_LIB_SETTINGS::updateSymbolExample().
|
staticconstexpr |
Delay after the last edit before the preview is rebuilt.
Definition at line 70 of file dialog_database_lib_settings.cpp.
|
staticconstexpr |
Narrowest the preview next to the settings can be before its tree columns are cut off.
Definition at line 67 of file dialog_database_lib_settings.cpp.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::onSplitterIdle().
|
staticconstexpr |
Rows read for the Data page and preview; enough to judge a mapping without loading a whole table.
Definition at line 64 of file dialog_database_lib_settings.cpp.
Referenced by DIALOG_DATABASE_LIB_SETTINGS::ensureSample(), DIALOG_DATABASE_LIB_SETTINGS::updateDataLabels(), and DIALOG_DATABASE_LIB_SETTINGS::updatePreview().