The main widget class of the schematic. More...
The schematic object is the main window of the Schematic Editor, with menus and toolbars, just as layout is for the layout window. A C++ macro started from a schematic already has this name; you do not construct it. The sheets and symbols live in schematic->drawing, a schematicDisplay. File name, shortcuts and toolbar layout are members of schematic itself. Most choose / save style methods open a dialog; scripts that must not block the user should use drawing load and save instead. In in-process Python there is no global schematic; call project currentSchematic() or newSchematic().
Example:
schematic->filename = "/tmp/sample.les";
sheet *s = schematic->drawing->currentSheet;
Set the feature of an extra keyboard. key is the number of the key. It is numbered from 0 to the amount of keys the keyboard has. function is the feature code of the featur you want to add. As toolbutton, modification of the extra keyboard are not store and it is recommended to set it with an autostart macro. (introduced with release 20210905)
Assigns one key of an external keyboard to a macro. key is the key number. macroFileName is the full path of the macro, title the caption, and iconFileName the full path of the icon file. (introduced with release 20210910)
| Parameter: | |
|---|---|
| key | key index on the extra keyboard |
| macroFileName | full path of the macro file |
| title | caption shown for the key |
| iconFileName | full path of the icon file |
Adds a button to the Macros toolbar (created if missing). macroName is the macro to run. iconfilename is the icon; a missing file uses the default. Macro buttons are not stored at shutdown. parameter should be an empty string.
| Parameter: | |
|---|---|
| macroName | macro to execute |
| parameter | reserved; pass an empty string |
| iconfilename | path to the button icon |
The schematic data: sheets and elements. See schematicDisplay.
This string hold the current filename.
Returns: an encoded string containing all required information to restore the current toolbar and dock window setup. With setToolbarState the current setup can be restored.
Hides the named toolbar.
Holds the name of the toolbar containing custom macros. The name must be set before the first macro is added to the toolbar. (introduced with release 20211216)
Reset the shortcut with the feature code as parameter to its default value. (introduced with release 20231115)
Returns: true or false.
disabled or enabled a single menu entry or a hole menu.
| Parameter: | |
|---|---|
| name | name |
| b | b |
Use this function to modify any existing shortcut. It returns true, if the modification was successful.
{{{ layout->setShortcut("&Zoom Fit All","F"); // set 'F' to zoom fit layout->setShortcut("&Zoom Fit Selection","Shift+F"); // set 'Shift F' to zoom fit selection }}}
Shortcuts are not saved with program shutdown and the modifications will not affect new opened windows. So it should usualy placed in a autostart macros to have the modified shortcut available in all windows.(introduced with releease 20180523)
| Parameter: | |
|---|---|
| function | function |
| key | key index or code |
Returns: true or false.
As the overloaded method, but with the feature code as parameter.(introduced with releease 20180523)
| Parameter: | |
|---|---|
| function | function |
| key | key index or code |
Returns: true or false.
disabled or enabled a toolbar.
schematic->setToolbarEnabled("Edit",false);
| Parameter: | |
|---|---|
| name | name |
| b | b |
Sets the toolbar and dock window configuration. The string parameter needs to be created with the getToolbarState.
Shows the named toolbar.
converts the current schematic sheet to a layout drawing.
Add a new tool bar, separate multipli buttons with a ';'.
layout->toolBarAdd("my toolbar","New Layout;Zoom Mouse;Code 39;Quit");
| Parameter: | |
|---|---|
| name | name |
| buttons | buttons |
the current sheet as netlist. Type had to be defined in the setup before.
OBSOLETE: Please use drawing->generateNetList() instead.
Returns: a string.
exports the current sheet as netlist. Type had to be defined in the setup before.
OBSOLETE: Please use drawing->saveNetList() instead.
| Parameter: | |
|---|---|
| filename | path of the file |
| type | mode selector |