37#include <wx/filedlg.h>
49 { wxID_CANCEL,
_(
"Close" ) } } );
56 brdFile.SetExt( wxT(
"xml" ) );
57 path = brdFile.GetFullPath();
76 m_parent( aEditFrame ),
100 wxFileName fn(
Prj().AbsolutePath(
path ) );
101 wxString ipc_files =
_(
"IPC-2581 Files (*.xml)|*.xml" );
102 wxString compressed_files =
_(
"IPC-2581 Compressed Files (*.zip)|*.zip" );
104 wxFileDialog dlg(
this,
_(
"Export IPC-2581 File" ), fn.GetPath(), fn.GetFullName(),
105 m_cbCompress->IsChecked() ? compressed_files : ipc_files,
106 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
108 if( dlg.ShowModal() == wxID_CANCEL )
147 if( event.GetSelection() == 0 )
161 if( it =
m_choiceMfg->FindString( wxT(
"manufacturer" ) ); it != wxNOT_FOUND )
165 else if( it =
m_choiceMfg->FindString(
_(
"manufacturer" ) ); it != wxNOT_FOUND )
169 else if( it =
m_choiceMfg->FindString( wxT(
"mfg" ) ); it != wxNOT_FOUND )
173 else if( it =
m_choiceMfg->FindString(
_(
"mfg" ) ); it != wxNOT_FOUND )
183 if( event.GetSelection() == 0 )
201 if( dist.Contains( wxT(
"DIGIKEY" ) ) )
205 else if( dist.Contains( wxT(
"DIGI-KEY" ) ) )
209 else if( dist.Contains( wxT(
"MOUSER" ) ) )
213 else if( dist.Contains( wxT(
"NEWARK" ) ) )
217 else if( dist.Contains( wxT(
"RS COMPONENTS" ) ) )
221 else if( dist.Contains( wxT(
"FARNELL" ) ) )
225 else if( dist.Contains( wxT(
"ARROW" ) ) )
229 else if( dist.Contains( wxT(
"AVNET" ) ) )
233 else if( dist.Contains( wxT(
"TME" ) ) )
237 else if( dist.Contains( wxT(
"LCSC" ) ) )
249 std::set<wxString> options;
254 for(
PCB_FIELD* field : fp->GetFields() )
255 options.insert( field->GetName() );
273 wxCommandEvent
dummy;
276 std::vector<wxString> items( options.begin(), options.end() );
286 wxString internalIdCol;
309 if( !
m_choiceMPN->SetStringSelection( internalIdCol ) )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
Information pertinent to a Pcbnew printed circuit board.
const FOOTPRINTS & Footprints() const
const wxString & GetFileName() const
Class DIALOG_EXPORT_2581_BASE.
wxTextCtrl * m_outputFileName
wxChoice * m_versionChoice
wxTextCtrl * m_textDistributor
STD_BITMAP_BUTTON * m_browseButton
wxChoice * m_choiceDistPN
wxCheckBox * m_cbCompress
void onMfgPNChange(wxCommandEvent &event) override
void onCompressCheck(wxCommandEvent &event) override
void onOKClick(wxCommandEvent &event) override
void onDistPNChange(wxCommandEvent &event) override
bool TransferDataFromWindow() override
wxString GetDistPN() const
DIALOG_EXPORT_2581(PCB_EDIT_FRAME *aParent)
PCB_EDIT_FRAME * m_parent
void onBrowseClicked(wxCommandEvent &event) override
wxString GetUnitsString() const
JOB_EXPORT_PCB_IPC2581 * m_job
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...
IPC2581_VERSION m_version
void SetOutputPath(const wxString &aPath)
wxString GetOutputPath() const
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
DIALOG_EXPORT_2581 m_Export2581
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.
virtual SETTINGS_MANAGER & GetSettingsManager() const
The backing store for a PROJECT, in JSON format.
struct IP2581_BOM m_IP2581Bom
Layer pair list for the board.
virtual PROJECT_FILE & GetProjectFile() const
T * GetAppSettings()
Returns a handle to the a given settings by type If the settings have already been loaded,...
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
static wxString s_oemColumn
static bool empty(const wxTextEntryBase *aCtrl)
PGM_BASE & Pgm()
The global Program "get" accessor.
std::vector< FAB_LAYER_COLOR > dummy
wxString mfg
Manufacturer name column.
wxString MPN
Manufacturer part number column.
wxString id
Internal ID column.
wxString dist
Distributor name column.
wxString distPN
Distributor part number column.