37#include <wx/treebook.h>
42 _(
"Import Settings from Another Project..." ) ),
44 m_severities( nullptr )
50 SetEvtHandlerEnabled(
false );
88 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
91 SetEvtHandlerEnabled(
true );
95 if(
Prj().IsReadOnly() )
98 "editable." ), wxICON_WARNING );
101 wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
116 int page = aEvent.GetSelection();
118 if(
Prj().IsReadOnly() )
127 if( importDlg.ShowModal() == wxID_CANCEL )
135 "Project file %s could not be loaded." ),
136 projectFn.GetFullPath() );
PANEL_SETUP_SEVERITIES * m_severities
PANEL_SETUP_NETCLASSES * m_netclasses
PANEL_TEXT_VARIABLES * m_textVars
void onPageChanged(wxBookCtrlEvent &aEvent) override
PANEL_TEMPLATE_FIELDNAMES * m_fieldNameTemplates
PANEL_SETUP_PINMAP * m_pinMap
PANEL_SETUP_FORMATTING * m_formatting
DIALOG_SCHEMATIC_SETUP(SCH_EDIT_FRAME *aFrame)
std::shared_ptr< ERC_ITEM > m_pinToPinError
~DIALOG_SCHEMATIC_SETUP()
void onAuxiliaryAction(wxCommandEvent &aEvent) override
PANEL_SETUP_BUSES * m_buses
wxCheckBox * m_NetClassesOpt
wxCheckBox * m_FormattingOpt
wxCheckBox * m_FieldNameTemplatesOpt
wxCheckBox * m_SeveritiesOpt
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
SETTINGS_MANAGER * GetSettingsManager() const
static std::shared_ptr< ERC_ITEM > Create(int aErrorCode)
Constructs an ERC_ITEM for the given error code.
static std::vector< std::reference_wrapper< RC_ITEM > > GetItemsWithSeverities()
std::map< int, SEVERITY > m_ERCSeverities
PIN_ERROR m_PinMap[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
bool LoadFromFile(const wxString &aDirectory="") override
Loads the JSON document from the parent and then calls Load()
virtual void onPageChanged(wxBookCtrlEvent &aEvent)
wxTreebook * GetTreebook()
void ImportSettingsFrom(const std::shared_ptr< NET_SETTINGS > &aNetSettings)
void ImportSettingsFrom(PIN_ERROR aPinMap[][ELECTRICAL_PINTYPES_TOTAL])
void ImportSettingsFrom(std::map< int, SEVERITY > &aSettings)
void ImportSettingsFrom(TEMPLATES *templateMgr)
The backing store for a PROJECT, in JSON format.
ERC_SETTINGS * m_ErcSettings
Eeschema params.
SCHEMATIC_SETTINGS * m_SchematicSettings
std::shared_ptr< NET_SETTINGS > m_NetSettings
Net settings for this project (owned here)
Container for project specific data.
virtual PROJECT_FILE & GetProjectFile() const
These settings were stored in SCH_BASE_FRAME previously.
TEMPLATES m_TemplateFieldNames
Holds all the data relating to one schematic.
SCHEMATIC_SETTINGS & Settings() const
std::set< wxString > GetNetClassAssignmentCandidates()
Return the set of netname candidates for netclass assignment.
ERC_SETTINGS & ErcSettings() const
Schematic editor (Eeschema) main window.
SCHEMATIC & Schematic() 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.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
This file is part of the common library.
@ ERCE_PIN_TO_PIN_WARNING
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.