46 _(
"Import Settings from Another Project..." ), wxSize( 920, 460 ) ),
49 SetEvtHandlerEnabled(
false );
61 [
this]( wxWindow* aParent ) -> wxWindow*
64 },
_(
"Formatting" ) );
68 [
this]( wxWindow* aParent ) -> wxWindow*
71 },
_(
"Annotation" ) );
75 [
this]( wxWindow* aParent ) -> wxWindow*
79 },
_(
"Field Name Templates" ) );
83 [
this]( wxWindow* aParent ) -> wxWindow*
87 },
_(
"BOM Presets" ) );
94 [
this]( wxWindow* aParent ) -> wxWindow*
99 },
_(
"Violation Severity" ) );
103 [
this]( wxWindow* aParent ) -> wxWindow*
106 },
_(
"Pin Conflicts Map" ) );
112 [
this]( wxWindow* aParent ) -> wxWindow*
116 m_frame->Prj().GetProjectFile().NetSettings(),
118 },
_(
"Net Classes" ) );
122 [
this]( wxWindow* aParent ) -> wxWindow*
125 },
_(
"Bus Alias Definitions" ) );
129 [
this]( wxWindow* aParent ) -> wxWindow*
132 },
_(
"Text Variables" ) );
139 [
this]( wxWindow* aParent ) -> wxWindow*
142 },
_(
"Embedded Files" ) );
144 for(
size_t i = 0; i <
m_treebook->GetPageCount(); ++i )
147 SetEvtHandlerEnabled(
true );
151 if(
Prj().IsReadOnly() )
153 m_infoBar->ShowMessage(
_(
"Project is missing or read-only. Settings will not be editable." ),
157 wxBookCtrlEvent evt( wxEVT_TREEBOOK_PAGE_CHANGED, wxID_ANY, 0 );
167 int page = aEvent.GetSelection();
169 if(
Prj().IsReadOnly() )
178 if( importDlg.
ShowModal() == wxID_CANCEL )
182 bool alreadyLoaded =
false;
184 if(
m_frame->GetSettingsManager()->GetProject( projectFn.GetFullPath() ) )
186 alreadyLoaded =
true;
188 else if( !
m_frame->GetSettingsManager()->LoadProject( projectFn.GetFullPath(),
false ) )
190 wxString msg = wxString::Format(
_(
"Error importing settings from project:\n"
191 "Project file %s could not be loaded." ),
192 projectFn.GetFullPath() );
198 PROJECT* otherPrj =
m_frame->GetSettingsManager()->GetProject( projectFn.GetFullPath() );
267 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.