25#include <../board_stackup_manager/panel_board_stackup.h>
26#include <../board_stackup_manager/panel_board_finish.h>
53#define RESOLVE_PAGE( T, pageIndex ) static_cast<T*>( m_treebook->ResolvePage( pageIndex ) )
57 _(
"Import Settings from Another Board..." ), wxSize( 980, 600 ) ),
60 m_physicalStackup( nullptr ),
63 m_physicalStackupPage( 0 ),
64 m_boardFinishPage( 0 ),
65 m_textAndGraphicsPage( 0 ),
66 m_formattingPage( 0 ),
67 m_maskAndPagePage( 0 ),
68 m_constraintsPage( 0 ),
69 m_tracksAndViasPage( 0 ),
71 m_tuningPatternsPage( 0 ),
72 m_netclassesPage( 0 ),
73 m_customRulesPage( 0 ),
77 SetEvtHandlerEnabled(
false );
93 [
this]( wxWindow* aParent ) -> wxWindow*
96 },
_(
"Board Editor Layers" ) );
100 [
this]( wxWindow* aParent ) -> wxWindow*
104 },
_(
"Physical Stackup" ) );
108 [
this]( wxWindow* aParent ) -> wxWindow*
111 },
_(
"Board Finish" ) );
115 [
this]( wxWindow* aParent ) -> wxWindow*
118 },
_(
"Solder Mask/Paste" ) );
124 [
this]( wxWindow* aParent ) -> wxWindow*
127 },
_(
"Defaults" ) );
131 [
this]( wxWindow* aParent ) -> wxWindow*
134 },
_(
"Formatting" ) );
137 [
this]( wxWindow* aParent ) -> wxWindow*
140 },
_(
"Text Variables" ) );
146 [
this]( wxWindow* aParent ) -> wxWindow*
149 },
_(
"Constraints" ) );
153 [
this]( wxWindow* aParent ) -> wxWindow*
156 },
_(
"Pre-defined Sizes" ) );
160 [
this]( wxWindow* aParent ) -> wxWindow*
163 },
_(
"Teardrops" ) );
167 [
this]( wxWindow* aParent ) -> wxWindow*
175 },
_(
"Length-tuning Patterns" ) );
179 [
this]( wxWindow* aParent ) -> wxWindow*
186 },
_(
"Net Classes" ) );
190 [
this]( wxWindow* aParent ) -> wxWindow*
193 },
_(
"Custom Rules" ) );
197 [
this]( wxWindow* aParent ) -> wxWindow*
202 },
_(
"Violation Severity" ) );
204 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
207 SetEvtHandlerEnabled(
true );
211 if(
Prj().IsReadOnly() )
214 "be editable." ), wxICON_WARNING );
217 wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
232 size_t page = aEvent.GetSelection();
248 else if(
Prj().IsReadOnly() )
260 if( importDlg.ShowModal() == wxID_CANCEL )
264 wxFileName projectFn( boardFn );
270 wxString msg = wxString::Format(
_(
"Error importing settings from board:\n"
271 "Associated project file %s could not be loaded" ),
272 projectFn.GetFullPath() );
283 bool okToProceed =
true;
288 BOARD* otherBoard =
nullptr;
294 pi->SetProgressReporter( &progressReporter );
296 otherBoard = pi->LoadBoard( boardFn.GetFullPath(),
nullptr );
313 if( ioe.
Problem() != wxT(
"CANCEL" ) )
315 wxString msg = wxString::Format(
_(
"Error loading board file:\n%s" ),
316 boardFn.GetFullPath() );
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
PNS::MEANDER_SETTINGS m_DiffPairMeanderSettings
PNS::MEANDER_SETTINGS m_SingleTrackMeanderSettings
PNS::MEANDER_SETTINGS m_SkewMeanderSettings
Information pertinent to a Pcbnew printed circuit board.
std::set< wxString > GetNetClassAssignmentCandidates() const
Return the set of netname candidates for netclass assignment.
void SetProject(PROJECT *aProject, bool aReferenceOnly=false)
Link a board to a given project.
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
DIALOG_BOARD_SETUP(PCB_EDIT_FRAME *aFrame)
size_t m_tracksAndViasPage
size_t m_textAndGraphicsPage
static std::mutex g_Mutex
size_t m_physicalStackupPage
void onAuxiliaryAction(wxCommandEvent &aEvent) override
size_t m_tuningPatternsPage
PANEL_SETUP_BOARD_STACKUP * m_physicalStackup
PANEL_SETUP_LAYERS * m_layers
void onPageChanged(wxBookCtrlEvent &aEvent) override
wxCheckBox * m_CustomRulesOpt
wxCheckBox * m_MaskAndPasteOpt
wxCheckBox * m_ConstraintsOpt
wxCheckBox * m_TuningPatternsOpt
wxCheckBox * m_SeveritiesOpt
wxCheckBox * m_TextAndGraphicsOpt
wxCheckBox * m_FormattingOpt
wxCheckBox * m_TeardropsOpt
wxCheckBox * m_TracksAndViasOpt
wxCheckBox * m_NetclassesOpt
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
SETTINGS_MANAGER * GetSettingsManager() const
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
virtual const wxString Problem() const
what was the problem?
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
WX_TREEBOOK * GetTreebook()
virtual void onPageChanged(wxBookCtrlEvent &aEvent)
void ImportSettingsFrom(BOARD *aBoard)
void OnLayersOptionsChanged(LSET aNewLayerSet)
Must be called if the copper layers count has changed or solder mask, solder paste or silkscreen laye...
int GetCopperLayerCount() const
bool CheckCopperLayerCount(BOARD *aWorkingBoard, BOARD *aImportedBoard)
Check and warn if inner copper layers will be deleted.
void SyncCopperLayers(int aNumCopperLayers)
Called when switching to this tab to make sure that any changes to the copper layer count made on the...
void ImportSettingsFrom(BOARD *aBoard)
The main frame for Pcbnew.
static PCB_IO * PluginFind(PCB_FILE_T aFileType)
Return a #PLUGIN which the caller can use to import, export, save, or load design documents.
@ KICAD_SEXP
S-expression Pcbnew file format.
The backing store for a PROJECT, in JSON format.
std::shared_ptr< NET_SETTINGS > & NetSettings()
std::shared_ptr< NET_SETTINGS > m_NetSettings
Net settings for this project (owned here)
Container for project specific data.
virtual PROJECT_FILE & GetProjectFile() const
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Loads a project or sets up a new project with a specified path.
PROJECT * GetProject(const wxString &aFullPath) const
Retrieves a loaded project by name.
bool UnloadProject(PROJECT *aProject, bool aSave=true)
Saves, unloads and unregisters the given PROJECT.
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
Multi-thread safe progress reporter dialog, intended for use of tasks that parallel reporting back of...
bool AddLazySubPage(std::function< wxWindow *(wxWindow *aParent)> aLazyCtor, const wxString &text, bool bSelect=false, int imageId=NO_IMAGE)
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
#define RESOLVE_PAGE(T, pageIndex)
static const std::string ProjectFileExtension
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
void Disable(wxWindow *aWindow)
Makes a window read-only.
Definition of file extensions used in Kicad.