Browse Source

More open-coded dialog state-saving cleanup.

pull/18/head
Jeff Young 2 months ago
parent
commit
892f9031d7
  1. 276
      eeschema/dialogs/dialog_plot_schematic.cpp
  2. 43
      eeschema/dialogs/dialog_plot_schematic.h
  3. 17
      eeschema/dialogs/dialog_plot_schematic_base.cpp
  4. 9
      eeschema/dialogs/dialog_plot_schematic_base.fbp
  5. 7
      eeschema/dialogs/dialog_plot_schematic_base.h
  6. 28
      eeschema/eeschema_settings.cpp
  7. 15
      eeschema/eeschema_settings.h
  8. 4
      eeschema/tools/sch_editor_control.cpp
  9. 28
      pcbnew/dialogs/dialog_footprint_wizard_list.cpp
  10. 13
      pcbnew/dialogs/dialog_footprint_wizard_list.h
  11. 12
      pcbnew/dialogs/panel_fp_lib_table.cpp
  12. 6
      pcbnew/dialogs/panel_fp_properties_3d_model.cpp
  13. 11
      pcbnew/pcbnew_settings.cpp
  14. 81
      pcbnew/pcbnew_settings.h

276
eeschema/dialogs/dialog_plot_schematic.cpp

@ -42,21 +42,16 @@
#include <pgm_base.h>
#include <sch_edit_frame.h>
#include <sch_painter.h>
#include <wx/dirdlg.h>
#include <wx/msgdlg.h>
#include <kiplatform/environment.h>
#include <wx/log.h>
#include <jobs/job_export_sch_plot.h>
// static members (static to remember last state):
int DIALOG_PLOT_SCHEMATIC::m_pageSizeSelect = PAGE_SIZE_AUTO;
#include <confirm.h>
DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame ) :
DIALOG_PLOT_SCHEMATIC( aEditFrame, aEditFrame )
DIALOG_PLOT_SCHEMATIC( aEditFrame, aEditFrame, nullptr )
{
}
@ -65,19 +60,17 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWind
JOB_EXPORT_SCH_PLOT* aJob ) :
DIALOG_PLOT_SCHEMATIC_BASE( aEditFrame ),
m_editFrame( aEditFrame ),
m_plotFormat( PLOT_FORMAT::UNDEFINED ),
m_defaultLineWidth( aEditFrame, m_lineWidthLabel, m_lineWidthCtrl, m_lineWidthUnits ),
m_job( aJob )
{
m_configChanged = false;
if( !m_job )
{
m_browseButton->SetBitmap( KiBitmapBundle( BITMAPS::small_folder ) );
m_MessagesBox->SetFileName( Prj().GetProjectPath() + wxT( "report.txt" ) );
SetupStandardButtons( { { wxID_OK, _( "Plot All Pages" ) },
{ wxID_APPLY, _( "Plot Current Page" ) },
{ wxID_CANCEL, _( "Close" ) } } );
SetupStandardButtons( { { wxID_OK, _( "Plot All Pages" ) },
{ wxID_APPLY, _( "Plot Current Page" ) },
{ wxID_CANCEL, _( "Close" ) } } );
}
else
{
@ -96,89 +89,32 @@ DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWind
// non-job versions (which have different sizes).
m_hash_key = TO_UTF8( GetTitle() );
initDlg();
for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
m_colorTheme->Append( settings->GetName(), static_cast<void*>( settings ) );
// Now all widgets have the size fixed, call FinishDialogSettings
finishDialogSettings();
}
void DIALOG_PLOT_SCHEMATIC::initDlg()
bool DIALOG_PLOT_SCHEMATIC::TransferDataToWindow()
{
auto cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
wxASSERT( cfg );
if( !m_job )
{
if( cfg )
{
for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
{
int idx = m_colorTheme->Append( settings->GetName(),
static_cast<void*>( settings ) );
if( settings->GetFilename() == cfg->m_PlotPanel.color_theme )
m_colorTheme->SetSelection( idx );
}
m_colorTheme->Enable( cfg->m_PlotPanel.color );
m_plotBackgroundColor->Enable( cfg->m_PlotPanel.color );
m_plotBackgroundColor->SetValue( cfg->m_PlotPanel.background_color );
// Set color or B&W plot option
setModeColor( cfg->m_PlotPanel.color );
// Set plot or not frame reference option
setPlotDrawingSheet( cfg->m_PlotPanel.frame_reference );
setOpenFileAfterPlot( cfg->m_PlotPanel.open_file_after_plot );
m_plotPDFPropertyPopups->SetValue( cfg->m_PlotPanel.pdf_property_popups );
m_plotPDFHierarchicalLinks->SetValue( cfg->m_PlotPanel.pdf_hierarchical_links );
m_plotPDFMetadata->SetValue( cfg->m_PlotPanel.pdf_metadata );
// Switch to the last save plot format
PLOT_FORMAT fmt = static_cast<PLOT_FORMAT>( cfg->m_PlotPanel.format );
switch( fmt )
{
default:
case PLOT_FORMAT::POST: m_plotFormatOpt->SetSelection( 0 ); break;
case PLOT_FORMAT::PDF: m_plotFormatOpt->SetSelection( 1 ); break;
case PLOT_FORMAT::SVG: m_plotFormatOpt->SetSelection( 2 ); break;
case PLOT_FORMAT::DXF: m_plotFormatOpt->SetSelection( 3 ); break;
case PLOT_FORMAT::HPGL: /* no longer supported */ break;
}
if( fmt == PLOT_FORMAT::DXF )
m_plotBackgroundColor->Disable();
EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
wxASSERT( cfg );
// Set the default line width (pen width which should be used for
// items that do not have a pen size defined (like frame ref)
// the default line width is stored in mils in config
if( m_lineWidthCtrl->GetValue().IsEmpty() && cfg )
{
// Set the default line width (pen width which should be used for items that do not have a
// pen size defined (like frame ref).
// The default line width is stored in mils in config
m_defaultLineWidth.SetValue( schIUScale.MilsToIU( cfg->m_Drawing.default_line_thickness ) );
}
// Plot directory
SCHEMATIC_SETTINGS& settings = m_editFrame->Schematic().Settings();
wxString path = settings.m_PlotDirectoryName;
#ifdef __WINDOWS__
path.Replace( '/', '\\' );
#endif
m_outputPath->SetValue( path );
}
else if( m_job )
else
{
for( COLOR_SETTINGS* settings : Pgm().GetSettingsManager().GetColorSettingsList() )
{
int idx = m_colorTheme->Append( settings->GetName(), static_cast<void*>( settings ) );
if( settings->GetName() == m_job->m_theme )
m_colorTheme->SetSelection( idx );
}
if( m_colorTheme->GetSelection() == wxNOT_FOUND )
if( !m_colorTheme->SetStringSelection( m_job->m_theme ) )
m_colorTheme->SetSelection( 0 );
m_plotBackgroundColor->SetValue( m_job->m_useBackgroundColor );
@ -186,9 +122,14 @@ void DIALOG_PLOT_SCHEMATIC::initDlg()
m_plotPDFPropertyPopups->SetValue( m_job->m_PDFPropertyPopups );
m_plotPDFHierarchicalLinks->SetValue( m_job->m_PDFHierarchicalLinks );
m_plotPDFMetadata->SetValue( m_job->m_PDFMetadata );
m_pageSizeSelect = static_cast<int>( m_job->m_pageSizeSelect );
int paperSizeIndex = (int) m_job->m_pageSizeSelect;
if( paperSizeIndex >= 0 && paperSizeIndex < (int) m_paperSizeOption->GetCount() )
m_paperSizeOption->SetSelection( paperSizeIndex );
m_plotDrawingSheet->SetValue( m_job->m_plotDrawingSheet );
setModeColor( !m_job->m_blackAndWhite );
m_ModeColorOption->SetSelection( m_job->m_blackAndWhite ? 1 : 0 );
// Set the plot format
switch( m_job->m_plotFormat )
@ -206,6 +147,11 @@ void DIALOG_PLOT_SCHEMATIC::initDlg()
m_outputPath->SetValue( m_job->GetConfiguredOutputPath() );
}
wxCommandEvent dummy;
onColorMode( dummy );
return true;
}
@ -248,12 +194,7 @@ void DIALOG_PLOT_SCHEMATIC::onOutputDirectoryBrowseClicked( wxCommandEvent& even
// Test if making the path relative is possible before asking the user if they want to do it
if( relPathTest.MakeRelativeTo( defaultPath ) )
{
msg.Printf( _( "Do you want to use a path relative to\n'%s'?" ), defaultPath );
wxMessageDialog dialog( this, msg, _( "Plot Output Directory" ),
wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
if( dialog.ShowModal() == wxID_YES )
if( IsOK( this, wxString::Format( _( "Do you want to use a path relative to\n'%s'?" ), defaultPath ) ) )
dirName.MakeRelativeTo( defaultPath );
}
@ -261,7 +202,7 @@ void DIALOG_PLOT_SCHEMATIC::onOutputDirectoryBrowseClicked( wxCommandEvent& even
}
PLOT_FORMAT DIALOG_PLOT_SCHEMATIC::GetPlotFileFormat()
PLOT_FORMAT DIALOG_PLOT_SCHEMATIC::getPlotFileFormat()
{
switch( m_plotFormatOpt->GetSelection() )
{
@ -274,71 +215,27 @@ PLOT_FORMAT DIALOG_PLOT_SCHEMATIC::GetPlotFileFormat()
}
void DIALOG_PLOT_SCHEMATIC::OnPageSizeSelected( wxCommandEvent& event )
{
m_pageSizeSelect = m_paperSizeOption->GetSelection();
}
void DIALOG_PLOT_SCHEMATIC::OnUpdateUI( wxUpdateUIEvent& event )
void DIALOG_PLOT_SCHEMATIC::onColorMode( wxCommandEvent& aEvent )
{
PLOT_FORMAT fmt = GetPlotFileFormat();
if( fmt != m_plotFormat )
{
m_plotFormat = fmt;
bool backgroundColorAvailable = getPlotFileFormat() == PLOT_FORMAT::POST
|| getPlotFileFormat() == PLOT_FORMAT::PDF
|| getPlotFileFormat() == PLOT_FORMAT::SVG;
wxArrayString paperSizes;
paperSizes.push_back( _( "Schematic size" ) );
m_colorThemeLabel->Enable( getModeColor() );
m_colorTheme->Enable( getModeColor() );
m_plotBackgroundColor->Enable( backgroundColorAvailable && getModeColor() );
int selection;
paperSizes.push_back( _( "A4" ) );
paperSizes.push_back( _( "A" ) );
selection = m_pageSizeSelect;
m_openFileAfterPlot->Enable( fmt == PLOT_FORMAT::PDF );
m_plotPDFPropertyPopups->Enable( fmt == PLOT_FORMAT::PDF );
m_plotPDFHierarchicalLinks->Enable( fmt == PLOT_FORMAT::PDF );
m_plotPDFMetadata->Enable( fmt == PLOT_FORMAT::PDF );
m_paperSizeOption->Set( paperSizes );
m_paperSizeOption->SetSelection( selection );
m_defaultLineWidth.Enable( fmt == PLOT_FORMAT::POST
|| fmt == PLOT_FORMAT::PDF
|| fmt == PLOT_FORMAT::SVG );
m_plotBackgroundColor->Enable( fmt == PLOT_FORMAT::POST
|| fmt == PLOT_FORMAT::PDF
|| fmt == PLOT_FORMAT::SVG );
}
aEvent.Skip();
}
void DIALOG_PLOT_SCHEMATIC::getPlotOptions( RENDER_SETTINGS* aSettings )
{
EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() );
wxASSERT( cfg );
if( EESCHEMA_SETTINGS* cfg = dynamic_cast<EESCHEMA_SETTINGS*>( Kiface().KifaceSettings() ) )
aSettings->SetDefaultFont( cfg->m_Appearance.default_font );
COLOR_SETTINGS* colors = getColorSettings();
if( cfg )
{
cfg->m_PlotPanel.background_color = m_plotBackgroundColor->GetValue();
cfg->m_PlotPanel.color = getModeColor();
cfg->m_PlotPanel.color_theme = colors->GetFilename();
cfg->m_PlotPanel.frame_reference = getPlotDrawingSheet();
cfg->m_PlotPanel.format = static_cast<int>( GetPlotFileFormat() );
cfg->m_PlotPanel.pdf_property_popups = m_plotPDFPropertyPopups->GetValue();
cfg->m_PlotPanel.pdf_hierarchical_links = m_plotPDFHierarchicalLinks->GetValue();
cfg->m_PlotPanel.pdf_metadata = m_plotPDFMetadata->GetValue();
cfg->m_PlotPanel.open_file_after_plot = getOpenFileAfterPlot();
aSettings->SetDefaultFont( cfg->m_Appearance.default_font );
}
aSettings->LoadColors( colors );
aSettings->SetMinPenWidth( (int) m_defaultLineWidth.GetValue() );
@ -346,17 +243,6 @@ void DIALOG_PLOT_SCHEMATIC::getPlotOptions( RENDER_SETTINGS* aSettings )
aSettings->SetBackgroundColor( colors->GetColor( LAYER_SCHEMATIC_BACKGROUND ) );
else
aSettings->SetBackgroundColor( COLOR4D::UNSPECIFIED );
// Plot directory
wxString path = m_outputPath->GetValue();
path.Replace( '\\', '/' );
SCHEMATIC_SETTINGS& settings = m_editFrame->Schematic().Settings();
if( settings.m_PlotDirectoryName != path )
m_configChanged = true;
settings.m_PlotDirectoryName = path;
}
@ -371,6 +257,26 @@ COLOR_SETTINGS* DIALOG_PLOT_SCHEMATIC::getColorSettings()
}
void DIALOG_PLOT_SCHEMATIC::onPlotFormatSelection( wxCommandEvent& event )
{
PLOT_FORMAT fmt = getPlotFileFormat();
m_openFileAfterPlot->Enable( fmt == PLOT_FORMAT::PDF );
m_plotPDFPropertyPopups->Enable( fmt == PLOT_FORMAT::PDF );
m_plotPDFHierarchicalLinks->Enable( fmt == PLOT_FORMAT::PDF );
m_plotPDFMetadata->Enable( fmt == PLOT_FORMAT::PDF );
m_paperSizeOption->SetSelection( m_paperSizeOption->GetSelection() );
m_defaultLineWidth.Enable( fmt == PLOT_FORMAT::POST || fmt == PLOT_FORMAT::PDF || fmt == PLOT_FORMAT::SVG );
wxCommandEvent dummy;
onColorMode( dummy );
event.Skip();
}
void DIALOG_PLOT_SCHEMATIC::OnPlotCurrent( wxCommandEvent& event )
{
plotSchematic( false );
@ -388,17 +294,14 @@ void DIALOG_PLOT_SCHEMATIC::OnPlotAll( wxCommandEvent& event )
m_job->m_blackAndWhite = !getModeColor();
m_job->m_useBackgroundColor = m_plotBackgroundColor->GetValue();
m_job->m_minPenWidth = m_defaultLineWidth.GetIntValue();
m_job->m_pageSizeSelect = static_cast<JOB_PAGE_SIZE>( m_pageSizeSelect );
m_job->m_pageSizeSelect = static_cast<JOB_PAGE_SIZE>( m_paperSizeOption->GetSelection() );
m_job->m_PDFPropertyPopups = m_plotPDFPropertyPopups->GetValue();
m_job->m_PDFHierarchicalLinks = m_plotPDFHierarchicalLinks->GetValue();
m_job->m_PDFMetadata = m_plotPDFMetadata->GetValue();
m_job->m_plotDrawingSheet = m_plotDrawingSheet->GetValue();
m_job->m_plotAll = true;
m_job->SetConfiguredOutputPath( m_outputPath->GetValue() );
COLOR_SETTINGS* colors = getColorSettings();
m_job->m_theme = colors->GetName();
m_job->m_theme = getColorSettings()->GetName();
event.Skip(); // Allow normal close action
}
@ -417,35 +320,32 @@ void DIALOG_PLOT_SCHEMATIC::plotSchematic( bool aPlotAll )
std::unique_ptr<SCH_PLOTTER> schPlotter = std::make_unique<SCH_PLOTTER>( m_editFrame );
COLOR_SETTINGS* colors = getColorSettings();
SCH_PLOT_OPTS plotOpts;
plotOpts.m_plotDrawingSheet = getPlotDrawingSheet();
plotOpts.m_plotDrawingSheet = m_plotDrawingSheet->GetValue();
plotOpts.m_plotAll = aPlotAll;
plotOpts.m_blackAndWhite = !getModeColor();
plotOpts.m_useBackgroundColor = m_plotBackgroundColor->GetValue();
plotOpts.m_theme = colors->GetFilename();
plotOpts.m_theme = getColorSettings()->GetFilename();
plotOpts.m_PDFPropertyPopups = m_plotPDFPropertyPopups->GetValue();
plotOpts.m_PDFHierarchicalLinks = m_plotPDFHierarchicalLinks->GetValue();
plotOpts.m_PDFMetadata = m_plotPDFMetadata->GetValue();
plotOpts.m_outputDirectory = getOutputPath();
plotOpts.m_pageSizeSelect = m_pageSizeSelect;
plotOpts.m_pageSizeSelect = m_paperSizeOption->GetSelection();
plotOpts.m_plotHopOver = m_editFrame->Schematic().Settings().m_HopOverScale > 0.0;
schPlotter->Plot( GetPlotFileFormat(), plotOpts, &renderSettings, &m_MessagesBox->Reporter() );
schPlotter->Plot( getPlotFileFormat(), plotOpts, &renderSettings, &m_MessagesBox->Reporter() );
if( GetPlotFileFormat() == PLOT_FORMAT::PDF && getOpenFileAfterPlot() )
if( getPlotFileFormat() == PLOT_FORMAT::PDF && m_openFileAfterPlot->GetValue() )
wxLaunchDefaultApplication( schPlotter->GetLastOutputFilePath() );
}
wxString DIALOG_PLOT_SCHEMATIC::getOutputPath()
{
wxString msg;
wxString extMsg;
wxFileName fn;
wxString extMsg = wxString::Format( _( "Falling back to user path '%s'." ),
KIPLATFORM::ENV::GetDocumentsPath() );
extMsg.Printf( _( "Falling back to user path '%s'." ), KIPLATFORM::ENV::GetDocumentsPath() );
wxFileName fn;
// Build the absolute path of current output directory to preselect it in the file browser.
std::function<bool( wxString* )> textResolver =
@ -474,8 +374,8 @@ wxString DIALOG_PLOT_SCHEMATIC::getOutputPath()
if( screen && !screen->GetFileName().IsEmpty() )
{
fn = screen->GetFileName();
msg.Printf( _( "Cannot normalize path '%s%s'." ), fn.GetPathWithSep(), path );
fn.SetPath( fn.GetPathWithSep() + path );
path = fn.GetPathWithSep() + path;
fn.SetPath( path );
// Normalize always returns true for a non-empty file name so clear the file name
// and extension so that only the path is normalized.
@ -488,34 +388,22 @@ wxString DIALOG_PLOT_SCHEMATIC::getOutputPath()
}
else
{
wxMessageDialog dlg( this, msg, _( "Warning" ), wxOK | wxCENTER | wxRESIZE_BORDER
| wxICON_EXCLAMATION | wxSTAY_ON_TOP );
dlg.SetExtendedMessage( extMsg );
dlg.ShowModal();
DisplayErrorMessage( this, wxString::Format( _( "Cannot normalize path '%s'." ), path ), extMsg );
path = KIPLATFORM::ENV::GetDocumentsPath();
}
}
else
{
msg = _( "No project or path defined for the current schematic." );
wxMessageDialog dlg( this, msg, _( "Warning" ), wxOK | wxCENTER | wxRESIZE_BORDER
| wxICON_EXCLAMATION | wxSTAY_ON_TOP );
dlg.SetExtendedMessage( extMsg );
dlg.ShowModal();
DisplayErrorMessage( this, _( "No project or path defined for the current schematic." ), extMsg );
// Always fall back to user's document path if no other absolute path can be normalized.
path = KIPLATFORM::ENV::GetDocumentsPath();
}
}
else
{
msg.Printf( _( "Cannot normalize path '%s%s'." ), Prj().GetProjectPath(), path );
// Build the absolute path of current output directory and the project path.
fn.SetPath( Prj().GetProjectPath() + path );
path = Prj().GetProjectPath() + path;
fn.SetPath( path );
if( fn.Normalize( FN_NORMALIZE_FLAGS | wxPATH_NORM_ENV_VARS ) )
{
@ -523,13 +411,7 @@ wxString DIALOG_PLOT_SCHEMATIC::getOutputPath()
}
else
{
wxMessageDialog dlg( this, msg, _( "Warning" ),
wxOK | wxCENTER | wxRESIZE_BORDER | wxICON_EXCLAMATION |
wxSTAY_ON_TOP );
dlg.SetExtendedMessage( extMsg );
dlg.ShowModal();
DisplayErrorMessage( this, wxString::Format( _( "Cannot normalize path '%s'." ), path ), extMsg );
path = KIPLATFORM::ENV::GetDocumentsPath();
}
}

43
eeschema/dialogs/dialog_plot_schematic.h

@ -24,9 +24,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __DIALOG_PLOT_SCHEMATIC__
#define __DIALOG_PLOT_SCHEMATIC__
#pragma once
#include <plotters/plotter.h>
#include <dialog_plot_schematic_base.h>
@ -37,50 +35,32 @@ class PDF_PLOTTER;
class SCH_EDIT_FRAME;
class SCH_SCREEN;
class SCH_SHEET_PATH;
class JOB_EXPORT_SCH_PLOT;
class DIALOG_PLOT_SCHEMATIC : public DIALOG_PLOT_SCHEMATIC_BASE
{
public:
DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame );
DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWindow* aParent,
JOB_EXPORT_SCH_PLOT* aJob = nullptr );
/**
* Return true if the project configuration was modified.
*/
bool PrjConfigChanged() { return m_configChanged; }
DIALOG_PLOT_SCHEMATIC( SCH_EDIT_FRAME* aEditFrame, wxWindow* aParent, JOB_EXPORT_SCH_PLOT* aJob );
private:
void OnPageSizeSelected( wxCommandEvent& event ) override;
void onColorMode( wxCommandEvent& aEvent ) override;
void onPlotFormatSelection( wxCommandEvent& event ) override;
void onOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
void OnPlotCurrent( wxCommandEvent& event ) override;
void OnPlotAll( wxCommandEvent& event ) override;
void OnUpdateUI( wxUpdateUIEvent& event ) override;
void initDlg();
bool TransferDataToWindow() override;
// common
void getPlotOptions( RENDER_SETTINGS* aSettings );
bool getModeColor() { return m_ModeColorOption->GetSelection() == 0; }
void setModeColor( bool aColor ) { m_ModeColorOption->SetSelection( aColor ? 0 : 1 ); }
COLOR_SETTINGS* getColorSettings();
/**
* Set the m_outputDirectoryName variable to the selected directory from directory dialog.
*/
void onOutputDirectoryBrowseClicked( wxCommandEvent& event ) override;
PLOT_FORMAT GetPlotFileFormat();
bool getPlotDrawingSheet() { return m_plotDrawingSheet->GetValue(); }
void setPlotDrawingSheet( bool aPlot) { m_plotDrawingSheet->SetValue( aPlot ); }
bool getOpenFileAfterPlot() { return m_openFileAfterPlot->GetValue(); }
void setOpenFileAfterPlot( bool aOpen ) { m_openFileAfterPlot->SetValue( aOpen ); }
PLOT_FORMAT getPlotFileFormat();
void plotSchematic( bool aPlotAll );
@ -104,11 +84,6 @@ private:
private:
SCH_EDIT_FRAME* m_editFrame;
bool m_configChanged; // true if a project config param has changed
PLOT_FORMAT m_plotFormat;
static int m_pageSizeSelect; // Static to keep last option for some format
UNIT_BINDER m_defaultLineWidth;
JOB_EXPORT_SCH_PLOT* m_job;
};
#endif // __DIALOG_PLOT_SCHEMATIC__

