KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCB::IFACE Struct Reference
Inheritance diagram for PCB::IFACE:
KIFACE_BASE UNITS_PROVIDER KIFACE

Public Member Functions

 IFACE (const char *aName, KIWAY::FACE_T aType)
 
bool OnKifaceStart (PGM_BASE *aProgram, int aCtlBits, KIWAY *aKiway) override
 Typically start_common() is called from here.
 
void Reset () override
 Reloads global state.
 
void OnKifaceEnd () override
 Called just once just before the DSO is to be unloaded.
 
wxWindow * CreateKiWindow (wxWindow *aParent, int aClassId, KIWAY *aKiway, int aCtlBits=0) override
 Create a wxWindow for the current project.
 
void * IfaceOrAddress (int aDataId) override
 Return a pointer to the requested object.
 
void SaveFileAs (const wxString &aProjectBasePath, const wxString &aSrcProjectName, const wxString &aNewProjectBasePath, const wxString &aNewProjectName, const wxString &aSrcFilePath, wxString &aErrors) override
 Saving a file under a different name is delegated to the various KIFACEs because the project doesn't know the internal format of the various files (which may have paths in them that need updating).
 
int HandleJob (JOB *aJob) override
 
bool HandleJobConfig (JOB *aJob, wxWindow *aParent) override
 
const wxString Name ()
 
APP_SETTINGS_BASEKifaceSettings () const
 
void InitSettings (APP_SETTINGS_BASE *aSettings)
 
int StartFlags () const
 Return whatever was passed as aCtlBits to OnKifaceStart().
 
bool IsSingle () const
 Is this KIFACE running under single_top?
 
const wxString & GetHelpFileName () const
 Return just the basename portion of the current help file.
 
SEARCH_STACKKifaceSearch ()
 Only for DSO specific 'non-library' files.
 
void GetActions (std::vector< TOOL_ACTION * > &aActions) const override
 Append this Kiface's registered actions to the given list.
 
EDA_UNITS GetUserUnits () const
 
void SetUserUnits (EDA_UNITS aUnits)
 
virtual void GetUnitPair (EDA_UNITS &aPrimaryUnit, EDA_UNITS &aSecondaryUnits)
 
const EDA_IU_SCALEGetIuScale () const
 
virtual ORIGIN_TRANSFORMSGetOriginTransforms ()
 
