|
KiCad PCB EDA Suite
|
The footprint wizard manager interfaces with API_PLUGINs that can generate footprints. More...
#include <footprint_wizard.h>
Public Member Functions | |
| FOOTPRINT_WIZARD_MANAGER () | |
| ~FOOTPRINT_WIZARD_MANAGER ()=default | |
| void | ReloadWizards () |
| Goes through the list of IPC API plugins that provide wizard actions and attempts to refresh the info of each one, placing the ones that work in to the internal list returned by Wizards(). | |
| std::optional< FOOTPRINT_WIZARD * > | GetWizard (const wxString &aIdentifier) |
| std::vector< FOOTPRINT_WIZARD * > | Wizards () const |
| tl::expected< FOOTPRINT *, wxString > | Generate (FOOTPRINT_WIZARD *aWizard) |
| Generates a footprint using a given wizard. | |
Static Public Member Functions | |
| static bool | RefreshInfo (FOOTPRINT_WIZARD *aWizard) |
| Runs a wizard plugin with the –get-info argument, which should result in the plugin dumping a WizardInfo protobuf message in JSON format to stdout. | |
Private Attributes | |
| std::map< wxString, std::unique_ptr< FOOTPRINT_WIZARD > > | m_wizards |
The footprint wizard manager interfaces with API_PLUGINs that can generate footprints.
It uses API_PLUGIN_MANAGER to enumerate the loaded wizard plugins, and filters to those that generate footprints. It then handles calling the plugin to query capabilities, generate footprints, and so on.
Definition at line 162 of file footprint_wizard.h.
|
inline |
Definition at line 165 of file footprint_wizard.h.
|
default |
| tl::expected< FOOTPRINT *, wxString > FOOTPRINT_WIZARD_MANAGER::Generate | ( | FOOTPRINT_WIZARD * | aWizard | ) |
Generates a footprint using a given wizard.
| aWizard | is the wizard data instance (with parameters set) to feed into the wizard |
Definition at line 125 of file footprint_wizard.cpp.
References _, FOOTPRINT_WIZARD::Identifier(), FOOTPRINT_WIZARD::Info(), API_PLUGIN_MANAGER::InvokeActionSync(), WIZARD_INFO::meta, WIZARD_META_INFO::name, WIZARD_INFO::parameters, Pgm(), and traceApi.
Referenced by FOOTPRINT_WIZARD_FRAME::GetBuiltFootprint(), and FOOTPRINT_WIZARD_FRAME::RegenerateFootprint().
| std::optional< FOOTPRINT_WIZARD * > FOOTPRINT_WIZARD_MANAGER::GetWizard | ( | const wxString & | aIdentifier | ) |
Definition at line 80 of file footprint_wizard.cpp.
References m_wizards.
|
static |
Runs a wizard plugin with the –get-info argument, which should result in the plugin dumping a WizardInfo protobuf message in JSON format to stdout.
Definition at line 89 of file footprint_wizard.cpp.
References WIZARD_INFO::FromProto(), FOOTPRINT_WIZARD::Identifier(), FOOTPRINT_WIZARD::Info(), info, API_PLUGIN_MANAGER::InvokeActionSync(), and Pgm().
Referenced by ReloadWizards().
| void FOOTPRINT_WIZARD_MANAGER::ReloadWizards | ( | ) |
Goes through the list of IPC API plugins that provide wizard actions and attempts to refresh the info of each one, placing the ones that work in to the internal list returned by Wizards().
Note that doing so clears the existing list and invalidates any existing pointers to wizards.
Definition at line 39 of file footprint_wizard.cpp.
References FOOTPRINT_WIZARD, API_PLUGIN_MANAGER::GetActionsForScope(), m_wizards, Pgm(), and RefreshInfo().
Referenced by DIALOG_FOOTPRINT_WIZARD_LIST::initLists().
| std::vector< FOOTPRINT_WIZARD * > FOOTPRINT_WIZARD_MANAGER::Wizards | ( | ) | const |
Definition at line 59 of file footprint_wizard.cpp.
References FOOTPRINT_WIZARD::Info(), m_wizards, WIZARD_INFO::meta, and WIZARD_META_INFO::name.
Referenced by DIALOG_FOOTPRINT_WIZARD_LIST::initLists(), and DIALOG_FOOTPRINT_WIZARD_LIST::OnCellFpGeneratorClick().
|
private |
Definition at line 197 of file footprint_wizard.h.
Referenced by GetWizard(), ReloadWizards(), and Wizards().