25#include <../board_stackup_manager/panel_board_stackup.h>
26#include <../board_stackup_manager/panel_board_finish.h>
51#define RESOLVE_PAGE( T, pageIndex ) static_cast<T*>( m_treebook->ResolvePage( pageIndex ) )
55 _(
"Import Settings from Another Board..." ), wxSize( 980, 600 ) ),
58 m_boardFinish( nullptr ),
59 m_physicalStackup( nullptr ),
62 m_physicalStackupPage( 0 ),
63 m_boardFinishPage( 0 ),
64 m_textAndGraphicsPage( 0 ),
65 m_formattingPage( 0 ),
66 m_maskAndPagePage( 0 ),
67 m_constraintsPage( 0 ),
68 m_tracksAndViasPage( 0 ),
70 m_tuningPatternsPage( 0 ),
71 m_netclassesPage( 0 ),
72 m_customRulesPage( 0 ),
76 SetEvtHandlerEnabled(
false );
92 [
this]( wxWindow* aParent ) -> wxWindow*
95 },
_(
"Board Editor Layers" ) );
99 [
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" ) );
207 [
this]( wxWindow* aParent ) -> wxWindow*
210 },
_(
"Embedded Files" ) );
212 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
215 SetEvtHandlerEnabled(
true );
219 if(
Prj().IsReadOnly() )
222 "be editable." ), wxICON_WARNING );
225 wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
240 size_t page = aEvent.GetSelection();
256 else if(
Prj().IsReadOnly() )
268 if( importDlg.
ShowModal() == wxID_CANCEL )
272 wxFileName projectFn( boardFn );
278 wxString msg = wxString::Format(
_(
"Error importing settings from board:\n"
279 "Associated project file %s could not be loaded" ),
280 projectFn.GetFullPath() );
292 bool okToProceed =
true;
297 BOARD* otherBoard =
nullptr;
303 pi->SetProgressReporter( &progressReporter );
305 otherBoard = pi->LoadBoard( boardFn.GetFullPath(),
nullptr );
322 if( ioe.
Problem() != wxT(
"CANCEL" ) )
324 wxString msg = wxString::Format(
_(
"Error loading board file:\n%s" ),
325 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
size_t m_embeddedFilesPage
DIALOG_BOARD_SETUP(PCB_EDIT_FRAME *aFrame)
size_t m_tracksAndViasPage
size_t m_textAndGraphicsPage
size_t m_physicalStackupPage
void onAuxiliaryAction(wxCommandEvent &aEvent) override
size_t m_tuningPatternsPage
PANEL_SETUP_BOARD_STACKUP * m_physicalStackup
PANEL_SETUP_BOARD_FINISH * m_boardFinish
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 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.
KICOMMON_API void Disable(wxWindow *aWindow)
Makes a window read-only.
Definition of file extensions used in Kicad.