KiCad PCB EDA Suite
sch_edit_frame.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015 Jean-Pierre Charras, jp.charras wanadoo.fr
5  * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 2004-2020 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
26 #ifndef SCH_EDIT_FRAME_H
27 #define SCH_EDIT_FRAME_H
28 
29 #include <stddef.h>
30 #include <vector>
31 #include <wx/cmndata.h>
32 #include <wx/event.h>
33 #include <wx/gdicmn.h>
34 #include <wx/string.h>
35 #include <wx/utils.h>
36 
37 #include <config_params.h>
38 #include <core/typeinfo.h>
39 #include <eda_base_frame.h>
40 #include <erc_settings.h>
41 #include <eeschema_settings.h>
42 #include <math/box2.h>
43 #include <sch_base_frame.h>
44 #include <sch_text.h> // enum PINSHEETLABEL_SHAPE
45 #include <template_fieldnames.h>
46 #include <undo_redo_container.h>
47 
48 class STATUS_TEXT_POPUP;
49 
50 class SCH_ITEM;
51 class EDA_ITEM;
52 class SCH_LINE;
53 class SCH_TEXT;
54 class SCH_BITMAP;
55 class SCH_SHEET;
56 class SCH_SHEET_PATH;
57 class SCH_SHEET_PIN;
58 class SCH_COMPONENT;
59 class SCH_FIELD;
60 class SCH_JUNCTION;
61 class SCHEMATIC;
62 class DIALOG_SCH_FIND;
63 class wxFindReplaceData;
64 class RESCUER;
66 
67 // @todo Move this to transform alone with all of the transform manipulation code.
70  CMP_NORMAL, // Normal orientation, no rotation or mirror
71  CMP_ROTATE_CLOCKWISE, // Rotate -90
73  CMP_ORIENT_0, // No rotation and no mirror id CMP_NORMAL
74  CMP_ORIENT_90, // Rotate 90, no mirror
75  CMP_ORIENT_180, // Rotate 180, no mirror
76  CMP_ORIENT_270, // Rotate -90, no mirror
77  CMP_MIRROR_X = 0x100, // Mirror around X axis
78  CMP_MIRROR_Y = 0x200 // Mirror around Y axis
79 };
80 
81 
87 };
89 
90 
97 };
99 
100 
105 };
106 
107 
112 };
113 
114 
119 {
120  // The schematic editor control class should be able to access some internal
121  // functions of the editor frame.
122  friend class SCH_EDITOR_CONTROL;
123 
124 private:
127 
128  std::vector<PARAM_CFG*> m_projectFileParams;
129  std::vector<PARAM_CFG*> m_configSettings;
130  wxPageSetupDialogData m_pageSetupData;
133  int m_exec_flags;
135 
138 
140  wxString m_netListFormat;
141 
144 
145  /* these are PROJECT specific, not schematic editor specific
146  wxString m_userLibraryPath;
147  wxArrayString m_componentLibFiles;
148  */
149 
151 
152 protected:
158  bool doAutoSave() override;
159 
163  bool isAutoSaveRequired() const override;
164 
168  void sendNetlistToCvpcb();
169 
170 public:
171  SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent );
172  ~SCH_EDIT_FRAME() override;
173 
174  SCH_SCREEN* GetScreen() const override;
175 
176  SCHEMATIC& Schematic() const;
177 
178  void OnCloseWindow( wxCloseEvent& Event );
179 
183  bool GetShowAllPins() const override;
184 
185  const wxString& GetNetListFormatName() const { return m_netListFormat; }
186  void SetNetListFormatName( const wxString& aFormat ) { m_netListFormat = aFormat; }
187 
189  void SetSpiceAdjustPassiveValues( bool aEnable ) { m_spiceAjustPassiveValues = aEnable; }
190 
192  const wxString& GetPlotDirectoryName() const { return m_plotDirectoryName; }
193  void SetPlotDirectoryName( const wxString& aDirName ) { m_plotDirectoryName = aDirName; }
194 
198  void SaveProjectSettings() override;
199 
205  bool LoadProjectSettings();
206 
207  void ShowSchematicSetupDialog( const wxString& aInitialPage = wxEmptyString );
208 
219  void AddTemplateFieldName( const TEMPLATE_FIELDNAME& aFieldName, bool aGlobal )
220  {
221  m_templateFieldNames.AddTemplateFieldName( aFieldName, aGlobal );
222  }
223 
227  void DeleteAllTemplateFieldNames( bool aGlobal )
228  {
230  }
231 
232  void LoadSettings( APP_SETTINGS_BASE* aCfg ) override;
233  void SaveSettings( APP_SETTINGS_BASE* aCfg ) override;
234 
235  void CreateScreens();
236  void ReCreateHToolbar() override;
237  void ReCreateVToolbar() override;
238  void ReCreateOptToolbar() override;
239  void ReCreateMenuBar() override;
240 
246  bool IsContentModified() override;
247 
252  void OnModify() override;
253 
257  wxString GetScreenDesc() const override;
258 
277  void ExecuteRemoteCommand( const char* cmdline ) override;
278 
279  void KiwayMailIn( KIWAY_EXPRESS& aEvent ) override;
280 
285  void AddItemToScreenAndUndoList( SCH_ITEM* aItem, bool aUndoAppend = false );
286 
290  void ShowFindReplaceDialog( bool aReplace );
291 
297  void UpdateHierarchyNavigator( bool aForceUpdate = false );
298 
303 
304  void ShowFindReplaceStatus( const wxString& aMsg, int aStatusTime );
305  void ClearFindReplaceStatus();
306 
310  wxFindReplaceData* GetFindReplaceData();
311 
315  void OnFindDialogClose();
316 
328  bool BreakSegment( SCH_LINE* aSegment, const wxPoint& aPoint,
329  SCH_LINE** aNewSegment = NULL, SCH_SCREEN* aScreen = nullptr );
330 
341  bool BreakSegments( const wxPoint& aPoint, SCH_SCREEN* aScreen = nullptr );
342 
352  bool BreakSegmentsOnJunctions( SCH_SCREEN* aScreen = nullptr );
353 
358  bool TestDanglingEnds();
359 
372  void SendMessageToPCBNEW( EDA_ITEM* aObjectToSync, SCH_COMPONENT* aPart );
373 
379  void SendCrossProbeNetName( const wxString& aNetName );
380 
385  void SetCrossProbeConnection( const SCH_CONNECTION* aConnection );
386 
391 
393  {
394  return m_highlightedConn;
395  }
396 
397  void SetHighlightedConnection( const SCH_CONNECTION* aConnection )
398  {
399  m_highlightedConn = aConnection;
400  }
401 
409  NETLIST_OBJECT_LIST* BuildNetListBase( bool updateStatusText = true );
410 
420  bool ReadyToNetlist( bool aSilent = false, bool aSilentAnnotate = false );
421 
438  bool WriteNetListFile( int aFormat,
439  const wxString& aFullFileName,
440  unsigned aNetlistOptions,
441  REPORTER* aReporter = NULL );
442 
449  void DeleteAnnotation( bool aCurrentSheetOnly );
450 
479  void AnnotateComponents( bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption,
480  ANNOTATE_OPTION_T aAlgoOption, int aStartNumber,
481  bool aResetAnnotation, bool aRepairTimestamps, bool aLockUnits,
482  REPORTER& aReporter );
483 
500  int CheckAnnotate( REPORTER& aReporter, bool aOneSheetOnly );
501 
507  int ModalAnnotate( const wxString& aMessage );
508 
509  // Functions used for hierarchy handling
511 
512  void SetCurrentSheet( const SCH_SHEET_PATH& aSheet );
513 
517  void HardRedraw() override;
518 
522  void DisplayCurrentSheet();
523 
529 
535  void OnPageSettingsChange() override;
536 
548 
554  void SetSheetNumberAndCount();
555 
556  wxPageSetupDialogData& GetPageSetupData() { return m_pageSetupData; }
557 
558  void NewProject();
559  void LoadProject();
560 
561  void Save_File( bool doSaveAs = false );
562 
563  bool SaveProject();
564 
565  bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
566 
567  wxString GetCurrentFileName() const override;
568 
574  bool AppendSchematic();
575 
585  bool SaveEEFile( SCH_SHEET* aSheet,
586  bool aSaveUnderNewName = false );
587 
588 
596  bool AskToSaveChanges();
597 
598  SCH_JUNCTION* AddJunction( const wxPoint& aPos, bool aAppendToUndo = false,
599  bool aFinal = true );
600 
610  bool SchematicCleanUp( SCH_SCREEN* aScreen = nullptr );
611 
622  bool TrimWire( const wxPoint& aStart, const wxPoint& aEnd );
623 
629  void GetSchematicConnections( std::vector< wxPoint >& aConnections );
630 
631  void OnOpenPcbnew( wxCommandEvent& event );
632  void OnOpenCvpcb( wxCommandEvent& event );
633  void OnUpdatePCB( wxCommandEvent& event );
634  void OnAnnotate( wxCommandEvent& event );
635 
636 private:
637  // Sets up the tool framework
638  void setupTools();
639 
640  void OnExit( wxCommandEvent& event );
641 
642  void OnLoadFile( wxCommandEvent& event );
643  void OnAppendProject( wxCommandEvent& event );
644  void OnImportProject( wxCommandEvent& event );
645 
646  void OnClearFileHistory( wxCommandEvent& aEvent );
647 
656  void UpdateTitle();
657 
666  bool checkForNoFullyDefinedLibIds( SCH_SHEET* aSheet );
667 
674  bool importFile( const wxString& aFileName, int aFileType );
675 
680  void mapExistingAnnotation( std::map<wxString, wxString>& aMap );
681 
682 public:
691  bool CheckSheetForRecursion( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy );
692 
704  bool AllowCaseSensitiveFileNameClashes( const wxString& aSchematicFileName );
705 
734  bool EditSheetProperties( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy, bool* aClearAnnotationNewItems );
735 
736  void InitSheet( SCH_SHEET* aSheet, const wxString& aNewFilename );
737 
782  bool LoadSheetFromFile( SCH_SHEET* aSheet, SCH_SHEET_PATH* aHierarchy,
783  const wxString& aFileName );
784 
792 
799 
806  void DeleteJunction( SCH_ITEM* aItem, bool aAppend = false );
807 
808  void ConvertPart( SCH_COMPONENT* aComponent );
809 
810  void SelectUnit( SCH_COMPONENT* aComponent, int aUnit );
811 
812  /* Undo - redo */
813 
841  void SaveCopyInUndoList( SCH_ITEM* aItemToCopy,
842  UNDO_REDO_T aTypeCommand,
843  bool aAppend = false,
844  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
845 
855  void SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsList,
856  UNDO_REDO_T aTypeCommand,
857  bool aAppend = false,
858  const wxPoint& aTransformPoint = wxPoint( 0, 0 ) );
859 
866  void PutDataInPreviousState( PICKED_ITEMS_LIST* aList, bool aRedoCommand );
867 
871  void SaveCopyForRepeatItem( SCH_ITEM* aItem );
872 
879 
880  EDA_ITEM* GetItem( const KIID& aId ) override;
881 
887 
897  bool CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilename = false );
898 
905  bool CreateArchiveLibrary( const wxString& aFileName );
906 
912  virtual void PrintPage( RENDER_SETTINGS* aSettings ) override;
913 
914  void SetNetListerCommand( const wxString& aCommand ) { m_netListerCommand = aCommand; }
915 
919  void DefaultExecFlags() { m_exec_flags = wxEXEC_SYNC; }
920 
926  void SetExecFlags( const int aFlags ) { m_exec_flags |= aFlags; }
927 
934  void ClearExecFlags( const int aFlags ) { m_exec_flags &= ~( aFlags ); }
935 
936  wxString GetNetListerCommand() const { return m_netListerCommand; }
937 
941  void RecalculateConnections( SCH_CLEANUP_FLAGS aCleanupFlags );
942 
946  void InstallPreferences( PAGED_DIALOG* aParent, PANEL_HOTKEYS_EDITOR* aHotkeysPanel ) override;
947 
951  void CommonSettingsChanged( bool aEnvVarsChanged ) override;
952 
953  void ShowChangedLanguage() override;
954 
955  void SyncToolbars() override;
956 
957  void SetScreen( BASE_SCREEN* aScreen ) override;
958 
959  const BOX2I GetDocumentExtents() const override;
960 
961  void FixupJunctions();
962 
963  void FocusOnItem( SCH_ITEM* aItem );
964 
974  void ConvertTimeStampUuids();
975 
976  DECLARE_EVENT_TABLE()
977 };
978 
979 
980 #endif // SCH_EDIT_FRAME_H
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
bool CheckSheetForRecursion(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy)
Verify that aSheet will not cause a recursion error in aHierarchy.
Definition: sheet.cpp:46
wxString m_netListerCommand
Command line to call a custom net list generator.
void ShowFindReplaceStatus(const wxString &aMsg, int aStatusTime)
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
Definition: sch_field.h:52
void OnOpenCvpcb(wxCommandEvent &event)
void Save_File(bool doSaveAs=false)
bool SchematicCleanUp(SCH_SCREEN *aScreen=nullptr)
Performs routine schematic cleaning including breaking wire and buses and deleting identical objects ...
SCHEMATIC * m_schematic
The currently loaded schematic.
KIWAY_EXPRESS carries a payload from one KIWAY_PLAYER to another within a PROJECT.
Definition: kiway_express.h:39
void DefaultExecFlags()
Reset the execution flags to defaults for external netlist and bom generators.
HIERARCHY_NAVIG_DLG * FindHierarchyNavigator()
bool OpenProjectFiles(const std::vector< wxString > &aFileSet, int aCtl=0) override
Function OpenProjectFiles is abstract, and opens a project or set of files given by aFileList.
NETLIST_OBJECT_LIST * BuildNetListBase(bool updateStatusText=true)
Create a flat list which stores all connected objects.
void mapExistingAnnotation(std::map< wxString, wxString > &aMap)
Fills a map of uuid -> reference from the currently loaded schematic.
void OnLoadFile(wxCommandEvent &event)
wxFindReplaceData * GetFindReplaceData()
Get the find criteria (as set by the dialog).
void SendCrossProbeNetName(const wxString &aNetName)
Sends a net name to pcbnew for highlighting.
bool WriteNetListFile(int aFormat, const wxString &aFullFileName, unsigned aNetlistOptions, REPORTER *aReporter=NULL)
Create a netlist file.
void SetPlotDirectoryName(const wxString &aDirName)
void GetSchematicConnections(std::vector< wxPoint > &aConnections)
Collects a unique list of all possible connection points in the schematic.
void RecalculateConnections(SCH_CLEANUP_FLAGS aCleanupFlags)
Generates the connection data for the entire schematic hierarchy.
RENDER_SETTINGS Contains all the knowledge about how graphical objects are drawn on any output surfac...
void SaveProjectSettings() override
Save changes to the project settings to the project (.pro) file.
COMPONENT_ORIENTATION_T
enum used in RotationMiroir()
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
Definition: schematic.h:42
ANNOTATE_ORDER_T
Schematic annotation order options.
bool BreakSegments(const wxPoint &aPoint, SCH_SCREEN *aScreen=nullptr)
Checks every wire and bus for a intersection at aPoint and break into two segments at aPoint if an in...
void SetScreen(BASE_SCREEN *aScreen) override
const SCH_CONNECTION * GetHighlightedConnection() const
bool BreakSegment(SCH_LINE *aSegment, const wxPoint &aPoint, SCH_LINE **aNewSegment=NULL, SCH_SCREEN *aScreen=nullptr)
Breaks a single segment into two at the specified point.
void ReCreateMenuBar() override
Recreates the menu bar.
STATUS_TEXT_POPUP.
Definition: status_popup.h:79
UNDO_REDO_T
Undo Redo considerations: Basically we have 3 cases New item Deleted item Modified item there is also...
void AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName, bool aGlobal)
Function AddTemplateFieldName inserts or appends a wanted symbol field name into the fieldnames templ...
void SendCrossProbeClearHighlight()
Tells PcbNew to clear the existing highlighted net, if one exists.
void AnnotateComponents(bool aAnnotateSchematic, ANNOTATE_ORDER_T aSortOption, ANNOTATE_OPTION_T aAlgoOption, int aStartNumber, bool aResetAnnotation, bool aRepairTimestamps, bool aLockUnits, REPORTER &aReporter)
Annotate the components in the schematic that are not currently annotated.
bool AskToSaveChanges()
Checks if any of the screens has unsaved changes and asks the user whether to save or drop them.
const wxString & GetNetListFormatName() const
TEMPLATES m_templateFieldNames
void OnCloseWindow(wxCloseEvent &Event)
EDA_ITEM * GetItem(const KIID &aId) override
Fetch an item by KIID.
void UpdateTitle()
Set the main window title bar text.
Annotate incrementally using the first free reference number.
void OnAppendProject(wxCommandEvent &event)
std::vector< PARAM_CFG * > m_projectFileParams
void CommonSettingsChanged(bool aEnvVarsChanged) override
Called after the preferences dialog is run.
void InitSheet(SCH_SHEET *aSheet, const wxString &aNewFilename)
Definition: sheet.cpp:95
void DrawCurrentSheetToClipboard()
Use the wxWidgets print code to draw an image of the current sheet onto the clipboard.
Definition: sheet.cpp:555
SCH_CLEANUP_FLAGS
Schematic editor (Eeschema) main window.
bool TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
void OnPageSettingsChange() override
Called when modifying the page settings.
bool ReadyToNetlist(bool aSilent=false, bool aSilentAnnotate=false)
Checks if we are ready to write a netlist file for the current schematic.
void DeleteAllTemplateFieldNames(bool aGlobal)
Remove all global or project fieldname templates.
void DisplayCurrentSheet()
Draw the current sheet on the display.
Definition: hierarch.cpp:229
REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:64
void DeleteAllFieldNameTemplates(bool aGlobal)
Function DeleteAllFieldNameTemplates deletes the entire contents.
void OnFindDialogClose()
Notification that the Find dialog has closed.
bool importFile(const wxString &aFileName, int aFileType)
Load the given filename but sets the path to the current project path.
bool SaveEEFile(SCH_SHEET *aSheet, bool aSaveUnderNewName=false)
Save aSheet to a schematic file.
void SetSpiceAdjustPassiveValues(bool aEnable)
void OnImportProject(wxCommandEvent &event)
NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected items in a...
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
wxString GetScreenDesc() const override
Return a human-readable description of the current screen.
SCH_EDITOR_CONTROL.
const BOX2I GetDocumentExtents() const override
void ShowChangedLanguage() override
Redraw the menus and what not in current language.
void OnClearFileHistory(wxCommandEvent &aEvent)
void SendMessageToPCBNEW(EDA_ITEM *aObjectToSync, SCH_COMPONENT *aPart)
Send a message to Pcbnew via a socket connection.
Definition: common.h:68
void ReCreateHToolbar() override
bool LoadSheetFromFile(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy, const wxString &aFileName)
Load a the KiCad schematic file aFileName into the sheet aSheet.
Definition: sheet.cpp:104
bool AllowCaseSensitiveFileNameClashes(const wxString &aSchematicFileName)
Check aSchematicFileName for a potential file name case sensitivity clashes.
Definition: sheet.cpp:623
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:91
#define NULL
static PINSHEETLABEL_SHAPE m_lastSheetPinType
Last sheet pin type.
void DeleteAnnotation(bool aCurrentSheetOnly)
Clear the current component annotation.
void HardRedraw() override
Rebuild the GAL and redraw the screen.
wxPageSetupDialogData m_pageSetupData
std::vector< PARAM_CFG * > m_configSettings
BASE_SCREEN handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:44
Annotate by position of component in the schematic sheet object list.
void SaveCopyInUndoList(SCH_ITEM *aItemToCopy, UNDO_REDO_T aTypeCommand, bool aAppend=false, const wxPoint &aTransformPoint=wxPoint(0, 0))
Create a copy of the current schematic item, and put it in the undo list.
const wxString & GetPlotDirectoryName() const
accessor to the destination directory to use when generating plot files.
SCHEMATIC & Schematic() const
void UpdateHierarchyNavigator(bool aForceUpdate=false)
Run the Hierarchy Navigator dialog.
Base window classes and related definitions.
void SaveCopyForRepeatItem(SCH_ITEM *aItem)
Clone aItem and owns that clone in this container.
bool AppendSchematic()
Import a KiCad schematic into the current sheet.
bool CreateArchiveLibraryCacheFile(bool aUseCurrentSheetFilename=false)
Create a symbol library file with the name of the root document plus the '-cache' suffix,...
Definition: libarch.cpp:43
SCH_JUNCTION * AddJunction(const wxPoint &aPos, bool aAppendToUndo=false, bool aFinal=true)
void KiwayMailIn(KIWAY_EXPRESS &aEvent) override
Function KiwayMailIn receives KIWAY_EXPRESS messages from other players.
KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the s...
Definition: kiway.h:273
ANNOTATE_OPTION_T
Schematic annotation type options.
SCH_ITEM * m_item_to_repeat
Last item to insert by the repeat command.
DIALOG_SCH_FIND * m_findReplaceDialog
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet.h:84
bool isAutoSaveRequired() const override
Returns true if the schematic has been modified.
SCH_SHEET_PATH.
wxPageSetupDialogData & GetPageSetupData()
PICKED_ITEMS_LIST is a holder to handle information on schematic or board items.
virtual void PrintPage(RENDER_SETTINGS *aSettings) override
Plot or print the current sheet to the clipboard.
void OnUpdatePCB(wxCommandEvent &event)
void ReCreateOptToolbar() override
Object to handle a bitmap image that can be inserted in a schematic.
Definition: sch_bitmap.h:42
void SelectUnit(SCH_COMPONENT *aComponent, int aUnit)
Definition: getpart.cpp:196
bool LoadProjectSettings()
Loads the KiCad project file (*.pro) settings specific to Eeschema.
const SCH_CONNECTION * m_highlightedConn
The highlighted net or bus, or nullptr.
int CheckAnnotate(REPORTER &aReporter, bool aOneSheetOnly)
Check for annotation errors.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:216
void PutDataInPreviousState(PICKED_ITEMS_LIST *aList, bool aRedoCommand)
Restore an undo or redo command to put data pointed by aList in the previous state.
bool doAutoSave() override
Save the schematic files that have been modified and not yet saved.
Annotate by Y position from top to bottom.
bool BreakSegmentsOnJunctions(SCH_SCREEN *aScreen=nullptr)
Tests all junctions and bus entries in the schematic for intersections with wires and buses and break...
void OnAnnotate(wxCommandEvent &event)
Annotate using the first free reference number starting at the sheet number * 100.
void ClearFindReplaceStatus()
void SetHighlightedConnection(const SCH_CONNECTION *aConnection)
void ClearExecFlags(const int aFlags)
Clear (removes) specified flags that not needed for next execution of external generator of the netli...
PINSHEETLABEL_SHAPE
Definition: sch_text.h:150
void SetNetListFormatName(const wxString &aFormat)
SCH_ITEM * GetRepeatItem() const
Return the item which is to be repeated with the insert key.
void AddTemplateFieldName(const TEMPLATE_FIELDNAME &aFieldName, bool aGlobal)
Insert or append a wanted symbol field name into the field names template.
int ModalAnnotate(const wxString &aMessage)
Run a modal version of the Annotate dialog for a specific purpose.
SCH_SEARCH_T
Schematic search type used by the socket link with Pcbnew.
SCH_HIERLABEL * ImportHierLabel(SCH_SHEET *aSheet)
Import a hierarchical label with no attached sheet pin.
Definition: sheet.cpp:537
void InstallPreferences(PAGED_DIALOG *aParent, PANEL_HOTKEYS_EDITOR *aHotkeysPanel) override
Allows Eeschema to install its preferences panels into the preferences dialog.
void OnExit(wxCommandEvent &event)
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:37
SCH_EDIT_FRAME(KIWAY *aKiway, wxWindow *aParent)
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
wxString m_plotDirectoryName
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
void DeleteJunction(SCH_ITEM *aItem, bool aAppend=false)
Removes a given junction and heals any wire segments under the junction.
void RollbackSchematicFromUndo()
Performs an undo of the last edit WITHOUT logging a corresponding redo.
Annotate by X position from left to right.
Annotate using the first free reference number starting at the sheet number * 1000.
void ShowFindReplaceDialog(bool aReplace)
Run the Find or Find & Replace dialog.
void OnOpenPcbnew(wxCommandEvent &event)
Schematic symbol object.
Definition: sch_component.h:88
void SetCrossProbeConnection(const SCH_CONNECTION *aConnection)
Sends a connection (net or bus) to pcbnew for highlighting.
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:159
wxString GetCurrentFileName() const override
Get the full filename + path of the currently opened file in the frame.
~SCH_EDIT_FRAME() override
void ExecuteRemoteCommand(const char *cmdline) override
Execute a remote command sent by Pcbnew via a socket connection.
wxString GetUniqueFilenameForCurrentSheet()
Struct TEMPLATE_FIELDNAME holds a name of a component's field, field value, and default visibility.
void ConvertTimeStampUuids()
Convert sheet and symbol legacy time stamp UUIDs to full UUIDs.
bool EditSheetProperties(SCH_SHEET *aSheet, SCH_SHEET_PATH *aHierarchy, bool *aClearAnnotationNewItems)
Edit an existing sheet or add a new sheet to the schematic.
Definition: sheet.cpp:482
wxString GetNetListerCommand() const
SCH_SHEET_PATH & GetCurrentSheet() const
wxString m_netListFormat
bool TrimWire(const wxPoint &aStart, const wxPoint &aEnd)
If any single wire passes through both points, remove the portion between the two points,...
void FocusOnItem(SCH_ITEM *aItem)
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current screen and u...
bool GetSpiceAjustPassiveValues() const
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Saves common frame parameters to a configuration data file.
bool IsContentModified() override
Get if the current schematic has been modified but not saved.
bool checkForNoFullyDefinedLibIds(SCH_SHEET *aSheet)
Verify that the symbol library links aSheet and all of it's child sheets have been remapped to the sy...
Definition: sheet.cpp:74
int m_exec_flags
Flags of the wxExecute() function to call a custom net list generator.
void ShowSchematicSetupDialog(const wxString &aInitialPage=wxEmptyString)
bool CreateArchiveLibrary(const wxString &aFileName)
Create a library aFileName that contains all components used in the current schematic.
Definition: libarch.cpp:66
void SetExecFlags(const int aFlags)
Set (adds) specified flags for next execution of external generator of the netlist or bom.
A shim class between EDA_DRAW_FRAME and several derived classes: LIB_EDIT_FRAME, LIB_VIEW_FRAME,...
void ConvertPart(SCH_COMPONENT *aComponent)
Definition: getpart.cpp:235
bool m_spiceAjustPassiveValues
Use netcodes (net number) as net names when generating spice net lists.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:186
void SetNetListerCommand(const wxString &aCommand)
SCH_SHEET_PIN * CreateSheetPin(SCH_SHEET *aSheet, SCH_HIERLABEL *aLabel)
Create a new SCH_SHEET_PIN object and add it to aSheet at the current cursor position.
Definition: sheet.cpp:501
bool GetShowAllPins() const override
Allow edit frame to show/hide hidden pins.
void ReCreateVToolbar() override
void SyncToolbars() override
Update the toolbars (mostly settings/check buttons/checkboxes) with the current controller state.
void sendNetlistToCvpcb()
Send the kicad netlist over to CVPCB.
void AddItemToScreenAndUndoList(SCH_ITEM *aItem, bool aUndoAppend=false)
Add an item to the schematic and adds the changes to the undo/redo container.