Class Reference schematic

The main widget class of the schematic. More...

Member

void addFunctionKey(int key,int function)
void addMacroKey(int key,string macroFileName, string title, string iconFileName)
void addMacroToolButton(string macroName,string parameter,string iconfilename)
schematicDisplay* drawing
string filename
string getToolbarState()
void hideToolBar(string name)
string macroToolbarName
bool resetShortcut(int function)
void setMenuEnabled(string name,bool b)
bool setShortcut(string function,string key)
bool setShortcut(int function,QString key)
void setToolbarEnabled(string name,bool b)
void setToolbarState(string)
void showToolBar(string name)
void toLayout(layout *l)
void toolBarAdd(string name,string buttons)
string generateNetList(string type)
void saveNetList(string filename, string type)

Detailed Description

graph LR classDef thisClas fill:#eaf5fc,stroke:#3c7faa,stroke-width:4px; classDef clas fill:#eaf5fc,stroke:#3c7faa,stroke-width:1px; la(schematic)==drawing==>dr(schematicDisplay) click dr "/layoutscript/api/schematicdisplay" click la "/layoutscript/api/schematic" class dr clas class la thisClas

This class is the main widget of the windows from which the macro was executed. It is directly accessible via the classname "schematic".

schematic->filename="/var/layouts/samples1.les";

Most methods of this call require a user dialog. A direct access of the drawing is possible via the member drawing.

Member Function Documentation


void schematic::addFunctionKey(int key,int function)

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)


void schematic::addMacroKey(int key,string macroFileName, string title, string iconFileName)

Will set an key of an external keyboard to a macro. key is the number of the key at the keyboard. macroFileName os the full path of the macro, title the capture and IconFileName the full path of the icon file. (introduced with release 20210910)


void schematic::addMacroToolButton(string macroName,string parameter,string iconfilename)

Add a new button to the toolbars. The button will be added to the toolbar 'Macros'. If this toolbar does not exist, it will be created. macroName specifies the name of the macro to be executed. iconfilename points to the file for the icon of the new button. If the given file does not exist, the default macro icon is used. MacroToolButtons will not stored with shut-down. parameter should be an empty string and is reserved for future extensions.


schematicDisplay* schematic::drawing

This class is the main class of the drawing. It holds all relevant information. schematicDisplay


string schematic::filename

This string hold the current filename.


string schematic::getToolbarState()

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.


void schematic::hideToolBar(string name)

Hides the named toolbar.


string schematic::macroToolbarName

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)


bool schematic::resetShortcut(int function)

Reset the shortcut with the feature code as parameter to its default value. (introduced with release 20231115)


void schematic::setMenuEnabled(string name,bool b)

disabled or enabled a single menu entry or a hole menu. (introduced with release 20191206)


bool schematic::setShortcut(string function,string key)

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)


bool schematic::setShortcut(int function,QString key)

As the overloaded method, but with the feature code as parameter.(introduced with releease 20180523)


void schematic::setToolbarEnabled(string name,bool b)

disabled or enabled a toolbar. (introduced with release 20191206)

 schematic->setToolbarEnabled("Edit",false);

void schematic::setToolbarState(string)

Sets the toolbar and dock window configuration. The string parameter needs to be created with the getToolbarState.


void schematic::showToolBar(string name)

Shows the named toolbar.


void schematic::toLayout(layout *l)

converts the current schematic sheet to a layout drawing.


void schematic::toolBarAdd(string name,string buttons)

Add a new tool bar, separate multipli buttons with a ';'.

layout->toolBarAdd("my toolbar","New Layout;Zoom Mouse;Code 39;Quit");

Obsolete Members


string schematic::generateNetList(string type)

the current sheet as netlist. Type had to be defined in the setup before.

OBSOLETE: Please use drawing->generateNetList() instead.


void schematic::saveNetList(string filename, string type)

exports the current sheet as netlist. Type had to be defined in the setup before.

OBSOLETE: Please use drawing->saveNetList() instead.