the fair gds editor MacroClassLayout
Please Sign in

Layout Class Reference

The main layout window class. More...

See also: List of Classes


Detailed Description

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

layout->filename="/var/layouts/samples1.gds";
layout->newCell();

Most methods of this call require a user dialog. A direct access of the drawing is possible via the member drawing to an object of the class drawingField.

Further modules to modify the design data are available with the pointers backgroundTool, barcodeTool, booleanTool, drcTool and netlistTool.

See also: MacroClassBackgroundModule, MacroClassBarcodeModule, MacroClassBooleanHandler, MacroClassDrawingField, MacroClassDrc, MacroClassView3dModule

In LayoutScript the keyword layout does not exists. A new layout object had to be created via the project class.

l=project.newLayout()   # open new instance of layout class for Python

l=Project.new_layout()  # open new instance of layout class for Ruby

Member Function Documentation

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

(introduced with version 20170716)

backgroundModule* layout::backgroundTool

The background utilities are accessible via this class pointer.

See also: class backgroundModule

barcodeModule* layout::barcodeTool

The barcode utilities are accessible via this class pointer.

See also: class barcodeModule

booleanHandler* layout::booleanTool

The boolean utilities are accessible via this class pointer.

See also: class booleanHandler

void layout::choose()

It opened a file dialog. The selected file will be loaded.

void layout::chooseImport()

It opened a file dialog. The selected file will be imported.(= add to the existing file)

void layout::closeDesign()

The current design will be removed and an empty design is shown like after the program start.

static bool layout::debug

True if the debug mode is on.

drawingField* layout::drawing

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

drc* layout::drcTool

The design rule checker is accessible via this class. drc

int layout::executeMacro(string filename)

Another macro is executed. The execution of this macro stopped until the termination of the new started macro.

Parameter:

filename

filename of the macro.

extractionModule* layout::extractionTool

A utility tool to extract electrical parameter from the design

See also: class extractionModule

string layout::filename

This string hold the current filename.

int layout::getBool(string caption,string label)

The user will be prompted to enter a bool.

Parameter:

caption

the title of the window.

label

this string will be displayed inside the window.

Returns: 0 if yes, otherwise 1

double layout::getDouble(string caption,string label,double value=0, int digits=1)

The user will be prompted to enter a double.

Parameter:

caption

the title of the window.

label

this string will be displayed inside the window.

value

default value

digits

maximal number of digits

Returns: the double set by the user

int layout::getInteger(string caption,string label, int value=0)

The user will be prompted to enter a integer.

Parameter:

caption

the title of the window

label

this string will be displayed inside the window.

value

default value

Returns: the integer set by the user.

string layout::getItem(string caption,string label,stringList values)

The user will be prompted to choose a item from a list.

Parameter:

caption

the title of the window

label

this string will be displayed inside the window

values

list with all items

Returns: the item text choosen by the user. An empty string is returned in the case the Cancel button was pressed.

(introduced with version 20141128)

int layout::getLayer(string label, int value=0)

The user will be prompted to choose a layer from a list of all existing layers.

Parameter:

label

this string will be displayed inside the window

value

default value

Returns: the layer number set by the user. -1 is returned in the case the Cancel button was pressed.

(introduced with version 20141112)

string layout::getOpenFilename(string filter="", string path="")

A file open dialog is shown. The optinal parameter filter set the default filter use in the dialog. The filter format is "filtername (*.ex1 *ex2)". With path the folder the dialog starts with is set. The parameter filter was introduced with version 20140704 and the parameter path was introduced with version 20170406.

Returns: a string with the filename or a empty string if cancelled

string layout::getStatistic()

Returns: a string with some statistic information on the design. (introduced with version 20150307)

string layout::getSaveFilename(string filter="")

A file save dialog is shown. The optional parameter filter set the default filter use in the dialog. The filter format is "filtername (*.ex1 *ex2)". The parameter filter was introduced with version 20140704.

Returns: a string with the filename or a empty string if cancelled

int layout::getSize(QString caption,QString label, int value=1)

The user will be prompted to enter a value in userunits.

Parameter:

caption

the title of the window

label

this string will be displayed inside the window.

value

default value in database units