17
eeschema/dialogs/dialog_plot_schematic_base.cpp

@ -81,9 +81,9 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
m_ModeColorOption->SetSelection( 0 );
gbSizer1->Add( m_ModeColorOption, wxGBPosition( 3, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticText9 = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText9->Wrap( -1 );
gbSizer1->Add( m_staticText9, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_colorThemeLabel = new wxStaticText( sbOptions->GetStaticBox(), wxID_ANY, _("Color theme:"), wxDefaultPosition, wxDefaultSize, 0 );
m_colorThemeLabel->Wrap( -1 );
gbSizer1->Add( m_colorThemeLabel, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxArrayString m_colorThemeChoices;
m_colorTheme = new wxChoice( sbOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_colorThemeChoices, 0 );
@ -133,6 +133,7 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
sbSizer4->Add( m_plotPDFHierarchicalLinks, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
m_plotPDFMetadata = new wxCheckBox( sbSizer4->GetStaticBox(), wxID_ANY, _("Generate metadata from AUTHOR && SUBJECT variables"), wxDefaultPosition, wxDefaultSize, 0 );
m_plotPDFMetadata->SetValue(true);
m_plotPDFMetadata->SetToolTip( _("Generate PDF document properties from AUTHOR and SUBJECT text variables") );
sbSizer4->Add( m_plotPDFMetadata, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@ -185,10 +186,9 @@ DIALOG_PLOT_SCHEMATIC_BASE::DIALOG_PLOT_SCHEMATIC_BASE( wxWindow* parent, wxWind
// Connect Events
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ) );
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnUpdateUI ) );
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
m_plotFormatOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotFormatSelection ), NULL, this );
m_paperSizeOption->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPageSizeSelected ), NULL, this );
m_plotFormatOpt->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onPlotFormatSelection ), NULL, this );
m_ModeColorOption->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onColorMode ), NULL, this );
m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotCurrent ), NULL, this );
m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotAll ), NULL, this );
}
@ -197,10 +197,9 @@ DIALOG_PLOT_SCHEMATIC_BASE::~DIALOG_PLOT_SCHEMATIC_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnCloseWindow ) );
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnUpdateUI ) );
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
m_plotFormatOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotFormatSelection ), NULL, this );
m_paperSizeOption->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPageSizeSelected ), NULL, this );
m_plotFormatOpt->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onPlotFormatSelection ), NULL, this );
m_ModeColorOption->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::onColorMode ), NULL, this );
m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotCurrent ), NULL, this );
m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PLOT_SCHEMATIC_BASE::OnPlotAll ), NULL, this );

