Class Reference symbol

A symbol of a component use for the schematic. More...

Member

sElement* addArc(pointArray p,int red, int green, int blue)
sElement* addBusPort(point p,string text)
sElement* addCircle(point p1,QPoint p2,int red, int green, int blue)
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)
void deleteElement( sElement* element)
sElementList* firstElement

Detailed Description

This class contains methods to read and modify symbols. (introduced with release 20180501)

Example:

  component *comp=schematic->drawing->currentSheet->getSheetComponent();
  symbol *sym= comp->getSymbol();
  sElementList *sl=sym->firstElement;
  while (sl!=NULL) {
        if (sl->thisElement!=NULL){
              sl->thisElement->setColor(255,0,50);
           }
        sl=sl->nextElement;
        }
    pointArray pa;
    pa.attach(0,0);
    pa.attach(30,0);
    pa.attach(0,30);
    sym->addPolygon(pa,0,155,255);

Member Function Documentation


sElement* symbol::addArc(pointArray p,int red, int green, int blue)

adds an arc to the symbol.


sElement* symbol::addBusPort(point p,string text)

adds a bus port


sElement* symbol::addCircle(point p1,QPoint p2,int red, int green, int blue)

adds a circle to the symbol.


sElement* symbol::addPort(point p,string text)

adds a port


sElement* symbol::addPolyline(pointArray p,int red, int green, int blue)

adds a polyline to the symbol.


sElement* symbol::addPolygon(pointArray p,int red, int green, int blue)

adds a polygon to the symbol.


sElement* symbol::addRect(point p1,QPoint p2,int red, int green, int blue)

adds a rectangle to the symbol.


sElement* symbol::addText(point p,int red, int green, int blue, string textt)

adds a text to the symbol.


void symbol::deleteElement( sElement* element)

The specified element will be deleted from the symbol.


sElementList* symbol::firstElement

This is a list of all elements in this symbol.