45 _(
"Import Settings from Another Project..." ), wxSize( 920, 460 ) ),
48 SetEvtHandlerEnabled(
false );
60 [
this]( wxWindow* aParent ) -> wxWindow*
63 },
_(
"Formatting" ) );
67 [
this]( wxWindow* aParent ) -> wxWindow*
71 },
_(
"Field Name Templates" ) );
75 [
this]( wxWindow* aParent ) -> wxWindow*
79 },
_(
"BOM Presets" ) );
86 [
this]( wxWindow* aParent ) -> wxWindow*
92 },
_(
"Violation Severity" ) );
96 [
this]( wxWindow* aParent ) -> wxWindow*
99 },
_(
"Pin Conflicts Map" ) );
105 [
this]( wxWindow* aParent ) -> wxWindow*
112 },
_(
"Net Classes" ) );
116 [
this]( wxWindow* aParent ) -> wxWindow*
119 },
_(
"Bus Alias Definitions" ) );
123 [
this]( wxWindow* aParent ) -> wxWindow*
126 },
_(
"Text Variables" ) );
133 [
this]( wxWindow* aParent ) -> wxWindow*
136 },
_(
"Embedded Files" ) );
138 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
141 SetEvtHandlerEnabled(
true );
145 if(
Prj().IsReadOnly() )
148 "editable." ), wxICON_WARNING );
151 wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
166 int page = aEvent.GetSelection();
168 if(
Prj().IsReadOnly() )
177 if( importDlg.
ShowModal() == wxID_CANCEL )
181 bool alreadyLoaded =
false;
185 alreadyLoaded =
true;
189 wxString msg = wxString::Format(
_(
"Error importing settings from project:\n"
190 "Project file %s could not be loaded." ),
191 projectFn.GetFullPath() );
252 wxFileName schematicFn( projectFn );
255 wxString fullFileName = schematicFn.GetFullPath();
260 pi->SetProgressReporter( &progressReporter );
265 otherSch.
SetRoot( pi->LoadSchematicFile( fullFileName, &otherSch ) );
273 msg.Printf(
_(
"Error fetching bus aliases. Could not load schematic '%s'." ),
275 progressReporter.Hide();
280 msg.Printf(
_(
"Error fetching bus aliases. Could not load schematic '%s'." ),
282 progressReporter.Hide();
292 ->ImportSettingsFrom( otherSch );
298 ->ImportSettingsFrom( otherPrj );
size_t m_fieldNameTemplatesPage
size_t m_embeddedFilesPage
void onPageChanged(wxBookCtrlEvent &aEvent) override
DIALOG_SCHEMATIC_SETUP(SCH_EDIT_FRAME *aFrame)
std::shared_ptr< ERC_ITEM > m_pinToPinError
~DIALOG_SCHEMATIC_SETUP()
void onAuxiliaryAction(wxCommandEvent &aEvent) override
wxCheckBox * m_BomPresetsOpt
wxCheckBox * m_NetClassesOpt
wxCheckBox * m_FormattingOpt
wxCheckBox * m_BusAliasesOpt
wxCheckBox * m_FieldNameTemplatesOpt
wxCheckBox * m_SeveritiesOpt
wxCheckBox * m_TextVarsOpt
wxCheckBox * m_BomFmtPresetsOpt
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()
Container for ERC settings.
std::map< int, SEVERITY > m_ERCSeverities
PIN_ERROR m_PinMap[ELECTRICAL_PINTYPES_TOTAL][ELECTRICAL_PINTYPES_TOTAL]
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.
bool LoadFromFile(const wxString &aDirectory="") override
Loads the JSON document from the parent and then calls Load()
WX_TREEBOOK * GetTreebook()
virtual void onPageChanged(wxBookCtrlEvent &aEvent)
The backing store for a PROJECT, in JSON format.
ERC_SETTINGS * m_ErcSettings
Eeschema params.
SCHEMATIC_SETTINGS * m_SchematicSettings
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
These are loaded from Eeschema settings but then overwritten by the project settings.
TEMPLATES m_TemplateFieldNames
Holds all the data relating to one schematic.
SCHEMATIC_SETTINGS & Settings() const
void SetRoot(SCH_SHEET *aRootSheet)
Initialize the schematic with a new root sheet.
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
void SetName(const wxString &aName)
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...
wxWindow * ResolvePage(size_t aPage)
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.
@ ERCE_PIN_TO_PIN_WARNING
static const std::string KiCadSchematicFileExtension
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.