41 _(
"Import Settings from Another Project..." ) ),
43 m_severities( nullptr )
66 m_treebook->AddPage(
new wxPanel(
this ),
_(
"General" ) );
70 m_treebook->AddPage(
new wxPanel(
this ),
_(
"Electrical Rules" ) );
74 m_treebook->AddPage(
new wxPanel(
this ),
_(
"Project" ) );
78 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
82 m_treebook->Connect( wxEVT_TREEBOOK_PAGE_CHANGED,
85 if(
Prj().IsReadOnly() )
94 m_treebook->Disconnect( wxEVT_TREEBOOK_PAGE_CHANGED,
101 int page =
event.GetSelection();
106 if(
auto panel = dynamic_cast<RESETTABLE_PANEL*>(
m_treebook->GetPage( page ) ) )
123 wxSize pageSize =
m_treebook->GetPage( page )->GetSize();
127 m_treebook->GetPage( page )->SetSize( pageSize );
141 if( importDlg.ShowModal() == wxID_CANCEL )
149 "Project file %s could not be loaded" ),
150 projectFn.GetFullPath() );
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
Container for project specific data.
PANEL_SETUP_PINMAP * m_pinMap
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
SETTINGS_MANAGER * GetSettingsManager() const
DIALOG_SCHEMATIC_SETUP(SCH_EDIT_FRAME *aFrame)
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
wxCheckBox * m_SeveritiesOpt
This file is part of the common library.
PANEL_TEXT_VARIABLES * m_textVars
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
static std::shared_ptr< ERC_ITEM > Create(int aErrorCode)
Constructs an ERC_ITEM for the given error code.
virtual PROJECT_FILE & GetProjectFile() const
SCHEMATIC_SETTINGS & Settings() const
TEMPLATES m_TemplateFieldNames
void OnAuxiliaryAction(wxCommandEvent &event) override
NET_SETTINGS & NetSettings()
Schematic editor (Eeschema) main window.
std::shared_ptr< ERC_ITEM > m_pinToPinError
void ImportSettingsFrom(std::map< int, SEVERITY > &aSettings)
bool LoadFromFile(const wxString &aDirectory="") override
Loads the JSON document from the parent and then calls Load()
PROJECT_FILE is the backing store for a PROJECT, in JSON format.
void ImportSettingsFrom(PIN_ERROR aPinMap[][ELECTRICAL_PINTYPES_TOTAL])
std::vector< bool > m_macHack
PANEL_SETUP_FORMATTING * m_formatting
PANEL_SETUP_SEVERITIES * m_severities
std::shared_ptr< NET_SETTINGS > m_NetSettings
Net settings for this project (owned here) NOTE: If we go multi-board in the future,...
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
wxCheckBox * m_FieldNameTemplatesOpt
void OnPageChange(wxBookCtrlEvent &event)
SCHEMATIC & Schematic() const
PIN_ERROR m_PinMap[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]
ERC_SETTINGS * m_ErcSettings
Eeschema params.
SCHEMATIC_SETTINGS * m_SchematicSettings
~DIALOG_SCHEMATIC_SETUP()
void ImportSettingsFrom(TEMPLATES *templateMgr)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Loads a project or sets up a new project with a specified path.
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
std::map< int, SEVERITY > m_Severities
wxCheckBox * m_FormattingOpt
PANEL_EESCHEMA_TEMPLATE_FIELDNAMES * m_fieldNameTemplates
bool UnloadProject(PROJECT *aProject, bool aSave=true)
Saves, unloads and unregisters the given PROJECT.
ERC_SETTINGS & ErcSettings() const
void ImportSettingsFrom(NETCLASSES *aBoard)
std::vector< wxString > GetNetClassAssignmentCandidates()
Returns a list of name candidates for netclass assignment.
wxCheckBox * m_NetClassesOpt
PROJECT * GetProject(const wxString &aFullPath) const
Retrieves a loaded project by name.
PANEL_SETUP_NETCLASSES * m_netclasses