Support text variables in STEP export filename.
Also fixes some other file browser titles to match Kicad's overall style. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15927
This commit is contained in:
parent
dd166ce835
commit
435e3fab8d
|
@ -429,7 +429,7 @@ bool BITMAP2CMP_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BITMAP2CMP_FRAME::ExportLogo()
|
void BITMAP2CMP_FRAME::ExportDrawingSheetFormat()
|
||||||
{
|
{
|
||||||
wxFileName fn( m_convertedFileName );
|
wxFileName fn( m_convertedFileName );
|
||||||
wxString path = fn.GetPath();
|
wxString path = fn.GetPath();
|
||||||
|
@ -437,7 +437,7 @@ void BITMAP2CMP_FRAME::ExportLogo()
|
||||||
if( path.IsEmpty() || !wxDirExists(path) )
|
if( path.IsEmpty() || !wxDirExists(path) )
|
||||||
path = ::wxGetCwd();
|
path = ::wxGetCwd();
|
||||||
|
|
||||||
wxFileDialog fileDlg( this, _( "Create Logo File" ), path, wxEmptyString,
|
wxFileDialog fileDlg( this, _( "Create Drawing Sheet File" ), path, wxEmptyString,
|
||||||
DrawingSheetFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
DrawingSheetFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
int diag = fileDlg.ShowModal();
|
int diag = fileDlg.ShowModal();
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Generate a file suitable to be copied into a drawing sheet (.kicad_wks) file
|
* Generate a file suitable to be copied into a drawing sheet (.kicad_wks) file
|
||||||
*/
|
*/
|
||||||
void ExportLogo();
|
void ExportDrawingSheetFormat();
|
||||||
|
|
||||||
void UpdateTitle();
|
void UpdateTitle();
|
||||||
void ShowChangedLanguage() override;
|
void ShowChangedLanguage() override;
|
||||||
|
|
|
@ -522,7 +522,7 @@ void BITMAP2CMP_PANEL::exportBitmap( OUTPUT_FMT_ID aFormat )
|
||||||
case EESCHEMA_FMT: m_parentFrame->ExportEeschemaFormat(); break;
|
case EESCHEMA_FMT: m_parentFrame->ExportEeschemaFormat(); break;
|
||||||
case PCBNEW_KICAD_MOD: m_parentFrame->ExportPcbnewFormat(); break;
|
case PCBNEW_KICAD_MOD: m_parentFrame->ExportPcbnewFormat(); break;
|
||||||
case POSTSCRIPT_FMT: m_parentFrame->ExportPostScriptFormat(); break;
|
case POSTSCRIPT_FMT: m_parentFrame->ExportPostScriptFormat(); break;
|
||||||
case KICAD_WKS_LOGO: m_parentFrame->ExportLogo(); break;
|
case KICAD_WKS_LOGO: m_parentFrame->ExportDrawingSheetFormat(); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -792,7 +792,7 @@ void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Display a file picker dialog
|
// Display a file picker dialog
|
||||||
wxFileDialog fileDialog( this, _( "Select Drawing Sheet File" ), path, name,
|
wxFileDialog fileDialog( this, _( "Drawing Sheet File" ), path, name,
|
||||||
DrawingSheetFileWildcard(), wxFD_DEFAULT_STYLE|wxFD_FILE_MUST_EXIST );
|
DrawingSheetFileWildcard(), wxFD_DEFAULT_STYLE|wxFD_FILE_MUST_EXIST );
|
||||||
|
|
||||||
if( fileDialog.ShowModal() != wxID_OK )
|
if( fileDialog.ShowModal() != wxID_OK )
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2015 CERN
|
* Copyright (C) 2015 CERN
|
||||||
* Copyright (C) 2015-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2015-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
* Author: Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
@ -365,7 +365,7 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
|
||||||
else
|
else
|
||||||
fn = m_reportFileName;
|
fn = m_reportFileName;
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Save Report to File" ), fn.GetPath(), fn.GetFullName(),
|
wxFileDialog dlg( this, _( "Save Report File" ), fn.GetPath(), fn.GetFullName(),
|
||||||
TextFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
TextFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
|
|
|
@ -882,7 +882,7 @@ void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
wxFileName fn( wxS( "ERC." ) + ReportFileExtension );
|
wxFileName fn( wxS( "ERC." ) + ReportFileExtension );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Save Report to File" ), Prj().GetProjectPath(), fn.GetFullName(),
|
wxFileDialog dlg( this, _( "Save Report File" ), Prj().GetProjectPath(), fn.GetFullName(),
|
||||||
ReportFileWildcard() + wxS( "|" ) + JsonFileWildcard(),
|
ReportFileWildcard() + wxS( "|" ) + JsonFileWildcard(),
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
|
|
|
@ -1184,7 +1184,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnOutputFileBrowseClicked( wxCommandEvent& even
|
||||||
wxFileName fn( Prj().AbsolutePath( m_parent->Schematic().GetFileName() ) );
|
wxFileName fn( Prj().AbsolutePath( m_parent->Schematic().GetFileName() ) );
|
||||||
fn.SetExt( CsvFileExtension );
|
fn.SetExt( CsvFileExtension );
|
||||||
|
|
||||||
wxFileDialog saveDlg( this, _( "Selected Output Filename" ), path, fn.GetFullName(),
|
wxFileDialog saveDlg( this, _( "Bill of Materials Output File" ), path, fn.GetFullName(),
|
||||||
CsvFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
CsvFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
if( saveDlg.ShowModal() == wxID_CANCEL )
|
if( saveDlg.ShowModal() == wxID_CANCEL )
|
||||||
|
|
|
@ -609,7 +609,7 @@ void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
||||||
if( m_cur_grid == m_project_grid )
|
if( m_cur_grid == m_project_grid )
|
||||||
openDir = m_lastProjectLibDir;
|
openDir = m_lastProjectLibDir;
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Select Library" ), openDir, wxEmptyString, fileFiltersStr,
|
wxFileDialog dlg( this, _( "Add Library" ), openDir, wxEmptyString, fileFiltersStr,
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
|
|
|
@ -199,7 +199,7 @@ void DIALOG_IMPORT_GFX_SCH::onBrowseFiles( wxCommandEvent& event )
|
||||||
|
|
||||||
wildcardsDesc = _( "All supported formats" ) + wxT( "|" ) + allWildcards + wildcardsDesc;
|
wildcardsDesc = _( "All supported formats" ) + wxT( "|" ) + allWildcards + wildcardsDesc;
|
||||||
|
|
||||||
wxFileDialog dlg( m_parent, _( "Open File" ), path, filename, wildcardsDesc,
|
wxFileDialog dlg( m_parent, _( "Import Graphics" ), path, filename, wildcardsDesc,
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
||||||
|
|
|
@ -91,7 +91,7 @@ int SIMULATOR_CONTROL::NewAnalysisTab( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
int SIMULATOR_CONTROL::OpenWorkbook( const TOOL_EVENT& aEvent )
|
int SIMULATOR_CONTROL::OpenWorkbook( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
wxFileDialog openDlg( m_simulatorFrame, _( "Open simulation workbook" ), getDefaultPath(), "",
|
wxFileDialog openDlg( m_simulatorFrame, _( "Open Simulation Workbook" ), getDefaultPath(), "",
|
||||||
WorkbookFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
WorkbookFileWildcard(), wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||||
|
|
||||||
if( openDlg.ShowModal() == wxID_CANCEL )
|
if( openDlg.ShowModal() == wxID_CANCEL )
|
||||||
|
|
|
@ -575,7 +575,7 @@ int SYMBOL_EDITOR_CONTROL::ExportView( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
wxString projectPath = wxPathOnly( m_frame->Prj().GetProjectFullName() );
|
wxString projectPath = wxPathOnly( m_frame->Prj().GetProjectFullName() );
|
||||||
|
|
||||||
wxFileDialog dlg( editFrame, _( "Image File Name" ), projectPath, fn.GetFullName(),
|
wxFileDialog dlg( editFrame, _( "Export View as PNG" ), projectPath, fn.GetFullName(),
|
||||||
PngFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
PngFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
||||||
|
|
|
@ -123,8 +123,8 @@ int GERBVIEW_CONTROL::ExportToPcbnew( const TOOL_EVENT& aEvent )
|
||||||
wxString fileDialogName( NAMELESS_PROJECT + wxT( "." ) + KiCadPcbFileExtension );
|
wxString fileDialogName( NAMELESS_PROJECT + wxT( "." ) + KiCadPcbFileExtension );
|
||||||
wxString path = m_frame->GetMruPath();
|
wxString path = m_frame->GetMruPath();
|
||||||
|
|
||||||
wxFileDialog filedlg( m_frame, _( "Board File Name" ), path, fileDialogName, PcbFileWildcard(),
|
wxFileDialog filedlg( m_frame, _( "Export as KiCad Board File" ), path, fileDialogName,
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
PcbFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
if( filedlg.ShowModal() == wxID_CANCEL )
|
if( filedlg.ShowModal() == wxID_CANCEL )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -735,8 +735,8 @@ void KICAD_MANAGER_FRAME::OnOpenFileInTextEditor( wxCommandEvent& event )
|
||||||
|
|
||||||
wxString default_dir = Prj().GetProjectPath();
|
wxString default_dir = Prj().GetProjectPath();
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Load File to Edit" ), default_dir,
|
wxFileDialog dlg( this, _( "Edit File in Text Editor" ), default_dir, wxEmptyString, wildcard,
|
||||||
wxEmptyString, wildcard, wxFD_OPEN );
|
wxFD_OPEN );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -286,7 +286,7 @@ void DIALOG_PCM::OnRefreshClicked( wxCommandEvent& event )
|
||||||
|
|
||||||
void DIALOG_PCM::OnInstallFromFileClicked( wxCommandEvent& event )
|
void DIALOG_PCM::OnInstallFromFileClicked( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
wxFileDialog open_file_dialog( this, _( "Choose package file" ), wxEmptyString, wxEmptyString,
|
wxFileDialog open_file_dialog( this, _( "Install Package" ), wxEmptyString, wxEmptyString,
|
||||||
wxT( "Zip files (*.zip)|*.zip" ),
|
wxT( "Zip files (*.zip)|*.zip" ),
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2021 Andrew Lutsenko, anlutsenko at gmail dot com
|
* Copyright (C) 2021 Andrew Lutsenko, anlutsenko at gmail dot com
|
||||||
* Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the
|
* under the terms of the GNU General Public License as published by the
|
||||||
|
@ -525,7 +525,7 @@ void PANEL_PACKAGES_VIEW::OnDownloadVersionClicked( wxCommandEvent& event )
|
||||||
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
|
||||||
KICAD_SETTINGS* app_settings = mgr.GetAppSettings<KICAD_SETTINGS>();
|
KICAD_SETTINGS* app_settings = mgr.GetAppSettings<KICAD_SETTINGS>();
|
||||||
|
|
||||||
wxFileDialog dialog( this, _( "Save package" ), app_settings->m_PcmLastDownloadDir,
|
wxFileDialog dialog( this, _( "Save Package" ), app_settings->m_PcmLastDownloadDir,
|
||||||
wxString::Format( wxT( "%s_v%s.zip" ), package.identifier, version ),
|
wxString::Format( wxT( "%s_v%s.zip" ), package.identifier, version ),
|
||||||
wxT( "ZIP files (*.zip)|*.zip" ), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
wxT( "ZIP files (*.zip)|*.zip" ), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
|
|
|
@ -154,7 +154,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
|
||||||
|
|
||||||
case wxID_OPEN:
|
case wxID_OPEN:
|
||||||
{
|
{
|
||||||
wxFileDialog openFileDialog( this, _( "Open" ), wxEmptyString, wxEmptyString,
|
wxFileDialog openFileDialog( this, _( "Open Drawing Sheet" ), wxEmptyString, wxEmptyString,
|
||||||
DrawingSheetFileWildcard(), wxFD_OPEN );
|
DrawingSheetFileWildcard(), wxFD_OPEN );
|
||||||
|
|
||||||
if( openFileDialog.ShowModal() == wxID_CANCEL )
|
if( openFileDialog.ShowModal() == wxID_CANCEL )
|
||||||
|
@ -192,7 +192,7 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event )
|
||||||
case wxID_SAVEAS:
|
case wxID_SAVEAS:
|
||||||
{
|
{
|
||||||
wxString dir = PATHS::GetUserTemplatesPath();
|
wxString dir = PATHS::GetUserTemplatesPath();
|
||||||
wxFileDialog openFileDialog( this, _( "Save As" ), dir, wxEmptyString,
|
wxFileDialog openFileDialog( this, _( "Save Drawing Sheet As" ), dir, wxEmptyString,
|
||||||
DrawingSheetFileWildcard(),
|
DrawingSheetFileWildcard(),
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
|
|
|
@ -866,7 +866,7 @@ void DIALOG_DRC::OnSaveReport( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
wxFileName fn( "DRC." + ReportFileExtension );
|
wxFileName fn( "DRC." + ReportFileExtension );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Save Report to File" ), Prj().GetProjectPath(), fn.GetFullName(),
|
wxFileDialog dlg( this, _( "Save Report File" ), Prj().GetProjectPath(), fn.GetFullName(),
|
||||||
ReportFileWildcard() + wxS( "|" ) + JsonFileWildcard(),
|
ReportFileWildcard() + wxS( "|" ) + JsonFileWildcard(),
|
||||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 Cirilo Bernardo
|
* Copyright (C) 2016 Cirilo Bernardo
|
||||||
* Copyright (C) 2016-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2016-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -22,15 +22,17 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wx/choicdlg.h>
|
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
#include <wx/stdpaths.h>
|
#include <wx/stdpaths.h>
|
||||||
#include <wx/process.h>
|
#include <wx/process.h>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
|
#include <wx/filedlg.h>
|
||||||
|
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <board.h>
|
#include <board.h>
|
||||||
#include <confirm.h>
|
#include <confirm.h>
|
||||||
|
#include <bitmaps.h>
|
||||||
|
#include <widgets/std_bitmap_button.h>
|
||||||
#include "dialog_export_step_base.h"
|
#include "dialog_export_step_base.h"
|
||||||
#include "dialog_export_step_process.h"
|
#include "dialog_export_step_process.h"
|
||||||
#include <footprint.h>
|
#include <footprint.h>
|
||||||
|
@ -63,6 +65,7 @@ public:
|
||||||
~DIALOG_EXPORT_STEP();
|
~DIALOG_EXPORT_STEP();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void onBrowseClicked( wxCommandEvent& aEvent ) override;
|
||||||
void onUpdateUnits( wxUpdateUIEvent& aEvent ) override;
|
void onUpdateUnits( wxUpdateUIEvent& aEvent ) override;
|
||||||
void onUpdateXPos( wxUpdateUIEvent& aEvent ) override;
|
void onUpdateXPos( wxUpdateUIEvent& aEvent ) override;
|
||||||
void onUpdateYPos( wxUpdateUIEvent& aEvent ) override;
|
void onUpdateYPos( wxUpdateUIEvent& aEvent ) override;
|
||||||
|
@ -129,42 +132,24 @@ bool DIALOG_EXPORT_STEP::m_exportZones = false;
|
||||||
DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString& aBoardPath ) :
|
DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString& aBoardPath ) :
|
||||||
DIALOG_EXPORT_STEP_BASE( aParent )
|
DIALOG_EXPORT_STEP_BASE( aParent )
|
||||||
{
|
{
|
||||||
|
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
||||||
|
|
||||||
m_parent = aParent;
|
m_parent = aParent;
|
||||||
m_boardPath = aBoardPath;
|
m_boardPath = aBoardPath;
|
||||||
m_sdbSizerCancel->SetLabel( _( "Close" ) );
|
|
||||||
m_sdbSizerOK->SetLabel( _( "Export" ) );
|
SetupStandardButtons( { { wxID_OK, _( "Export" ) },
|
||||||
m_sdbSizer->Layout();
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
|
|
||||||
// Build default output file name
|
// Build default output file name
|
||||||
wxString path = m_parent->GetLastPath( LAST_PATH_STEP );
|
wxString path = m_parent->GetLastPath( LAST_PATH_STEP );
|
||||||
|
|
||||||
if( path.IsEmpty() )
|
if( path.IsEmpty() )
|
||||||
{
|
{
|
||||||
wxFileName brdFile = m_parent->GetBoard()->GetFileName();
|
wxFileName brdFile( m_parent->GetBoard()->GetFileName() );
|
||||||
brdFile.SetExt( wxT( "step" ) );
|
brdFile.SetExt( wxT( "step" ) );
|
||||||
path = brdFile.GetFullPath();
|
path = brdFile.GetFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset this picker bc wxFormBuilder doesn't allow untranslated strings
|
|
||||||
wxSizerItem* sizer_item = bSizerTop->GetItem( 1UL );
|
|
||||||
wxWindow* widget = sizer_item->GetWindow();
|
|
||||||
bSizerTop->Hide( widget );
|
|
||||||
widget->Destroy();
|
|
||||||
|
|
||||||
wxString filter = _( "STEP files" )
|
|
||||||
+ AddFileExtListToFilter( { StepFileExtension, StepFileAbrvExtension } ) + "|"
|
|
||||||
+ _( "Binary GTLF files" )
|
|
||||||
+ AddFileExtListToFilter( { GltfBinaryFileExtension } );
|
|
||||||
|
|
||||||
m_filePickerSTEP = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString,
|
|
||||||
_( "Select a STEP export filename" ),
|
|
||||||
filter,
|
|
||||||
wxDefaultPosition,
|
|
||||||
wxSize( -1, -1 ), wxFLP_SAVE | wxFLP_USE_TEXTCTRL );
|
|
||||||
bSizerTop->Add( m_filePickerSTEP, 1, wxTOP | wxRIGHT | wxLEFT | wxALIGN_CENTER_VERTICAL, 5 );
|
|
||||||
|
|
||||||
m_filePickerSTEP->SetPath( path );
|
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
bSizerSTEPFile->Fit( this );
|
bSizerSTEPFile->Fit( this );
|
||||||
|
|
||||||
|
@ -211,10 +196,7 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString&
|
||||||
{
|
{
|
||||||
for( const FP_3DMODEL& model : fp->Models() )
|
for( const FP_3DMODEL& model : fp->Models() )
|
||||||
{
|
{
|
||||||
|
if( model.m_Scale.x != 1.0 || model.m_Scale.y != 1.0 || model.m_Scale.z != 1.0 )
|
||||||
if( model.m_Scale.x != 1.0 ||
|
|
||||||
model.m_Scale.y != 1.0 ||
|
|
||||||
model.m_Scale.z != 1.0 )
|
|
||||||
{
|
{
|
||||||
bad_scales.Append( wxS("\n") );
|
bad_scales.Append( wxS("\n") );
|
||||||
bad_scales.Append( model.m_Filename );
|
bad_scales.Append( model.m_Filename );
|
||||||
|
@ -348,9 +330,33 @@ void DIALOG_EXPORT_STEP::onUpdateYPos( wxUpdateUIEvent& aEvent )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_EXPORT_STEP::onBrowseClicked( wxCommandEvent& aEvent )
|
||||||
|
{
|
||||||
|
wxString filter = _( "STEP files" )
|
||||||
|
+ AddFileExtListToFilter( { StepFileExtension, StepFileAbrvExtension } ) + "|"
|
||||||
|
+ _( "Binary GTLF files" )
|
||||||
|
+ AddFileExtListToFilter( { GltfBinaryFileExtension } );
|
||||||
|
|
||||||
|
// Build the absolute path of current output directory to preselect it in the file browser.
|
||||||
|
wxString path = ExpandEnvVarSubstitutions( m_outputFileName->GetValue(), &Prj() );
|
||||||
|
wxFileName fn( Prj().AbsolutePath( path ) );
|
||||||
|
|
||||||
|
wxFileDialog dlg( this, _( "STEP Output File" ), fn.GetPath(), fn.GetFullName(), filter,
|
||||||
|
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_outputFileName->SetValue( dlg.GetPath() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
m_parent->SetLastPath( LAST_PATH_STEP, m_filePickerSTEP->GetPath() );
|
wxString path = m_outputFileName->GetValue();
|
||||||
|
m_parent->SetLastPath( LAST_PATH_STEP, path );
|
||||||
|
|
||||||
|
path = ExpandEnvVarSubstitutions( path, &Prj() );
|
||||||
|
|
||||||
double tolerance; // default value in mm
|
double tolerance; // default value in mm
|
||||||
m_toleranceLastChoice = m_choiceTolerance->GetSelection();
|
m_toleranceLastChoice = m_choiceTolerance->GetSelection();
|
||||||
|
@ -384,7 +390,7 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileName fn = m_filePickerSTEP->GetFileName();
|
wxFileName fn( Prj().AbsolutePath( path ) );
|
||||||
|
|
||||||
if( fn.FileExists() && !GetOverwriteFile() )
|
if( fn.FileExists() && !GetOverwriteFile() )
|
||||||
{
|
{
|
||||||
|
@ -500,12 +506,12 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
||||||
quote, tolerance, quote ) );
|
quote, tolerance, quote ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Input file path.
|
|
||||||
cmdK2S.Append( wxString::Format( wxT( " -f -o %c%s%c" ),
|
|
||||||
dblquote, m_filePickerSTEP->GetPath(), dblquote ) );
|
|
||||||
|
|
||||||
|
|
||||||
// Output file path.
|
// Output file path.
|
||||||
|
cmdK2S.Append( wxString::Format( wxT( " -f -o %c%s%c" ),
|
||||||
|
dblquote, fn.GetFullPath(), dblquote ) );
|
||||||
|
|
||||||
|
|
||||||
|
// Input file path.
|
||||||
cmdK2S.Append( wxString::Format( wxT( " %c%s%c" ), dblquote, m_boardPath, dblquote ) );
|
cmdK2S.Append( wxString::Format( wxT( " %c%s%c" ), dblquote, m_boardPath, dblquote ) );
|
||||||
|
|
||||||
wxLogTrace( traceKiCad2Step, wxT( "export step command: %s" ), cmdK2S );
|
wxLogTrace( traceKiCad2Step, wxT( "export step command: %s" ), cmdK2S );
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "widgets/std_bitmap_button.h"
|
||||||
#include "widgets/text_ctrl_eval.h"
|
#include "widgets/text_ctrl_eval.h"
|
||||||
|
|
||||||
#include "dialog_export_step_base.h"
|
#include "dialog_export_step_base.h"
|
||||||
|
@ -21,10 +22,16 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i
|
||||||
|
|
||||||
m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_txtBrdFile->Wrap( -1 );
|
m_txtBrdFile->Wrap( -1 );
|
||||||
bSizerTop->Add( m_txtBrdFile, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 );
|
bSizerTop->Add( m_txtBrdFile, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_filePickerSTEP = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("temp"), _("temp"), wxDefaultPosition, wxSize( -1,-1 ), wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
|
m_outputFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizerTop->Add( m_filePickerSTEP, 1, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
|
m_outputFileName->SetToolTip( _("Enter a filename if you do not want to use default file names\nCan be used only when printing the current sheet") );
|
||||||
|
m_outputFileName->SetMinSize( wxSize( 450,-1 ) );
|
||||||
|
|
||||||
|
bSizerTop->Add( m_outputFileName, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
|
bSizerTop->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerSTEPFile->Add( bSizerTop, 0, wxEXPAND|wxALL, 10 );
|
bSizerSTEPFile->Add( bSizerTop, 0, wxEXPAND|wxALL, 10 );
|
||||||
|
@ -126,7 +133,7 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i
|
||||||
sbOtherOptions->Add( m_cbOverwriteFile, 0, wxBOTTOM|wxRIGHT, 5 );
|
sbOtherOptions->Add( m_cbOverwriteFile, 0, wxBOTTOM|wxRIGHT, 5 );
|
||||||
|
|
||||||
m_staticline1 = new wxStaticLine( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
m_staticline1 = new wxStaticLine( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||||
sbOtherOptions->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
|
sbOtherOptions->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||||
|
|
||||||
m_cbExportTracks = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export tracks (time consuming)"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbExportTracks = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export tracks (time consuming)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_cbExportTracks->SetToolTip( _("Export tracks and vias on external copper layers.\nWarning: this is *extremely* time consuming.") );
|
m_cbExportTracks->SetToolTip( _("Export tracks and vias on external copper layers.\nWarning: this is *extremely* time consuming.") );
|
||||||
|
@ -179,6 +186,7 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i
|
||||||
this->Centre( wxBOTH );
|
this->Centre( wxBOTH );
|
||||||
|
|
||||||
// Connect Events
|
// Connect Events
|
||||||
|
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onBrowseClicked ), NULL, this );
|
||||||
m_STEP_OrgUnitChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
|
m_STEP_OrgUnitChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
|
||||||
m_STEP_Xorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
|
m_STEP_Xorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
|
||||||
m_STEP_Yorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
|
m_STEP_Yorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
|
||||||
|
@ -188,6 +196,7 @@ DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID i
|
||||||
DIALOG_EXPORT_STEP_BASE::~DIALOG_EXPORT_STEP_BASE()
|
DIALOG_EXPORT_STEP_BASE::~DIALOG_EXPORT_STEP_BASE()
|
||||||
{
|
{
|
||||||
// Disconnect Events
|
// Disconnect Events
|
||||||
|
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onBrowseClicked ), NULL, this );
|
||||||
m_STEP_OrgUnitChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
|
m_STEP_OrgUnitChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
|
||||||
m_STEP_Xorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
|
m_STEP_Xorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
|
||||||
m_STEP_Yorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
|
m_STEP_Yorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
<property name="center">wxBOTH</property>
|
<property name="center">wxBOTH</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="event_handler">impl_virtual</property>
|
<property name="event_handler">impl_virtual</property>
|
||||||
<property name="extra_style"></property>
|
<property name="extra_style"></property>
|
||||||
|
@ -73,7 +72,7 @@
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="0">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="0">
|
<object class="wxStaticText" expanded="0">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -96,7 +95,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -133,11 +131,11 @@
|
||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxFilePickerCtrl" expanded="0">
|
<object class="wxTextCtrl" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
<property name="LeftDockable">1</property>
|
<property name="LeftDockable">1</property>
|
||||||
<property name="RightDockable">1</property>
|
<property name="RightDockable">1</property>
|
||||||
|
@ -158,7 +156,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -169,12 +166,12 @@
|
||||||
<property name="max_size"></property>
|
<property name="max_size"></property>
|
||||||
<property name="maximize_button">0</property>
|
<property name="maximize_button">0</property>
|
||||||
<property name="maximum_size"></property>
|
<property name="maximum_size"></property>
|
||||||
<property name="message">temp</property>
|
<property name="maxlength">0</property>
|
||||||
<property name="min_size"></property>
|
<property name="min_size"></property>
|
||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size">-1,-1</property>
|
<property name="minimum_size">450,-1</property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_filePickerSTEP</property>
|
<property name="name">m_outputFileName</property>
|
||||||
<property name="pane_border">1</property>
|
<property name="pane_border">1</property>
|
||||||
<property name="pane_position"></property>
|
<property name="pane_position"></property>
|
||||||
<property name="pane_size"></property>
|
<property name="pane_size"></property>
|
||||||
|
@ -183,20 +180,93 @@
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size">-1,-1</property>
|
<property name="size"></property>
|
||||||
<property name="style">wxFLP_SAVE|wxFLP_USE_TEXTCTRL</property>
|
<property name="style"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass"></property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip">Enter a filename if you do not want to use default file names
Can be used only when printing the current sheet</property>
|
||||||
|
<property name="validator_data_type"></property>
|
||||||
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
|
<property name="validator_variable"></property>
|
||||||
|
<property name="value"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="1">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBitmapButton" expanded="1">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer"></property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position"></property>
|
||||||
|
<property name="aui_row"></property>
|
||||||
|
<property name="auth_needed">0</property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="bitmap"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="current"></property>
|
||||||
|
<property name="default">0</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="disabled"></property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="focus"></property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">MyButton</property>
|
||||||
|
<property name="margins"></property>
|
||||||
|
<property name="markup">0</property>
|
||||||
|
<property name="max_size"></property>
|
||||||
|
<property name="maximize_button">0</property>
|
||||||
|
<property name="maximum_size"></property>
|
||||||
|
<property name="min_size"></property>
|
||||||
|
<property name="minimize_button">0</property>
|
||||||
|
<property name="minimum_size">-1,-1</property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_browseButton</property>
|
||||||
|
<property name="pane_border">1</property>
|
||||||
|
<property name="pane_position"></property>
|
||||||
|
<property name="pane_size"></property>
|
||||||
|
<property name="permission">protected</property>
|
||||||
|
<property name="pin_button">1</property>
|
||||||
|
<property name="pos"></property>
|
||||||
|
<property name="position"></property>
|
||||||
|
<property name="pressed"></property>
|
||||||
|
<property name="resize">Resizable</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size">-1,-1</property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass">STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
<property name="validator_data_type"></property>
|
<property name="validator_data_type"></property>
|
||||||
<property name="validator_style">wxFILTER_NONE</property>
|
<property name="validator_style">wxFILTER_NONE</property>
|
||||||
<property name="validator_type">wxDefaultValidator</property>
|
<property name="validator_type">wxDefaultValidator</property>
|
||||||
<property name="validator_variable"></property>
|
<property name="validator_variable"></property>
|
||||||
<property name="value"></property>
|
|
||||||
<property name="wildcard">temp</property>
|
|
||||||
<property name="window_extra_style"></property>
|
<property name="window_extra_style"></property>
|
||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
|
<event name="OnButtonClick">onBrowseClicked</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
@ -247,7 +317,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -312,7 +381,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -377,7 +445,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -442,7 +509,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -537,7 +603,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -600,7 +665,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -665,7 +729,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -727,7 +790,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -793,7 +855,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -855,7 +916,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -938,7 +998,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -1003,7 +1062,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -1068,7 +1126,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -1133,7 +1190,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -1174,7 +1230,7 @@
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="1">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND | wxALL</property>
|
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticLine" expanded="1">
|
<object class="wxStaticLine" expanded="1">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -1197,7 +1253,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -1257,7 +1312,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -1322,7 +1376,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -1386,7 +1439,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
@ -1449,7 +1501,6 @@
|
||||||
<property name="dock">Dock</property>
|
<property name="dock">Dock</property>
|
||||||
<property name="dock_fixed">0</property>
|
<property name="dock_fixed">0</property>
|
||||||
<property name="docking">Left</property>
|
<property name="docking">Left</property>
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
<property name="enabled">1</property>
|
||||||
<property name="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="floatable">1</property>
|
<property name="floatable">1</property>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -10,6 +10,7 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
class STD_BITMAP_BUTTON;
|
||||||
class TEXT_CTRL_EVAL;
|
class TEXT_CTRL_EVAL;
|
||||||
|
|
||||||
#include "dialog_shim.h"
|
#include "dialog_shim.h"
|
||||||
|
@ -19,16 +20,19 @@ class TEXT_CTRL_EVAL;
|
||||||
#include <wx/font.h>
|
#include <wx/font.h>
|
||||||
#include <wx/colour.h>
|
#include <wx/colour.h>
|
||||||
#include <wx/settings.h>
|
#include <wx/settings.h>
|
||||||
#include <wx/filepicker.h>
|
#include <wx/textctrl.h>
|
||||||
|
#include <wx/bmpbuttn.h>
|
||||||
|
#include <wx/bitmap.h>
|
||||||
|
#include <wx/image.h>
|
||||||
|
#include <wx/icon.h>
|
||||||
|
#include <wx/button.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/radiobut.h>
|
#include <wx/radiobut.h>
|
||||||
#include <wx/statbox.h>
|
#include <wx/statbox.h>
|
||||||
#include <wx/choice.h>
|
#include <wx/choice.h>
|
||||||
#include <wx/textctrl.h>
|
|
||||||
#include <wx/valtext.h>
|
#include <wx/valtext.h>
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
#include <wx/statline.h>
|
#include <wx/statline.h>
|
||||||
#include <wx/button.h>
|
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -44,7 +48,8 @@ class DIALOG_EXPORT_STEP_BASE : public DIALOG_SHIM
|
||||||
wxBoxSizer* bSizerSTEPFile;
|
wxBoxSizer* bSizerSTEPFile;
|
||||||
wxBoxSizer* bSizerTop;
|
wxBoxSizer* bSizerTop;
|
||||||
wxStaticText* m_txtBrdFile;
|
wxStaticText* m_txtBrdFile;
|
||||||
wxFilePickerCtrl* m_filePickerSTEP;
|
wxTextCtrl* m_outputFileName;
|
||||||
|
STD_BITMAP_BUTTON* m_browseButton;
|
||||||
wxRadioButton* m_rbDrillAndPlotOrigin;
|
wxRadioButton* m_rbDrillAndPlotOrigin;
|
||||||
wxRadioButton* m_rbGridOrigin;
|
wxRadioButton* m_rbGridOrigin;
|
||||||
wxRadioButton* m_rbUserDefinedOrigin;
|
wxRadioButton* m_rbUserDefinedOrigin;
|
||||||
|
@ -69,6 +74,7 @@ class DIALOG_EXPORT_STEP_BASE : public DIALOG_SHIM
|
||||||
wxButton* m_sdbSizerCancel;
|
wxButton* m_sdbSizerCancel;
|
||||||
|
|
||||||
// Virtual event handlers, override them in your derived class
|
// Virtual event handlers, override them in your derived class
|
||||||
|
virtual void onBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
|
||||||
virtual void onUpdateUnits( wxUpdateUIEvent& event ) { event.Skip(); }
|
virtual void onUpdateUnits( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||||
virtual void onUpdateXPos( wxUpdateUIEvent& event ) { event.Skip(); }
|
virtual void onUpdateXPos( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||||
virtual void onUpdateYPos( wxUpdateUIEvent& event ) { event.Skip(); }
|
virtual void onUpdateYPos( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||||
|
|
|
@ -132,7 +132,7 @@ void DIALOG_IMPORT_NETLIST::onBrowseNetlistFiles( wxCommandEvent& event )
|
||||||
filename = fn.GetFullName();
|
filename = fn.GetFullName();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFileDialog FilesDialog( this, _( "Select Netlist" ), dirPath, filename,
|
wxFileDialog FilesDialog( this, _( "Import Netlist" ), dirPath, filename,
|
||||||
NetlistFileWildcard(), wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
|
NetlistFileWildcard(), wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST );
|
||||||
|
|
||||||
if( FilesDialog.ShowModal() != wxID_OK )
|
if( FilesDialog.ShowModal() != wxID_OK )
|
||||||
|
|
|
@ -2221,7 +2221,7 @@ void DIALOG_NET_INSPECTOR::onDeleteNet( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
void DIALOG_NET_INSPECTOR::onReport( wxCommandEvent& aEvent )
|
void DIALOG_NET_INSPECTOR::onReport( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
wxFileDialog dlg( this, _( "Report file" ), "", "",
|
wxFileDialog dlg( this, _( "Save Report File" ), "", "",
|
||||||
_( "Report file" ) + AddFileExtListToFilter( { "csv" } ),
|
_( "Report file" ) + AddFileExtListToFilter( { "csv" } ),
|
||||||
wxFD_SAVE );
|
wxFD_SAVE );
|
||||||
|
|
||||||
|
|
|
@ -1350,7 +1350,7 @@ void FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng( wxCommandEvent& event )
|
||||||
|
|
||||||
wxString projectPath = wxPathOnly( Prj().GetProjectFullName() );
|
wxString projectPath = wxPathOnly( Prj().GetProjectFullName() );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Footprint Image File Name" ), projectPath,
|
wxFileDialog dlg( this, _( "Export View as PNG" ), projectPath,
|
||||||
fn.GetFullName(), PngFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
fn.GetFullName(), PngFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL || dlg.GetPath().IsEmpty() )
|
if( dlg.ShowModal() == wxID_CANCEL || dlg.GetPath().IsEmpty() )
|
||||||
|
|
|
@ -198,7 +198,7 @@ void DIALOG_IMPORT_GRAPHICS::onBrowseFiles( wxCommandEvent& event )
|
||||||
|
|
||||||
wildcardsDesc = _( "All supported formats" ) + wxT( "|" ) + allWildcards + wildcardsDesc;
|
wildcardsDesc = _( "All supported formats" ) + wxT( "|" ) + allWildcards + wildcardsDesc;
|
||||||
|
|
||||||
wxFileDialog dlg( m_parent, _( "Open File" ), path, filename, wildcardsDesc,
|
wxFileDialog dlg( m_parent, _( "Import Graphics" ), path, filename, wildcardsDesc,
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
|
||||||
|
|
Loading…
Reference in New Issue