mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
More removal of open-coded dialog state saving.
This commit is contained in:
parent
2909e984b6
commit
44bd29d592
@ -72,9 +72,6 @@ PROJECT_FILE::PROJECT_FILE( const wxString& aFullPath ) :
|
|||||||
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.netlist",
|
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.netlist",
|
||||||
&m_PcbLastPath[LAST_PATH_NETLIST], "" ) );
|
&m_PcbLastPath[LAST_PATH_NETLIST], "" ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.step",
|
|
||||||
&m_PcbLastPath[LAST_PATH_STEP], "" ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.idf",
|
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.idf",
|
||||||
&m_PcbLastPath[LAST_PATH_IDF], "" ) );
|
&m_PcbLastPath[LAST_PATH_IDF], "" ) );
|
||||||
|
|
||||||
@ -84,15 +81,6 @@ PROJECT_FILE::PROJECT_FILE( const wxString& aFullPath ) :
|
|||||||
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.specctra_dsn",
|
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.specctra_dsn",
|
||||||
&m_PcbLastPath[LAST_PATH_SPECCTRADSN], "" ) );
|
&m_PcbLastPath[LAST_PATH_SPECCTRADSN], "" ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.gencad",
|
|
||||||
&m_PcbLastPath[LAST_PATH_GENCAD], "" ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.pos_files",
|
|
||||||
&m_PcbLastPath[LAST_PATH_POS_FILES], "" ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.svg",
|
|
||||||
&m_PcbLastPath[LAST_PATH_SVG], "" ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.plot",
|
m_params.emplace_back( new PARAM_PATH( "pcbnew.last_paths.plot",
|
||||||
&m_PcbLastPath[LAST_PATH_PLOT], "" ) );
|
&m_PcbLastPath[LAST_PATH_PLOT], "" ) );
|
||||||
|
|
||||||
|
@ -50,16 +50,11 @@ enum LAST_PATH_TYPE : unsigned int
|
|||||||
{
|
{
|
||||||
LAST_PATH_FIRST = 0,
|
LAST_PATH_FIRST = 0,
|
||||||
LAST_PATH_NETLIST = LAST_PATH_FIRST,
|
LAST_PATH_NETLIST = LAST_PATH_FIRST,
|
||||||
LAST_PATH_STEP,
|
|
||||||
LAST_PATH_IDF,
|
LAST_PATH_IDF,
|
||||||
LAST_PATH_VRML,
|
LAST_PATH_VRML,
|
||||||
LAST_PATH_SPECCTRADSN,
|
LAST_PATH_SPECCTRADSN,
|
||||||
LAST_PATH_GENCAD,
|
|
||||||
LAST_PATH_POS_FILES,
|
|
||||||
LAST_PATH_SVG,
|
|
||||||
LAST_PATH_PLOT,
|
LAST_PATH_PLOT,
|
||||||
LAST_PATH_2581,
|
LAST_PATH_2581,
|
||||||
LAST_PATH_ODBPP,
|
|
||||||
|
|
||||||
LAST_PATH_SIZE
|
LAST_PATH_SIZE
|
||||||
};
|
};
|
||||||
|
@ -156,10 +156,7 @@ DIALOG_DRC::~DIALOG_DRC()
|
|||||||
g_lastIgnored.clear();
|
g_lastIgnored.clear();
|
||||||
|
|
||||||
for( int ii = 0; ii < m_ignoredList->GetItemCount(); ++ii )
|
for( int ii = 0; ii < m_ignoredList->GetItemCount(); ++ii )
|
||||||
{
|
g_lastIgnored.push_back( { m_ignoredList->GetItemText( ii ), m_ignoredList->GetItemData( ii ) } );
|
||||||
g_lastIgnored.push_back( { m_ignoredList->GetItemText( ii ),
|
|
||||||
m_ignoredList->GetItemData( ii ) } );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_markersTreeModel->DecRef();
|
m_markersTreeModel->DecRef();
|
||||||
m_unconnectedTreeModel->DecRef();
|
m_unconnectedTreeModel->DecRef();
|
||||||
@ -178,8 +175,8 @@ void DIALOG_DRC::OnActivateDlg( wxActivateEvent& aEvent )
|
|||||||
{
|
{
|
||||||
if( m_currentBoard != m_frame->GetBoard() )
|
if( m_currentBoard != m_frame->GetBoard() )
|
||||||
{
|
{
|
||||||
// If m_currentBoard is not the current board, (for instance because a new board
|
// If m_currentBoard is not the current board, (for instance because a new board was loaded),
|
||||||
// was loaded), close the dialog, because many pointers are now invalid in lists
|
// close the dialog, because many pointers are now invalid in lists
|
||||||
SetReturnCode( wxID_CANCEL );
|
SetReturnCode( wxID_CANCEL );
|
||||||
Close();
|
Close();
|
||||||
|
|
||||||
@ -616,8 +613,7 @@ void DIALOG_DRC::OnDRCItemDClick( wxDataViewEvent& aEvent )
|
|||||||
Show( false );
|
Show( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not skip aEvent here: this is not useful, and Pcbnew crashes
|
// Do not skip aEvent here: this is not useful, and Pcbnew crashes if skipped (at least on MSW)
|
||||||
// if skipped (at least on Windows)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,14 +109,14 @@ int BOARD_EDITOR_CONTROL::ExportIDF( const TOOL_EVENT& aEvent )
|
|||||||
|
|
||||||
if( dlg.GetSetBoardReferencePoint() )
|
if( dlg.GetSetBoardReferencePoint() )
|
||||||
{
|
{
|
||||||
BOX2I bbox = board->GetBoardEdgesBoundingBox();
|
aXRef = dlg.GetXRefMM();
|
||||||
aXRef = bbox.Centre().x * pcbIUScale.MM_PER_IU;
|
aYRef = dlg.GetYRefMM();
|
||||||
aYRef = bbox.Centre().y * pcbIUScale.MM_PER_IU;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aXRef = dlg.GetXRefMM();
|
BOX2I bbox = board->GetBoardEdgesBoundingBox();
|
||||||
aYRef = dlg.GetYRefMM();
|
aXRef = bbox.Centre().x * pcbIUScale.MM_PER_IU;
|
||||||
|
aYRef = bbox.Centre().y * pcbIUScale.MM_PER_IU;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString fullFilename = dlg.FilePicker()->GetPath();
|
wxString fullFilename = dlg.FilePicker()->GetPath();
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <progress_reporter.h>
|
#include <progress_reporter.h>
|
||||||
#include <project.h>
|
#include <project.h>
|
||||||
#include <project/board_project_settings.h>
|
|
||||||
#include <project/project_file.h>
|
#include <project/project_file.h>
|
||||||
#include <settings/settings_manager.h>
|
#include <settings/settings_manager.h>
|
||||||
#include <widgets/std_bitmap_button.h>
|
#include <widgets/std_bitmap_button.h>
|
||||||
@ -49,7 +48,6 @@
|
|||||||
#include <wx/tarstrm.h>
|
#include <wx/tarstrm.h>
|
||||||
#include <wx/zstream.h>
|
#include <wx/zstream.h>
|
||||||
|
|
||||||
static wxString s_oemColumn = wxEmptyString;
|
|
||||||
|
|
||||||
DIALOG_EXPORT_ODBPP::DIALOG_EXPORT_ODBPP( PCB_EDIT_FRAME* aParent ) :
|
DIALOG_EXPORT_ODBPP::DIALOG_EXPORT_ODBPP( PCB_EDIT_FRAME* aParent ) :
|
||||||
DIALOG_EXPORT_ODBPP_BASE( aParent ),
|
DIALOG_EXPORT_ODBPP_BASE( aParent ),
|
||||||
@ -60,22 +58,9 @@ DIALOG_EXPORT_ODBPP::DIALOG_EXPORT_ODBPP( PCB_EDIT_FRAME* aParent ) :
|
|||||||
|
|
||||||
SetupStandardButtons();
|
SetupStandardButtons();
|
||||||
|
|
||||||
wxString path = m_parent->GetLastPath( LAST_PATH_ODBPP );
|
// DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
|
||||||
|
// non-job versions.
|
||||||
if( path.IsEmpty() )
|
m_hash_key = TO_UTF8( GetTitle() );
|
||||||
{
|
|
||||||
wxFileName brdFile( m_parent->GetBoard()->GetFileName() );
|
|
||||||
wxFileName odbFile( brdFile.GetPath(),
|
|
||||||
wxString::Format( wxS( "%s-odb" ), brdFile.GetName() ),
|
|
||||||
FILEEXT::ArchiveFileExtension );
|
|
||||||
path = odbFile.GetFullPath();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_outputFileName->SetValue( path );
|
|
||||||
|
|
||||||
// Fill wxChoice (and others) items with data before calling finishDialogSettings()
|
|
||||||
// to calculate suitable widgets sizes
|
|
||||||
Init();
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
@ -92,17 +77,43 @@ DIALOG_EXPORT_ODBPP::DIALOG_EXPORT_ODBPP( JOB_EXPORT_PCB_ODB* aJob, PCB_EDIT_FRA
|
|||||||
|
|
||||||
SetupStandardButtons();
|
SetupStandardButtons();
|
||||||
|
|
||||||
m_outputFileName->SetValue( m_job->GetConfiguredOutputPath() );
|
// DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
|
||||||
|
// non-job versions.
|
||||||
// Fill wxChoice (and others) items with data before calling finishDialogSettings()
|
m_hash_key = TO_UTF8( GetTitle() );
|
||||||
// to calculate suitable widgets sizes
|
|
||||||
Init();
|
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool DIALOG_EXPORT_ODBPP::TransferDataToWindow()
|
||||||
|
{
|
||||||
|
if( !m_job )
|
||||||
|
{
|
||||||
|
if( m_outputFileName->GetValue().IsEmpty() )
|
||||||
|
{
|
||||||
|
wxFileName brdFile( m_parent->GetBoard()->GetFileName() );
|
||||||
|
wxFileName odbFile( brdFile.GetPath(), wxString::Format( wxS( "%s-odb" ), brdFile.GetName() ),
|
||||||
|
FILEEXT::ArchiveFileExtension );
|
||||||
|
|
||||||
|
m_outputFileName->SetValue( odbFile.GetFullPath() );
|
||||||
|
OnFmtChoiceOptionChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetTitle( m_job->GetSettingsDialogTitle() );
|
||||||
|
|
||||||
|
m_choiceUnits->SetSelection( static_cast<int>( m_job->m_units ) );
|
||||||
|
m_precision->SetValue( m_job->m_precision );
|
||||||
|
m_choiceCompress->SetSelection( static_cast<int>( m_job->m_compressionMode ) );
|
||||||
|
m_outputFileName->SetValue( m_job->GetConfiguredOutputPath() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_EXPORT_ODBPP::onBrowseClicked( wxCommandEvent& event )
|
void DIALOG_EXPORT_ODBPP::onBrowseClicked( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
// clang-format off
|
// clang-format off
|
||||||
@ -120,8 +131,7 @@ void DIALOG_EXPORT_ODBPP::onBrowseClicked( wxCommandEvent& event )
|
|||||||
|
|
||||||
wxString fileDialogName( wxString::Format( wxS( "%s-odb" ), brdFile.GetName() ) );
|
wxString fileDialogName( wxString::Format( wxS( "%s-odb" ), brdFile.GetName() ) );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Export ODB++ File" ), fn.GetPath(), fileDialogName, filter,
|
wxFileDialog dlg( this, _( "Export ODB++ File" ), fn.GetPath(), fileDialogName, filter, wxFD_SAVE );
|
||||||
wxFD_SAVE );
|
|
||||||
|
|
||||||
if( dlg.ShowModal() == wxID_CANCEL )
|
if( dlg.ShowModal() == wxID_CANCEL )
|
||||||
return;
|
return;
|
||||||
@ -132,30 +142,26 @@ void DIALOG_EXPORT_ODBPP::onBrowseClicked( wxCommandEvent& event )
|
|||||||
|
|
||||||
if( fn.GetExt().Lower() == "zip" )
|
if( fn.GetExt().Lower() == "zip" )
|
||||||
{
|
{
|
||||||
m_choiceCompress->SetSelection(
|
m_choiceCompress->SetSelection( static_cast<int>( JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::ZIP ) );
|
||||||
static_cast<int>( JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::ZIP ) );
|
|
||||||
}
|
}
|
||||||
else if( fn.GetExt().Lower() == "tgz" )
|
else if( fn.GetExt().Lower() == "tgz" )
|
||||||
{
|
{
|
||||||
m_choiceCompress->SetSelection(
|
m_choiceCompress->SetSelection( static_cast<int>( JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::TGZ ) );
|
||||||
static_cast<int>( JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::TGZ ) );
|
|
||||||
}
|
}
|
||||||
else if( path.EndsWith( "/" ) || path.EndsWith( "\\" ) )
|
else if( path.EndsWith( "/" ) || path.EndsWith( "\\" ) )
|
||||||
{
|
{
|
||||||
m_choiceCompress->SetSelection(
|
m_choiceCompress->SetSelection( static_cast<int>( JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::NONE ) );
|
||||||
static_cast<int>( JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::NONE ) );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxString msg;
|
DisplayErrorMessage( this, _( "The selected output file name is not a supported archive format." ) );
|
||||||
msg.Printf( _( "The selected output file name is not a supported archive format." ) );
|
|
||||||
DisplayErrorMessage( this, msg );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_outputFileName->SetValue( path );
|
m_outputFileName->SetValue( path );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_EXPORT_ODBPP::onFormatChoice( wxCommandEvent& event )
|
void DIALOG_EXPORT_ODBPP::onFormatChoice( wxCommandEvent& event )
|
||||||
{
|
{
|
||||||
OnFmtChoiceOptionChanged();
|
OnFmtChoiceOptionChanged();
|
||||||
@ -168,8 +174,7 @@ void DIALOG_EXPORT_ODBPP::OnFmtChoiceOptionChanged()
|
|||||||
|
|
||||||
wxFileName fileName( fn );
|
wxFileName fileName( fn );
|
||||||
|
|
||||||
auto compressionMode =
|
auto compressionMode = static_cast<JOB_EXPORT_PCB_ODB::ODB_COMPRESSION>( m_choiceCompress->GetSelection() );
|
||||||
static_cast<JOB_EXPORT_PCB_ODB::ODB_COMPRESSION>( m_choiceCompress->GetSelection() );
|
|
||||||
|
|
||||||
int sepIdx = std::max( fn.Find( '/', true ), fn.Find( '\\', true ) );
|
int sepIdx = std::max( fn.Find( '/', true ), fn.Find( '\\', true ) );
|
||||||
int dotIdx = fn.Find( '.', true );
|
int dotIdx = fn.Find( '.', true );
|
||||||
@ -184,9 +189,14 @@ void DIALOG_EXPORT_ODBPP::OnFmtChoiceOptionChanged()
|
|||||||
case JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::ZIP:
|
case JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::ZIP:
|
||||||
fn = fn + '.' + FILEEXT::ArchiveFileExtension;
|
fn = fn + '.' + FILEEXT::ArchiveFileExtension;
|
||||||
break;
|
break;
|
||||||
case JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::TGZ: fn += ".tgz"; break;
|
case JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::TGZ:
|
||||||
case JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::NONE: fn = wxFileName( fn, "" ).GetFullPath(); break;
|
fn += ".tgz";
|
||||||
default: break;
|
break;
|
||||||
|
case JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::NONE:
|
||||||
|
fn = wxFileName( fn, "" ).GetFullPath();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
m_outputFileName->SetValue( fn );
|
m_outputFileName->SetValue( fn );
|
||||||
@ -200,14 +210,11 @@ void DIALOG_EXPORT_ODBPP::onOKClick( wxCommandEvent& event )
|
|||||||
|
|
||||||
if( fn.IsEmpty() )
|
if( fn.IsEmpty() )
|
||||||
{
|
{
|
||||||
wxString msg;
|
DisplayErrorMessage( this, _( "Output file name cannot be empty." ) );
|
||||||
msg.Printf( _( "Output file name cannot be empty." ) );
|
|
||||||
DisplayErrorMessage( this, msg );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto compressionMode = static_cast<JOB_EXPORT_PCB_ODB::ODB_COMPRESSION>(
|
auto compressionMode = static_cast<JOB_EXPORT_PCB_ODB::ODB_COMPRESSION>( m_choiceCompress->GetSelection() );
|
||||||
m_choiceCompress->GetSelection() );
|
|
||||||
|
|
||||||
wxFileName fileName( fn );
|
wxFileName fileName( fn );
|
||||||
bool isDirectory = fileName.IsDir();
|
bool isDirectory = fileName.IsDir();
|
||||||
@ -215,65 +222,20 @@ void DIALOG_EXPORT_ODBPP::onOKClick( wxCommandEvent& event )
|
|||||||
|
|
||||||
if( ( compressionMode == JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::NONE && !isDirectory )
|
if( ( compressionMode == JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::NONE && !isDirectory )
|
||||||
|| ( compressionMode == JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::ZIP && extension != "zip" )
|
|| ( compressionMode == JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::ZIP && extension != "zip" )
|
||||||
|| ( compressionMode == JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::TGZ
|
|| ( compressionMode == JOB_EXPORT_PCB_ODB::ODB_COMPRESSION::TGZ && extension != "tgz" ) )
|
||||||
&& extension != "tgz" ) )
|
|
||||||
{
|
{
|
||||||
wxString msg;
|
DisplayErrorMessage( this, _( "The output file name conflicts with the selected compression format." ) );
|
||||||
msg.Printf(
|
|
||||||
_( "The output file name conflicts with the selected compression format." ) );
|
|
||||||
DisplayErrorMessage( this, msg );
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_parent->SetLastPath( LAST_PATH_ODBPP, m_outputFileName->GetValue() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_EXPORT_ODBPP::Init()
|
|
||||||
{
|
|
||||||
if( !m_job )
|
|
||||||
{
|
|
||||||
if( PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" ) )
|
|
||||||
{
|
|
||||||
m_choiceUnits->SetSelection( cfg->m_ExportODBPP.units );
|
|
||||||
m_precision->SetValue( cfg->m_ExportODBPP.precision );
|
|
||||||
m_choiceCompress->SetSelection( cfg->m_ExportODBPP.compressFormat );
|
|
||||||
OnFmtChoiceOptionChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetTitle( m_job->GetSettingsDialogTitle() );
|
|
||||||
|
|
||||||
m_choiceUnits->SetSelection( static_cast<int>( m_job->m_units ) );
|
|
||||||
m_precision->SetValue( m_job->m_precision );
|
|
||||||
m_choiceCompress->SetSelection( static_cast<int>( m_job->m_compressionMode ) );
|
|
||||||
m_outputFileName->SetValue( m_job->GetConfiguredOutputPath() );
|
|
||||||
}
|
|
||||||
|
|
||||||
// DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
|
|
||||||
// non-job versions (which have different sizes).
|
|
||||||
m_hash_key = TO_UTF8( GetTitle() );
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_EXPORT_ODBPP::TransferDataFromWindow()
|
bool DIALOG_EXPORT_ODBPP::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
if( !m_job )
|
if( m_job )
|
||||||
{
|
|
||||||
if( PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" ) )
|
|
||||||
{
|
|
||||||
cfg->m_ExportODBPP.units = m_choiceUnits->GetSelection();
|
|
||||||
cfg->m_ExportODBPP.precision = m_precision->GetValue();
|
|
||||||
cfg->m_ExportODBPP.compressFormat = m_choiceCompress->GetSelection();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
m_job->SetConfiguredOutputPath( m_outputFileName->GetValue() );
|
m_job->SetConfiguredOutputPath( m_outputFileName->GetValue() );
|
||||||
|
|
||||||
@ -287,8 +249,7 @@ bool DIALOG_EXPORT_ODBPP::TransferDataFromWindow()
|
|||||||
|
|
||||||
|
|
||||||
void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BOARD* aBoard,
|
void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BOARD* aBoard,
|
||||||
PCB_EDIT_FRAME* aParentFrame,
|
PCB_EDIT_FRAME* aParentFrame, PROGRESS_REPORTER* aProgressReporter,
|
||||||
PROGRESS_REPORTER* aProgressReporter,
|
|
||||||
REPORTER* aReporter )
|
REPORTER* aReporter )
|
||||||
{
|
{
|
||||||
wxCHECK( aBoard, /* void */ );
|
wxCHECK( aBoard, /* void */ );
|
||||||
@ -351,12 +312,10 @@ void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BO
|
|||||||
{
|
{
|
||||||
if( aParentFrame )
|
if( aParentFrame )
|
||||||
{
|
{
|
||||||
msg = wxString::Format( _( "Output files '%s' already exists. "
|
msg = wxString::Format( _( "Output files '%s' already exists. Do you want to overwrite it?" ),
|
||||||
"Do you want to overwrite it?" ),
|
|
||||||
outputFn.GetFullPath() );
|
outputFn.GetFullPath() );
|
||||||
|
|
||||||
KIDIALOG errorDlg( aParentFrame, msg, _( "Confirmation" ),
|
KIDIALOG errorDlg( aParentFrame, msg, _( "Confirmation" ), wxOK | wxCANCEL | wxICON_WARNING );
|
||||||
wxOK | wxCANCEL | wxICON_WARNING );
|
|
||||||
errorDlg.SetOKLabel( _( "Overwrite" ) );
|
errorDlg.SetOKLabel( _( "Overwrite" ) );
|
||||||
|
|
||||||
if( errorDlg.ShowModal() != wxID_OK )
|
if( errorDlg.ShowModal() != wxID_OK )
|
||||||
@ -364,16 +323,14 @@ void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BO
|
|||||||
|
|
||||||
if( !wxRemoveFile( outputFn.GetFullPath() ) )
|
if( !wxRemoveFile( outputFn.GetFullPath() ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Cannot remove existing output file '%s'." ),
|
msg.Printf( _( "Cannot remove existing output file '%s'." ), outputFn.GetFullPath() );
|
||||||
outputFn.GetFullPath() );
|
|
||||||
DisplayErrorMessage( aParentFrame, msg );
|
DisplayErrorMessage( aParentFrame, msg );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg = wxString::Format( _( "Output file '%s' already exists." ),
|
msg = wxString::Format( _( "Output file '%s' already exists." ), outputFn.GetFullPath() );
|
||||||
outputFn.GetFullPath() );
|
|
||||||
|
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
@ -409,8 +366,7 @@ void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BO
|
|||||||
"Do you want to overwrite it?" ),
|
"Do you want to overwrite it?" ),
|
||||||
tempFile.GetFullPath() );
|
tempFile.GetFullPath() );
|
||||||
|
|
||||||
KIDIALOG errorDlg( aParentFrame, msg, _( "Confirmation" ),
|
KIDIALOG errorDlg( aParentFrame, msg, _( "Confirmation" ), wxOK | wxCANCEL | wxICON_WARNING );
|
||||||
wxOK | wxCANCEL | wxICON_WARNING );
|
|
||||||
errorDlg.SetOKLabel( _( "Overwrite" ) );
|
errorDlg.SetOKLabel( _( "Overwrite" ) );
|
||||||
|
|
||||||
if( errorDlg.ShowModal() != wxID_OK )
|
if( errorDlg.ShowModal() != wxID_OK )
|
||||||
@ -418,16 +374,14 @@ void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BO
|
|||||||
|
|
||||||
if( !tempFile.Rmdir( wxPATH_RMDIR_RECURSIVE ) )
|
if( !tempFile.Rmdir( wxPATH_RMDIR_RECURSIVE ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Cannot remove existing output directory '%s'." ),
|
msg.Printf( _( "Cannot remove existing output directory '%s'." ), tempFile.GetFullPath() );
|
||||||
tempFile.GetFullPath() );
|
|
||||||
DisplayErrorMessage( aParentFrame, msg );
|
DisplayErrorMessage( aParentFrame, msg );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg = wxString::Format( _( "Output directory '%s' already exists." ),
|
msg = wxString::Format( _( "Output directory '%s' already exists." ), tempFile.GetFullPath() );
|
||||||
tempFile.GetFullPath() );
|
|
||||||
|
|
||||||
if( aReporter )
|
if( aReporter )
|
||||||
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
aReporter->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
@ -442,7 +396,8 @@ void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BO
|
|||||||
props["units"] = aJob.m_units == JOB_EXPORT_PCB_ODB::ODB_UNITS::MM ? "mm" : "inch";
|
props["units"] = aJob.m_units == JOB_EXPORT_PCB_ODB::ODB_UNITS::MM ? "mm" : "inch";
|
||||||
props["sigfig"] = wxString::Format( "%d", aJob.m_precision );
|
props["sigfig"] = wxString::Format( "%d", aJob.m_precision );
|
||||||
|
|
||||||
auto saveFile = [&]() -> bool
|
auto saveFile =
|
||||||
|
[&]() -> bool
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@ -515,11 +470,10 @@ void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BO
|
|||||||
while( cont )
|
while( cont )
|
||||||
{
|
{
|
||||||
wxFileName fileInZip( dirPath, fileName );
|
wxFileName fileInZip( dirPath, fileName );
|
||||||
wxString relativePath =
|
wxString relativePath = fileName;
|
||||||
parentPath.IsEmpty()
|
|
||||||
? fileName
|
if( !parentPath.IsEmpty() )
|
||||||
: parentPath + wxString( wxFileName::GetPathSeparator() )
|
relativePath = parentPath + wxString( wxFileName::GetPathSeparator() ) + fileName;
|
||||||
+ fileName;
|
|
||||||
|
|
||||||
if( wxFileName::DirExists( fileInZip.GetFullPath() ) )
|
if( wxFileName::DirExists( fileInZip.GetFullPath() ) )
|
||||||
{
|
{
|
||||||
@ -559,11 +513,10 @@ void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BO
|
|||||||
while( cont )
|
while( cont )
|
||||||
{
|
{
|
||||||
wxFileName fileInTar( dirPath, fileName );
|
wxFileName fileInTar( dirPath, fileName );
|
||||||
wxString relativePath =
|
wxString relativePath = fileName;
|
||||||
parentPath.IsEmpty()
|
|
||||||
? fileName
|
if( !parentPath.IsEmpty() )
|
||||||
: parentPath + wxString( wxFileName::GetPathSeparator() )
|
relativePath = parentPath + wxString( wxFileName::GetPathSeparator() ) + fileName;
|
||||||
+ fileName;
|
|
||||||
|
|
||||||
if( wxFileName::DirExists( fileInTar.GetFullPath() ) )
|
if( wxFileName::DirExists( fileInTar.GetFullPath() ) )
|
||||||
{
|
{
|
||||||
@ -573,16 +526,14 @@ void DIALOG_EXPORT_ODBPP::GenerateODBPPFiles( const JOB_EXPORT_PCB_ODB& aJob, BO
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxFFileInputStream fileStream( fileInTar.GetFullPath() );
|
wxFFileInputStream fileStream( fileInTar.GetFullPath() );
|
||||||
tarStream.PutNextEntry( relativePath, wxDateTime::Now(),
|
tarStream.PutNextEntry( relativePath, wxDateTime::Now(), fileStream.GetLength() );
|
||||||
fileStream.GetLength() );
|
|
||||||
fileStream.Read( tarStream );
|
fileStream.Read( tarStream );
|
||||||
}
|
}
|
||||||
cont = dir.GetNext( &fileName );
|
cont = dir.GetNext( &fileName );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
addDirToTar(
|
addDirToTar( tempFile.GetFullPath(),
|
||||||
tempFile.GetFullPath(),
|
|
||||||
tempFile.GetPath( wxPATH_NO_SEPARATOR ).AfterLast( tempFile.GetPathSeparator() ) );
|
tempFile.GetPath( wxPATH_NO_SEPARATOR ).AfterLast( tempFile.GetPathSeparator() ) );
|
||||||
|
|
||||||
tarStream.Close();
|
tarStream.Close();
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ODBPP_EXPORT_DIALOG_H
|
#pragma once
|
||||||
#define ODBPP_EXPORT_DIALOG_H
|
|
||||||
#include "dialog_export_odbpp_base.h"
|
#include "dialog_export_odbpp_base.h"
|
||||||
|
|
||||||
class PCB_EDIT_FRAME;
|
class PCB_EDIT_FRAME;
|
||||||
@ -60,12 +60,10 @@ private:
|
|||||||
|
|
||||||
void OnFmtChoiceOptionChanged();
|
void OnFmtChoiceOptionChanged();
|
||||||
|
|
||||||
|
bool TransferDataToWindow() override;
|
||||||
bool Init();
|
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
|
|
||||||
|
private:
|
||||||
PCB_EDIT_FRAME* m_parent;
|
PCB_EDIT_FRAME* m_parent;
|
||||||
JOB_EXPORT_PCB_ODB* m_job;
|
JOB_EXPORT_PCB_ODB* m_job;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ODBPP_EXPORT_DIALOG_H
|
|
||||||
|
@ -93,19 +93,6 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aEditFrame, wxWindow* aP
|
|||||||
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
||||||
SetupStandardButtons( { { wxID_OK, _( "Export" ) },
|
SetupStandardButtons( { { wxID_OK, _( "Export" ) },
|
||||||
{ wxID_CANCEL, _( "Close" ) } } );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
|
|
||||||
// Build default output file name
|
|
||||||
// (last saved filename in project or built from board filename)
|
|
||||||
wxString path = m_editFrame->GetLastPath( LAST_PATH_STEP );
|
|
||||||
|
|
||||||
if( path.IsEmpty() )
|
|
||||||
{
|
|
||||||
wxFileName brdFile( m_editFrame->GetBoard()->GetFileName() );
|
|
||||||
brdFile.SetExt( wxT( "step" ) );
|
|
||||||
path = brdFile.GetFullPath();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_outputFileName->SetValue( path );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -169,7 +156,16 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aEditFrame, wxWindow* aP
|
|||||||
|
|
||||||
bool DIALOG_EXPORT_STEP::TransferDataToWindow()
|
bool DIALOG_EXPORT_STEP::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
if( m_job )
|
if( !m_job )
|
||||||
|
{
|
||||||
|
if( m_outputFileName->GetValue().IsEmpty() )
|
||||||
|
{
|
||||||
|
wxFileName brdFile( m_editFrame->GetBoard()->GetFileName() );
|
||||||
|
brdFile.SetExt( wxT( "step" ) );
|
||||||
|
m_outputFileName->SetValue( brdFile.GetFullPath() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
m_rbBoardCenterOrigin->SetValue( true ); // Default
|
m_rbBoardCenterOrigin->SetValue( true ); // Default
|
||||||
|
|
||||||
@ -331,7 +327,6 @@ void DIALOG_EXPORT_STEP::OnFmtChoiceOptionChanged()
|
|||||||
path = path.Mid( 0, dotIdx ) << '.' << newExt;
|
path = path.Mid( 0, dotIdx ) << '.' << newExt;
|
||||||
|
|
||||||
m_outputFileName->SetValue( path );
|
m_outputFileName->SetValue( path );
|
||||||
m_editFrame->SetLastPath( LAST_PATH_STEP, path );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -367,8 +362,6 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
|||||||
|
|
||||||
if( !m_job )
|
if( !m_job )
|
||||||
{
|
{
|
||||||
m_editFrame->SetLastPath( LAST_PATH_STEP, path );
|
|
||||||
|
|
||||||
// Build the absolute path of current output directory to preselect it in the file browser.
|
// Build the absolute path of current output directory to preselect it in the file browser.
|
||||||
std::function<bool( wxString* )> textResolver =
|
std::function<bool( wxString* )> textResolver =
|
||||||
[&]( wxString* token ) -> bool
|
[&]( wxString* token ) -> bool
|
||||||
|
@ -22,9 +22,6 @@
|
|||||||
* or you may write to the Free Software Foundation, Inc.,
|
* or you may write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
/**
|
|
||||||
* @file dialog_export_vrml.cpp
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <wx/dir.h>
|
#include <wx/dir.h>
|
||||||
|
|
||||||
@ -43,46 +40,11 @@
|
|||||||
|
|
||||||
DIALOG_EXPORT_VRML::DIALOG_EXPORT_VRML( PCB_EDIT_FRAME* aEditFrame ) :
|
DIALOG_EXPORT_VRML::DIALOG_EXPORT_VRML( PCB_EDIT_FRAME* aEditFrame ) :
|
||||||
DIALOG_EXPORT_VRML_BASE( aEditFrame ),
|
DIALOG_EXPORT_VRML_BASE( aEditFrame ),
|
||||||
m_editFrame( aEditFrame ),
|
m_xOrigin( aEditFrame, m_xLabel, m_VRML_Xref, m_xUnits ),
|
||||||
m_unitsOpt( 1 ),
|
m_yOrigin( aEditFrame, m_yLabel, m_VRML_Yref, m_yUnits )
|
||||||
m_noUnspecified( false ),
|
|
||||||
m_noDNP( false ),
|
|
||||||
m_copy3DFilesOpt( false ),
|
|
||||||
m_useRelativePathsOpt( false ),
|
|
||||||
m_RefUnits( 0 ),
|
|
||||||
m_XRef( 0.0 ),
|
|
||||||
m_YRef( 0.0 ),
|
|
||||||
m_originMode( 0 )
|
|
||||||
{
|
{
|
||||||
m_filePicker->SetFocus();
|
m_filePicker->SetFocus();
|
||||||
|
|
||||||
if( PCBNEW_SETTINGS* cfg = m_editFrame->GetPcbNewSettings() )
|
|
||||||
{
|
|
||||||
m_unitsOpt = cfg->m_ExportVrml.units;
|
|
||||||
m_noUnspecified = cfg->m_ExportVrml.no_unspecified;
|
|
||||||
m_noDNP = cfg->m_ExportVrml.no_dnp;
|
|
||||||
m_copy3DFilesOpt = cfg->m_ExportVrml.copy_3d_models;
|
|
||||||
m_useRelativePathsOpt = cfg->m_ExportVrml.use_relative_paths;
|
|
||||||
m_RefUnits = cfg->m_ExportVrml.ref_units;
|
|
||||||
m_XRef = cfg->m_ExportVrml.ref_x;
|
|
||||||
m_YRef = cfg->m_ExportVrml.ref_y;
|
|
||||||
m_originMode = cfg->m_ExportVrml.origin_mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_rbCoordOrigin->SetSelection( m_originMode );
|
|
||||||
m_rbSelectUnits->SetSelection( m_unitsOpt );
|
|
||||||
m_cbRemoveUnspecified->SetValue( m_noUnspecified );
|
|
||||||
m_cbRemoveDNP->SetValue( m_noDNP );
|
|
||||||
m_cbCopyFiles->SetValue( m_copy3DFilesOpt );
|
|
||||||
m_cbUseRelativePaths->SetValue( m_useRelativePathsOpt );
|
|
||||||
m_VRML_RefUnitChoice->SetSelection( m_RefUnits );
|
|
||||||
wxString tmpStr;
|
|
||||||
tmpStr << m_XRef;
|
|
||||||
m_VRML_Xref->SetValue( tmpStr );
|
|
||||||
tmpStr = wxT( "" );
|
|
||||||
tmpStr << m_YRef;
|
|
||||||
m_VRML_Yref->SetValue( tmpStr );
|
|
||||||
|
|
||||||
SetupStandardButtons();
|
SetupStandardButtons();
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
@ -90,65 +52,26 @@ DIALOG_EXPORT_VRML::DIALOG_EXPORT_VRML( PCB_EDIT_FRAME* aEditFrame ) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DIALOG_EXPORT_VRML::~DIALOG_EXPORT_VRML()
|
|
||||||
{
|
|
||||||
m_unitsOpt = GetUnits();
|
|
||||||
m_noUnspecified = GetNoUnspecifiedOption();
|
|
||||||
m_noDNP = GetNoDNPOption();
|
|
||||||
m_copy3DFilesOpt = GetCopyFilesOption();
|
|
||||||
|
|
||||||
if( PCBNEW_SETTINGS* cfg = m_editFrame->GetPcbNewSettings() )
|
|
||||||
{
|
|
||||||
cfg->m_ExportVrml.units = m_unitsOpt;
|
|
||||||
cfg->m_ExportVrml.no_unspecified = m_noUnspecified;
|
|
||||||
cfg->m_ExportVrml.no_dnp = m_noDNP;
|
|
||||||
cfg->m_ExportVrml.copy_3d_models = m_copy3DFilesOpt;
|
|
||||||
cfg->m_ExportVrml.use_relative_paths = m_useRelativePathsOpt;
|
|
||||||
cfg->m_ExportVrml.ref_units = m_VRML_RefUnitChoice->GetSelection();
|
|
||||||
cfg->m_ExportVrml.origin_mode = m_rbCoordOrigin->GetSelection();
|
|
||||||
|
|
||||||
double val = 0.0;
|
|
||||||
m_VRML_Xref->GetValue().ToDouble( &val );
|
|
||||||
cfg->m_ExportVrml.ref_x = val;
|
|
||||||
|
|
||||||
m_VRML_Yref->GetValue().ToDouble( &val );
|
|
||||||
cfg->m_ExportVrml.ref_y = val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_EXPORT_VRML::TransferDataFromWindow()
|
bool DIALOG_EXPORT_VRML::TransferDataFromWindow()
|
||||||
{
|
{
|
||||||
wxFileName fn = m_filePicker->GetPath();
|
wxFileName fn = m_filePicker->GetPath();
|
||||||
|
|
||||||
if( fn.Exists() )
|
if( fn.Exists() )
|
||||||
{
|
{
|
||||||
if( wxMessageBox( _( "Are you sure you want to overwrite the existing file?" ),
|
if( wxMessageBox( _( "Are you sure you want to overwrite the existing file?" ), _( "Warning" ),
|
||||||
_( "Warning" ), wxYES_NO | wxCENTER | wxICON_QUESTION, this ) == wxNO )
|
wxYES_NO | wxCENTER | wxICON_QUESTION, this )
|
||||||
|
== wxNO )
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double DIALOG_EXPORT_VRML::GetXRef()
|
|
||||||
{
|
|
||||||
return EDA_UNIT_UTILS::UI::DoubleValueFromString( m_VRML_Xref->GetValue() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
double DIALOG_EXPORT_VRML::GetYRef()
|
|
||||||
{
|
|
||||||
return EDA_UNIT_UTILS::UI::DoubleValueFromString( m_VRML_Yref->GetValue() );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int BOARD_EDITOR_CONTROL::ExportVRML( const TOOL_EVENT& aEvent )
|
int BOARD_EDITOR_CONTROL::ExportVRML( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
// These variables are static to keep info during the session.
|
|
||||||
static wxString subDirFor3Dshapes;
|
|
||||||
|
|
||||||
BOARD* board = m_frame->GetBoard();
|
BOARD* board = m_frame->GetBoard();
|
||||||
|
|
||||||
// Build default output file name
|
// Build default output file name
|
||||||
@ -161,32 +84,21 @@ int BOARD_EDITOR_CONTROL::ExportVRML( const TOOL_EVENT& aEvent )
|
|||||||
path = brdFile.GetFullPath();
|
path = brdFile.GetFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( subDirFor3Dshapes.IsEmpty() )
|
|
||||||
subDirFor3Dshapes = wxT( "shapes3D" );
|
|
||||||
|
|
||||||
// The general VRML scale factor
|
|
||||||
// Assuming the VRML default unit is the mm
|
|
||||||
// this is the mm to VRML scaling factor for mm, 0.1 inch, and inch
|
|
||||||
double scaleList[4] = { 1.0, 0.001, 10.0/25.4, 1.0/25.4 };
|
|
||||||
|
|
||||||
DIALOG_EXPORT_VRML dlg( m_frame );
|
DIALOG_EXPORT_VRML dlg( m_frame );
|
||||||
dlg.FilePicker()->SetPath( path );
|
dlg.FilePicker()->SetPath( path );
|
||||||
dlg.SetSubdir( subDirFor3Dshapes );
|
|
||||||
|
|
||||||
if( dlg.ShowModal() != wxID_OK )
|
if( dlg.ShowModal() != wxID_OK )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
double aXRef = dlg.GetXRef();
|
double aXRef;
|
||||||
double aYRef = dlg.GetYRef();
|
double aYRef;
|
||||||
|
|
||||||
if( dlg.GetRefUnitsChoice() == 1 )
|
if( dlg.GetSetUserDefinedOrigin() )
|
||||||
{
|
{
|
||||||
// selected reference unit is in inches
|
aXRef = dlg.GetXRefMM();
|
||||||
aXRef *= 25.4;
|
aYRef = dlg.GetYRefMM();
|
||||||
aYRef *= 25.4;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if( dlg.GetOriginChoice() == 1 )
|
|
||||||
{
|
{
|
||||||
// Origin = board center:
|
// Origin = board center:
|
||||||
BOX2I bbox = board->ComputeBoundingBox( true );
|
BOX2I bbox = board->ComputeBoundingBox( true );
|
||||||
@ -194,22 +106,15 @@ int BOARD_EDITOR_CONTROL::ExportVRML( const TOOL_EVENT& aEvent )
|
|||||||
aYRef = pcbIUScale.IUTomm( bbox.GetCenter().y );
|
aYRef = pcbIUScale.IUTomm( bbox.GetCenter().y );
|
||||||
}
|
}
|
||||||
|
|
||||||
double scale = scaleList[dlg.GetUnits()]; // final scale export
|
|
||||||
bool includeUnspecified = !dlg.GetNoUnspecifiedOption();
|
|
||||||
bool includeDNP = !dlg.GetNoDNPOption();
|
|
||||||
bool export3DFiles = dlg.GetCopyFilesOption();
|
|
||||||
bool useRelativePaths = dlg.GetUseRelativePathsOption();
|
|
||||||
|
|
||||||
path = dlg.FilePicker()->GetPath();
|
path = dlg.FilePicker()->GetPath();
|
||||||
m_frame->SetLastPath( LAST_PATH_VRML, path );
|
m_frame->SetLastPath( LAST_PATH_VRML, path );
|
||||||
wxFileName modelPath = path;
|
wxFileName modelPath = path;
|
||||||
|
|
||||||
wxBusyCursor dummy;
|
wxBusyCursor dummy;
|
||||||
|
|
||||||
subDirFor3Dshapes = dlg.GetSubdir3Dshapes();
|
modelPath.AppendDir( dlg.GetSubdir3Dshapes() );
|
||||||
modelPath.AppendDir( subDirFor3Dshapes );
|
|
||||||
|
|
||||||
if( export3DFiles && !modelPath.DirExists() )
|
if( dlg.GetCopyFilesOption() && !modelPath.DirExists() )
|
||||||
{
|
{
|
||||||
if( !modelPath.Mkdir() )
|
if( !modelPath.Mkdir() )
|
||||||
{
|
{
|
||||||
@ -219,11 +124,16 @@ int BOARD_EDITOR_CONTROL::ExportVRML( const TOOL_EVENT& aEvent )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !m_frame->ExportVRML_File( path, scale, includeUnspecified, includeDNP, export3DFiles,
|
if( !m_frame->ExportVRML_File( path,
|
||||||
useRelativePaths, modelPath.GetPath(), aXRef, aYRef ) )
|
dlg.GetScale(),
|
||||||
|
!dlg.GetNoUnspecifiedOption(),
|
||||||
|
!dlg.GetNoDNPOption(),
|
||||||
|
dlg.GetCopyFilesOption(),
|
||||||
|
dlg.GetUseRelativePathsOption(),
|
||||||
|
modelPath.GetPath(),
|
||||||
|
aXRef, aYRef ) )
|
||||||
{
|
{
|
||||||
DisplayErrorMessage( m_frame, wxString::Format( _( "Failed to create file '%s'." ),
|
DisplayErrorMessage( m_frame, wxString::Format( _( "Failed to create file '%s'." ), path ) );
|
||||||
path ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <dialog_export_vrml_base.h> // the wxFormBuilder header file
|
#include <dialog_export_vrml_base.h> // the wxFormBuilder header file
|
||||||
|
#include <widgets/unit_binder.h>
|
||||||
|
|
||||||
class PCB_EDIT_FRAME;
|
class PCB_EDIT_FRAME;
|
||||||
|
|
||||||
@ -33,35 +34,28 @@ class DIALOG_EXPORT_VRML : public DIALOG_EXPORT_VRML_BASE
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DIALOG_EXPORT_VRML( PCB_EDIT_FRAME* aEditFrame );
|
DIALOG_EXPORT_VRML( PCB_EDIT_FRAME* aEditFrame );
|
||||||
|
~DIALOG_EXPORT_VRML() = default;
|
||||||
~DIALOG_EXPORT_VRML();
|
|
||||||
|
|
||||||
void SetSubdir( const wxString& aDir ) { m_SubdirNameCtrl->SetValue( aDir ); }
|
|
||||||
|
|
||||||
wxString GetSubdir3Dshapes() { return m_SubdirNameCtrl->GetValue(); }
|
|
||||||
|
|
||||||
wxFilePickerCtrl* FilePicker() { return m_filePicker; }
|
wxFilePickerCtrl* FilePicker() { return m_filePicker; }
|
||||||
|
|
||||||
int GetRefUnitsChoice() { return m_VRML_RefUnitChoice->GetSelection(); }
|
wxString GetSubdir3Dshapes() { return m_SubdirNameCtrl->GetValue(); }
|
||||||
|
int GetSetUserDefinedOrigin() { return m_cbUserDefinedOrigin->GetValue(); }
|
||||||
|
|
||||||
int GetOriginChoice() { return m_rbCoordOrigin->GetSelection(); }
|
double GetXRefMM() { return pcbIUScale.IUTomm( m_xOrigin.GetIntValue() ); }
|
||||||
|
double GetYRefMM() { return pcbIUScale.IUTomm( m_yOrigin.GetIntValue() ); }
|
||||||
|
|
||||||
double GetXRef();
|
double GetScale()
|
||||||
|
{
|
||||||
double GetYRef();
|
// Assuming the VRML default unit is the mm
|
||||||
|
// this is the mm to VRML scaling factor for mm, 0.1 inch, and inch
|
||||||
int GetUnits() { return m_unitsOpt = m_rbSelectUnits->GetSelection(); }
|
double scaleList[4] = { 1.0, 0.001, 10.0/25.4, 1.0/25.4 };
|
||||||
|
return scaleList[ m_unitsChoice->GetSelection() ];
|
||||||
|
}
|
||||||
|
|
||||||
bool GetNoUnspecifiedOption() { return m_cbRemoveUnspecified->GetValue(); }
|
bool GetNoUnspecifiedOption() { return m_cbRemoveUnspecified->GetValue(); }
|
||||||
|
|
||||||
bool GetNoDNPOption() { return m_cbRemoveDNP->GetValue(); }
|
bool GetNoDNPOption() { return m_cbRemoveDNP->GetValue(); }
|
||||||
|
bool GetCopyFilesOption() { return m_cbCopyFiles->GetValue(); }
|
||||||
bool GetCopyFilesOption() { return m_copy3DFilesOpt = m_cbCopyFiles->GetValue(); }
|
bool GetUseRelativePathsOption() { return m_cbUseRelativePaths->GetValue(); }
|
||||||
|
|
||||||
bool GetUseRelativePathsOption()
|
|
||||||
{
|
|
||||||
return m_useRelativePathsOpt = m_cbUseRelativePaths->GetValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnUpdateUseRelativePath( wxUpdateUIEvent& event ) override
|
void OnUpdateUseRelativePath( wxUpdateUIEvent& event ) override
|
||||||
{
|
{
|
||||||
@ -72,15 +66,6 @@ public:
|
|||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
PCB_EDIT_FRAME* m_editFrame;
|
UNIT_BINDER m_xOrigin;
|
||||||
int m_unitsOpt; // Remember last units option
|
UNIT_BINDER m_yOrigin;
|
||||||
bool m_noUnspecified; // Remember last No Unspecified Component option
|
|
||||||
bool m_noDNP; // Remember last No DNP Component option
|
|
||||||
bool m_copy3DFilesOpt; // Remember last copy model files option
|
|
||||||
bool m_useRelativePathsOpt; // Remember last use absolute paths option
|
|
||||||
int m_RefUnits; // Remember last units for Reference Point
|
|
||||||
double m_XRef; // Remember last X Reference Point
|
|
||||||
double m_YRef; // Remember last Y Reference Point
|
|
||||||
int m_originMode; // Origin selection option
|
|
||||||
// (0 = user, 1 = board center)
|
|
||||||
};
|
};
|
@ -32,47 +32,28 @@ DIALOG_EXPORT_VRML_BASE::DIALOG_EXPORT_VRML_BASE( wxWindow* parent, wxWindowID i
|
|||||||
m_staticText3->Wrap( -1 );
|
m_staticText3->Wrap( -1 );
|
||||||
bUpperSizer->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
bUpperSizer->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_SubdirNameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
m_SubdirNameCtrl = new wxTextCtrl( this, wxID_ANY, _("shapes3D"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bUpperSizer->Add( m_SubdirNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bUpperSizer->Add( m_SubdirNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizer1->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
|
bSizer1->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bSizerOptions;
|
wxBoxSizer* bSizerOptions;
|
||||||
bSizerOptions = new wxBoxSizer( wxHORIZONTAL );
|
bSizerOptions = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
wxString m_rbCoordOriginChoices[] = { _("User defined origin"), _("Board center origin") };
|
m_cbUserDefinedOrigin = new wxCheckBox( this, wxID_ANY, _("User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
int m_rbCoordOriginNChoices = sizeof( m_rbCoordOriginChoices ) / sizeof( wxString );
|
m_cbUserDefinedOrigin->SetValue(true);
|
||||||
m_rbCoordOrigin = new wxRadioBox( this, wxID_ANY, _("Coordinate Origin Options"), wxDefaultPosition, wxDefaultSize, m_rbCoordOriginNChoices, m_rbCoordOriginChoices, 1, wxRA_SPECIFY_COLS );
|
bSizerOptions->Add( m_cbUserDefinedOrigin, 0, wxALL, 5 );
|
||||||
m_rbCoordOrigin->SetSelection( 0 );
|
|
||||||
bSizerOptions->Add( m_rbCoordOrigin, 1, wxALL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
wxBoxSizer* bSizerVrmlUnits;
|
|
||||||
bSizerVrmlUnits = new wxBoxSizer( wxVERTICAL );
|
|
||||||
|
|
||||||
m_staticText6 = new wxStaticText( this, wxID_ANY, _("User defined origin:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText6->Wrap( -1 );
|
|
||||||
bSizerVrmlUnits->Add( m_staticText6, 0, wxALL, 5 );
|
|
||||||
|
|
||||||
wxFlexGridSizer* fgSizerOptions;
|
wxFlexGridSizer* fgSizerOptions;
|
||||||
fgSizerOptions = new wxFlexGridSizer( 0, 2, 0, 0 );
|
fgSizerOptions = new wxFlexGridSizer( 0, 3, 3, 0 );
|
||||||
fgSizerOptions->AddGrowableCol( 1 );
|
fgSizerOptions->AddGrowableCol( 1 );
|
||||||
fgSizerOptions->SetFlexibleDirection( wxBOTH );
|
fgSizerOptions->SetFlexibleDirection( wxBOTH );
|
||||||
fgSizerOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
fgSizerOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
|
||||||
m_staticText61 = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_xLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText61->Wrap( -1 );
|
m_xLabel->Wrap( -1 );
|
||||||
fgSizerOptions->Add( m_staticText61, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
fgSizerOptions->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxString m_VRML_RefUnitChoiceChoices[] = { _("mm"), _("inch") };
|
|
||||||
int m_VRML_RefUnitChoiceNChoices = sizeof( m_VRML_RefUnitChoiceChoices ) / sizeof( wxString );
|
|
||||||
m_VRML_RefUnitChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_VRML_RefUnitChoiceNChoices, m_VRML_RefUnitChoiceChoices, 0 );
|
|
||||||
m_VRML_RefUnitChoice->SetSelection( 0 );
|
|
||||||
fgSizerOptions->Add( m_VRML_RefUnitChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
m_staticText4 = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_staticText4->Wrap( -1 );
|
|
||||||
fgSizerOptions->Add( m_staticText4, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
||||||
|
|
||||||
m_VRML_Xref = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_VRML_Xref = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
@ -83,11 +64,15 @@ DIALOG_EXPORT_VRML_BASE::DIALOG_EXPORT_VRML_BASE( wxWindow* parent, wxWindowID i
|
|||||||
#else
|
#else
|
||||||
m_VRML_Xref->SetMaxLength( 8 );
|
m_VRML_Xref->SetMaxLength( 8 );
|
||||||
#endif
|
#endif
|
||||||
fgSizerOptions->Add( m_VRML_Xref, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
fgSizerOptions->Add( m_VRML_Xref, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_staticText5 = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_xUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_staticText5->Wrap( -1 );
|
m_xUnits->Wrap( -1 );
|
||||||
fgSizerOptions->Add( m_staticText5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
fgSizerOptions->Add( m_xUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
m_yLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_yLabel->Wrap( -1 );
|
||||||
|
fgSizerOptions->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_VRML_Yref = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_VRML_Yref = new wxTextCtrl( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
@ -98,22 +83,33 @@ DIALOG_EXPORT_VRML_BASE::DIALOG_EXPORT_VRML_BASE( wxWindow* parent, wxWindowID i
|
|||||||
#else
|
#else
|
||||||
m_VRML_Yref->SetMaxLength( 8 );
|
m_VRML_Yref->SetMaxLength( 8 );
|
||||||
#endif
|
#endif
|
||||||
fgSizerOptions->Add( m_VRML_Yref, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
|
fgSizerOptions->Add( m_VRML_Yref, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_yUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_yUnits->Wrap( -1 );
|
||||||
|
fgSizerOptions->Add( m_yUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerVrmlUnits->Add( fgSizerOptions, 1, wxEXPAND, 5 );
|
bSizerOptions->Add( fgSizerOptions, 0, wxEXPAND|wxRIGHT|wxLEFT, 20 );
|
||||||
|
|
||||||
|
wxBoxSizer* bSizer7;
|
||||||
|
bSizer7 = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
m_unitsLabel = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_unitsLabel->Wrap( -1 );
|
||||||
|
bSizer7->Add( m_unitsLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
wxString m_unitsChoiceChoices[] = { _("mm"), _("meter"), _("0.1 inch"), _("inch") };
|
||||||
|
int m_unitsChoiceNChoices = sizeof( m_unitsChoiceChoices ) / sizeof( wxString );
|
||||||
|
m_unitsChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitsChoiceNChoices, m_unitsChoiceChoices, 0 );
|
||||||
|
m_unitsChoice->SetSelection( 1 );
|
||||||
|
bSizer7->Add( m_unitsChoice, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerOptions->Add( bSizerVrmlUnits, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bSizerOptions->Add( bSizer7, 0, wxEXPAND|wxTOP, 5 );
|
||||||
|
|
||||||
wxString m_rbSelectUnitsChoices[] = { _("mm"), _("meter"), _("0.1 Inch"), _("Inch") };
|
|
||||||
int m_rbSelectUnitsNChoices = sizeof( m_rbSelectUnitsChoices ) / sizeof( wxString );
|
|
||||||
m_rbSelectUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_rbSelectUnitsNChoices, m_rbSelectUnitsChoices, 1, wxRA_SPECIFY_COLS );
|
|
||||||
m_rbSelectUnits->SetSelection( 0 );
|
|
||||||
bSizerOptions->Add( m_rbSelectUnits, 1, wxALL|wxEXPAND, 5 );
|
|
||||||
|
|
||||||
|
|
||||||
bSizer1->Add( bSizerOptions, 0, wxEXPAND, 5 );
|
bSizer1->Add( bSizerOptions, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bLowerSizer;
|
wxBoxSizer* bLowerSizer;
|
||||||
bLowerSizer = new wxBoxSizer( wxHORIZONTAL );
|
bLowerSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
@ -122,15 +118,15 @@ DIALOG_EXPORT_VRML_BASE::DIALOG_EXPORT_VRML_BASE( wxWindow* parent, wxWindowID i
|
|||||||
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_cbRemoveDNP = new wxCheckBox( this, wxID_ANY, _("Ignore 'Do not populate' components"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbRemoveDNP = new wxCheckBox( this, wxID_ANY, _("Ignore 'Do not populate' components"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer4->Add( m_cbRemoveDNP, 0, wxALL, 5 );
|
bSizer4->Add( m_cbRemoveDNP, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_cbRemoveUnspecified = new wxCheckBox( this, wxID_ANY, _("Ignore 'Unspecified' components"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbRemoveUnspecified = new wxCheckBox( this, wxID_ANY, _("Ignore 'Unspecified' components"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer4->Add( m_cbRemoveUnspecified, 0, wxALL, 5 );
|
bSizer4->Add( m_cbRemoveUnspecified, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_cbCopyFiles = new wxCheckBox( this, wxID_ANY, _("Copy 3D model files to 3D model path"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbCopyFiles = new wxCheckBox( this, wxID_ANY, _("Copy 3D model files to 3D model path"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_cbCopyFiles->SetToolTip( _("If checked: copy 3D models to the destination folder\nIf not checked: Embed 3D models in the VRML board file") );
|
m_cbCopyFiles->SetToolTip( _("If checked: copy 3D models to the destination folder\nIf not checked: Embed 3D models in the VRML board file") );
|
||||||
|
|
||||||
bSizer4->Add( m_cbCopyFiles, 0, wxALL, 5 );
|
bSizer4->Add( m_cbCopyFiles, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_cbUseRelativePaths = new wxCheckBox( this, wxID_ANY, _("Use relative paths to model files in board VRML file"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_cbUseRelativePaths = new wxCheckBox( this, wxID_ANY, _("Use relative paths to model files in board VRML file"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_cbUseRelativePaths->SetToolTip( _("Use paths for model files in board VRML file relative to the VRML file") );
|
m_cbUseRelativePaths->SetToolTip( _("Use paths for model files in board VRML file relative to the VRML file") );
|
||||||
|
@ -322,7 +322,7 @@
|
|||||||
<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="value">shapes3D</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>
|
||||||
@ -332,18 +332,18 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="true">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizerOptions</property>
|
<property name="name">bSizerOptions</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxALL</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxRadioBox" expanded="true">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<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>
|
||||||
@ -357,7 +357,7 @@
|
|||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="choices">"User defined origin" "Board center origin"</property>
|
<property name="checked">1</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
@ -373,8 +373,7 @@
|
|||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Coordinate Origin Options</property>
|
<property name="label">User defined origin</property>
|
||||||
<property name="majorDimension">1</property>
|
|
||||||
<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>
|
||||||
@ -382,7 +381,7 @@
|
|||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_rbCoordOrigin</property>
|
<property name="name">m_cbUserDefinedOrigin</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>
|
||||||
@ -390,10 +389,9 @@
|
|||||||
<property name="pin_button">1</property>
|
<property name="pin_button">1</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="selection">0</property>
|
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
<property name="style"></property>
|
||||||
<property name="subclass">; ; forward_declare</property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="toolbar_pane">0</property>
|
<property name="toolbar_pane">0</property>
|
||||||
<property name="tooltip"></property>
|
<property name="tooltip"></property>
|
||||||
@ -406,83 +404,12 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
|
||||||
<property name="proportion">1</property>
|
|
||||||
<object class="wxBoxSizer" expanded="true">
|
|
||||||
<property name="minimum_size"></property>
|
|
||||||
<property name="name">bSizerVrmlUnits</property>
|
|
||||||
<property name="orient">wxVERTICAL</property>
|
|
||||||
<property name="permission">none</property>
|
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">20</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="false">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer">0</property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position">0</property>
|
|
||||||
<property name="aui_row">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></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="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label">User defined origin:</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"></property>
|
|
||||||
<property name="moveable">1</property>
|
|
||||||
<property name="name">m_staticText6</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="resize">Resizable</property>
|
|
||||||
<property name="show">1</property>
|
|
||||||
<property name="size"></property>
|
|
||||||
<property name="style"></property>
|
|
||||||
<property name="subclass"></property>
|
|
||||||
<property name="toolbar_pane">0</property>
|
|
||||||
<property name="tooltip"></property>
|
|
||||||
<property name="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
<property name="wrap">-1</property>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="false">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxEXPAND</property>
|
|
||||||
<property name="proportion">1</property>
|
|
||||||
<object class="wxFlexGridSizer" expanded="false">
|
<object class="wxFlexGridSizer" expanded="false">
|
||||||
<property name="cols">2</property>
|
<property name="cols">3</property>
|
||||||
<property name="flexible_direction">wxBOTH</property>
|
<property name="flexible_direction">wxBOTH</property>
|
||||||
<property name="growablecols">1</property>
|
<property name="growablecols">1</property>
|
||||||
<property name="growablerows"></property>
|
<property name="growablerows"></property>
|
||||||
@ -492,137 +419,10 @@
|
|||||||
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<property name="rows">0</property>
|
<property name="rows">0</property>
|
||||||
<property name="vgap">0</property>
|
<property name="vgap">3</property>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxStaticText" expanded="false">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer">0</property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position">0</property>
|
|
||||||
<property name="aui_row">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></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="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</property>
|
|
||||||
<property name="label">Units:</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"></property>
|
|
||||||
<property name="moveable">1</property>
|
|
||||||
<property name="name">m_staticText61</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="resize">Resizable</property>
|
|
||||||
<property name="show">1</property>
|
|
||||||
<property name="size"></property>
|
|
||||||
<property name="style"></property>
|
|
||||||
<property name="subclass"></property>
|
|
||||||
<property name="toolbar_pane">0</property>
|
|
||||||
<property name="tooltip"></property>
|
|
||||||
<property name="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
<property name="wrap">-1</property>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="false">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
|
|
||||||
<property name="proportion">0</property>
|
|
||||||
<object class="wxChoice" expanded="false">
|
|
||||||
<property name="BottomDockable">1</property>
|
|
||||||
<property name="LeftDockable">1</property>
|
|
||||||
<property name="RightDockable">1</property>
|
|
||||||
<property name="TopDockable">1</property>
|
|
||||||
<property name="aui_layer">0</property>
|
|
||||||
<property name="aui_name"></property>
|
|
||||||
<property name="aui_position">0</property>
|
|
||||||
<property name="aui_row">0</property>
|
|
||||||
<property name="best_size"></property>
|
|
||||||
<property name="bg"></property>
|
|
||||||
<property name="caption"></property>
|
|
||||||
<property name="caption_visible">1</property>
|
|
||||||
<property name="center_pane">0</property>
|
|
||||||
<property name="choices">"mm" "inch"</property>
|
|
||||||
<property name="close_button">1</property>
|
|
||||||
<property name="context_help"></property>
|
|
||||||
<property name="context_menu">1</property>
|
|
||||||
<property name="default_pane">0</property>
|
|
||||||
<property name="dock">Dock</property>
|
|
||||||
<property name="dock_fixed">0</property>
|
|
||||||
<property name="docking">Left</property>
|
|
||||||
<property name="drag_accept_files">0</property>
|
|
||||||
<property name="enabled">1</property>
|
|
||||||
<property name="fg"></property>
|
|
||||||
<property name="floatable">1</property>
|
|
||||||
<property name="font"></property>
|
|
||||||
<property name="gripper">0</property>
|
|
||||||
<property name="hidden">0</property>
|
|
||||||
<property name="id">wxID_ANY</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"></property>
|
|
||||||
<property name="moveable">1</property>
|
|
||||||
<property name="name">m_VRML_RefUnitChoice</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="resize">Resizable</property>
|
|
||||||
<property name="selection">0</property>
|
|
||||||
<property name="show">1</property>
|
|
||||||
<property name="size"></property>
|
|
||||||
<property name="style"></property>
|
|
||||||
<property name="subclass"></property>
|
|
||||||
<property name="toolbar_pane">0</property>
|
|
||||||
<property name="tooltip"></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="window_extra_style"></property>
|
|
||||||
<property name="window_name"></property>
|
|
||||||
<property name="window_style"></property>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="false">
|
|
||||||
<property name="border">5</property>
|
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="false">
|
<object class="wxStaticText" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
@ -662,7 +462,7 @@
|
|||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_staticText4</property>
|
<property name="name">m_xLabel</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>
|
||||||
@ -684,7 +484,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxTextCtrl" expanded="false">
|
<object class="wxTextCtrl" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
@ -747,9 +547,71 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="sizeritem" expanded="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></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="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">units</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"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_xUnits</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="resize">Resizable</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="false">
|
<object class="wxStaticText" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
@ -789,7 +651,7 @@
|
|||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_staticText5</property>
|
<property name="name">m_yLabel</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>
|
||||||
@ -811,7 +673,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT|wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxTextCtrl" expanded="false">
|
<object class="wxTextCtrl" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
@ -874,15 +736,11 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
<object class="sizeritem" expanded="true">
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
</object>
|
|
||||||
<object class="sizeritem" expanded="false">
|
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxRadioBox" expanded="false">
|
<object class="wxStaticText" expanded="true">
|
||||||
<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>
|
||||||
@ -896,7 +754,6 @@
|
|||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="choices">"mm" "meter" "0.1 Inch" "Inch"</property>
|
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
@ -912,8 +769,8 @@
|
|||||||
<property name="gripper">0</property>
|
<property name="gripper">0</property>
|
||||||
<property name="hidden">0</property>
|
<property name="hidden">0</property>
|
||||||
<property name="id">wxID_ANY</property>
|
<property name="id">wxID_ANY</property>
|
||||||
<property name="label">Units</property>
|
<property name="label">units</property>
|
||||||
<property name="majorDimension">1</property>
|
<property name="markup">0</property>
|
||||||
<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>
|
||||||
@ -921,7 +778,7 @@
|
|||||||
<property name="minimize_button">0</property>
|
<property name="minimize_button">0</property>
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="moveable">1</property>
|
<property name="moveable">1</property>
|
||||||
<property name="name">m_rbSelectUnits</property>
|
<property name="name">m_yUnits</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>
|
||||||
@ -929,11 +786,145 @@
|
|||||||
<property name="pin_button">1</property>
|
<property name="pin_button">1</property>
|
||||||
<property name="pos"></property>
|
<property name="pos"></property>
|
||||||
<property name="resize">Resizable</property>
|
<property name="resize">Resizable</property>
|
||||||
<property name="selection">0</property>
|
|
||||||
<property name="show">1</property>
|
<property name="show">1</property>
|
||||||
<property name="size"></property>
|
<property name="size"></property>
|
||||||
<property name="style">wxRA_SPECIFY_COLS</property>
|
<property name="style"></property>
|
||||||
<property name="subclass"></property>
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxEXPAND|wxTOP</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxBoxSizer" expanded="true">
|
||||||
|
<property name="minimum_size"></property>
|
||||||
|
<property name="name">bSizer7</property>
|
||||||
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
|
<property name="permission">none</property>
|
||||||
|
<object class="sizeritem" expanded="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxStaticText" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></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="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</property>
|
||||||
|
<property name="label">Units:</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"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_unitsLabel</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="resize">Resizable</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
|
<property name="toolbar_pane">0</property>
|
||||||
|
<property name="tooltip"></property>
|
||||||
|
<property name="window_extra_style"></property>
|
||||||
|
<property name="window_name"></property>
|
||||||
|
<property name="window_style"></property>
|
||||||
|
<property name="wrap">-1</property>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
|
<object class="sizeritem" expanded="true">
|
||||||
|
<property name="border">5</property>
|
||||||
|
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
||||||
|
<property name="proportion">0</property>
|
||||||
|
<object class="wxChoice" expanded="true">
|
||||||
|
<property name="BottomDockable">1</property>
|
||||||
|
<property name="LeftDockable">1</property>
|
||||||
|
<property name="RightDockable">1</property>
|
||||||
|
<property name="TopDockable">1</property>
|
||||||
|
<property name="aui_layer">0</property>
|
||||||
|
<property name="aui_name"></property>
|
||||||
|
<property name="aui_position">0</property>
|
||||||
|
<property name="aui_row">0</property>
|
||||||
|
<property name="best_size"></property>
|
||||||
|
<property name="bg"></property>
|
||||||
|
<property name="caption"></property>
|
||||||
|
<property name="caption_visible">1</property>
|
||||||
|
<property name="center_pane">0</property>
|
||||||
|
<property name="choices">"mm" "meter" "0.1 inch" "inch"</property>
|
||||||
|
<property name="close_button">1</property>
|
||||||
|
<property name="context_help"></property>
|
||||||
|
<property name="context_menu">1</property>
|
||||||
|
<property name="default_pane">0</property>
|
||||||
|
<property name="dock">Dock</property>
|
||||||
|
<property name="dock_fixed">0</property>
|
||||||
|
<property name="docking">Left</property>
|
||||||
|
<property name="drag_accept_files">0</property>
|
||||||
|
<property name="enabled">1</property>
|
||||||
|
<property name="fg"></property>
|
||||||
|
<property name="floatable">1</property>
|
||||||
|
<property name="font"></property>
|
||||||
|
<property name="gripper">0</property>
|
||||||
|
<property name="hidden">0</property>
|
||||||
|
<property name="id">wxID_ANY</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"></property>
|
||||||
|
<property name="moveable">1</property>
|
||||||
|
<property name="name">m_unitsChoice</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="resize">Resizable</property>
|
||||||
|
<property name="selection">1</property>
|
||||||
|
<property name="show">1</property>
|
||||||
|
<property name="size"></property>
|
||||||
|
<property name="style"></property>
|
||||||
|
<property name="subclass">; ; forward_declare</property>
|
||||||
<property name="toolbar_pane">0</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>
|
||||||
@ -947,6 +938,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
|
</object>
|
||||||
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
<property name="flag">wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT</property>
|
||||||
@ -967,7 +960,7 @@
|
|||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="true">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
@ -1032,7 +1025,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="true">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="true">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
@ -1097,7 +1090,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="false">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL</property>
|
<property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="false">
|
<object class="wxCheckBox" expanded="false">
|
||||||
<property name="BottomDockable">1</property>
|
<property name="BottomDockable">1</property>
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
#include <wx/filepicker.h>
|
#include <wx/filepicker.h>
|
||||||
#include <wx/textctrl.h>
|
#include <wx/textctrl.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/radiobox.h>
|
|
||||||
#include <wx/choice.h>
|
|
||||||
#include <wx/checkbox.h>
|
#include <wx/checkbox.h>
|
||||||
|
#include <wx/choice.h>
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/dialog.h>
|
#include <wx/dialog.h>
|
||||||
|
|
||||||
@ -40,15 +39,15 @@ class DIALOG_EXPORT_VRML_BASE : public DIALOG_SHIM
|
|||||||
wxFilePickerCtrl* m_filePicker;
|
wxFilePickerCtrl* m_filePicker;
|
||||||
wxStaticText* m_staticText3;
|
wxStaticText* m_staticText3;
|
||||||
wxTextCtrl* m_SubdirNameCtrl;
|
wxTextCtrl* m_SubdirNameCtrl;
|
||||||
wxRadioBox* m_rbCoordOrigin;
|
wxCheckBox* m_cbUserDefinedOrigin;
|
||||||
wxStaticText* m_staticText6;
|
wxStaticText* m_xLabel;
|
||||||
wxStaticText* m_staticText61;
|
|
||||||
wxChoice* m_VRML_RefUnitChoice;
|
|
||||||
wxStaticText* m_staticText4;
|
|
||||||
wxTextCtrl* m_VRML_Xref;
|
wxTextCtrl* m_VRML_Xref;
|
||||||
wxStaticText* m_staticText5;
|
wxStaticText* m_xUnits;
|
||||||
|
wxStaticText* m_yLabel;
|
||||||
wxTextCtrl* m_VRML_Yref;
|
wxTextCtrl* m_VRML_Yref;
|
||||||
wxRadioBox* m_rbSelectUnits;
|
wxStaticText* m_yUnits;
|
||||||
|
wxStaticText* m_unitsLabel;
|
||||||
|
wxChoice* m_unitsChoice;
|
||||||
wxCheckBox* m_cbRemoveDNP;
|
wxCheckBox* m_cbRemoveDNP;
|
||||||
wxCheckBox* m_cbRemoveUnspecified;
|
wxCheckBox* m_cbRemoveUnspecified;
|
||||||
wxCheckBox* m_cbCopyFiles;
|
wxCheckBox* m_cbCopyFiles;
|
||||||
|
@ -29,11 +29,6 @@ DIALOG_FILTER_SELECTION::DIALOG_FILTER_SELECTION( PCB_BASE_FRAME* aParent, OPTIO
|
|||||||
DIALOG_FILTER_SELECTION_BASE( aParent ),
|
DIALOG_FILTER_SELECTION_BASE( aParent ),
|
||||||
m_options( aOptions )
|
m_options( aOptions )
|
||||||
{
|
{
|
||||||
setCheckboxStatesFromOptions( aOptions );
|
|
||||||
|
|
||||||
// Update "All Items" checkbox based on how many items are currently checked
|
|
||||||
m_All_Items->Set3StateValue( GetSuggestedAllItemsState() );
|
|
||||||
|
|
||||||
SetupStandardButtons();
|
SetupStandardButtons();
|
||||||
|
|
||||||
SetFocus();
|
SetFocus();
|
||||||
@ -54,7 +49,7 @@ void DIALOG_FILTER_SELECTION::checkBoxClicked( wxCommandEvent& aEvent )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_FILTER_SELECTION::setCheckboxStatesFromOptions( OPTIONS& aOptions )
|
bool DIALOG_FILTER_SELECTION::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
m_Include_Modules->SetValue( m_options.includeModules );
|
m_Include_Modules->SetValue( m_options.includeModules );
|
||||||
m_IncludeLockedModules->SetValue( m_options.includeLockedModules );
|
m_IncludeLockedModules->SetValue( m_options.includeLockedModules );
|
||||||
@ -70,6 +65,11 @@ void DIALOG_FILTER_SELECTION::setCheckboxStatesFromOptions( OPTIONS& aOptions )
|
|||||||
m_Include_Draw_Items->SetValue( m_options.includeItemsOnTechLayers );
|
m_Include_Draw_Items->SetValue( m_options.includeItemsOnTechLayers );
|
||||||
m_Include_Edges_Items->SetValue( m_options.includeBoardOutlineLayer );
|
m_Include_Edges_Items->SetValue( m_options.includeBoardOutlineLayer );
|
||||||
m_Include_PcbTexts->SetValue( m_options.includePcbTexts );
|
m_Include_PcbTexts->SetValue( m_options.includePcbTexts );
|
||||||
|
|
||||||
|
// Update "All Items" checkbox based on how many items are currently checked
|
||||||
|
m_All_Items->Set3StateValue( GetSuggestedAllItemsState() );
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -93,28 +93,27 @@ void DIALOG_FILTER_SELECTION::forceCheckboxStates( bool aNewState )
|
|||||||
|
|
||||||
wxCheckBoxState DIALOG_FILTER_SELECTION::GetSuggestedAllItemsState( void )
|
wxCheckBoxState DIALOG_FILTER_SELECTION::GetSuggestedAllItemsState( void )
|
||||||
{
|
{
|
||||||
int NumChecked = 0;
|
int numChecked = 0;
|
||||||
int NumCheckboxesOnDlg = 0;
|
int numCheckboxesOnDlg = 0;
|
||||||
wxCheckBoxState SuggestedState = wxCHK_UNDETERMINED; // Assume some but not all are checked
|
wxCheckBoxState suggestedState = wxCHK_UNDETERMINED; // Assume some but not all are checked
|
||||||
|
|
||||||
// Find out how many checkboxes are on this dialog. We do this at runtime so future
|
// Find out how many checkboxes are on this dialog. We do this at runtime so future
|
||||||
// changes to the dialog are easier to handle or automatic, depending on the change.
|
// changes to the dialog are easier to handle or automatic, depending on the change.
|
||||||
const wxWindowList& list = this->GetChildren();
|
const wxWindowList& list = this->GetChildren();
|
||||||
|
|
||||||
for( wxWindowList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext() )
|
for( wxWindowList::compatibility_iterator node = list.GetFirst(); node; node = node->GetNext() )
|
||||||
{
|
{
|
||||||
wxWindow* current = node->GetData();
|
wxWindow* current = node->GetData();
|
||||||
|
|
||||||
// If casting the child window to a checkbox isn't NULL, then the child is a checkbox
|
// If casting the child window to a checkbox isn't NULL, then the child is a checkbox
|
||||||
wxCheckBox* CurrCB = dynamic_cast<wxCheckBox*>( current );
|
if( wxCheckBox* currCB = dynamic_cast<wxCheckBox*>( current ) )
|
||||||
|
|
||||||
if( CurrCB )
|
|
||||||
{
|
{
|
||||||
// Need to get count of checkboxes, but not include the "All Items" checkbox (the only
|
// Need to get count of checkboxes, but not include the "All Items" checkbox (the only
|
||||||
// one that allows the 3rd state) or the hidden one (the only one with an empty label)
|
// one that allows the 3rd state) or the hidden one (the only one with an empty label)
|
||||||
// that keeps the dialog formatted properly
|
// that keeps the dialog formatted properly
|
||||||
|
|
||||||
if( !( "" == CurrCB->GetLabelText() || CurrCB->Is3State() ) )
|
if( !( currCB->GetLabelText().IsEmpty() || currCB->Is3State() ) )
|
||||||
NumCheckboxesOnDlg++;
|
numCheckboxesOnDlg++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,49 +121,38 @@ wxCheckBoxState DIALOG_FILTER_SELECTION::GetSuggestedAllItemsState( void )
|
|||||||
// if "footprints" is checked.
|
// if "footprints" is checked.
|
||||||
if( m_Include_Modules->GetValue() )
|
if( m_Include_Modules->GetValue() )
|
||||||
{
|
{
|
||||||
NumChecked++;
|
numChecked++;
|
||||||
|
|
||||||
if( m_IncludeLockedModules->GetValue() )
|
if( m_IncludeLockedModules->GetValue() )
|
||||||
NumChecked++;
|
numChecked++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If include modules isn't checked then ignore the "Locked Footprints" checkbox in tally
|
// If include modules isn't checked then ignore the "Locked Footprints" checkbox in tally
|
||||||
NumCheckboxesOnDlg--;
|
numCheckboxesOnDlg--;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_Include_Tracks->GetValue() )
|
for( wxCheckBox* cb : { m_Include_Tracks, m_Include_Vias, m_Include_Zones, m_Include_Draw_Items,
|
||||||
NumChecked++;
|
m_Include_Edges_Items, m_Include_PcbTexts } )
|
||||||
|
{
|
||||||
if( m_Include_Vias->GetValue() )
|
if( cb->GetValue() )
|
||||||
NumChecked++;
|
numChecked++;
|
||||||
|
}
|
||||||
if( m_Include_Zones->GetValue() )
|
|
||||||
NumChecked++;
|
|
||||||
|
|
||||||
if( m_Include_Draw_Items->GetValue() )
|
|
||||||
NumChecked++;
|
|
||||||
|
|
||||||
if( m_Include_Edges_Items->GetValue() )
|
|
||||||
NumChecked++;
|
|
||||||
|
|
||||||
if( m_Include_PcbTexts->GetValue() )
|
|
||||||
NumChecked++;
|
|
||||||
|
|
||||||
// Change suggestion if all or none are checked
|
// Change suggestion if all or none are checked
|
||||||
|
|
||||||
if( !NumChecked )
|
if( !numChecked )
|
||||||
SuggestedState = wxCHK_UNCHECKED;
|
suggestedState = wxCHK_UNCHECKED;
|
||||||
else if( NumChecked == NumCheckboxesOnDlg )
|
else if( numChecked == numCheckboxesOnDlg )
|
||||||
SuggestedState = wxCHK_CHECKED;
|
suggestedState = wxCHK_CHECKED;
|
||||||
|
|
||||||
return SuggestedState;
|
return suggestedState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_FILTER_SELECTION::allItemsClicked( wxCommandEvent& aEvent )
|
void DIALOG_FILTER_SELECTION::allItemsClicked( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
if( wxCHK_CHECKED == m_All_Items->Get3StateValue() )
|
if( m_All_Items->Get3StateValue() == wxCHK_CHECKED )
|
||||||
forceCheckboxStates( true ); // Select all items
|
forceCheckboxStates( true ); // Select all items
|
||||||
else
|
else
|
||||||
forceCheckboxStates( false ); // Clear all items
|
forceCheckboxStates( false ); // Clear all items
|
||||||
@ -176,7 +164,6 @@ bool DIALOG_FILTER_SELECTION::TransferDataFromWindow()
|
|||||||
if( !wxDialog::TransferDataFromWindow() )
|
if( !wxDialog::TransferDataFromWindow() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_options.allItems = m_All_Items->Get3StateValue();
|
|
||||||
m_options.includeModules = m_Include_Modules->GetValue();
|
m_options.includeModules = m_Include_Modules->GetValue();
|
||||||
m_options.includeLockedModules = m_IncludeLockedModules->GetValue();
|
m_options.includeLockedModules = m_IncludeLockedModules->GetValue();
|
||||||
m_options.includeTracks = m_Include_Tracks->GetValue();
|
m_options.includeTracks = m_Include_Tracks->GetValue();
|
||||||
|
@ -21,8 +21,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DIALOG_FILTER_SELECTION_H
|
#pragma once
|
||||||
#define DIALOG_FILTER_SELECTION_H
|
|
||||||
|
|
||||||
#include <dialogs/dialog_filter_selection_base.h>
|
#include <dialogs/dialog_filter_selection_base.h>
|
||||||
|
|
||||||
@ -31,13 +30,11 @@ class PCB_BASE_FRAME;
|
|||||||
class DIALOG_FILTER_SELECTION : public DIALOG_FILTER_SELECTION_BASE
|
class DIALOG_FILTER_SELECTION : public DIALOG_FILTER_SELECTION_BASE
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Struct that will be set with the result of the user choices in the dialog
|
* Struct that will be set with the result of the user choices in the dialog
|
||||||
*/
|
*/
|
||||||
struct OPTIONS
|
struct OPTIONS
|
||||||
{
|
{
|
||||||
wxCheckBoxState allItems = wxCHK_UNDETERMINED;
|
|
||||||
bool includeModules = true;
|
bool includeModules = true;
|
||||||
bool includeLockedModules = true;
|
bool includeLockedModules = true;
|
||||||
bool includeTracks = true;
|
bool includeTracks = true;
|
||||||
@ -56,24 +53,19 @@ public:
|
|||||||
* changes made by the dialog on exit.
|
* changes made by the dialog on exit.
|
||||||
*/
|
*/
|
||||||
DIALOG_FILTER_SELECTION( PCB_BASE_FRAME* aParent, OPTIONS& aOptions );
|
DIALOG_FILTER_SELECTION( PCB_BASE_FRAME* aParent, OPTIONS& aOptions );
|
||||||
|
~DIALOG_FILTER_SELECTION() = default;
|
||||||
~DIALOG_FILTER_SELECTION()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
bool TransferDataToWindow() override;
|
||||||
bool TransferDataFromWindow() override;
|
bool TransferDataFromWindow() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void checkBoxClicked( wxCommandEvent& aEvent ) override;
|
void checkBoxClicked( wxCommandEvent& aEvent ) override;
|
||||||
void allItemsClicked( wxCommandEvent& aEvent ) override;
|
void allItemsClicked( wxCommandEvent& aEvent ) override;
|
||||||
|
|
||||||
void setCheckboxStatesFromOptions( OPTIONS& aOptions );
|
|
||||||
void forceCheckboxStates( bool aNewState );
|
void forceCheckboxStates( bool aNewState );
|
||||||
wxCheckBoxState GetSuggestedAllItemsState( void );
|
wxCheckBoxState GetSuggestedAllItemsState( void );
|
||||||
|
|
||||||
///< Reference to the options struct to fill.
|
///< Reference to the options struct to fill.
|
||||||
OPTIONS& m_options;
|
OPTIONS& m_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOG_FILTER_SELECTION_H
|
|
||||||
|
@ -42,27 +42,19 @@ DIALOG_FOOTPRINT_CHECKER::DIALOG_FOOTPRINT_CHECKER( FOOTPRINT_EDIT_FRAME* aParen
|
|||||||
DIALOG_FOOTPRINT_CHECKER_BASE( aParent ),
|
DIALOG_FOOTPRINT_CHECKER_BASE( aParent ),
|
||||||
m_frame( aParent ),
|
m_frame( aParent ),
|
||||||
m_checksRun( false ),
|
m_checksRun( false ),
|
||||||
m_severities( RPT_SEVERITY_ERROR | RPT_SEVERITY_WARNING ),
|
|
||||||
m_centerMarkerOnIdle( nullptr )
|
m_centerMarkerOnIdle( nullptr )
|
||||||
{
|
{
|
||||||
m_markersProvider = std::make_shared<DRC_ITEMS_PROVIDER>( m_frame->GetBoard(),
|
m_markersProvider = std::make_shared<DRC_ITEMS_PROVIDER>( m_frame->GetBoard(), MARKER_BASE::MARKER_DRC );
|
||||||
MARKER_BASE::MARKER_DRC );
|
|
||||||
|
|
||||||
m_markersTreeModel = new RC_TREE_MODEL( m_frame, m_markersDataView );
|
m_markersTreeModel = new RC_TREE_MODEL( m_frame, m_markersDataView );
|
||||||
m_markersDataView->AssociateModel( m_markersTreeModel );
|
m_markersDataView->AssociateModel( m_markersTreeModel );
|
||||||
m_markersTreeModel->Update( m_markersProvider, m_severities );
|
|
||||||
|
|
||||||
if( m_frame->GetBoard()->GetFirstFootprint() == g_lastFootprint )
|
if( m_frame->GetBoard()->GetFirstFootprint() == g_lastFootprint )
|
||||||
{
|
|
||||||
m_checksRun = g_lastChecksRun;
|
m_checksRun = g_lastChecksRun;
|
||||||
updateDisplayedCounts();
|
|
||||||
}
|
|
||||||
|
|
||||||
SetupStandardButtons( { { wxID_OK, _( "Run Checks" ) },
|
SetupStandardButtons( { { wxID_OK, _( "Run Checks" ) },
|
||||||
{ wxID_CANCEL, _( "Close" ) } } );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
|
|
||||||
syncCheckboxes();
|
|
||||||
|
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,31 +70,20 @@ DIALOG_FOOTPRINT_CHECKER::~DIALOG_FOOTPRINT_CHECKER()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void DIALOG_FOOTPRINT_CHECKER::updateData()
|
||||||
|
{
|
||||||
|
m_markersTreeModel->Update( m_markersProvider, getSeverities() );
|
||||||
|
updateDisplayedCounts();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_FOOTPRINT_CHECKER::TransferDataToWindow()
|
bool DIALOG_FOOTPRINT_CHECKER::TransferDataToWindow()
|
||||||
{
|
{
|
||||||
|
updateData();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool DIALOG_FOOTPRINT_CHECKER::TransferDataFromWindow()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Don't globally define this; different facilities use different definitions of "ALL"
|
|
||||||
static int RPT_SEVERITY_ALL = RPT_SEVERITY_WARNING | RPT_SEVERITY_ERROR | RPT_SEVERITY_EXCLUSION;
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_FOOTPRINT_CHECKER::syncCheckboxes()
|
|
||||||
{
|
|
||||||
m_showAll->SetValue( m_severities == RPT_SEVERITY_ALL );
|
|
||||||
m_showErrors->SetValue( m_severities & RPT_SEVERITY_ERROR );
|
|
||||||
m_showWarnings->SetValue( m_severities & RPT_SEVERITY_WARNING );
|
|
||||||
m_showExclusions->SetValue( m_severities & RPT_SEVERITY_EXCLUSION );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_FOOTPRINT_CHECKER::runChecks()
|
void DIALOG_FOOTPRINT_CHECKER::runChecks()
|
||||||
{
|
{
|
||||||
BOARD* board = m_frame->GetBoard();
|
BOARD* board = m_frame->GetBoard();
|
||||||
@ -148,15 +129,13 @@ void DIALOG_FOOTPRINT_CHECKER::runChecks()
|
|||||||
&& footprint->GetCourtyard( F_CrtYd ).OutlineCount() == 0
|
&& footprint->GetCourtyard( F_CrtYd ).OutlineCount() == 0
|
||||||
&& footprint->GetCourtyard( B_CrtYd ).OutlineCount() == 0 )
|
&& footprint->GetCourtyard( B_CrtYd ).OutlineCount() == 0 )
|
||||||
{
|
{
|
||||||
errorHandler( footprint, nullptr, nullptr, DRCE_MISSING_COURTYARD, wxEmptyString,
|
errorHandler( footprint, nullptr, nullptr, DRCE_MISSING_COURTYARD, wxEmptyString, { 0, 0 } );
|
||||||
{ 0, 0 } );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footprint->CheckFootprintAttributes(
|
footprint->CheckFootprintAttributes(
|
||||||
[&]( const wxString& aMsg )
|
[&]( const wxString& aMsg )
|
||||||
{
|
{
|
||||||
errorHandler( footprint, nullptr, nullptr, DRCE_FOOTPRINT_TYPE_MISMATCH, aMsg,
|
errorHandler( footprint, nullptr, nullptr, DRCE_FOOTPRINT_TYPE_MISMATCH, aMsg, { 0, 0 } );
|
||||||
{ 0, 0 } );
|
|
||||||
} );
|
} );
|
||||||
|
|
||||||
footprint->CheckPads( m_frame,
|
footprint->CheckPads( m_frame,
|
||||||
@ -181,10 +160,9 @@ void DIALOG_FOOTPRINT_CHECKER::runChecks()
|
|||||||
|
|
||||||
footprint->CheckNetTies(
|
footprint->CheckNetTies(
|
||||||
[&]( const BOARD_ITEM* aItemA, const BOARD_ITEM* aItemB, const BOARD_ITEM* aItemC,
|
[&]( const BOARD_ITEM* aItemA, const BOARD_ITEM* aItemB, const BOARD_ITEM* aItemC,
|
||||||
const VECTOR2I& aPosition )
|
const VECTOR2I& aPt )
|
||||||
{
|
{
|
||||||
errorHandler( aItemA, aItemB, aItemC, DRCE_SHORTING_ITEMS, wxEmptyString,
|
errorHandler( aItemA, aItemB, aItemC, DRCE_SHORTING_ITEMS, wxEmptyString, aPt );
|
||||||
aPosition );
|
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,10 +173,7 @@ void DIALOG_FOOTPRINT_CHECKER::runChecks()
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
m_checksRun = true;
|
m_checksRun = true;
|
||||||
|
updateData();
|
||||||
m_markersTreeModel->Update( m_markersProvider, m_severities );
|
|
||||||
updateDisplayedCounts();
|
|
||||||
|
|
||||||
refreshEditor();
|
refreshEditor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +203,6 @@ void DIALOG_FOOTPRINT_CHECKER::centerMarkerIdleHandler( wxIdleEvent& aEvent )
|
|||||||
void DIALOG_FOOTPRINT_CHECKER::OnRunChecksClick( wxCommandEvent& aEvent )
|
void DIALOG_FOOTPRINT_CHECKER::OnRunChecksClick( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
m_checksRun = false;
|
m_checksRun = false;
|
||||||
|
|
||||||
runChecks();
|
runChecks();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,9 +216,7 @@ void DIALOG_FOOTPRINT_CHECKER::OnSelectItem( wxDataViewEvent& aEvent )
|
|||||||
|
|
||||||
if( m_centerMarkerOnIdle )
|
if( m_centerMarkerOnIdle )
|
||||||
{
|
{
|
||||||
// we already came from a cross-probe of the marker in the document; don't go
|
// we already came from a cross-probe of the marker in the document; don't go around in circles
|
||||||
// around in circles
|
|
||||||
|
|
||||||
aEvent.Skip();
|
aEvent.Skip();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -333,35 +305,37 @@ void DIALOG_FOOTPRINT_CHECKER::OnLeftDClickItem( wxMouseEvent& event )
|
|||||||
Show( false );
|
Show( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not skip aVent here: this is not useful, and Pcbnew crashes
|
// Do not skip event here: this is not useful, and Pcbnew crashes if skipped (at least on MSW)
|
||||||
// if skipped (at least on Windows)
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int DIALOG_FOOTPRINT_CHECKER::getSeverities() const
|
||||||
|
{
|
||||||
|
int severities = 0;
|
||||||
|
|
||||||
|
if( m_showErrors->GetValue() )
|
||||||
|
severities |= RPT_SEVERITY_ERROR;
|
||||||
|
|
||||||
|
if( m_showWarnings->GetValue() )
|
||||||
|
severities |= RPT_SEVERITY_WARNING;
|
||||||
|
|
||||||
|
if( m_showExclusions->GetValue() )
|
||||||
|
severities |= RPT_SEVERITY_EXCLUSION;
|
||||||
|
|
||||||
|
return severities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_FOOTPRINT_CHECKER::OnSeverity( wxCommandEvent& aEvent )
|
void DIALOG_FOOTPRINT_CHECKER::OnSeverity( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
int flag = 0;
|
|
||||||
|
|
||||||
if( aEvent.GetEventObject() == m_showAll )
|
if( aEvent.GetEventObject() == m_showAll )
|
||||||
flag = RPT_SEVERITY_ALL;
|
{
|
||||||
else if( aEvent.GetEventObject() == m_showErrors )
|
m_showErrors->SetValue( true );
|
||||||
flag = RPT_SEVERITY_ERROR;
|
m_showWarnings->SetValue( aEvent.IsChecked() );
|
||||||
else if( aEvent.GetEventObject() == m_showWarnings )
|
m_showExclusions->SetValue( aEvent.IsChecked() );
|
||||||
flag = RPT_SEVERITY_WARNING;
|
}
|
||||||
else if( aEvent.GetEventObject() == m_showExclusions )
|
|
||||||
flag = RPT_SEVERITY_EXCLUSION;
|
|
||||||
|
|
||||||
if( aEvent.IsChecked() )
|
updateData();
|
||||||
m_severities |= flag;
|
|
||||||
else if( aEvent.GetEventObject() == m_showAll )
|
|
||||||
m_severities = RPT_SEVERITY_ERROR;
|
|
||||||
else
|
|
||||||
m_severities &= ~flag;
|
|
||||||
|
|
||||||
syncCheckboxes();
|
|
||||||
|
|
||||||
m_markersTreeModel->Update( m_markersProvider, m_severities );
|
|
||||||
updateDisplayedCounts();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -22,8 +22,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DIALOG_FOOTPRINT_CHECKER_H
|
#pragma once
|
||||||
#define DIALOG_FOOTPRINT_CHECKER_H
|
|
||||||
|
|
||||||
#include <dialog_footprint_checker_base.h>
|
#include <dialog_footprint_checker_base.h>
|
||||||
#include <rc_item.h>
|
#include <rc_item.h>
|
||||||
@ -41,11 +40,13 @@ public:
|
|||||||
void SelectMarker( const PCB_MARKER* aMarker );
|
void SelectMarker( const PCB_MARKER* aMarker );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void syncCheckboxes();
|
int getSeverities() const;
|
||||||
void updateDisplayedCounts();
|
|
||||||
|
|
||||||
void runChecks();
|
void runChecks();
|
||||||
|
|
||||||
|
void updateDisplayedCounts();
|
||||||
|
void updateData();
|
||||||
|
|
||||||
void centerMarkerIdleHandler( wxIdleEvent& aEvent );
|
void centerMarkerIdleHandler( wxIdleEvent& aEvent );
|
||||||
|
|
||||||
void deleteAllMarkers();
|
void deleteAllMarkers();
|
||||||
@ -63,17 +64,13 @@ private:
|
|||||||
void OnDeleteAllClick( wxCommandEvent& event ) override;
|
void OnDeleteAllClick( wxCommandEvent& event ) override;
|
||||||
|
|
||||||
bool TransferDataToWindow() override;
|
bool TransferDataToWindow() override;
|
||||||
bool TransferDataFromWindow() override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FOOTPRINT_EDIT_FRAME* m_frame;
|
FOOTPRINT_EDIT_FRAME* m_frame;
|
||||||
bool m_checksRun;
|
bool m_checksRun;
|
||||||
|
|
||||||
int m_severities;
|
|
||||||
std::shared_ptr<RC_ITEMS_PROVIDER> m_markersProvider;
|
std::shared_ptr<RC_ITEMS_PROVIDER> m_markersProvider;
|
||||||
RC_TREE_MODEL* m_markersTreeModel;
|
RC_TREE_MODEL* m_markersTreeModel;
|
||||||
|
|
||||||
const PCB_MARKER* m_centerMarkerOnIdle;
|
const PCB_MARKER* m_centerMarkerOnIdle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOG_FOOTPRINT_CHECKER_H
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -34,19 +34,20 @@ DIALOG_FOOTPRINT_CHECKER_BASE::DIALOG_FOOTPRINT_CHECKER_BASE( wxWindow* parent,
|
|||||||
bSeveritySizer->Add( m_showLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
bSeveritySizer->Add( m_showLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
||||||
|
|
||||||
m_showAll = new wxCheckBox( this, wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_showAll = new wxCheckBox( this, wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
m_showAll->SetValue(true);
|
|
||||||
bSeveritySizer->Add( m_showAll, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
bSeveritySizer->Add( m_showAll, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSeveritySizer->Add( 35, 0, 0, wxEXPAND, 5 );
|
bSeveritySizer->Add( 35, 0, 0, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_showErrors = new wxCheckBox( this, wxID_ANY, _("Errors"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_showErrors = new wxCheckBox( this, wxID_ANY, _("Errors"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_showErrors->SetValue(true);
|
||||||
bSeveritySizer->Add( m_showErrors, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
bSeveritySizer->Add( m_showErrors, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_errorsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
m_errorsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSeveritySizer->Add( m_errorsBadge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 25 );
|
bSeveritySizer->Add( m_errorsBadge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 25 );
|
||||||
|
|
||||||
m_showWarnings = new wxCheckBox( this, wxID_ANY, _("Warnings"), wxDefaultPosition, wxDefaultSize, 0 );
|
m_showWarnings = new wxCheckBox( this, wxID_ANY, _("Warnings"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
m_showWarnings->SetValue(true);
|
||||||
bSeveritySizer->Add( m_showWarnings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
bSeveritySizer->Add( m_showWarnings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
m_warningsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
m_warningsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
|
@ -1,41 +1,44 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<wxFormBuilder_Project>
|
<wxFormBuilder_Project>
|
||||||
<FileVersion major="1" minor="16" />
|
<FileVersion major="1" minor="18"/>
|
||||||
<object class="Project" expanded="1">
|
<object class="Project" expanded="true">
|
||||||
<property name="class_decoration"></property>
|
|
||||||
<property name="code_generation">C++</property>
|
<property name="code_generation">C++</property>
|
||||||
<property name="disconnect_events">1</property>
|
<property name="cpp_class_decoration"></property>
|
||||||
<property name="disconnect_mode">source_name</property>
|
<property name="cpp_disconnect_events">1</property>
|
||||||
<property name="disconnect_php_events">0</property>
|
<property name="cpp_event_generation">connect</property>
|
||||||
<property name="disconnect_python_events">0</property>
|
<property name="cpp_help_provider">none</property>
|
||||||
|
<property name="cpp_namespace"></property>
|
||||||
|
<property name="cpp_precompiled_header"></property>
|
||||||
|
<property name="cpp_use_array_enum">0</property>
|
||||||
|
<property name="cpp_use_enum">0</property>
|
||||||
<property name="embedded_files_path">res</property>
|
<property name="embedded_files_path">res</property>
|
||||||
<property name="encoding">UTF-8</property>
|
<property name="encoding">UTF-8</property>
|
||||||
<property name="event_generation">connect</property>
|
|
||||||
<property name="file">dialog_footprint_checker_base</property>
|
<property name="file">dialog_footprint_checker_base</property>
|
||||||
<property name="first_id">1000</property>
|
<property name="first_id">1000</property>
|
||||||
<property name="help_provider">none</property>
|
|
||||||
<property name="image_path_wrapper_function_name"></property>
|
|
||||||
<property name="indent_with_spaces"></property>
|
|
||||||
<property name="internationalize">1</property>
|
<property name="internationalize">1</property>
|
||||||
|
<property name="lua_skip_events">1</property>
|
||||||
|
<property name="lua_ui_table">UI</property>
|
||||||
<property name="name">dialog_footprint_checker</property>
|
<property name="name">dialog_footprint_checker</property>
|
||||||
<property name="namespace"></property>
|
|
||||||
<property name="path">.</property>
|
<property name="path">.</property>
|
||||||
<property name="precompiled_header"></property>
|
<property name="php_disconnect_events">0</property>
|
||||||
|
<property name="php_disconnect_mode">source_name</property>
|
||||||
|
<property name="php_skip_events">1</property>
|
||||||
|
<property name="python_disconnect_events">0</property>
|
||||||
|
<property name="python_disconnect_mode">source_name</property>
|
||||||
|
<property name="python_image_path_wrapper_function_name"></property>
|
||||||
|
<property name="python_indent_with_spaces"></property>
|
||||||
|
<property name="python_skip_events">1</property>
|
||||||
<property name="relative_path">1</property>
|
<property name="relative_path">1</property>
|
||||||
<property name="skip_lua_events">1</property>
|
|
||||||
<property name="skip_php_events">1</property>
|
|
||||||
<property name="skip_python_events">1</property>
|
|
||||||
<property name="ui_table">UI</property>
|
|
||||||
<property name="use_array_enum">0</property>
|
|
||||||
<property name="use_enum">0</property>
|
|
||||||
<property name="use_microsoft_bom">0</property>
|
<property name="use_microsoft_bom">0</property>
|
||||||
<object class="Dialog" expanded="1">
|
<property name="use_native_eol">0</property>
|
||||||
|
<object class="Dialog" expanded="true">
|
||||||
<property name="aui_managed">0</property>
|
<property name="aui_managed">0</property>
|
||||||
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
<property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<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>
|
||||||
@ -57,28 +60,29 @@
|
|||||||
<property name="window_name"></property>
|
<property name="window_name"></property>
|
||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
<event name="OnClose">OnClose</event>
|
<event name="OnClose">OnClose</event>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizerMain</property>
|
<property name="name">bSizerMain</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">10</property>
|
<property name="border">10</property>
|
||||||
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size">660,250</property>
|
<property name="minimum_size">660,250</property>
|
||||||
<property name="name">bUpperSizer</property>
|
<property name="name">bUpperSizer</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxEXPAND</property>
|
<property name="flag">wxALL|wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxDataViewCtrl" expanded="1">
|
<object class="wxDataViewCtrl" expanded="true">
|
||||||
<property name="bg"></property>
|
<property name="bg"></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="fg"></property>
|
<property name="fg"></property>
|
||||||
<property name="font"></property>
|
<property name="font"></property>
|
||||||
@ -100,37 +104,37 @@
|
|||||||
<event name="OnLeftDClick">OnLeftDClickItem</event>
|
<event name="OnLeftDClick">OnLeftDClickItem</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">3</property>
|
<property name="border">3</property>
|
||||||
<property name="flag">wxEXPAND|wxTOP</property>
|
<property name="flag">wxEXPAND|wxTOP</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSizer9</property>
|
<property name="name">bSizer9</property>
|
||||||
<property name="orient">wxVERTICAL</property>
|
<property name="orient">wxVERTICAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bSeveritySizer</property>
|
<property name="name">bSeveritySizer</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxStaticText" expanded="1">
|
<object class="wxStaticText" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
@ -143,6 +147,7 @@
|
|||||||
<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>
|
||||||
@ -179,25 +184,25 @@
|
|||||||
<property name="wrap">-1</property>
|
<property name="wrap">-1</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="1">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="checked">1</property>
|
<property name="checked">0</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
@ -205,6 +210,7 @@
|
|||||||
<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>
|
||||||
@ -244,35 +250,35 @@
|
|||||||
<event name="OnCheckBox">OnSeverity</event>
|
<event name="OnCheckBox">OnSeverity</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="spacer" expanded="1">
|
<object class="spacer" expanded="true">
|
||||||
<property name="height">0</property>
|
<property name="height">0</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="width">35</property>
|
<property name="width">35</property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="1">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="checked">0</property>
|
<property name="checked">1</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
@ -280,6 +286,7 @@
|
|||||||
<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>
|
||||||
@ -319,19 +326,19 @@
|
|||||||
<event name="OnCheckBox">OnSeverity</event>
|
<event name="OnCheckBox">OnSeverity</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">25</property>
|
<property name="border">25</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="CustomControl" expanded="1">
|
<object class="CustomControl" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
@ -347,6 +354,7 @@
|
|||||||
<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>
|
||||||
@ -381,25 +389,25 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="1">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
<property name="caption_visible">1</property>
|
<property name="caption_visible">1</property>
|
||||||
<property name="center_pane">0</property>
|
<property name="center_pane">0</property>
|
||||||
<property name="checked">0</property>
|
<property name="checked">1</property>
|
||||||
<property name="close_button">1</property>
|
<property name="close_button">1</property>
|
||||||
<property name="context_help"></property>
|
<property name="context_help"></property>
|
||||||
<property name="context_menu">1</property>
|
<property name="context_menu">1</property>
|
||||||
@ -407,6 +415,7 @@
|
|||||||
<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>
|
||||||
@ -446,19 +455,19 @@
|
|||||||
<event name="OnCheckBox">OnSeverity</event>
|
<event name="OnCheckBox">OnSeverity</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">25</property>
|
<property name="border">25</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="CustomControl" expanded="1">
|
<object class="CustomControl" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
@ -474,6 +483,7 @@
|
|||||||
<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>
|
||||||
@ -508,19 +518,19 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxCheckBox" expanded="1">
|
<object class="wxCheckBox" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
@ -534,6 +544,7 @@
|
|||||||
<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>
|
||||||
@ -573,19 +584,19 @@
|
|||||||
<event name="OnCheckBox">OnSeverity</event>
|
<event name="OnCheckBox">OnSeverity</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">25</property>
|
<property name="border">25</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="CustomControl" expanded="1">
|
<object class="CustomControl" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
<property name="caption"></property>
|
<property name="caption"></property>
|
||||||
@ -601,6 +612,7 @@
|
|||||||
<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>
|
||||||
@ -635,11 +647,11 @@
|
|||||||
<property name="window_style"></property>
|
<property name="window_style"></property>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND</property>
|
<property name="flag">wxEXPAND</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="spacer" expanded="1">
|
<object class="spacer" expanded="true">
|
||||||
<property name="height">0</property>
|
<property name="height">0</property>
|
||||||
<property name="permission">protected</property>
|
<property name="permission">protected</property>
|
||||||
<property name="width">5</property>
|
<property name="width">5</property>
|
||||||
@ -651,28 +663,28 @@
|
|||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">10</property>
|
<property name="border">10</property>
|
||||||
<property name="flag">wxEXPAND|wxLEFT</property>
|
<property name="flag">wxEXPAND|wxLEFT</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxBoxSizer" expanded="1">
|
<object class="wxBoxSizer" expanded="true">
|
||||||
<property name="minimum_size"></property>
|
<property name="minimum_size"></property>
|
||||||
<property name="name">bLowerSizer</property>
|
<property name="name">bLowerSizer</property>
|
||||||
<property name="orient">wxHORIZONTAL</property>
|
<property name="orient">wxHORIZONTAL</property>
|
||||||
<property name="permission">none</property>
|
<property name="permission">none</property>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
<property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="1">
|
<object class="wxButton" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="auth_needed">0</property>
|
<property name="auth_needed">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
@ -690,6 +702,7 @@
|
|||||||
<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>
|
||||||
@ -734,19 +747,19 @@
|
|||||||
<event name="OnButtonClick">OnDeleteOneClick</event>
|
<event name="OnButtonClick">OnDeleteOneClick</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="1">
|
<object class="sizeritem" expanded="true">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
|
||||||
<property name="proportion">0</property>
|
<property name="proportion">0</property>
|
||||||
<object class="wxButton" expanded="1">
|
<object class="wxButton" expanded="true">
|
||||||
<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>
|
||||||
<property name="TopDockable">1</property>
|
<property name="TopDockable">1</property>
|
||||||
<property name="aui_layer"></property>
|
<property name="aui_layer">0</property>
|
||||||
<property name="aui_name"></property>
|
<property name="aui_name"></property>
|
||||||
<property name="aui_position"></property>
|
<property name="aui_position">0</property>
|
||||||
<property name="aui_row"></property>
|
<property name="aui_row">0</property>
|
||||||
<property name="auth_needed">0</property>
|
<property name="auth_needed">0</property>
|
||||||
<property name="best_size"></property>
|
<property name="best_size"></property>
|
||||||
<property name="bg"></property>
|
<property name="bg"></property>
|
||||||
@ -764,6 +777,7 @@
|
|||||||
<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>
|
||||||
@ -808,11 +822,11 @@
|
|||||||
<event name="OnButtonClick">OnDeleteAllClick</event>
|
<event name="OnButtonClick">OnDeleteAllClick</event>
|
||||||
</object>
|
</object>
|
||||||
</object>
|
</object>
|
||||||
<object class="sizeritem" expanded="0">
|
<object class="sizeritem" expanded="false">
|
||||||
<property name="border">5</property>
|
<property name="border">5</property>
|
||||||
<property name="flag">wxEXPAND|wxALL</property>
|
<property name="flag">wxEXPAND|wxALL</property>
|
||||||
<property name="proportion">1</property>
|
<property name="proportion">1</property>
|
||||||
<object class="wxStdDialogButtonSizer" expanded="0">
|
<object class="wxStdDialogButtonSizer" expanded="false">
|
||||||
<property name="Apply">0</property>
|
<property name="Apply">0</property>
|
||||||
<property name="Cancel">1</property>
|
<property name="Cancel">1</property>
|
||||||
<property name="ContextHelp">0</property>
|
<property name="ContextHelp">0</property>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
/// Class DIALOG_FOOTPRINT_CHECKER_BASE
|
/// Class DIALOG_FOOTPRINT_CHECKER_BASE
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -55,8 +55,6 @@ DIALOG_GEN_FOOTPRINT_POSITION::DIALOG_GEN_FOOTPRINT_POSITION( PCB_EDIT_FRAME* aE
|
|||||||
|
|
||||||
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
||||||
|
|
||||||
m_outputDirectoryName->SetValue( m_editFrame->Prj().GetProjectFile().m_PcbLastPath[LAST_PATH_POS_FILES] );
|
|
||||||
|
|
||||||
SetupStandardButtons( { { wxID_OK, _( "Generate Position File" ) },
|
SetupStandardButtons( { { wxID_OK, _( "Generate Position File" ) },
|
||||||
{ wxID_CANCEL, _( "Close" ) } } );
|
{ wxID_CANCEL, _( "Close" ) } } );
|
||||||
|
|
||||||
@ -217,8 +215,6 @@ void DIALOG_GEN_FOOTPRINT_POSITION::onGenerate( wxCommandEvent& event )
|
|||||||
// Keep unix directory format convention in cfg files
|
// Keep unix directory format convention in cfg files
|
||||||
m_outputDirectory.Replace( wxT( "\\" ), wxT( "/" ) );
|
m_outputDirectory.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||||
|
|
||||||
m_editFrame->Prj().GetProjectFile().m_PcbLastPath[LAST_PATH_POS_FILES] = m_outputDirectory;
|
|
||||||
|
|
||||||
if( m_formatCtrl->GetSelection() == 2 )
|
if( m_formatCtrl->GetSelection() == 2 )
|
||||||
CreateGerberFiles();
|
CreateGerberFiles();
|
||||||
else
|
else
|
||||||
|
@ -42,13 +42,12 @@
|
|||||||
#include <board.h>
|
#include <board.h>
|
||||||
|
|
||||||
|
|
||||||
|
DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, const wxString& aTitle,
|
||||||
DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent,
|
JOB_EXPORT_PCB_GENCAD* aJob ) :
|
||||||
const wxString& aPath ) :
|
DIALOG_SHIM( aParent, wxID_ANY, aTitle, wxDefaultPosition, wxDefaultSize,
|
||||||
DIALOG_SHIM( aParent, wxID_ANY, _( "Export to GenCAD settings" ), wxDefaultPosition,
|
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ),
|
||||||
wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER ),
|
|
||||||
m_frame( aParent ),
|
m_frame( aParent ),
|
||||||
m_job( nullptr )
|
m_job( aJob )
|
||||||
{
|
{
|
||||||
wxBoxSizer* m_mainSizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer* m_mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
@ -58,20 +57,17 @@ DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aPar
|
|||||||
m_textFile->Wrap( -1 );
|
m_textFile->Wrap( -1 );
|
||||||
m_fileSizer->Add( m_textFile, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 5 );
|
m_fileSizer->Add( m_textFile, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 5 );
|
||||||
|
|
||||||
m_outputFileName =
|
m_outputFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
||||||
m_outputFileName->SetToolTip( _( "Enter a filename if you do not want to use default file names" ) );
|
m_outputFileName->SetToolTip( _( "Enter a filename if you do not want to use default file names" ) );
|
||||||
m_outputFileName->SetMinSize( wxSize( 350, -1 ) );
|
m_outputFileName->SetMinSize( wxSize( 350, -1 ) );
|
||||||
m_fileSizer->Add( m_outputFileName, 1, wxALL | wxEXPAND, 5 );
|
m_fileSizer->Add( m_outputFileName, 1, wxALL | wxEXPAND, 5 );
|
||||||
|
|
||||||
|
m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1, -1 ),
|
||||||
m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition,
|
wxBU_AUTODRAW | 0 );
|
||||||
wxSize( -1, -1 ), wxBU_AUTODRAW | 0 );
|
|
||||||
m_fileSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5 );
|
m_fileSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 5 );
|
||||||
|
|
||||||
m_mainSizer->Add( m_fileSizer, 0, wxEXPAND | wxALL, 5 );
|
m_mainSizer->Add( m_fileSizer, 0, wxEXPAND | wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
m_optsSizer = new wxGridSizer( 0, 1, 3, 3 );
|
m_optsSizer = new wxGridSizer( 0, 1, 3, 3 );
|
||||||
createOptCheckboxes();
|
createOptCheckboxes();
|
||||||
m_mainSizer->Add( m_optsSizer, 1, wxEXPAND | wxALL, 5 );
|
m_mainSizer->Add( m_optsSizer, 1, wxEXPAND | wxALL, 5 );
|
||||||
@ -81,33 +77,26 @@ DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aPar
|
|||||||
|
|
||||||
SetSizer( m_mainSizer );
|
SetSizer( m_mainSizer );
|
||||||
|
|
||||||
|
if( !aTitle.IsEmpty() )
|
||||||
|
SetTitle( aTitle );
|
||||||
|
|
||||||
|
if( aJob )
|
||||||
|
m_browseButton->Hide();
|
||||||
|
|
||||||
|
// DIALOG_SHIM needs a unique hash_key because classname will be the same for both job and
|
||||||
|
// non-job versions.
|
||||||
|
m_hash_key = TO_UTF8( GetTitle() );
|
||||||
|
|
||||||
// Now all widgets have the size fixed, call FinishDialogSettings
|
// Now all widgets have the size fixed, call FinishDialogSettings
|
||||||
finishDialogSettings();
|
finishDialogSettings();
|
||||||
|
|
||||||
// Set the path in m_filePicker, now the size is set
|
|
||||||
// (otherwise the text is truncated)
|
|
||||||
m_outputFileName->SetValue( aPath );
|
|
||||||
|
|
||||||
Layout();
|
Layout();
|
||||||
Fit();
|
Fit();
|
||||||
|
|
||||||
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
|
||||||
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler( DIALOG_GENCAD_EXPORT_OPTIONS::onBrowseClicked ),
|
wxCommandEventHandler( DIALOG_GENCAD_EXPORT_OPTIONS::onBrowseClicked ),
|
||||||
NULL, this );
|
nullptr, this );
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DIALOG_GENCAD_EXPORT_OPTIONS::DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent,
|
|
||||||
JOB_EXPORT_PCB_GENCAD* aJob ) :
|
|
||||||
DIALOG_GENCAD_EXPORT_OPTIONS( aParent, aJob->GetConfiguredOutputPath() )
|
|
||||||
{
|
|
||||||
m_job = aJob;
|
|
||||||
|
|
||||||
m_browseButton->Hide();
|
|
||||||
|
|
||||||
// Set the title
|
|
||||||
SetTitle( aJob->GetSettingsDialogTitle() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -115,7 +104,7 @@ DIALOG_GENCAD_EXPORT_OPTIONS::~DIALOG_GENCAD_EXPORT_OPTIONS()
|
|||||||
{
|
{
|
||||||
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED,
|
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED,
|
||||||
wxCommandEventHandler( DIALOG_GENCAD_EXPORT_OPTIONS::onBrowseClicked ),
|
wxCommandEventHandler( DIALOG_GENCAD_EXPORT_OPTIONS::onBrowseClicked ),
|
||||||
NULL, this );
|
nullptr, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -148,17 +137,6 @@ bool DIALOG_GENCAD_EXPORT_OPTIONS::GetOption( GENCAD_EXPORT_OPT aOption ) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::map<GENCAD_EXPORT_OPT, bool> DIALOG_GENCAD_EXPORT_OPTIONS::GetAllOptions() const
|
|
||||||
{
|
|
||||||
std::map<GENCAD_EXPORT_OPT, bool> retVal;
|
|
||||||
|
|
||||||
for( const auto& option : m_options )
|
|
||||||
retVal[option.first] = option.second->IsChecked();
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
wxString DIALOG_GENCAD_EXPORT_OPTIONS::GetFileName() const
|
wxString DIALOG_GENCAD_EXPORT_OPTIONS::GetFileName() const
|
||||||
{
|
{
|
||||||
return m_outputFileName->GetValue();
|
return m_outputFileName->GetValue();
|
||||||
@ -170,14 +148,25 @@ bool DIALOG_GENCAD_EXPORT_OPTIONS::TransferDataToWindow()
|
|||||||
if( !wxDialog::TransferDataToWindow() )
|
if( !wxDialog::TransferDataToWindow() )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if( m_job )
|
if( !m_job )
|
||||||
{
|
{
|
||||||
|
if( m_outputFileName->GetValue().IsEmpty() )
|
||||||
|
{
|
||||||
|
wxFileName brdFile = m_frame->GetBoard()->GetFileName();
|
||||||
|
brdFile.SetExt( wxT( "cad" ) );
|
||||||
|
m_outputFileName->SetValue( brdFile.GetFullPath() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_outputFileName->SetValue( m_job->GetConfiguredOutputPath() );
|
||||||
m_options[FLIP_BOTTOM_PADS]->SetValue( m_job->m_flipBottomPads );
|
m_options[FLIP_BOTTOM_PADS]->SetValue( m_job->m_flipBottomPads );
|
||||||
m_options[UNIQUE_PIN_NAMES]->SetValue( m_job->m_useUniquePins );
|
m_options[UNIQUE_PIN_NAMES]->SetValue( m_job->m_useUniquePins );
|
||||||
m_options[INDIVIDUAL_SHAPES]->SetValue( m_job->m_useIndividualShapes );
|
m_options[INDIVIDUAL_SHAPES]->SetValue( m_job->m_useIndividualShapes );
|
||||||
m_options[USE_AUX_ORIGIN]->SetValue( m_job->m_useDrillOrigin );
|
m_options[USE_AUX_ORIGIN]->SetValue( m_job->m_useDrillOrigin );
|
||||||
m_options[STORE_ORIGIN_COORDS]->SetValue( m_job->m_storeOriginCoords );
|
m_options[STORE_ORIGIN_COORDS]->SetValue( m_job->m_storeOriginCoords );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,8 +24,7 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DIALOG_GENCAD_EXPORT_OPTIONS_H__
|
#pragma once
|
||||||
#define __DIALOG_GENCAD_EXPORT_OPTIONS_H__
|
|
||||||
|
|
||||||
#include <dialog_shim.h>
|
#include <dialog_shim.h>
|
||||||
|
|
||||||
@ -55,16 +54,12 @@ class JOB_EXPORT_PCB_GENCAD;
|
|||||||
class DIALOG_GENCAD_EXPORT_OPTIONS : public DIALOG_SHIM
|
class DIALOG_GENCAD_EXPORT_OPTIONS : public DIALOG_SHIM
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, const wxString& aPath );
|
DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, const wxString& aTitle, JOB_EXPORT_PCB_GENCAD* aJob );
|
||||||
DIALOG_GENCAD_EXPORT_OPTIONS( PCB_EDIT_FRAME* aParent, JOB_EXPORT_PCB_GENCAD* aJob );
|
|
||||||
~DIALOG_GENCAD_EXPORT_OPTIONS();
|
~DIALOG_GENCAD_EXPORT_OPTIONS();
|
||||||
|
|
||||||
///< Check whether an option has been selected.
|
///< Check whether an option has been selected.
|
||||||
bool GetOption( GENCAD_EXPORT_OPT aOption ) const;
|
bool GetOption( GENCAD_EXPORT_OPT aOption ) const;
|
||||||
|
|
||||||
///< Return all export settings.
|
|
||||||
std::map<GENCAD_EXPORT_OPT, bool> GetAllOptions() const;
|
|
||||||
|
|
||||||
///< Return the selected file path.
|
///< Return the selected file path.
|
||||||
wxString GetFileName() const;
|
wxString GetFileName() const;
|
||||||
|
|
||||||
@ -77,6 +72,7 @@ protected:
|
|||||||
///< Create checkboxes for GenCAD export options.
|
///< Create checkboxes for GenCAD export options.
|
||||||
void createOptCheckboxes();
|
void createOptCheckboxes();
|
||||||
|
|
||||||
|
protected:
|
||||||
std::map<GENCAD_EXPORT_OPT, wxCheckBox*> m_options;
|
std::map<GENCAD_EXPORT_OPT, wxCheckBox*> m_options;
|
||||||
|
|
||||||
PCB_EDIT_FRAME* m_frame;
|
PCB_EDIT_FRAME* m_frame;
|
||||||
@ -89,5 +85,3 @@ protected:
|
|||||||
STD_BITMAP_BUTTON* m_browseButton;
|
STD_BITMAP_BUTTON* m_browseButton;
|
||||||
JOB_EXPORT_PCB_GENCAD* m_job;
|
JOB_EXPORT_PCB_GENCAD* m_job;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__DIALOG_GENCAD_EXPORT_OPTIONS_H__
|
|
||||||
|
@ -42,23 +42,12 @@
|
|||||||
/* Driver function: processing starts here */
|
/* Driver function: processing starts here */
|
||||||
int BOARD_EDITOR_CONTROL::ExportGenCAD( const TOOL_EVENT& aEvent )
|
int BOARD_EDITOR_CONTROL::ExportGenCAD( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
// Build default output file name
|
DIALOG_GENCAD_EXPORT_OPTIONS optionsDialog( m_frame, _( "Export to GenCAD" ), nullptr );
|
||||||
wxString path = m_frame->GetLastPath( LAST_PATH_GENCAD );
|
|
||||||
|
|
||||||
if( path.IsEmpty() )
|
|
||||||
{
|
|
||||||
wxFileName brdFile = m_frame->GetBoard()->GetFileName();
|
|
||||||
brdFile.SetExt( wxT( "cad" ) );
|
|
||||||
path = brdFile.GetFullPath();
|
|
||||||
}
|
|
||||||
|
|
||||||
DIALOG_GENCAD_EXPORT_OPTIONS optionsDialog( m_frame, path );
|
|
||||||
|
|
||||||
if( optionsDialog.ShowModal() == wxID_CANCEL )
|
if( optionsDialog.ShowModal() == wxID_CANCEL )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
path = optionsDialog.GetFileName();
|
wxString path = optionsDialog.GetFileName();
|
||||||
m_frame->SetLastPath( LAST_PATH_GENCAD, path );
|
|
||||||
|
|
||||||
// Get options
|
// Get options
|
||||||
bool flipBottomPads = optionsDialog.GetOption( FLIP_BOTTOM_PADS );
|
bool flipBottomPads = optionsDialog.GetOption( FLIP_BOTTOM_PADS );
|
||||||
|
@ -160,7 +160,7 @@ PCBNEW_JOBS_HANDLER::PCBNEW_JOBS_HANDLER( KIWAY* aKiway ) :
|
|||||||
|
|
||||||
wxCHECK( gencadJob && editFrame, false );
|
wxCHECK( gencadJob && editFrame, false );
|
||||||
|
|
||||||
DIALOG_GENCAD_EXPORT_OPTIONS dlg( editFrame, gencadJob );
|
DIALOG_GENCAD_EXPORT_OPTIONS dlg( editFrame, gencadJob->GetSettingsDialogTitle(), gencadJob );
|
||||||
return dlg.ShowModal() == wxID_OK;
|
return dlg.ShowModal() == wxID_OK;
|
||||||
} );
|
} );
|
||||||
Register( "dxf", std::bind( &PCBNEW_JOBS_HANDLER::JobExportDxf, this, std::placeholders::_1 ),
|
Register( "dxf", std::bind( &PCBNEW_JOBS_HANDLER::JobExportDxf, this, std::placeholders::_1 ),
|
||||||
|
@ -50,8 +50,6 @@ const int pcbnewSchemaVersion = 5;
|
|||||||
PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
||||||
: PCB_VIEWERS_SETTINGS_BASE( "pcbnew", pcbnewSchemaVersion ),
|
: PCB_VIEWERS_SETTINGS_BASE( "pcbnew", pcbnewSchemaVersion ),
|
||||||
m_AuiPanels(),
|
m_AuiPanels(),
|
||||||
m_ExportODBPP(),
|
|
||||||
m_ExportVrml(),
|
|
||||||
m_FootprintWizardList(),
|
m_FootprintWizardList(),
|
||||||
m_FootprintChooser(),
|
m_FootprintChooser(),
|
||||||
m_Zones(),
|
m_Zones(),
|
||||||
@ -300,42 +298,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
|
|||||||
m_params.emplace_back( new PARAM<bool>( "export_2581.compress",
|
m_params.emplace_back( new PARAM<bool>( "export_2581.compress",
|
||||||
&m_Export2581.compress, false ) );
|
&m_Export2581.compress, false ) );
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "export_odb.units",
|
|
||||||
&m_ExportODBPP.units, 0 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "export_odb.precision",
|
|
||||||
&m_ExportODBPP.precision, 6 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "export_odb.compress_format",
|
|
||||||
&m_ExportODBPP.compressFormat, 1 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "export_vrml.units",
|
|
||||||
&m_ExportVrml.units, 1 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<bool>( "export_vrml.no_unspecified",
|
|
||||||
&m_ExportVrml.no_unspecified, false ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<bool>( "export_vrml.no_dnp",
|
|
||||||
&m_ExportVrml.no_dnp, false ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<bool>( "export_vrml.copy_3d_models",
|
|
||||||
&m_ExportVrml.copy_3d_models, false ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<bool>( "export_vrml.use_relative_paths",
|
|
||||||
&m_ExportVrml.use_relative_paths, false ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "export_vrml.ref_units",
|
|
||||||
&m_ExportVrml.ref_units, 0 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<double>( "export_vrml.ref_x",
|
|
||||||
&m_ExportVrml.ref_x, 0 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<double>( "export_vrml.ref_y",
|
|
||||||
&m_ExportVrml.ref_y, 0 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<int>( "export_vrml.origin_mode",
|
|
||||||
&m_ExportVrml.origin_mode, 0 ) );
|
|
||||||
|
|
||||||
m_params.emplace_back( new PARAM<bool>( "export_d356.doNotExportUnconnectedPads",
|
m_params.emplace_back( new PARAM<bool>( "export_d356.doNotExportUnconnectedPads",
|
||||||
&m_ExportD356.doNotExportUnconnectedPads, false ) );
|
&m_ExportD356.doNotExportUnconnectedPads, false ) );
|
||||||
|
|
||||||
|
@ -171,28 +171,9 @@ public:
|
|||||||
bool compress;
|
bool compress;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DIALOG_EXPORT_ODBPP
|
|
||||||
{
|
|
||||||
int precision;
|
|
||||||
int units;
|
|
||||||
int compressFormat;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct DIALOG_EXPORT_VRML
|
|
||||||
{
|
|
||||||
int units;
|
|
||||||
bool no_unspecified;
|
|
||||||
bool no_dnp;
|
|
||||||
bool copy_3d_models;
|
|
||||||
bool use_relative_paths;
|
|
||||||
int ref_units;
|
|
||||||
double ref_x;
|
|
||||||
double ref_y;
|
|
||||||
int origin_mode;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct DIALOG_EXPORT_D356
|
struct DIALOG_EXPORT_D356
|
||||||
{
|
{
|
||||||
|
// Export D356 uses wxFileDialog, so there's no DIALOG_SHIM to save/restore control state
|
||||||
bool doNotExportUnconnectedPads;
|
bool doNotExportUnconnectedPads;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -263,10 +244,6 @@ public:
|
|||||||
|
|
||||||
DIALOG_EXPORT_2581 m_Export2581;
|
DIALOG_EXPORT_2581 m_Export2581;
|
||||||
|
|
||||||
DIALOG_EXPORT_ODBPP m_ExportODBPP;
|
|
||||||
|
|
||||||
DIALOG_EXPORT_VRML m_ExportVrml;
|
|
||||||
|
|
||||||
DIALOG_EXPORT_D356 m_ExportD356;
|
DIALOG_EXPORT_D356 m_ExportD356;
|
||||||
|
|
||||||
DIALOG_FOOTPRINT_WIZARD_LIST m_FootprintWizardList;
|
DIALOG_FOOTPRINT_WIZARD_LIST m_FootprintWizardList;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user