25#include <../board_stackup_manager/panel_board_stackup.h>
26#include <../board_stackup_manager/panel_board_finish.h>
52#define RESOLVE_PAGE( T, pageIndex ) static_cast<T*>( m_treebook->ResolvePage( pageIndex ) )
56 _(
"Import Settings from Another Board..." ), wxSize( 980, 600 ) ),
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*
103 },
_(
"Physical Stackup" ) );
107 [
this]( wxWindow* aParent ) -> wxWindow*
110 },
_(
"Board Finish" ) );
114 [
this]( wxWindow* aParent ) -> wxWindow*
117 },
_(
"Solder Mask/Paste" ) );
123 [
this]( wxWindow* aParent ) -> wxWindow*
126 },
_(
"Defaults" ) );
130 [
this]( wxWindow* aParent ) -> wxWindow*
133 },
_(
"Formatting" ) );
136 [
this]( wxWindow* aParent ) -> wxWindow*
139 },
_(
"Text Variables" ) );
145 [
this]( wxWindow* aParent ) -> wxWindow*
148 },
_(
"Constraints" ) );
152 [
this]( wxWindow* aParent ) -> wxWindow*
155 },
_(
"Pre-defined Sizes" ) );
159 [
this]( wxWindow* aParent ) -> wxWindow*
162 },
_(
"Teardrops" ) );
166 [
this]( wxWindow* aParent ) -> wxWindow*
174 },
_(
"Length-tuning Patterns" ) );
178 [
this]( wxWindow* aParent ) -> wxWindow*
185 },
_(
"Net Classes" ) );
189 [
this]( wxWindow* aParent ) -> wxWindow*
192 },
_(
"Custom Rules" ) );
196 [
this]( wxWindow* aParent ) -> wxWindow*
201 },
_(
"Violation Severity" ) );
203 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
206 SetEvtHandlerEnabled(
true );
210 if(
Prj().IsReadOnly() )
213 "be editable." ), wxICON_WARNING );
216 wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
231 size_t page = aEvent.GetSelection();
247 else if(
Prj().IsReadOnly() )
259 if( importDlg.ShowModal() == wxID_CANCEL )
263 wxFileName projectFn( boardFn );
269 wxString msg = wxString::Format(
_(
"Error importing settings from board:\n"
270 "Associated project file %s could not be loaded" ),
271 projectFn.GetFullPath() );
282 bool okToProceed =
true;
287 BOARD* otherBoard =
nullptr;
293 otherBoard = pi->
LoadBoard( boardFn.GetFullPath(),
nullptr,
nullptr,
nullptr,
311 if( ioe.
Problem() != wxT(
"CANCEL" ) )
313 wxString msg = wxString::Format(
_(
"Error loading board file:\n%s" ),
314 boardFn.GetFullPath() );
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
PNS::MEANDER_SETTINGS m_skewMeanderSettings
PNS::MEANDER_SETTINGS m_diffPairMeanderSettings
PNS::MEANDER_SETTINGS m_singleTrackMeanderSettings
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?
@ KICAD_SEXP
S-expression Pcbnew file format.
static PLUGIN * PluginFind(PCB_FILE_T aFileType)
Return a PLUGIN which the caller can use to import, export, save, or load design documents.
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.
Releases a PLUGIN in the context of a potential thrown exception through its destructor.
virtual BOARD * LoadBoard(const wxString &aFileName, BOARD *aAppendToMe, const STRING_UTF8_MAP *aProperties=nullptr, PROJECT *aProject=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Load information from some input file format that this PLUGIN implementation knows about into either ...
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)
const std::string ProjectFileExtension
void Disable(wxWindow *aWindow)
Makes a window read-only.
Definition of file extensions used in Kicad.