36#include <wx/filedlg.h>
47 { wxID_CANCEL,
_(
"Close" ) } } );
63 m_parent( aEditFrame ),
87 wxFileName fn(
Prj().AbsolutePath(
path ) );
88 wxString ipc_files =
_(
"IPC-2581 Files (*.xml)|*.xml" );
89 wxString compressed_files =
_(
"IPC-2581 Compressed Files (*.zip)|*.zip" );
91 wxFileDialog dlg(
this,
_(
"Export IPC-2581 File" ), fn.GetPath(), fn.GetFullName(),
92 m_cbCompress->IsChecked() ? compressed_files : ipc_files,
93 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
95 if( dlg.ShowModal() == wxID_CANCEL )
123 if( event.GetSelection() == 0 )
137 if( it =
m_choiceMfg->FindString( wxT(
"manufacturer" ) ); it != wxNOT_FOUND )
139 else if( it =
m_choiceMfg->FindString(
_(
"manufacturer" ) ); it != wxNOT_FOUND )
141 else if( it =
m_choiceMfg->FindString( wxT(
"mfg" ) ); it != wxNOT_FOUND )
143 else if( it =
m_choiceMfg->FindString(
_(
"mfg" ) ); it != wxNOT_FOUND )
151 if( event.GetSelection() == 0 )
169 if( dist.Contains( wxT(
"DIGIKEY" ) ) )
173 else if( dist.Contains( wxT(
"DIGI-KEY" ) ) )
177 else if( dist.Contains( wxT(
"MOUSER" ) ) )
181 else if( dist.Contains( wxT(
"NEWARK" ) ) )
185 else if( dist.Contains( wxT(
"RS COMPONENTS" ) ) )
189 else if( dist.Contains( wxT(
"FARNELL" ) ) )
193 else if( dist.Contains( wxT(
"ARROW" ) ) )
197 else if( dist.Contains( wxT(
"AVNET" ) ) )
201 else if( dist.Contains( wxT(
"TME" ) ) )
205 else if( dist.Contains( wxT(
"LCSC" ) ) )
217 std::set<wxString> options;
221 for(
PCB_FIELD* field : fp->GetFields() )
222 options.insert( field->GetName() );
225 std::vector<wxString> items( options.begin(), options.end() );
242 brdFile.SetExt( wxT(
"xml" ) );
243 path = brdFile.GetFullPath();
256 wxCommandEvent
dummy;
261 wxString internalIdCol;
284 if( !
m_choiceMPN->SetStringSelection( internalIdCol ) )
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
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
bool TransferDataToWindow() override
void onCompressCheck(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
wxString GetSettingsDialogTitle() const override
void SetConfiguredOutputPath(const wxString &aPath)
Sets the configured output path for the job, this path is always saved to file.
wxString GetConfiguredOutputPath() const
Returns the configured output path for the job.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
The main frame for Pcbnew.
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
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
std::vector< FAB_LAYER_COLOR > dummy
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
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.