41#include <wx/filedlg.h>
71 { wxID_CANCEL,
_(
"Close" ) },
72 { wxID_APPLY,
_(
"Update PCB" ) } } );
92 wxString dirPath = wxFileName(
Prj().GetProjectFullName() ).GetPath();
95 if( !filename.IsEmpty() )
97 wxFileName fn = filename;
98 dirPath = fn.GetPath();
99 filename = fn.GetFullName();
103 wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
105 if( FilesDialog.ShowModal() != wxID_OK )
126 wxMessageBox(
_(
"Please choose a valid netlist file." ) );
130 if( !fn.FileExists() )
132 wxMessageBox(
_(
"The netlist file does not exist." ) );
158 if( fn.FileExists() )
193 wxFileName fn = netlistFileName;
195 if( !fn.IsOk() || !fn.FileExists() )
204 msg.Printf(
_(
"Reading netlist file '%s'.\n" ), netlistFileName );
208 msg =
_(
"Using reference designators to match symbols and footprints.\n" );
210 msg =
_(
"Using tstamps (unique IDs) to match symbols and footprints.\n" );
221 if( !
m_parent->ReadNetlistFromFile( netlistFileName,
netlist, reporter ) )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
Update the BOARD with a new netlist.
void SetReporter(REPORTER *aReporter)
Enable dry run mode (just report, no changes to PCB).
bool UpdateNetlist(NETLIST &aNetlist)
Update the board's components according to the new netlist.
void SetIsDryRun(bool aEnabled)
void SetDeleteUnusedFootprints(bool aEnabled)
void SetOverrideLocks(bool aOverride)
void SetReplaceFootprints(bool aEnabled)
void SetLookupByTimestamp(bool aEnabled)
void SetTransferGroups(bool aEnabled)
wxCheckBox * m_cbDeleteExtraFootprints
wxCheckBox * m_cbUpdateFootprints
wxCheckBox * m_cbTransferGroups
wxTextCtrl * m_NetlistFilenameCtrl
DIALOG_IMPORT_NETLIST_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Import Netlist"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
STD_BITMAP_BUTTON * m_browseButton
wxRadioBox * m_matchByTimestamp
wxCheckBox * m_cbOverrideLocks
wxButton * m_sdbSizerCancel
WX_HTML_REPORT_PANEL * m_MessageWindow
void onFilenameChanged(bool aLoadNetlist)
void onUpdatePCB(wxCommandEvent &event) override
PCB_EDIT_FRAME * m_parent
void loadNetlist(bool aDryRun)
void onImportNetlist(wxCommandEvent &event) override
void OnFilenameKillFocus(wxFocusEvent &event) override
void OnOptionChanged(wxCommandEvent &event) override
void OnMatchChanged(wxCommandEvent &event) override
void onBrowseNetlistFiles(wxCommandEvent &event) override
DIALOG_IMPORT_NETLIST(PCB_EDIT_FRAME *aParent, wxString &aNetlistFullFilename)
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
An interface for classes handling user events controlling the view behavior such as zooming,...
virtual VECTOR2D GetMousePosition(bool aWorldCoordinates=true) const =0
Return the current mouse pointer position.
virtual void SetCursorPosition(const VECTOR2D &aPosition, bool aWarpView=true, bool aTriggeredByArrows=false, long aArrowCommand=0)=0
Move cursor to the requested position expressed in world coordinates.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
static TOOL_ACTION move
move or drag an item
The main frame for Pcbnew.
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
void InstallNetlistFrame()
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & ReportHead(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Places the report at the beginning of the list for objects that support ordering.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
Report a string with a given severity.
static wxString NetlistFileWildcard()
Definition of file extensions used in Kicad.