9
eeschema/dialogs/dialog_plot_schematic_base.fbp

@ -60,7 +60,6 @@
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnClose">OnCloseWindow</event>
<event name="OnUpdateUI">OnUpdateUI</event>
<object class="wxBoxSizer" expanded="true">
<property name="minimum_size"></property>
<property name="name">bMainSizer</property>
@ -353,7 +352,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnRadioBox">OnPlotFormatSelection</event>
<event name="OnRadioBox">onPlotFormatSelection</event>
</object>
</object>
<object class="sizeritem" expanded="true">
@ -514,7 +513,6 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChoice">OnPageSizeSelected</event>
</object>
</object>
<object class="gbsizeritem" expanded="false">
@ -716,6 +714,7 @@
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChoice">onColorMode</event>
</object>
</object>
<object class="gbsizeritem" expanded="true">
@ -763,7 +762,7 @@
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_staticText9</property>
<property name="name">m_colorThemeLabel</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
@ -1290,7 +1289,7 @@
<property name="caption"></property>
<property name="caption_visible">1</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="context_help"></property>
<property name="context_menu">1</property>

7
eeschema/dialogs/dialog_plot_schematic_base.h

@ -54,7 +54,7 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
wxChoice* m_paperSizeOption;
wxCheckBox* m_plotDrawingSheet;
wxChoice* m_ModeColorOption;
wxStaticText* m_staticText9;
wxStaticText* m_colorThemeLabel;
wxChoice* m_colorTheme;
wxCheckBox* m_plotBackgroundColor;
wxStaticText* m_lineWidthLabel;
@ -73,10 +73,9 @@ class DIALOG_PLOT_SCHEMATIC_BASE : public DIALOG_SHIM
// Virtual event handlers, override them in your derived class
virtual void OnCloseWindow( wxCloseEvent& event ) { event.Skip(); }
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void onOutputDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPlotFormatSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPageSizeSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void onPlotFormatSelection( wxCommandEvent& event ) { event.Skip(); }
virtual void onColorMode( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPlotCurrent( wxCommandEvent& event ) { event.Skip(); }
virtual void OnPlotAll( wxCommandEvent& event ) { event.Skip(); }

28
eeschema/eeschema_settings.cpp

@ -162,7 +162,6 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
m_FieldEditorPanel(),
m_LibViewPanel(),
m_NetlistPanel(),
m_PlotPanel(),
m_SymChooserPanel(),
m_ImportGraphics(),
m_Selection(),
@ -541,33 +540,6 @@ EESCHEMA_SETTINGS::EESCHEMA_SETTINGS() :
m_params.emplace_back( new PARAM<int>( "field_editor.scope",
&m_FieldEditorPanel.scope, 0 ) );
m_params.emplace_back( new PARAM<bool>( "plot.background_color",
&m_PlotPanel.background_color, false ) );
m_params.emplace_back( new PARAM<bool>( "plot.color",
&m_PlotPanel.color, true ) );
m_params.emplace_back( new PARAM<wxString>( "plot.color_theme",
&m_PlotPanel.color_theme, DEFAULT_THEME ) );
m_params.emplace_back( new PARAM<int>( "plot.format",
&m_PlotPanel.format, 0 ) );
m_params.emplace_back( new PARAM<bool>( "plot.frame_reference",
&m_PlotPanel.frame_reference, true ) );
m_params.emplace_back( new PARAM<bool>( "plot.pdf_property_popups",
&m_PlotPanel.pdf_property_popups, true ) );
m_params.emplace_back( new PARAM<bool>( "plot.pdf_hierarchical_links",
&m_PlotPanel.pdf_hierarchical_links, true ) );
m_params.emplace_back( new PARAM<bool>( "plot.pdf_metadata",
&m_PlotPanel.pdf_metadata, true ) );
m_params.emplace_back( new PARAM<bool>( "plot.other_open_file_after_plot",
&m_PlotPanel.open_file_after_plot, false ) );
addParamsForWindow( &m_Simulator.window, "simulator.window", 500, 400 );
m_params.emplace_back( new PARAM<int>( "simulator.plot_panel_width",

15
eeschema/eeschema_settings.h

@ -260,19 +260,6 @@ public:
std::vector<NETLIST_PLUGIN_SETTINGS> plugins;
};
struct PANEL_PLOT
{
bool background_color;
bool color;
wxString color_theme;
int format;
bool frame_reference;
bool pdf_property_popups;
bool pdf_hierarchical_links;
bool pdf_metadata;
bool open_file_after_plot;
};
struct PANEL_SYM_CHOOSER
{
int sash_pos_h;
@ -371,8 +358,6 @@ public:
PANEL_NETLIST m_NetlistPanel;
PANEL_PLOT m_PlotPanel;
PANEL_SYM_CHOOSER m_SymChooserPanel;
DIALOG_IMPORT_GRAPHICS m_ImportGraphics;

4
eeschema/tools/sch_editor_control.cpp

@ -306,10 +306,6 @@ int SCH_EDITOR_CONTROL::Plot( const TOOL_EVENT& aEvent )
dlg.ShowModal();
// save project config if the prj config has changed:
if( dlg.PrjConfigChanged() )
m_frame->OnModify();
return 0;
}

28
pcbnew/dialogs/dialog_footprint_wizard_list.cpp

@ -22,10 +22,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file dialog_footprint_wizard_list.cpp
*/
#include <wx/grid.h>
#include <pcbnew_settings.h>
@ -50,11 +46,9 @@ enum FPGeneratorRowNames
DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST( wxWindow* aParent ) :
DIALOG_FOOTPRINT_WIZARD_LIST_BASE( aParent )
{
OptOut( this );
initLists();
if( PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" ) )
SetSize( wxSize( cfg->m_FootprintWizardList.width, cfg->m_FootprintWizardList.height ) );
SetupStandardButtons();
finishDialogSettings();
@ -62,19 +56,6 @@ DIALOG_FOOTPRINT_WIZARD_LIST::DIALOG_FOOTPRINT_WIZARD_LIST( wxWindow* aParent )
}
DIALOG_FOOTPRINT_WIZARD_LIST::~DIALOG_FOOTPRINT_WIZARD_LIST()
{
if( !IsIconized() )
{
if( PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" ) )
{
cfg->m_FootprintWizardList.width = GetSize().x;
cfg->m_FootprintWizardList.height = GetSize().y;
}
}
}
void DIALOG_FOOTPRINT_WIZARD_LIST::initLists()
{
// Current wizard selection, empty or first
@ -108,15 +89,14 @@ void DIALOG_FOOTPRINT_WIZARD_LIST::initLists()
m_footprintGeneratorsGrid->SetCellValue( ii, FP_GEN_ROW_NUMBER, num );
m_footprintGeneratorsGrid->SetCellValue( ii, FP_GEN_ROW_NAME, name );
m_footprintGeneratorsGrid->SetCellValue( ii, FP_GEN_ROW_DESCR, description );
}
m_footprintGeneratorsGrid->AutoSizeColumns();
// Auto-expand the description column
int width = m_footprintGeneratorsGrid->GetClientSize().GetWidth() -
m_footprintGeneratorsGrid->GetRowLabelSize() -
m_footprintGeneratorsGrid->GetColSize( FP_GEN_ROW_NAME );
int width = m_footprintGeneratorsGrid->GetClientSize().GetWidth()
- m_footprintGeneratorsGrid->GetRowLabelSize()
- m_footprintGeneratorsGrid->GetColSize( FP_GEN_ROW_NAME );
if ( width > m_footprintGeneratorsGrid->GetColMinimalAcceptableWidth() )
m_footprintGeneratorsGrid->SetColSize( FP_GEN_ROW_DESCR, width );

13
pcbnew/dialogs/dialog_footprint_wizard_list.h

@ -22,20 +22,16 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _DIALOG_FOOTPRINT_WIZARD_LIST_H_
#define _DIALOG_FOOTPRINT_WIZARD_LIST_H_
#pragma once
#include <dialog_footprint_wizard_list_base.h>
#include <footprint_wizard.h>
class DIALOG_FOOTPRINT_WIZARD_LIST: public DIALOG_FOOTPRINT_WIZARD_LIST_BASE
{
private:
FOOTPRINT_WIZARD* m_footprintWizard; ///< The selected python script wizard
public:
DIALOG_FOOTPRINT_WIZARD_LIST( wxWindow * aParent );
~DIALOG_FOOTPRINT_WIZARD_LIST();
~DIALOG_FOOTPRINT_WIZARD_LIST() = default;
FOOTPRINT_WIZARD* GetWizard();
@ -45,6 +41,7 @@ private:
void OnCellFpGeneratorDoubleClick( wxGridEvent& event ) override;
void onShowTrace( wxCommandEvent& event ) override;
void onUpdatePythonModulesClick( wxCommandEvent& event ) override;
};
#endif // _DIALOG_FOOTPRINT_WIZARD_LIST_H_
private:
FOOTPRINT_WIZARD* m_footprintWizard; ///< The selected python script wizard
};

12
pcbnew/dialogs/panel_fp_lib_table.cpp

@ -265,7 +265,7 @@ void PANEL_FP_LIB_TABLE::setupGrid( WX_GRID* aGrid )
if( PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" ) )
{
attr->SetEditor( new GRID_CELL_PATH_EDITOR(
m_parent, aGrid, &cfg->m_lastFootprintLibDir, true, m_projectBasePath,
m_parent, aGrid, &cfg->m_LastFootprintLibDir, true, m_projectBasePath,
[this]( WX_GRID* grid, int row ) -> wxString
{
auto* libTable = static_cast<FP_LIB_TABLE_GRID*>( grid->GetTable() );
@ -336,8 +336,8 @@ PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE( DIALOG_EDIT_LIBRARY_TABLES* aParent, PRO
if( PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" ) )
{
if( cfg->m_lastFootprintLibDir.IsEmpty() )
cfg->m_lastFootprintLibDir = PATHS::GetDefaultUserFootprintsPath();
if( cfg->m_LastFootprintLibDir.IsEmpty() )
cfg->m_LastFootprintLibDir = PATHS::GetDefaultUserFootprintsPath();
}
m_lastProjectLibDir = m_projectBasePath;
@ -838,7 +838,7 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
if( m_cur_grid == m_project_grid )
lastDir = &m_lastProjectLibDir;
else
lastDir = cfg ? &cfg->m_lastFootprintLibDir : &dummy;
lastDir = cfg ? &cfg->m_LastFootprintLibDir : &dummy;
wxArrayString files;
@ -873,8 +873,8 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
}
// Drop the last directory if the path is a .pretty folder
if( cfg && cfg->m_lastFootprintLibDir.EndsWith( FILEEXT::KiCadFootprintLibPathExtension ) )
cfg->m_lastFootprintLibDir = cfg->m_lastFootprintLibDir.BeforeLast( wxFileName::GetPathSeparator() );
if( cfg && cfg->m_LastFootprintLibDir.EndsWith( FILEEXT::KiCadFootprintLibPathExtension ) )
cfg->m_LastFootprintLibDir = cfg->m_LastFootprintLibDir.BeforeLast( wxFileName::GetPathSeparator() );
const ENV_VAR_MAP& envVars = Pgm().GetLocalEnvVariables();
bool addDuplicates = false;

6
pcbnew/dialogs/panel_fp_properties_3d_model.cpp

@ -90,10 +90,10 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( PCB_BASE_EDIT_FRAME*
// Get the last 3D directory
PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" );
if( cfg && cfg->m_lastFootprint3dDir.IsEmpty() )
if( cfg && cfg->m_LastFootprint3dDir.IsEmpty() )
{
wxGetEnv( ENV_VAR::GetVersionedEnvVarName( wxS( "3DMODEL_DIR" ) ),
&cfg->m_lastFootprint3dDir );
&cfg->m_LastFootprint3dDir );
}
// Icon showing warning/error information
@ -107,7 +107,7 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( PCB_BASE_EDIT_FRAME*
if( cfg )
{
attr->SetEditor( new GRID_CELL_PATH_EDITOR( m_parentDialog, m_modelsGrid,
&cfg->m_lastFootprint3dDir, wxT( "*.*" ), true,
&cfg->m_LastFootprint3dDir, wxT( "*.*" ), true,
m_frame->Prj().GetProjectPath() ) );
}

11
pcbnew/pcbnew_settings.cpp

@ -50,7 +50,6 @@ const int pcbnewSchemaVersion = 5;
PCBNEW_SETTINGS::PCBNEW_SETTINGS()
: PCB_VIEWERS_SETTINGS_BASE( "pcbnew", pcbnewSchemaVersion ),
m_AuiPanels(),
m_FootprintWizardList(),
m_FootprintChooser(),
m_Zones(),
m_FootprintViewer(),
@ -295,12 +294,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
m_params.emplace_back( new PARAM<wxString>( "window.footprint_text_shown_columns",
&m_FootprintTextShownColumns, "0 1 2 3 4 5 7" ) );
m_params.emplace_back( new PARAM<int>( "footprint_wizard_list.width",
&m_FootprintWizardList.width, -1 ) );
m_params.emplace_back( new PARAM<int>( "footprint_wizard_list.height",
&m_FootprintWizardList.height, -1 ) );
m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( "action_plugins",
[&]() -> nlohmann::json
{
@ -351,10 +344,10 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS()
addParamsForWindow( &m_FootprintWizard, "footprint_wizard" );
m_params.emplace_back( new PARAM<wxString>( "system.last_footprint_lib_dir",
&m_lastFootprintLibDir, "" ) );
&m_LastFootprintLibDir, "" ) );
m_params.emplace_back( new PARAM<wxString>( "system.last_footprint3d_dir",
&m_lastFootprint3dDir, "" ) );
&m_LastFootprint3dDir, "" ) );
registerMigration( 0, 1,
[&]()

81
pcbnew/pcbnew_settings.h

@ -18,8 +18,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef PCBNEW_SETTINGS_H_
#define PCBNEW_SETTINGS_H_
#pragma once
#include <core/mirror.h> // for FLIP_DIRECTION
#include <geometry/eda_angle.h>
@ -50,7 +49,6 @@ struct CONVERT_SETTINGS
};
enum class MAGNETIC_OPTIONS
{
NO_EFFECT = 0,
@ -169,14 +167,9 @@ public:
bool doNotExportUnconnectedPads;
};
struct DIALOG_FOOTPRINT_WIZARD_LIST
{
int width;
int height;
};
struct FOOTPRINT_CHOOSER
{
// Footprint chooser is a FRAME, so there's no DIALOG_SHIM to save/restore control state
int width;
int height;
int sash_h;
@ -227,75 +220,63 @@ public:
};
PCBNEW_SETTINGS();
virtual ~PCBNEW_SETTINGS();
virtual bool MigrateFromLegacy( wxConfigBase* aLegacyConfig ) override;
AUI_PANELS m_AuiPanels;
DIALOG_EXPORT_D356 m_ExportD356;
DIALOG_FOOTPRINT_WIZARD_LIST m_FootprintWizardList;
FOOTPRINT_CHOOSER m_FootprintChooser;
ZONES m_Zones;
protected:
virtual std::string getLegacyFrameName() const override { return "PcbFrame"; }
WINDOW_SETTINGS m_FootprintViewer;
public:
AUI_PANELS m_AuiPanels;
WINDOW_SETTINGS m_FootprintWizard;
DIALOG_EXPORT_D356 m_ExportD356;
FOOTPRINT_CHOOSER m_FootprintChooser;
DISPLAY_OPTIONS m_Display;
ZONES m_Zones;
MAGNETIC_SETTINGS m_MagneticItems;
WINDOW_SETTINGS m_FootprintViewer;
WINDOW_SETTINGS m_FootprintWizard;
TRACK_DRAG_ACTION m_TrackDragAction;
DISPLAY_OPTIONS m_Display;
ARC_EDIT_MODE m_ArcEditMode;
MAGNETIC_SETTINGS m_MagneticItems;
TRACK_DRAG_ACTION m_TrackDragAction;
ARC_EDIT_MODE m_ArcEditMode;
bool m_CtrlClickHighlight;
bool m_CtrlClickHighlight;
bool m_Use45DegreeLimit; // True to constrain tool actions to horizontal,
// vertical and 45deg
FLIP_DIRECTION m_FlipDirection;
bool m_Use45DegreeLimit; // Constrain tool actions to horizontal, vertical and 45deg
FLIP_DIRECTION m_FlipDirection;
bool m_ESCClearsNetHighlight;
bool m_ESCClearsNetHighlight;
bool m_PolarCoords;
bool m_PolarCoords;
EDA_ANGLE m_RotationAngle;
bool m_ShowPageLimits;
bool m_ShowCourtyardCollisions;
bool m_ShowPageLimits;
bool m_ShowCourtyardCollisions;
///<@todo Implement real auto zone filling (not just after zone properties are edited)
bool m_AutoRefillZones; // Fill zones after editing the zone using the Zone Properties dialog
bool m_AutoRefillZones; // Fill zones after editing the zone using the Zone Properties dialog
bool m_AllowFreePads; // True: unlocked pads can be moved freely with respect to the footprint.
// False (default): all pads are treated as locked for the purposes of
// movement and any attempt to move them will move the footprint instead.
bool m_AllowFreePads; // True: unlocked pads can be moved freely with respect to the footprint.
// False (default): all pads are treated as locked for the purposes of
// movement and any attempt to move them will move the footprint instead.
wxString m_FootprintTextShownColumns;
wxString m_FootprintTextShownColumns;
std::unique_ptr<PNS::ROUTING_SETTINGS> m_PnsSettings;
int m_FootprintViewerLibListWidth;
int m_FootprintViewerFPListWidth;
wxString m_lastFootprintLibDir;
int m_FootprintViewerLibListWidth;
int m_FootprintViewerFPListWidth;
wxString m_lastFootprint3dDir;
wxString m_LastFootprintLibDir;
wxString m_LastFootprint3dDir;
LOCKING_OPTIONS m_LockingOptions;
ACTION_PLUGIN_SETTINGS_LIST m_VisibleActionPlugins;
protected:
virtual std::string getLegacyFrameName() const override { return "PcbFrame"; }
};
#endif
Loading…
Cancel
Save