Class Reference schematic

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

Member

void addMacroToolButton(string macroName,string parameter,string iconfilename)
schematicDisplay* drawing
string filename
string getToolbarState()
void hideToolBar(string name)
bool setShortcut(string function,string key)
bool setShortcut(int function,QString key)
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

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::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.


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.


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::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.