36#include <wx/filedlg.h>
46 { wxID_CANCEL,
_(
"Close" ) } } );
53 brdFile.SetExt( wxT(
"xml" ) );
54 path = brdFile.GetFullPath();
74 wxFileName fn(
Prj().AbsolutePath(
path ) );
75 wxString ipc_files =
_(
"IPC-2581 Files (*.xml)|*.xml" );
76 wxString compressed_files =
_(
"IPC-2581 Compressed Files (*.zip)|*.zip" );
78 wxFileDialog dlg(
this,
_(
"Export IPC-2581 File" ), fn.GetPath(), fn.GetFullName(),
79 m_cbCompress->IsChecked() ? compressed_files : ipc_files,
80 wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
82 if( dlg.ShowModal() == wxID_CANCEL )
118 if( event.GetSelection() == 0 )
132 if( it =
m_choiceMfg->FindString( wxT(
"manufacturer" ) ); it != wxNOT_FOUND )
136 else if( it =
m_choiceMfg->FindString(
_(
"manufacturer" ) ); it != wxNOT_FOUND )
140 else if( it =
m_choiceMfg->FindString( wxT(
"mfg" ) ); it != wxNOT_FOUND )
144 else if( it =
m_choiceMfg->FindString(
_(
"mfg" ) ); it != wxNOT_FOUND )
154 if( event.GetSelection() == 0 )
172 if( dist.Contains( wxT(
"DIGIKEY" ) ) )
176 else if( dist.Contains( wxT(
"DIGI-KEY" ) ) )
180 else if( dist.Contains( wxT(
"MOUSER" ) ) )
184 else if( dist.Contains( wxT(
"NEWARK" ) ) )
188 else if( dist.Contains( wxT(
"RS COMPONENTS" ) ) )
192 else if( dist.Contains( wxT(
"FARNELL" ) ) )
196 else if( dist.Contains( wxT(
"ARROW" ) ) )
200 else if( dist.Contains( wxT(
"AVNET" ) ) )
204 else if( dist.Contains( wxT(
"TME" ) ) )
208 else if( dist.Contains( wxT(
"LCSC" ) ) )
220 std::set<wxString> options;
225 for(
PCB_FIELD* field : fp->GetFields() )
226 options.insert( field->GetName() );
234 wxCommandEvent
dummy;
237 std::vector<wxString> items( options.begin(), options.end() );
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
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...
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.