wxString StringFromValue (double aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
 Converts aValue in internal units into a united string.
 
wxString StringFromValue (const EDA_ANGLE &aValue, bool aAddUnitLabel=false) const
 
wxString StringFromOptionalValue (std::optional< int > aValue, bool aAddUnitLabel=false, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
 Converts an optional aValue in internal units into a united string.
 
wxString MessageTextFromValue (double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
 A lower-precision version of StringFromValue().
 
wxString MessageTextFromValue (const EDA_ANGLE &aValue, bool aAddUnitLabel=true) const
 
wxString MessageTextFromMinOptMax (const MINOPTMAX< int > &aValue) const
 
int ValueFromString (const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
 Converts aTextValue in aUnits to internal units used by the frame.
 
std::optional< int > OptionalValueFromString (const wxString &aTextValue, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
 Converts aTextValue in aUnits to internal units used by the frame.
 
EDA_ANGLE AngleValueFromString (const wxString &aTextValue) const
 

Static Public Attributes

static const wxString NullUiString = ""
 The string that is used in the UI to represent a null value.
 

Protected Member Functions

bool start_common (int aCtlBits)
 Common things to do for a top program module, during OnKifaceStart().
 
void end_common ()
 Common things to do for a top program module, during OnKifaceEnd();.
 

Protected Attributes

int m_start_flags
 flags provided in OnKifaceStart()
 

Private Member Functions

bool loadGlobalLibTable ()
 

Private Attributes

std::unique_ptr< PCBNEW_JOBS_HANDLERm_jobHandler
 
KIWAY::FACE_T m_id
 
BIN_MOD m_bm
 
const EDA_IU_SCALEm_iuScale
 
EDA_UNITS m_userUnits
 

Detailed Description

Definition at line 76 of file pcbnew.cpp.

Constructor & Destructor Documentation

◆ IFACE()

PCB::IFACE::IFACE ( const char *  aName,
KIWAY::FACE_T  aType 
)
inline

Definition at line 80 of file pcbnew.cpp.

Member Function Documentation

◆ AngleValueFromString()

EDA_ANGLE UNITS_PROVIDER::AngleValueFromString ( const wxString &  aTextValue) const
inlineinherited

◆ CreateKiWindow()

wxWindow * PCB::IFACE::CreateKiWindow ( wxWindow *  aParent,
int  aClassId,
KIWAY aKIWAY,
int  aCtlBits = 0 
)
inlineoverridevirtual

Create a wxWindow for the current project.

The caller must cast the return value into the known type.

Parameters
aParentmay be NULL or is otherwise the parent to connect under. If NULL then caller may want to connect the returned wxWindow into some hierarchy after this function returns.
aClassIdidentifies which wxFrame or wxDialog to retrieve, using a value known to the implementing KIFACE.
aKIWAYtells the window which KIWAY (and PROJECT) it is a participant in.
aCtlBitsconsists of bit flags from the set of KFCTL_* #defines above.
Returns
the window created and if not NULL, should be cast into the known type using and old school cast. dynamic_cast is problematic since it needs typeinfo probably not contained in the caller's link image.

Implements KIFACE_BASE.

Definition at line 91 of file pcbnew.cpp.

References KIWAY::CommonSettingsChanged(), DIALOG_CONFIGUREPATHS, DIALOG_PCB_LIBRARY_TABLE, FRAME_FOOTPRINT_CHOOSER, FRAME_FOOTPRINT_EDITOR, FRAME_FOOTPRINT_PREVIEW, FRAME_FOOTPRINT_VIEWER, FRAME_FOOTPRINT_WIZARD, FRAME_PCB_EDITOR, SETTINGS_MANAGER::GetAppSettings(), PGM_BASE::GetSettingsManager(), UNITS_PROVIDER::GetUserUnits(), InvokePcbLibTableEditor(), KIFACE_BASE::IsSingle(), KICAD_PCB_PORT_SERVICE_NUMBER, Kiface(), FOOTPRINT_PREVIEW_PANEL::New(), PANEL_FP_COLORS, PANEL_FP_DEFAULT_VALUES, PANEL_FP_DISPLAY_OPTIONS, PANEL_FP_EDIT_OPTIONS, PANEL_FP_GRIDS, PANEL_FP_ORIGINS_AXES, PANEL_PCB_DISPLAY_OPTS, PANEL_PCB_GRIDS, Pgm(), KIWAY::Player(), ScriptingSetPcbEditFrame(), KIWAY_HOLDER::SetKiway(), UNITS_PROVIDER::SetUserUnits(), and DIALOG_SHIM::ShowQuasiModal().

◆ end_common()

void KIFACE_BASE::end_common ( )
protectedinherited

◆ GetActions()

void KIFACE_BASE::GetActions ( std::vector< TOOL_ACTION * > &  aActions) const
inlineoverridevirtualinherited

Append this Kiface's registered actions to the given list.

Implements KIFACE.

Definition at line 118 of file kiface_base.h.

References ACTION_MANAGER::GetActionList().

Referenced by DIALOG_LIST_HOTKEYS::DIALOG_LIST_HOTKEYS(), and EDA_BASE_FRAME::ShowPreferences().

◆ GetHelpFileName()

const wxString & KIFACE_BASE::GetHelpFileName ( ) const
inlineinherited

Return just the basename portion of the current help file.

Definition at line 112 of file kiface_base.h.

References KIFACE_BASE::m_bm, and BIN_MOD::m_help_file.

Referenced by EDA_BASE_FRAME::help_name().

◆ GetIuScale()

◆ GetOriginTransforms()

virtual ORIGIN_TRANSFORMS & UNITS_PROVIDER::GetOriginTransforms ( )
inlinevirtualinherited

Reimplemented in EDA_BASE_FRAME, and PCB_BASE_FRAME.

Definition at line 62 of file units_provider.h.

◆ GetUnitPair()

virtual void UNITS_PROVIDER::GetUnitPair ( EDA_UNITS aPrimaryUnit,
EDA_UNITS aSecondaryUnits 
)
inlinevirtualinherited

◆ GetUserUnits()

EDA_UNITS UNITS_PROVIDER::GetUserUnits ( ) const
inlineinherited

Definition at line 45 of file units_provider.h.

References UNITS_PROVIDER::m_userUnits.

Referenced by DIALOG_BOOK_REPORTER::AddHTMLPage(), PANEL_SYMBOL_CHOOSER::constructRightPanel(), PG_UNIT_EDITOR::CreateControls(), CreateKiWindow(), DIALOG_SHIM::DIALOG_SHIM(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), PL_EDITOR_FRAME::DisplayGridMsg(), EDA_DRAW_FRAME::DisplayUnitsMsg(), DRAWING_TOOL::drawArc(), DRAWING_TOOL::drawOneBezier(), DRAWING_TOOL::drawShape(), DRAWING_TOOL::DrawSpecificationStackup(), EVT_GRID_CMD_CELL_CHANGED(), FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL(), PCB_NET_INSPECTOR_PANEL::generateReport(), RC_ITEM::GetJsonViolation(), GERBER_DRAW_ITEM::GetMsgPanelInfo(), WX_GRID::GetOptionalUnitValue(), UNITS_PROVIDER::GetUnitPair(), EDA_DRAW_FRAME::GetUnitPair(), WX_GRID::GetUnitValue(), GetUserUnits(), UNIT_BINDER::init(), FIELDS_GRID_TABLE::initGrid(), GERBVIEW_INSPECTION_TOOL::MeasureTool(), PCB_VIEWER_TOOLS::MeasureTool(), UNITS_PROVIDER::MessageTextFromMinOptMax(), UNITS_PROVIDER::MessageTextFromValue(), PANEL_SETUP_BOARD_STACKUP::onAdjustDielectricThickness(), WX_GRID::onCellEditorHidden(), PANEL_SETUP_BOARD_STACKUP::onExportToClipboard(), DIALOG_ERC::OnSaveReport(), PANEL_PREVIEW_3D_MODEL::onUnitsChanged(), PANEL_SETUP_NETCLASSES::onUnitsChanged(), UNIT_BINDER::onUnitsChanged(), DIALOG_TRACK_VIA_PROPERTIES::onUnitsChanged(), PANEL_SETUP_BOARD_STACKUP::onUnitsChanged(), DIALOG_GENERATORS::onUnitsChanged(), UNITS_PROVIDER::OptionalValueFromString(), PANEL_FOOTPRINT_CHOOSER::PANEL_FOOTPRINT_CHOOSER(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES(), PCB_FIELDS_GRID_TABLE::PCB_FIELDS_GRID_TABLE(), PG_UNIT_EDITOR::PG_UNIT_EDITOR(), PIN_TABLE_DATA_MODEL::PIN_TABLE_DATA_MODEL(), POSITION_RELATIVE_TOOL::PositionRelative(), DRC_TOOL::RunTests(), EDA_DRAW_FRAME::SaveSettings(), PCB_BASE_FRAME::SetBoard(), WX_GRID::SetUnitsProvider(), PIN_TABLE_DATA_MODEL::SetValue(), FIELDS_GRID_TABLE::SetValue(), PCB_FIELDS_GRID_TABLE::SetValue(), GERBVIEW_INSPECTION_TOOL::ShowDCodes(), UNITS_PROVIDER::StringFromOptionalValue(), UNITS_PROVIDER::StringFromValue(), COMMON_TOOLS::ToggleUnits(), EDA_DRAW_FRAME::ToggleUserUnits(), PCB_BASE_FRAME::unitsChangeRefresh(), EDITOR_CONDITIONS::unitsFunc(), GERBVIEW_FRAME::updateDCodeSelectBox(), PG_UNIT_EDITOR::UpdateFrame(), PL_EDITOR_FRAME::UpdateStatusBar(), DRC_TOOL::userUnits(), GRID::UserUnitsMessageText(), and UNITS_PROVIDER::ValueFromString().

◆ HandleJob()

int IFACE::HandleJob ( JOB aJob)
overridevirtual

Reimplemented from KIFACE.

Definition at line 571 of file pcbnew.cpp.

References m_jobHandler.

◆ HandleJobConfig()

bool IFACE::HandleJobConfig ( JOB aJob,
wxWindow *  aParent 
)
overridevirtual

Reimplemented from KIFACE.

Definition at line 577 of file pcbnew.cpp.

References m_jobHandler.

◆ IfaceOrAddress()

void * PCB::IFACE::IfaceOrAddress ( int  aDataId)
inlineoverridevirtual

Return a pointer to the requested object.

The safest way to use this is to retrieve a pointer to a static instance of an interface, similar to how the KIFACE interface is exported. But if you know what you are doing use it to retrieve anything you want.

Parameters
aDataIdidentifies which object you want the address of.
Returns
the object which must be cast into the know type.

Implements KIFACE_BASE.

Definition at line 306 of file pcbnew.cpp.

References GFootprintList, GFootprintTable, KIFACE_FOOTPRINT_LIST, KIFACE_GLOBAL_FOOTPRINT_TABLE, KIFACE_NEW_FOOTPRINT_TABLE, KIFACE_SCRIPTING_LEGACY, and PyInit__pcbnew().

◆ InitSettings()

◆ IsSingle()

◆ KifaceSearch()

SEARCH_STACK & KIFACE_BASE::KifaceSearch ( )
inlineinherited

Only for DSO specific 'non-library' files.

(The library search path is in the PROJECT class.)

Definition at line 116 of file kiface_base.h.

References KIFACE_BASE::m_bm, and BIN_MOD::m_search.

Referenced by CVPCB_MAINFRAME::buildEquivalenceList(), and EDA_BASE_FRAME::sys_search().

◆ KifaceSettings()

APP_SETTINGS_BASE * KIFACE_BASE::KifaceSettings ( ) const
inlineinherited

Definition at line 95 of file kiface_base.h.

References KIFACE_BASE::m_bm, and BIN_MOD::m_config.

Referenced by AUTOPLACER::AUTOPLACER(), SCH_EDIT_FRAME::CaptureHierarchyPaneSize(), EDA_BASE_FRAME::config(), BMP2CMP::IFACE::CreateKiWindow(), DIALOG_BOARD_REANNOTATE::DIALOG_BOARD_REANNOTATE(), DIALOG_COLOR_PICKER::DIALOG_COLOR_PICKER(), DIALOG_ERC::DIALOG_ERC(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_PRINT_GERBVIEW::DIALOG_PRINT_GERBVIEW(), DIALOG_PRINT_PCBNEW::DIALOG_PRINT_PCBNEW(), KIGFX::eeconfig(), PCB_IO_KICAD_SEXPR::FootprintSave(), DIALOG_PLOT_SCHEMATIC::getPlotOptions(), SCH_RENDER_SETTINGS::GetShowPageLimits(), LAYERS_MAP_DIALOG::initDialog(), DIALOG_PLOT_SCHEMATIC::initDlg(), DIALOG_ANNOTATE::InitValues(), DIALOG_EXPORT_NETLIST::InstallCustomPages(), EDA_DRAW_FRAME::loadCanvasTypeSetting(), LAYERS_MAP_DIALOG::OnGetSetup(), DIALOG_SHEET_PROPERTIES::OnInitDlg(), DIALOG_SYMBOL_PROPERTIES::OnInitDlg(), CV::IFACE::OnKifaceStart(), SCH::IFACE::OnKifaceStart(), GERBV::IFACE::OnKifaceStart(), PGE::IFACE::OnKifaceStart(), PCBCALC::IFACE::OnKifaceStart(), OnKifaceStart(), DIALOG_RESCUE_EACH::OnNeverShowClick(), SCH_EDIT_FRAME::onResizeNetNavigator(), LAYERS_MAP_DIALOG::OnStoreSetup(), DIALOG_EESCHEMA_PAGE_SETTINGS::onTransferDataToWindow(), SCH_EDIT_FRAME::OpenProjectFiles(), pcbconfig(), TRANSLINE_IDENT::ReadConfig(), PCB_EDIT_FRAME::redrawNetnames(), PCB_CALCULATOR_FRAME::SaveSettings(), PANEL_PCBNEW_ACTION_PLUGINS::TransferDataFromWindow(), RATSNEST_VIEW_ITEM::ViewDraw(), TRANSLINE_IDENT::WriteConfig(), DIALOG_EXPORT_NETLIST::WriteCurrentNetlistSetup(), DIALOG_ANNOTATE::~DIALOG_ANNOTATE(), DIALOG_COLOR_PICKER::~DIALOG_COLOR_PICKER(), DIALOG_EESCHEMA_PAGE_SETTINGS::~DIALOG_EESCHEMA_PAGE_SETTINGS(), and DIALOG_ERC::~DIALOG_ERC().

◆ loadGlobalLibTable()

◆ MessageTextFromMinOptMax()

wxString UNITS_PROVIDER::MessageTextFromMinOptMax ( const MINOPTMAX< int > &  aValue) const
inlineinherited

◆ MessageTextFromValue() [1/2]

wxString UNITS_PROVIDER::MessageTextFromValue ( const EDA_ANGLE aValue,
bool  aAddUnitLabel = true 
) const
inlineinherited

◆ MessageTextFromValue() [2/2]

wxString UNITS_PROVIDER::MessageTextFromValue ( double  aValue,
bool  aAddUnitLabel = true,
EDA_DATA_TYPE  aType = EDA_DATA_TYPE::DISTANCE 
) const
inlineinherited

A lower-precision version of StringFromValue().

Should ONLY be used for status text and messages. Not suitable for dialogs, files, etc. where the loss of precision matters.

Definition at line 127 of file units_provider.h.

References UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), and EDA_UNIT_UTILS::UI::MessageTextFromValue().

Referenced by CheckDuplicatePins(), CheckLibSymbol(), CheckLibSymbolGraphics(), DRC_TEST_PROVIDER_MATCHED_LENGTH::checkSkews(), DIALOG_BOARD_REANNOTATE::CoordTowxString(), GERBVIEW_FRAME::DisplayGridMsg(), GERBER_FILE_IMAGE::DisplayImageInfo(), DRAWING_TOOL::DrawBoardCharacteristics(), DRC_ENGINE::EvalRules(), PCB_NET_INSPECTOR_PANEL::formatLength(), DRC_TEST_PROVIDER::formatMsg(), SCH_LINE::GetItemDescription(), SCH_SHAPE::GetItemDescription(), DS_DRAW_ITEM_LINE::GetItemDescription(), DS_DRAW_ITEM_RECT::GetItemDescription(), PCB_TRACK::GetItemDescription(), SCH_BITMAP::GetMsgPanelInfo(), SCH_FIELD::GetMsgPanelInfo(), SCH_JUNCTION::GetMsgPanelInfo(), SCH_LABEL_BASE::GetMsgPanelInfo(), SCH_PIN::GetMsgPanelInfo(), SCH_TABLECELL::GetMsgPanelInfo(), SCH_TEXT::GetMsgPanelInfo(), SCH_TEXTBOX::GetMsgPanelInfo(), DS_DRAW_ITEM_BASE::GetMsgPanelInfo(), PCB_TUNING_PATTERN::GetMsgPanelInfo(), NETINFO_ITEM::GetMsgPanelInfo(), PAD::GetMsgPanelInfo(), PCB_DIMENSION_BASE::GetMsgPanelInfo(), PCB_DIM_ALIGNED::GetMsgPanelInfo(), PCB_DIM_LEADER::GetMsgPanelInfo(), PCB_REFERENCE_IMAGE::GetMsgPanelInfo(), PCB_TABLECELL::GetMsgPanelInfo(), PCB_TARGET::GetMsgPanelInfo(), PCB_TEXT::GetMsgPanelInfo(), PCB_TEXTBOX::GetMsgPanelInfo(), PCB_TRACK::GetMsgPanelInfo(), PCB_VIA::GetMsgPanelInfo(), ZONE::GetMsgPanelInfo(), STROKE_PARAMS::GetMsgPanelInfo(), GetNetNavigatorItemText(), SYMBOL_SEARCH_HANDLER::getResultCell(), POWER_SEARCH_HANDLER::getResultCell(), TEXT_SEARCH_HANDLER::getResultCell(), LABEL_SEARCH_HANDLER::getResultCell(), DIALOG_BOARD_REANNOTATE::MakeSampleText(), PCB_BASE_FRAME::MessageTextFromCoord(), test::DRC_TEST_PROVIDER_DIFF_PAIR_COUPLING::Run(), DRC_TEST_PROVIDER_MATCHED_LENGTH::runInternal(), DIALOG_BOARD_STATISTICS::saveReportClicked(), TUNING_STATUS_VIEW_ITEM::SetCurrent(), TUNING_STATUS_VIEW_ITEM::SetMinMax(), EDA_SHAPE::ShapeGetMsgPanelInfo(), showCoord(), TRACK_WIDTH_MENU::update(), DIFF_PAIR_MENU::update(), VIA_SIZE_MENU::update(), DIALOG_POSITION_RELATIVE::updateAnchorInfo(), BOARD_NETLIST_UPDATER::updateCopperZoneNets(), DIALOG_BOARD_STATISTICS::updateDrillGrid(), PCB_CONTROL::UpdateMessagePanel(), PL_EDITOR_FRAME::UpdateMsgPanelInfo(), SCH_BASE_FRAME::UpdateStatusBar(), GERBVIEW_FRAME::UpdateStatusBar(), PCB_BASE_FRAME::UpdateStatusBar(), and DIALOG_BOARD_STATISTICS::updateWidets().

◆ Name()

const wxString KIFACE_BASE::Name ( )
inlineinherited

Definition at line 90 of file kiface_base.h.

References KIFACE_BASE::m_bm, and BIN_MOD::m_name.

◆ OnKifaceEnd()

void IFACE::OnKifaceEnd ( )
overridevirtual

Called just once just before the DSO is to be unloaded.

It is called before static C++ destructors are called. A default implementation is supplied.

Reimplemented from KIFACE_BASE.

Definition at line 475 of file pcbnew.cpp.

References KIFACE_BASE::end_common().

◆ OnKifaceStart()

◆ OptionalValueFromString()

std::optional< int > UNITS_PROVIDER::OptionalValueFromString ( const wxString &  aTextValue,
EDA_DATA_TYPE  aType = EDA_DATA_TYPE::DISTANCE 
) const
inlineinherited

Converts aTextValue in aUnits to internal units used by the frame.

Allows the return of an empty optional if the string represents a null value (currently empty string)

Warning
This utilizes the current locale and will break if decimal formats differ
Parameters
aTypeis the type of this value, and controls the way the string is converted to a value
aTextValueA reference to a wxString object containing the string to convert.
Returns
internal units value

Definition at line 175 of file units_provider.h.

References EDA_UNIT_UTILS::UI::DoubleValueFromString(), UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), and UNITS_PROVIDER::NullUiString.

Referenced by WX_GRID::GetOptionalUnitValue(), and WX_GRID::onCellEditorHidden().

◆ Reset()

void IFACE::Reset ( )
overridevirtual

Reloads global state.

Reimplemented from KIFACE_BASE.

Definition at line 424 of file pcbnew.cpp.

References loadGlobalLibTable().

◆ SaveFileAs()

void IFACE::SaveFileAs ( const wxString &  aProjectBasePath,
const wxString &  aSrcProjectName,
const wxString &  aNewProjectBasePath,
const wxString &  aNewProjectName,
const wxString &  aSrcFilePath,
wxString &  aErrors 
)
overridevirtual

Saving a file under a different name is delegated to the various KIFACEs because the project doesn't know the internal format of the various files (which may have paths in them that need updating).

Reimplemented from KIFACE.

Definition at line 481 of file pcbnew.cpp.

References _, LIB_TABLE::At(), FILEEXT::BackupFileSuffix, FILEEXT::FootprintAssignmentFileExtension, LIB_TABLE::GetCount(), LIB_TABLE_ROW::GetFullURI(), FILEEXT::KiCadFootprintFileExtension, FILEEXT::KiCadPcbFileExtension, KiCopyFile(), FILEEXT::LegacyFootprintLibPathExtension, FILEEXT::LegacyPcbFileExtension, LIB_TABLE::Load(), LIB_TABLE::Save(), and LIB_TABLE_ROW::SetFullURI().

◆ SetUserUnits()

◆ start_common()

◆ StartFlags()

int KIFACE_BASE::StartFlags ( ) const
inlineinherited

Return whatever was passed as aCtlBits to OnKifaceStart().

Definition at line 102 of file kiface_base.h.

References KIFACE_BASE::m_start_flags.

◆ StringFromOptionalValue()

wxString UNITS_PROVIDER::StringFromOptionalValue ( std::optional< int >  aValue,
bool  aAddUnitLabel = false,
EDA_DATA_TYPE  aType = EDA_DATA_TYPE::DISTANCE 
) const
inlineinherited

Converts an optional aValue in internal units into a united string.

For readability, trailing 0s are removed if the mantissa has 3 or more digits. This function should be used to display values in dialogs because a value entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa if displayed in inch to avoid truncation or rounding made just by the printf function.

Parameters
aValue= optional value in internal units
aAddUnitLabel= true to add symbol unit to the string value
aTypeis the type of this value, and controls the way the value is converted to a string, and the suitable unit
Returns
A wxString object containing value and optionally the symbol unit (like 2.000 mm)

Definition at line 104 of file units_provider.h.

References UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), UNITS_PROVIDER::NullUiString, and EDA_UNIT_UTILS::UI::StringFromValue().

Referenced by WX_GRID::onCellEditorHidden(), and WX_GRID::SetOptionalUnitValue().

◆ StringFromValue() [1/2]

wxString UNITS_PROVIDER::StringFromValue ( const EDA_ANGLE aValue,
bool  aAddUnitLabel = false 
) const
inlineinherited

◆ StringFromValue() [2/2]

wxString UNITS_PROVIDER::StringFromValue ( double  aValue,
bool  aAddUnitLabel = false,
EDA_DATA_TYPE  aType = EDA_DATA_TYPE::DISTANCE 
) const
inlineinherited

Converts aValue in internal units into a united string.

For readability, trailing 0s are removed if the mantissa has 3 or more digits. This function should be used to display values in dialogs because a value entered in mm (for instance 2.0 mm) could need up to 8 digits mantissa if displayed in inch to avoid truncation or rounding made just by the printf function.

Parameters
aValue= value in internal units
aAddUnitLabel= true to add symbol unit to the string value
aTypeis the type of this value, and controls the way the value is converted to a string, and the suitable unit
Returns
A wxString object containing value and optionally the symbol unit (like 2.000 mm)

Definition at line 83 of file units_provider.h.

References UNITS_PROVIDER::GetIuScale(), UNITS_PROVIDER::GetUserUnits(), and EDA_UNIT_UTILS::UI::StringFromValue().

Referenced by DIALOG_PLOT::applyPlotSettings(), PANEL_SETUP_BOARD_STACKUP::computeBoardThickness(), MICROWAVE_TOOL::createFootprint(), MICROWAVE_TOOL::createMicrowaveInductor(), DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES(), PAD::doCheckPad(), DRAWING_TOOL::DrawSpecificationStackup(), VALIDATION_ERROR_TOO_LARGE< T >::Format(), VALIDATION_ERROR_TOO_SMALL< T >::Format(), DRC_TEST_PROVIDER::formatMsg(), PIN_TABLE_DATA_MODEL::GetValue(), FIELDS_GRID_TABLE::GetValue(), PCB_FIELDS_GRID_TABLE::GetValue(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectDRCError(), PANEL_SETUP_BOARD_STACKUP::lazyBuildRowUI(), PANEL_SETUP_BOARD_STACKUP::onAdjustDielectricThickness(), WX_GRID::onCellEditorHidden(), DIALOG_TRACK_VIA_PROPERTIES::onUnitsChanged(), reportMax(), reportMin(), reportOpt(), PANEL_SETUP_BOARD_STACKUP::setDefaultLayerWidths(), WX_GRID::SetUnitValue(), PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard(), PANEL_FP_EDITOR_DEFAULTS::TransferDataFromWindow(), PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataFromWindow(), PANEL_SETUP_CONSTRAINTS::TransferDataToWindow(), DIALOG_FOOTPRINT_PROPERTIES::Validate(), and DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate().

◆ ValueFromString()

Member Data Documentation

◆ m_bm

◆ m_id

KIWAY::FACE_T KIFACE_BASE::m_id
privateinherited

Definition at line 128 of file kiface_base.h.

Referenced by KIFACE_BASE::start_common().

◆ m_iuScale

const EDA_IU_SCALE& UNITS_PROVIDER::m_iuScale
privateinherited

Definition at line 200 of file units_provider.h.

Referenced by UNITS_PROVIDER::GetIuScale().

◆ m_jobHandler

std::unique_ptr<PCBNEW_JOBS_HANDLER> PCB::IFACE::m_jobHandler
private

Definition at line 346 of file pcbnew.cpp.

Referenced by HandleJob(), HandleJobConfig(), and OnKifaceStart().

◆ m_start_flags

◆ m_userUnits

EDA_UNITS UNITS_PROVIDER::m_userUnits
privateinherited

Definition at line 201 of file units_provider.h.

Referenced by UNITS_PROVIDER::GetUserUnits(), and UNITS_PROVIDER::SetUserUnits().

◆ NullUiString

const wxString UNITS_PROVIDER::NullUiString = ""
inlinestaticinherited

The string that is used in the UI to represent a null value.

Definition at line 197 of file units_provider.h.

Referenced by WX_GRID::GetOptionalUnitValue(), WX_GRID::onCellEditorHidden(), UNITS_PROVIDER::OptionalValueFromString(), and UNITS_PROVIDER::StringFromOptionalValue().


The documentation for this struct was generated from the following file: