42 #include <wx/filedlg.h> 62 m_netlistPath( aNetlistFullFilename ),
63 m_initialized( false ),
64 m_runDragCommand( false )
114 wxString dirPath = wxFileName(
Prj().GetProjectFullName() ).GetPath();
118 if( !filename.IsEmpty() )
120 wxFileName fn = filename;
121 dirPath = fn.GetPath();
122 filename = fn.GetFullName();
125 wxFileDialog FilesDialog(
this,
_(
"Select Netlist" ), dirPath, filename,
128 if( FilesDialog.ShowModal() != wxID_OK )
148 wxMessageBox(
_(
"Please choose a valid netlist file." ) );
152 if( !fn.FileExists() )
154 wxMessageBox(
_(
"The netlist file does not exist." ) );
180 if( fn.FileExists() )
215 wxFileName fn = netlistFileName;
217 if( !fn.IsOk() || !fn.FileExists() )
226 msg.Printf(
_(
"Reading netlist file '%s'.\n" ), netlistFileName );
230 msg =
_(
"Using reference designators to match symbols and footprints.\n" );
232 msg =
_(
"Using tstamps (unique IDs) to match symbols and footprints.\n" );
249 updater.SetIsDryRun( aDryRun );
253 updater.UpdateNetlist(
netlist );
void SetVisibleSeverities(int aSeverities)
wxCheckBox * m_cbUpdateFootprints
static bool m_matchByUUID
void SetLazyUpdate(bool aLazyUpdate)
Forces updating the HTML page, after the report is built in lazy mode If aSort = true,...
void onImportNetlist(wxCommandEvent &event) override
static TOOL_ACTION move
move or drag an item
KIGFX::VIEW_CONTROLS * GetViewControls() const
Return a pointer to the #VIEW_CONTROLS instance used in the panel.
virtual VECTOR2D GetMousePosition(bool aWorldCoordinates=true) const =0
Return the current mouse pointer position.
This file is part of the common library.
Update the BOARD with a new netlist.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
bool ReadNetlistFromFile(const wxString &aFilename, NETLIST &aNetlist, REPORTER &aReporter)
Read a netlist from a file into a NETLIST object.
void Flush(bool aSort=false)
Set the visible severity filter.
void InstallNetlistFrame()
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.
void SetReporter(REPORTER *aReporter)
Enable dry run mode (just report, no changes to PCB).
bool delete_extra_footprints
A pure virtual class used to derive REPORTER objects from.
void OnNetlistChanged(BOARD_NETLIST_UPDATER &aUpdater, bool *aRunDragCommand)
Called after netlist is updated.
DIALOG_NETLIST_IMPORT(PCB_EDIT_FRAME *aParent, wxString &aNetlistFullFilename)
Class DIALOG_NETLIST_IMPORT_BASE.
void onUpdatePCB(wxCommandEvent &event) override
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
void OnMatchChanged(wxCommandEvent &event) override
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
wxBoxSizer * m_buttonsSizer
void OnFilenameKillFocus(wxFocusEvent &event) override
WX_HTML_REPORT_PANEL * m_MessageWindow
void loadNetlist(bool aDryRun)
Store information read from a netlist along with the flags used to update the NETLIST in the BOARD.
wxRadioBox * m_matchByTimestamp
DIALOG_NETLIST m_NetlistDialog
wxString NetlistFileWildcard()
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
wxCheckBox * m_cbDeleteExtraFootprints
Definition of file extensions used in Kicad.
An interface for classes handling user events controlling the view behavior such as zooming,...
wxCheckBox * m_cbDeleteShortingTracks
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
PCB_EDIT_FRAME * m_parent
int GetVisibleSeverities() const
void OnOptionChanged(wxCommandEvent &event) override
wxButton * m_sdbSizerCancel
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.
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
void Clear()
return the number of messages matching the given severity mask.
bool delete_shorting_tracks
The main frame for Pcbnew.
PCBNEW_SETTINGS * GetPcbNewSettings() const
wxTextCtrl * m_NetlistFilenameCtrl
void onFilenameChanged(bool aLoadNetlist)
wxBitmapButton * m_browseButton
void SetFileName(const wxString &aReportFileName)
void SetLabel(const wxString &aLabel) override
Sets the lazy update.
void onBrowseNetlistFiles(wxCommandEvent &event) override
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.
wxButton * m_sdbSizerApply