A sheet in the schematic. More...
| sElement* | addArc(pointArray p,int red, int green, int blue) |
| sElement* | addBus(pointArray p) |
| sElement* | addBusport(point p,string text) |
| sElement* | addCircle(point p1,QPoint p2,int red, int green, int blue) |
| sElement* | addGround(point p) |
| sElement* | addPlacement(string name,string lib, point pos, strans trans_) |
| sElement* | addPlacement(component *, point pos, strans trans_) |
| sElement* | addPort(point p,string text) |
| sElement* | addPolyline(pointArray p,int red, int green, int blue) |
| sElement* | addPolygon(pointArray p,int red, int green, int blue) |
| sElement* | addRect(point p1,QPoint p2,int red, int green, int blue) |
| sElement* | addText(point p,int red, int green, int blue, string textt) |
| sElement* | addWire(pointArray p) |
| sElement* | addWireLabel(point p) |
| void | deleteElement( sElement* element) |
| bool | existsDevicename(string name) |
| sElementList* | firstElement |
| sElement * | getDevice(string name) |
| component * | getSheetComponent() |
| string | getUnusedDevicename(string prefix) |
| string | sheetName |
A sheet is one page of a schematic: the wires, devices, ports and drawing shapes you see in the Schematic Editor. You reach the page on screen as schematic->drawing->currentSheet. The shapes themselves live in firstElement, a linked sElementList; walk thisElement / nextElement to inspect them. New graphics and placements are created with the add… methods on this class, not on the window. Device names must be unique on the sheet; getUnusedDevicename builds a free name from a prefix such as R or M, and existsDevicename tests a name before you place anything. If this sheet was turned into a library device, getSheetComponent returns that component; otherwise it returns NULL.
Example:
sheet *s = schematic->drawing->currentSheet;
s->sheetName = "amplifier";
pointArray w;
w.attach(0, 0);
w.attach(200, 0);
sElement *wire = s->addWire(w);
string name = s->getUnusedDevicename("R");
strans t;
sElement *res = s->addPlacement("resistor", "analog", point(100, 50), t);
if (res != NULL)
res->addParameter("devicename", name);
Adds an arc on this sheet. p holds the points that define the arc. red, green and blue are the colour channels from 0 to 255.
| Parameter: | |
|---|---|
| p | points of the arc |
| red | red colour channel |
| green | green colour channel |
| blue | blue colour channel |
Returns: a pointer to the new sElement.
Adds a bus along the vertices in p. A bus is a functional connection, not a drawing polyline.
Returns: a pointer to the new sElement.
Adds a bus port at p. text is the port name shown on the sheet.
Returns: a pointer to the new sElement.
| Parameter: | |
|---|---|
| p | p |
| text | text |
Adds a circle whose bounding box runs from p1 to p2. red, green and blue set the colour of this non-functional shape.
| Parameter: | |
|---|---|
| p1 | first corner of the bounding box |
| p2 | opposite corner of the bounding box |
| red | red colour channel |
| green | green colour channel |
| blue | blue colour channel |
Returns: a pointer to the new sElement.
Adds a ground symbol at p.
Returns: a pointer to the new sElement.
Places a library device on this sheet. name and lib select the component. pos is the origin. trans_ is the strans rotation, mirror and magnification.
| Parameter: | |
|---|---|
| name | component name in the library |
| lib | library name |
| pos | origin of the placement |
| trans_ | transformation of the placement |
Returns: a pointer to the new device sElement.
Places the given component at pos with transformation trans_. Use this overload when you already hold a pointer from components findComponent or newComponent.
| Parameter: | |
|---|---|
| pos | origin of the placement |
| trans_ | transformation of the placement |
Returns: a pointer to the new device sElement.
Adds a port at p. text is the port name.
Returns: a pointer to the new sElement.
| Parameter: | |
|---|---|
| p | p |
| text | text |
Adds a drawing polyline along p. This is not a wire and does not create a net. red, green and blue set the colour.
| Parameter: | |
|---|---|
| p | vertices of the polyline |
| red | red colour channel |
| green | green colour channel |
| blue | blue colour channel |
Returns: a pointer to the new sElement.
Adds a drawing polygon with vertices p. red, green and blue set the colour.
| Parameter: | |
|---|---|
| p | vertices of the polygon |
| red | red colour channel |
| green | green colour channel |
| blue | blue colour channel |
Returns: a pointer to the new sElement.
Adds a rectangle with opposite corners p1 and p2. red, green and blue set the colour of this non-functional shape.
| Parameter: | |
|---|---|
| p1 | first corner |
| p2 | opposite corner |
| red | red colour channel |
| green | green colour channel |
| blue | blue colour channel |
Returns: a pointer to the new sElement.
Adds a text textt at p. red, green and blue set the colour.
| Parameter: | |
|---|---|
| p | origin of the text |
| red | red colour channel |
| green | green colour channel |
| blue | blue colour channel |
| textt | the text string |
Returns: a pointer to the new sElement.
Adds a wire along the vertices in p. Wires create electrical connections; use addPolyline for a non-connecting line.
Returns: a pointer to the new sElement.
Adds a wire label at p. The label names the net at that location.
Returns: a pointer to the new sElement.
Deletes element from this sheet. The pointer is then invalid.
Returns: true if a device with name already exists on this sheet, otherwise false.
Head of the linked list of all elements on this sheet. See sElementList.
Returns: a pointer to the device with name, or NULL if no device uses that name.
Returns: a pointer to the component created from this sheet, or NULL if the sheet was not used as a component.
Returns: a device name that is still free on this sheet, built from prefix plus a number.
The name of this sheet.