61 return ::GetColorSettings(
DEFAULT_THEME )->GetColor( aLayer );
111 Prj().GetProjectPath(), &
Prj(),
121 static std::mutex dialogMutex;
123 std::unique_lock<std::mutex> dialogLock( dialogMutex, std::try_to_lock );
126 if( !dialogLock.owns_lock() )
138 if( !aInitialPage.IsEmpty() )
170 adapter->Tracker().InvalidateProjectScoped();
177 if( aAliasesChanged )
187 graph->ApplyNetChainNetclasses();
204 "Reloading loses your unsaved edits. Keeping them keeps the sheets "
205 "you have open, and your next save writes those back to the "
207 _(
"Top-Level Sheets Changed on Disk" ) )
213 ShowInfoBarWarning(
_(
"The project file lists different top-level sheets. This schematic keeps "
214 "its own until it is reloaded, and saving writes them to the project file." ),
229 std::unordered_set<const EDA_ITEM*> freed( stale.begin(), stale.end() );
247 ShowInfoBarWarning(
_(
"The reloaded project file defines no bus aliases. The ones in use are kept "
248 "and will be saved with the project." ),
true );
251 if(
Schematic().ReloadProjectVariants() )
266 wxFileName fn(
Prj().GetProjectFullName() );
268 if( !fn.HasName() || !
IsWritable( fn,
false ) )
288 Prj().GetProjectPath(),
293 if( !layoutfn.IsAbsolute() )
294 success = layoutfn.MakeAbsolute(
Prj().GetProjectPath() );
296 if( success && layoutfn.IsOk() && !layoutfn.FileExists() && layoutfn.HasName() )
298 if( layoutfn.DirExists() && layoutfn.IsDirWritable() )
306 wxLogError(
_(
"Failed to save drawing sheet '%s': %s" ),
307 layoutfn.GetFullPath(), ioe.
What() );
323 if( !topLevelSheets.empty() )
420 if( netNavigatorPane.IsDocked() )
433 if( designBlocksPane.IsDocked() )
448 if( remoteSymbolPane.IsDocked() )
463 wxCHECK_RET( aCfg,
"Call to SCH_BASE_FRAME::LoadSettings with null settings" );
490 wxCHECK_RET( aCfg, wxS(
"Call to SCH_BASE_FRAME::SaveSettings with null settings" ) );
static TOOL_ACTION selectionClear
Clear the current selection.
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
static wxString m_DrawingSheetFileName
the name of the drawing sheet file, or empty to use the default drawing sheet
Calculate the connectivity of a schematic and generate netlists.
static DS_DATA_MODEL & GetTheInstance()
Return the instance of DS_DATA_MODEL used in the application.
void Save(const wxString &aFullFileName)
Save the description in a file.
UNDO_REDO_CONTAINER m_undoList
static const wxString GitCommitPaneName()
Named here rather than beside the editors' other panes, because the project manager docks this one to...
SETTINGS_MANAGER * GetSettingsManager() const
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, INFOBAR_MESSAGE_TYPE aType=INFOBAR_MESSAGE_TYPE::GENERIC)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
void ShowInfoBarWarning(const wxString &aWarningMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and a warning icon on the left ...
UNDO_REDO_CONTAINER m_redoList
bool IsWritable(const wxFileName &aFileName, bool aVerbose=true)
Check if aFileName can be written.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
static const wxString PropertiesPaneName()
static const wxString RemoteSymbolPaneName()
SEARCH_PANE * m_searchPane
static const wxString DesignBlocksPaneName()
std::unique_ptr< EDA_SEARCH_DATA > m_findReplaceData
PROPERTIES_PANEL * m_propertiesPanel
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
FIND_REPLACE_EXTRA m_FindReplaceExtra
Provide an extensible class to resolve 3D model paths.
wxString ResolvePath(const wxString &aFileName, const wxString &aWorkingPath, std::vector< const EMBEDDED_FILES * > aEmbeddedFilesStack)
Determine the full path of the given file name.
void SetProgramBase(PGM_BASE *aBase)
Set a pointer to the application's PGM_BASE instance used to extract the local env vars.
bool SetProject(const PROJECT *aProject, bool *flgChanged=nullptr)
Set the current KiCad project directory as the first entry in the model path list.
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()
A color representation with 4 components: red, green, blue, alpha.
void SetDefaultPenWidth(int aWidth)
void SetDefaultFont(const wxString &aFont)
void SetGapLengthRatio(double aRatio)
void SetDashLengthRatio(double aRatio)
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
void MarkDirty()
Force redraw of view on the next rendering.
virtual void CommonSettingsChanged(int aFlags=0)
Call CommonSettingsChanged() on all KIWAY_PLAYERs.
bool SaveToFile(const wxString &aDirectory="", bool aForce=false) override
Calls Store() and then saves the JSON document contents into the parent JSON_SETTINGS.
void ClearAllCaches()
Clears the effective netclass cache for all nets.
void SetInitialPage(const wxString &aPage, const wxString &aParentPage=wxEmptyString)
virtual SETTINGS_MANAGER & GetSettingsManager() const
SCHEMATIC_SETTINGS * m_SchematicSettings
std::shared_ptr< NET_SETTINGS > & NetSettings()
struct IP2581_BOM m_IP2581Bom
Layer pair list for the board.
std::map< wxString, std::vector< wxString > > m_BusAliases
Bus alias definitions for the schematic project.
std::vector< TOP_LEVEL_SHEET_INFO > & GetTopLevelSheets()
The project local settings are things that are attached to a particular project, but also might be pa...
SCH_SELECTION_FILTER_OPTIONS m_SchSelectionFilter
std::vector< wxString > m_SchHierarchyCollapsed
Collapsed nodes in the schematic hierarchy navigator.
virtual PROJECT_LOCAL_SETTINGS & GetLocalSettings() const
void IncrementNetclassesTicker()
virtual PROJECT_FILE & GetProjectFile() const
void IncrementTextVarsTicker()
These are loaded from Eeschema settings but then overwritten by the project settings.
wxString m_SchDrawingSheetFileName
double m_DashedLineGapRatio
double m_DashedLineDashRatio
std::shared_ptr< NGSPICE_SETTINGS > m_NgspiceSettings
Ngspice simulator settings.
Bridges SCHEMATIC's listener stream into the generic TEXT_VAR_TRACKER.
@ TABLE_REMOVED
The reread file has no table; the one in use is kept, even empty, and saved back.
@ CHANGED
The project table changed the aliases in use, so connectivity needs a rebuild.
std::vector< SCH_MARKER * > ReloadERCExclusions()
Resolve exclusions again after the project file was reread.
SCHEMATIC_SETTINGS & Settings() const
void RecordERCExclusions()
Scan existing markers and record data from any that are Excluded.
EMBEDDED_FILES * GetEmbeddedFiles() override
SCH_SCREEN * RootScreen() const
Helper to retrieve the screen of the root sheet.
BUS_ALIAS_RELOAD ReloadProjectBusAliases()
Take the bus aliases from the project file again after it was reread.
std::vector< TOP_LEVEL_SHEET_INFO > TopLevelSheetInfos() const
The top-level sheets as the project file records them, with file names relative to the project.
SCH_RENDER_SETTINGS * GetRenderSettings()
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
EESCHEMA_SETTINGS * eeconfig() const
PANEL_SCH_SELECTION_FILTER * m_selectionFilterPanel
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the KIGFX::VIEW instance used in the panel.
void DisplaySheet(SCH_SCREEN *aScreen)
void ShowSchematicSetupDialog(const wxString &aInitialPage=wxEmptyString)
void RefreshOperatingPointDisplay()
Refresh the display of any operating points.
void ReloadProjectFileSettings()
Bring the frame in line with a project file that was reread from disk.
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag and update other data struc...
void ShowAllIntersheetRefs(bool aShow)
void SaveProjectLocalSettings() override
Save changes to the project settings to the project (.pro) file.
NET_NAVIGATOR_TREE * m_netNavigator
bool TopLevelSheetsChangedOnDisk()
Check whether the last read of the project file brought a top-level sheet list that the open schemati...
void SyncVariantUI()
Refill the toolbar variant control and any open symbol fields table from the schematic.
void SetCurrentVariant(const wxString &aVariantName)
DIALOG_SCHEMATIC_SETUP * m_schematicSetupDialog
void ApplyProjectFileSettings()
Apply the project file's render settings.
bool RecalculateConnections(SCH_COMMIT *aCommit, SCH_CLEANUP_FLAGS aCleanupFlags, PROGRESS_REPORTER *aProgressReporter=nullptr, bool aCleanupDone=false)
Generate the connection data for the entire schematic hierarchy.
bool ReloadFromDisk()
Reload the schematic and all its sheets from disk.
PANEL_REMOTE_SYMBOL * m_remoteSymbolPane
SCH_SHEET_PATH & GetCurrentSheet() const
SCHEMATIC & Schematic() const
bool LoadProjectSettings()
Load the KiCad project file (*.pro) settings specific to Eeschema.
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
static const wxString SearchPaneName()
SCH_DESIGN_BLOCK_PANE * m_designBlocksPane
bool ConfirmReloadFromDisk(const wxString &aMessage, const wxString &aTitle)
Ask whether to reload when that would discard unsaved edits.
void LoadDrawingSheet()
Load the drawing sheet file.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Save common frame parameters to a configuration data file.
static const wxString SchematicHierarchyPaneName()
void RefreshProjectSettings(bool aAliasesChanged)
Update what depends on the schematic's project settings after they changed in memory.
static const wxString NetNavigatorPaneName()
void saveProjectSettings() override
Save any design-related project settings associated with this frame.
HIERARCHY_PANE * m_hierarchy
int m_SymbolLineWidth
Override line widths for symbol drawing objects set to default line width.
bool m_ShowRemappedPinNumbers
bool m_ShowPinsElectricalType
TITLE_BLOCK & GetTitleBlock()
bool SaveProject(const wxString &aFullPath=wxEmptyString, PROJECT *aProject=nullptr)
Save a loaded project.
const wxString & GetRevision() const
EDA_UNITS GetUserUnits() const
This file is part of the common library.
COLOR4D GetLayerColor(SCH_LAYER_ID aLayer)
Helper for all the old plotting/printing code while it still exists.
SCH_LAYER_ID
Eeschema drawing layers.
@ REPAINT
Item needs to be redrawn.
@ GEOMETRY
Position or shape has changed.
@ LAYERS
Layers have changed.
PGM_BASE & Pgm()
The global program "get" accessor.
KIWAY Kiway(KFCTL_STANDALONE)
bool show_remapped_pin_numbers
int remote_symbol_panel_float_height
int design_blocks_panel_float_width
int search_panel_dock_direction
wxSize net_nav_panel_float_size
float properties_splitter
int design_blocks_panel_float_height
bool schematic_hierarchy_float
int design_blocks_panel_docked_width
int properties_panel_width
wxPoint net_nav_panel_float_pos
bool show_git_commit_pane
wxSize net_nav_panel_docked_size
int remote_symbol_panel_docked_width
int remote_symbol_panel_float_width
bool show_schematic_hierarchy
std::vector< GRID > grids
Common grid settings, available to every frame.
wxString schRevision
Auto-propagated schematic title block revision.
bool searchCurrentSheetOnly