35 #define OPTKEY_IDF_THOU wxT( "IDFExportThou" ) 36 #define OPTKEY_IDF_REF_AUTOADJ wxT( "IDFRefAutoAdj" ) 37 #define OPTKEY_IDF_REF_UNITS wxT( "IDFRefUnits" ) 38 #define OPTKEY_IDF_REF_X wxT( "IDFRefX" ) 39 #define OPTKEY_IDF_REF_Y wxT( "IDFRefY" ) 162 if( fn.FileExists() )
165 KIDIALOG dlg(
this, msg,
_(
"Confirmation" ), wxOK | wxCANCEL | wxICON_WARNING );
166 dlg.SetOKLabel(
_(
"Overwrite" ) );
167 dlg.DoNotShowCheckbox( __FILE__, __LINE__ );
169 return ( dlg.ShowModal() == wxID_OK );
184 brdFile.SetExt(
"emn" );
185 path = brdFile.GetFullPath();
191 if ( dlg.ShowModal() != wxID_OK )
202 aXRef = bbox.
Centre().x * MM_PER_IU;
203 aYRef = bbox.
Centre().y * MM_PER_IU;
221 wxString fullFilename = dlg.
FilePicker()->GetPath();
226 wxString msg =
_(
"Unable to create " ) + fullFilename;
wxChoice * m_IDF_RefUnitChoice
void OnExportIDF3(wxCommandEvent &event)
Function OnExportIDF3 will export the current BOARD to a IDFv3 board and lib files.
wxFilePickerCtrl * m_filePickerIDF
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
This file is part of the common library.
wxRadioBox * m_rbUnitSelection
void OnAutoAdjustOffset(wxCommandEvent &event)
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
wxConfigBase * KifaceSettings() const
void FinishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
bool Export_IDF3(BOARD *aPcb, const wxString &aFullFileName, bool aUseThou, double aXRef, double aYRef)
Function Export_IDF3 Creates an IDF3 compliant BOARD (*.emn) and LIBRARY (*.emp) file.
const wxString & GetFileName() const
void SetValue(const wxString &aValue) override
Set a new value in evaluator buffer, and display it in the wxTextCtrl.
wxString GetLastPath(LAST_PATH_TYPE aType)
Get the last path for a particular type.
TEXT_CTRL_EVAL * m_IDF_Xref
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
bool TransferDataFromWindow() override
wxCheckBox * m_cbAutoAdjustOffset
bool GetAutoAdjustOffset()
#define OPTKEY_IDF_REF_UNITS
double DoubleValueFromString(EDA_UNITS_T aUnits, const wxString &aTextValue, bool aUseMils)
Function DoubleValueFromString converts aTextValue to a double.
TEXT_CTRL_EVAL * m_IDF_Yref
Class DIALOG_EXPORT_IDF3_BASE.
wxFilePickerCtrl * FilePicker()
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
static LIB_PART * dummy()
Used to draw a dummy shape when a LIB_PART is not found in library.
Class EDA_RECT handles the component boundary box.
Class PCB_EDIT_FRAME is the main frame for Pcbnew.
DIALOG_EXPORT_IDF3(PCB_EDIT_FRAME *parent)
#define OPTKEY_IDF_REF_AUTOADJ
void SetLastPath(LAST_PATH_TYPE aType, const wxString &aLastPath)
Set the path of the last file successfully read.