47 _(
"Import Settings from Another Project..." ), wxSize( 920, 460 ) ),
50 SetEvtHandlerEnabled(
false );
62 [
this]( wxWindow* aParent ) -> wxWindow*
65 },
_(
"Formatting" ) );
69 [
this]( wxWindow* aParent ) -> wxWindow*
72 },
_(
"Annotation" ) );
76 [
this]( wxWindow* aParent ) -> wxWindow*
80 },
_(
"Field Name Templates" ) );
84 [
this]( wxWindow* aParent ) -> wxWindow*
88 },
_(
"BOM Presets" ) );
95 [
this]( wxWindow* aParent ) -> wxWindow*
100 },
_(
"Violation Severity" ) );
104 [
this]( wxWindow* aParent ) -> wxWindow*
107 },
_(
"Pin Conflicts Map" ) );
113 [
this]( wxWindow* aParent ) -> wxWindow*
117 m_frame->Prj().GetProjectFile().NetSettings(),
119 },
_(
"Net Classes" ) );
123 [
this]( wxWindow* aParent ) -> wxWindow*
126 },
_(
"Bus Alias Definitions" ) );
130 [
this]( wxWindow* aParent ) -> wxWindow*
133 },
_(
"Text Variables" ) );
140 [
this]( wxWindow* aParent ) -> wxWindow*
143 },
_(
"Embedded Files" ) );
145 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
148 SetEvtHandlerEnabled(
true );
152 if(
Prj().IsReadOnly() )
154 m_infoBar->ShowMessage(
_(
"Project is missing or read-only. Settings will not be editable." ),
158 wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
168 int page = aEvent.GetSelection();
170 if(
Prj().IsReadOnly() )
179 if( importDlg.
ShowModal() == wxID_CANCEL )
183 bool alreadyLoaded =
false;
185 if(
m_frame->GetSettingsManager()->GetProject( projectFn.GetFullPath() ) )
187 alreadyLoaded =
true;
189 else if( !
m_frame->GetSettingsManager()->LoadProject( projectFn.GetFullPath(),
false ) )
191 wxString msg = wxString::Format(
_(
"Error importing settings from project:\n"
192 "Project file %s could not be loaded." ),
193 projectFn.GetFullPath() );
199 PROJECT* otherPrj =
m_frame->GetSettingsManager()->GetProject( projectFn.GetFullPath() );
268 m_frame->GetSettingsManager()->UnloadProject( otherPrj,
false );
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
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
wxCheckBox * m_annotationOpt
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
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]
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()
PAGED_DIALOG(wxWindow *aParent, const wxString &aTitle, bool aShowReset, bool aShowOpenFolder, const wxString &aAuxiliaryAction=wxEmptyString, const wxSize &aInitialSize=wxDefaultSize)
virtual void onPageChanged(wxBookCtrlEvent &aEvent)
void ImportBomFmtPresetsFrom(SCHEMATIC_SETTINGS &aSettings)
void ImportBomPresetsFrom(SCHEMATIC_SETTINGS &aSettings)
void ImportSettingsFrom(SCHEMATIC_SETTINGS &aSettings)
void ImportSettingsFrom(const std::map< wxString, std::vector< wxString > > &aAliases)
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)
void ImportSettingsFrom(const PROJECT *aOtherProject)
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)
std::map< wxString, std::vector< wxString > > m_BusAliases
Bus alias definitions for the schematic project.
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
std::set< wxString > GetNetClassAssignmentCandidates()
Return the set of netname candidates for netclass assignment.
Schematic editor (Eeschema) main window.
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
KICOMMON_API void Disable(wxWindow *aWindow)
Makes a window read-only.