26#include <../board_stackup_manager/panel_board_stackup.h>
27#include <../board_stackup_manager/panel_board_finish.h>
46#include <wx/treebook.h>
51 _(
"Import Settings from Another Board..." ) ),
54 SetEvtHandlerEnabled(
false );
114 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
118 m_treebook->SetInitialSize( wxSize( -1, 700 ) );
119 SetEvtHandlerEnabled(
true );
123 if(
Prj().IsReadOnly() )
126 "be editable." ), wxICON_WARNING );
129 wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
144 int page = aEvent.GetSelection();
152 else if(
Prj().IsReadOnly() )
163 if( importDlg.ShowModal() == wxID_CANCEL )
167 wxFileName projectFn( boardFn );
174 "Associated project file %s could not be loaded" ),
175 projectFn.GetFullPath() );
183 bool okToProceed =
true;
189 BOARD* otherBoard =
nullptr;
195 otherBoard = pi->
Load( boardFn.GetFullPath(),
nullptr,
nullptr,
nullptr,
213 if( ioe.
Problem() != wxT(
"CANCEL" ) )
216 boardFn.GetFullPath() );
Container for design settings for a BOARD object.
std::map< int, SEVERITY > m_DRCSeverities
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)
PANEL_SETUP_TEXT_AND_GRAPHICS * m_textAndGraphics
PANEL_SETUP_FORMATTING * m_formatting
PANEL_SETUP_TRACKS_AND_VIAS * m_tracksAndVias
PANEL_SETUP_MASK_AND_PASTE * m_maskAndPaste
PANEL_SETUP_NETCLASSES * m_netclasses
int m_physicalStackupPage
void onAuxiliaryAction(wxCommandEvent &aEvent) override
PANEL_SETUP_CONSTRAINTS * m_constraints
PANEL_SETUP_RULES * m_rules
PANEL_SETUP_BOARD_STACKUP * m_physicalStackup
PANEL_TEXT_VARIABLES * m_textVars
PANEL_SETUP_BOARD_FINISH * m_boardFinish
PANEL_SETUP_LAYERS * m_layers
void onPageChanged(wxBookCtrlEvent &aEvent) override
PANEL_SETUP_SEVERITIES * m_severities
wxCheckBox * m_MaskAndPasteOpt
wxCheckBox * m_ConstraintsOpt
wxCheckBox * m_SeveritiesOpt
wxCheckBox * m_TextAndGraphicsOpt
wxCheckBox * m_FormattingOpt
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.
virtual void onPageChanged(wxBookCtrlEvent &aEvent)
wxTreebook * GetTreebook()
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
void ImportSettingsFrom(BOARD *aBoard)
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)
void ImportSettingsFrom(BOARD *aBoard)
void ImportSettingsFrom(const std::shared_ptr< NET_SETTINGS > &aNetSettings)
void ImportSettingsFrom(std::map< int, SEVERITY > &aSettings)
void ImportSettingsFrom(BOARD *aBoard)
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 * Load(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 > 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...
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
const std::string ProjectFileExtension
void Disable(wxWindow *aWindow)
Makes a window read-only.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition of file extensions used in Kicad.