Returns: value entered by the user in database units (introduced with version 20150927)

string layout::getText(string caption,string label,string value="")

The user will be prompted to enter a text.

Parameter:

caption

the title of the window.

label

this string will be displayed inside the window.

value

default value

Returns: the text set by the user. An empty string is returned in the case the Cancel button was pressed.

string layout::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. (introduced with version 20160401)

void layout::hideToolBar(string name)

Hides the named toolbar.

netListModule* layout::netlistTool

The netlist utilities are accessible via this class.

void layout::open(string fileName)

The design with the name fileName is opened. If the current design was changed, you will be asked to save it before.

(introduced with version 20170320)

void layout::print()

A printer dialog will be opened.

void layout::save()

The current opened design will be saved to disc. If filename is empty, you will be prompted to enter a filename.

void layout::saveAs()

You will be prompted to enter a filename. The current design will be saved.

void layout::screenshot()

The screen will be saved. You will be prompted to enter a filename.

void layout::setCell()

You will be prompted to select a cell. The cell will be displayed.

void layout::setCellname()

You will be prompted to enter a name for the current displayed cell.

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

Use this function to modify any existing shortcut. It returns true, if the modification was successful. & marks the underline in the menuname. As normally always the first character is underlined, add a & in the front.

layout->setShortcut("&Sector",""); // remove old 'F' shortkey
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

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

As the overloaded method, but with the feature code as parameter.

void layout::showMessage(string caption,string label)

A message will be displayed.

Parameter:

caption

the title of the window.

label

this string will be displayed inside the window.

void layout::setSnapToGrid(bool b)

Snapping to grid is activated or deactivated depending on the given bool value. (introduced with version 20150316)

void layout::setSnapToPoint(bool b)

Snapping to point is activated or deactivated depending on the given bool value. (introduced with version 20150316)

void layout::setSnapToMiddle(bool b)

Snapping to middle of a line is activated or deactivated depending on the given bool value. (introduced with version 20150316)

void layout::setSnapToLine(bool b)

Snapping to line is activated or deactivated depending on the given bool value. (introduced with version 20150316)

void layout::setSnapToCenter(bool b)

Snapping to shape center is activated or deactivated depending on the given bool value. (introduced with version 20150316)

void layout::setSnapToIntersection(bool b)

Snapping to intersections is activated or deactivated depending on the given bool value. (introduced with version 20150316)

void layout::setToolbarState(string)

Sets the toolbar and dock window configuration. The string parameter needs to be created with the getToolbarState. (introduced with version 20160401)

void layout::showStatus(string label)

A message will be displayed in the statusbar for 2 seconds. The macro will continue to run. If the further status message is posted before the 2 seconds are over, the existing message is exchanged.

Parameter:

label

this string will be displayed in the status bar.

textEdit* layout::showTextEditor()

Will create a new text Editor window in a thread save way.

void layout::showToolBar(string name)

Shows the name toolbar.

void layout::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"); 

view3dModule* layout::view3dTool

The 3d view is accessable via this class.

Obsolete Members

void layout::deleteActuellCell()

After a confirmation the current display cell will be deleted. If there are no more cell in the drawing, a new empty cell will be created.

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

void layout::group()

All selected elements are moved to a new cell. A correlating cellref will be added.

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

void layout::newCell()

A new empty cell will be added, named with an unused cell name and it is set as current cell.

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

void layout::saveScreenshot(string filename)

The screen will be saved in the file with the name filename. The type is selected by the extension.

OBSOLETE: Please use drawing->saveScreenshot(string filename) instead.

void layout::trigger3dRenderAll()

renderAll will be called after the macro terminates.

OBSOLETE: Please use view3dTool->trigger3dRenderAll() instead.

void layout::trigger3dRenderAuto()

renderAuto will be called after the macro terminates.

OBSOLETE: Please use view3dTool->trigger3dRenderAuto() instead.

void layout::trigger3dRenderSelect()

renderSeclect will be called after the macro terminates.

OBSOLETE: Please use view3dTool->trigger3dRenderSelect() instead.

See also


CategoryMacroClass


MacroClassLayout (last edited 2017-07-16 11:30:04 by JurgenThies)