45 for(pn =
Nodes->first(); pn != 0; pn =
Nodes->next())
46 if(pn->
cx == x)
if(pn->
cy == y)
65 if(pw->y1 > y)
continue;
66 if(pw->y2 < y)
continue;
70 if(pw->x1 > x)
continue;
71 if(pw->x2 < x)
continue;
87 if(pn->getSelected(x, y))
107 for(pn =
Nodes->first(); pn != 0; pn =
Nodes->next())
108 if(pn->
cx == w->
x1)
if(pn->
cy == w->
y1)
break;
122 if(ptr2->x1 == w->
x1)
124 if(ptr2->y1 > w->
y1)
continue;
125 if(ptr2->y2 < w->
y1)
continue;
129 if(ptr2->y2 >= w->
y2)
138 if(ptr2->Port2->Connections.count() == 1)
141 w->
Port1 = ptr2->Port1;
144 w->
Label = ptr2->Label;
148 ptr2->Port1->Connections.append(w);
149 Nodes->removeRef(ptr2->Port2);
150 Wires->removeRef(ptr2);
156 w->
Port1 = ptr2->Port2;
163 else if(ptr2->y1 == w->
y1)
165 if(ptr2->x1 > w->
x1)
continue;
166 if(ptr2->x2 < w->
x1)
continue;
170 if(ptr2->x2 >= w->
x2)
179 if(ptr2->Port2->Connections.count() == 1)
182 w->
Port1 = ptr2->Port1;
185 w->
Label = ptr2->Label;
189 ptr2->Port1->Connections.append(w);
190 Nodes->removeRef(ptr2->Port2);
191 Wires->removeRef(ptr2);
197 w->
Port1 = ptr2->Port2;
254 Wires->removeRef(pw);
273 Wires->removeRef(pw);
317 Wires->removeRef(pw);
336 Wires->removeRef(pw);
357 for(pn =
Nodes->first(); pn != 0; pn =
Nodes->next())
358 if(pn->
cx == w->
x2)
if(pn->
cy == w->
y2)
break;
372 if(ptr2->x1 == w->
x2)
374 if(ptr2->y1 > w->
y2)
continue;
375 if(ptr2->y2 < w->
y2)
continue;
382 if(ptr2->Port1->Connections.count() == 1)
386 w->
Label = ptr2->Label;
390 w->
Port2 = ptr2->Port2;
392 ptr2->Port2->Connections.append(w);
393 Nodes->removeRef(ptr2->Port1);
394 Wires->removeRef(ptr2);
400 w->
Port2 = ptr2->Port1;
406 else if(ptr2->y1 == w->
y2)
408 if(ptr2->x1 > w->
x2)
continue;
409 if(ptr2->x2 < w->
x2)
continue;
416 if(ptr2->Port1->Connections.count() == 1)
420 w->
Label = ptr2->Label;
424 w->
Port2 = ptr2->Port2;
426 ptr2->Port2->Connections.append(w);
427 Nodes->removeRef(ptr2->Port1);
428 Wires->removeRef(ptr2);
434 w->
Port2 = ptr2->Port1;
484 Wires->removeRef(pw);
500 Wires->removeRef(pw);
538 Wires->removeRef(pw);
554 Wires->removeRef(pw);
584 else if(w->
y1 > w->
y2)
595 if(tmp == 0)
return 3;
596 if(tmp > 1) con |= 2;
606 if(tmp == 0)
return 3;
607 if(tmp > 1) con |= 1;
616 if(con > 255) con = ((con >> 1) & 1) | ((con << 1) & 2);
630 for(pw =
Wires->current(); pw != 0; pw =
Wires->next())
631 for(pn =
Nodes->first(); pn != 0; )
646 else if(pn->
cy == pw->
y1)
682 Nodes->removeRef(pn);
690 Nodes->removeRef(pn2);
701 Wires->removeRef(nw);
706 if(n1 == 1)
if(n2 == 1)
continue;
709 if((pw->
x1 != pn->
cx) || (pw->
y1 != pn->
cy))
726 if (
Wires->containsRef (w))
745 if(((
Wire*)pe)->Port1 == pn) pn = ((
Wire*)pe)->Port2;
746 else pn = ((
Wire*)pe)->Port1;
747 if(pn == pn_1st)
break;
755 if(pw->getSelected(x, y))
776 Wires->append(newWire);
800 if(e1->
x1 == e2->
x2)
if(e1->
y1 == e2->
y2)
827 Wires->removeRef(e2);
871 Q3PtrList<Element> *ElementCache)
877 for(pw =
Wires->first(); pw != 0; )
880 if(pw->
x1 < x1) x1 = pw->
x1;
881 if(pw->
x2 > x2) x2 = pw->
x2;
882 if(pw->
y1 < y1) y1 = pw->
y1;
883 if(pw->
y2 > y2) y2 = pw->
y2;
886 ElementCache->append(pw);
893 ElementCache->append(pn->
Label);
904 ElementCache->append(pn->
Label);
916 pw =
Wires->current();
918 else pw =
Wires->next();
935 if(pd->getSelected(x, y))
939 for(
Graph *pg = pd->Graphs.first(); pg != 0; pg = pd->Graphs.next())
945 pg->Markers.append(pm);
961 for(pm = (
Marker*)Elements->first(); pm!=0; pm = (
Marker*)Elements->next())
977 for(pm = (
Marker*)Elements->first(); pm!=0; pm = (
Marker*)Elements->next())
1005 int n, x = int(fX), y = int(fY);
1020 if(pn->getSelected(x, y))
1068 if(pw->getSelected(x, y))
1122 if(pc->getSelected(x, y))
1146 n = pc->getTextSelected(x, y, Corr);
1150 if(index) *index = n;
1162 for(pg = pd->Graphs.first(); pg != 0; pg = pd->Graphs.next())
1167 if(pm->getSelected(x-pd->cx, y-pd->cy))
1172 pm->isSelected ^= flag;
1195 if(pd->resizeTouched(fX, fY, Corr))
1205 if(pd->getSelected(x, y))
1207 if(pd->Name[0] ==
'T')
1209 if(pd->Name[1] ==
'i')
1213 if(x < pd->cx+pd->xAxis.numGraphs)
continue;
1229 for(pg = pd->Graphs.first(); pg != 0; pg = pd->Graphs.next())
1282 if(pp->resizeTouched(fX, fY, Corr))
1292 if(pp->getSelected(fX, fY, Corr))
1297 pp->isSelected ^= flag;
1325 for(
Wire *pwouter =
Wires->last(); pwouter != 0; pwouter =
Wires->prev())
1327 pltestouter = pwouter->Label;
1336 for(
Wire *pwouter =
Wires->last(); pwouter != 0; pwouter =
Wires->prev())
1339 pltestouter = pwouter->Label;
1345 for(
Wire *pwinner =
Wires->last(); pwinner != 0; pwinner =
Wires->prev())
1347 pltestinner = pwinner->Label;
1351 if (strcmp(pltestouter->
Name, pltestinner->
Name) == 0)
1368 if(e != pc) pc->isSelected =
false;
1373 if(e != pw) pw->isSelected =
false;
1374 if(pw->Label)
if(pw->Label != e) pw->Label->isSelected =
false;
1379 if(pn->Label)
if(pn->Label != e) pn->Label->isSelected =
false;
1384 if(e != pd) pd->isSelected =
false;
1387 for(
Graph *pg = pd->Graphs.first(); pg != 0; pg = pd->Graphs.next())
1389 if(e != pg) pg->isSelected =
false;
1392 for(
Marker *pm = pg->Markers.first(); pm != 0; pm = pg->Markers.next())
1393 if(e != pm) pm->isSelected =
false;
1400 if(e != pp) pp->isSelected =
false;
1408 int cx1, cy1, cx2, cy2;
1411 cx1 = (x1 < x2) ? x1 : x2;
1412 cx2 = (x1 > x2) ? x1 : x2;
1413 cy1 = (y1 < y2) ? y1 : y2;
1414 cy2 = (y1 > y2) ? y1 : y2;
1423 pc->Bounding(cx1, cy1, cx2, cy2);
1424 if(cx1 >= x1)
if(cx2 <= x2)
if(cy1 >= y1)
if(cy2 <= y2)
1426 pc->isSelected =
true;
1430 if(pc->isSelected &= flag) z++;
1435 for(pw =
Wires->first(); pw != 0; pw =
Wires->next())
1437 if(pw->
x1 >= x1)
if(pw->
x2 <= x2)
if(pw->
y1 >= y1)
if(pw->
y2 <= y2)
1449 for(pw =
Wires->first(); pw != 0; pw =
Wires->next())
1454 if(pl->
x1 >= x1)
if((pl->
x1+pl->
x2) <= x2)
1455 if(pl->
y1 >= y1)
if((pl->
y1+pl->
y2) <= y2)
1472 if(pl->
x1 >= x1)
if((pl->
x1+pl->
x2) <= x2)
1473 if((pl->
y1-pl->
y2) >= y1)
if(pl->
y1 <= y2)
1488 for(
Graph *pg = pd->Graphs.first(); pg != 0; pg = pd->Graphs.next())
1490 if(pg->isSelected &= flag) z++;
1493 for(
Marker *pm = pg->Markers.first(); pm!=0; pm = pg->Markers.next())
1495 pm->Bounding(cx1, cy1, cx2, cy2);
1496 if(cx1 >= x1)
if(cx2 <= x2)
if(cy1 >= y1)
if(cy2 <= y2)
1498 pm->isSelected =
true;
1502 if(pm->isSelected &= flag) z++;
1507 pd->Bounding(cx1, cy1, cx2, cy2);
1508 if(cx1 >= x1)
if(cx2 <= x2)
if(cy1 >= y1)
if(cy2 <= y2)
1510 pd->isSelected =
true;
1514 if(pd->isSelected &= flag) z++;
1520 pp->Bounding(cx1, cy1, cx2, cy2);
1521 if(cx1 >= x1)
if(cx2 <= x2)
if(cy1 >= y1)
if(cy2 <= y2)
1523 pp->isSelected =
true;
1527 if(pp->isSelected &= flag) z++;
1538 for(
Graph *pg = pd->Graphs.first(); pg != 0; pg = pd->Graphs.next())
1539 for(
Marker *pm = pg->Markers.first(); pm!=0; pm = pg->Markers.next())
1540 pm->isSelected =
true;
1569 long mask = 1, invMask = 3;
1572 Node *pn2 = pw->Port1;
1573 if(pn2 == pn) pn2 = pw->Port2;
1576 if((pn2->
State & (8+4)) == 0)
1588 pw->Port1->Connections.removeRef(pw);
1589 pw->Port1->State |= 16+4;
1590 pw->Port2->Connections.removeRef(pw);
1591 pw->Port2->State |= 16+4;
1594 if(pw->isHorizontal()) mask = 2;
1605 pw->Port1->
State |= mask;
1606 pw->Port1 = (
Node*)mask;
1607 pw->Port2->State |= invMask;
1608 pw->Port2 = (
Node*)invMask;
1612 pw->Port1->State |= invMask;
1613 pw->Port1 = (
Node*)invMask;
1614 pw->Port2->State |= mask;
1615 pw->Port2 = (
Node*)mask;
1623 if(pw->Port1 != (
Node*)mask)
1625 new Wire(pw->x2, pw->y2, pw->x2, pw->y2, (
Node*)mask, (
Node*)invMask));
1628 new Wire(pw->x1, pw->y1, pw->x1, pw->y1, (
Node*)mask, (
Node*)invMask));
1635 p->insert(pos, pw2);
1642 if(pw2->
Port1 != pn2)
1686 for(pp = pc->
Ports.first(); pp!=0; pp = pc->
Ports.next())
1698 for(pw =
Wires->first(); pw != 0; )
1701 p->append(pw->
Label);
1712 pw =
Wires->current();
1714 else pw =
Wires->next();
1722 for(i=0; i<count; i++)
1724 for(pp = pc->
Ports.first(); pp!=0; pp = pc->
Ports.next())
1731 for(pe = (
Element*)pc; pe != 0; pe = p->next())
1735 for(pw = (
Wire*)pe; pw != 0; pw = (
Wire*)p->next())
1746 for(pn =
Nodes->first(); pn!=0; )
1752 pn =
Nodes->current();
1766 p->append(pn->
Label);
1769 pn =
Nodes->current();
1779 for(pn =
Nodes->first(); pn != 0; pn =
Nodes->next())
1781 p->append(pn->
Label);
1796 for(pd =
Diagrams->first(); pd != 0; )
1806 for(
Marker *pm = pg->Markers.first(); pm != 0; )
1812 pm = pg->Markers.current();
1814 else pm = pg->Markers.next();
1824 Q3PtrList<Element> *ElementCache)
1832 copyWires(x1, y1, x2, y2, ElementCache);
1835 if(y1 == INT_MAX)
return false;
1842 Q3PtrList<Element> *ElementCache)
1844 int bx1, by1, bx2, by2;
1845 Wires->setAutoDelete(
false);
1854 number +=
copyWires(x1, y1, x2, y2, ElementCache);
1856 Wires->setAutoDelete(
true);
1863 pd->Bounding(bx1, by1, bx2, by2);
1864 if(bx1 < x1) x1 = bx1;
1865 if(bx2 > x2) x2 = bx2;
1866 if(by1 < y1) y1 = by1;
1867 if(by2 > y2) y2 = by2;
1868 ElementCache->append(pd);
1875 pp->Bounding(bx1, by1, bx2, by2);
1876 if(bx1 < x1) x1 = bx1;
1877 if(bx2 > x2) x2 = bx2;
1878 if(by1 < y1) y1 = by1;
1879 if(by2 > y2) y2 = by2;
1880 ElementCache->append(pp);
1917 pw =
Wires->current();
1920 else pw =
Wires->next();
1926 if(pn->Label->isSelected)
1943 bool wasGraphDeleted =
false;
1948 for(
Marker *pm = pg->Markers.first(); pm != 0; )
1951 pg->Markers.remove();
1952 pm = pg->Markers.current();
1955 else pm = pg->Markers.next();
1960 pg = pd->
Graphs.current();
1961 sel = wasGraphDeleted =
true;
1963 else pg = pd->
Graphs.next();
1975 if(pp->
Name.at(0) !=
'.')
1997 int bx1, by1, bx2, by2, *bx=0, *by=0, *ax=0, *ay=0;
1998 Q3PtrList<Element> ElementCache;
1999 int count =
copyElements(x1, y1, x2, y2, &ElementCache);
2000 if(count < 1)
return false;
2051 for(
Element *pe = ElementCache.last(); pe != 0; pe = ElementCache.prev())
2059 pc->
setCenter(x1-((*bx)+(*ax))/y2, y1-((*by)+(*ay))/y2,
true);
2069 pw->
setCenter(x1-((*bx)+(*ax))/y2, y1-((*by)+(*ay))/y2,
true);
2082 bx2 = bx1 + ((
Diagram*)pe)->x2;
2083 by1 = by2 - ((
Diagram*)pe)->y2;
2084 ((
Diagram*)pe)->setCenter(x1-((*bx)+(*ax))/y2, y1-((*by)+(*ay))/y2,
true);
2088 ((
Painting*)pe)->Bounding(bx1, by1, bx2, by2);
2089 ((
Painting*)pe)->setCenter(x1-((*bx)+(*ax))/y2, y1-((*by)+(*ay))/y2,
true);
2106 ((
WireLabel*)pe)->cx += x1-((*bx)+(*ax))/y2;
2107 ((
WireLabel*)pe)->cy += y1-((*by)+(*ay))/y2;
2115 ElementCache.clear();
2116 if(count < 2)
return false;
2126 int bx1, by1, bx2, by2;
2127 Q3PtrList<Element> ElementCache;
2128 int count =
copyElements(x1, y1, x2, y2, &ElementCache);
2129 if(count < 1)
return false;
2142 for(
int i = count-1; i>0; i--)
2144 pe = ElementCache.first();
2145 for(
int j=0; j<i; j++)
2148 pe=ElementCache.next();
2152 ElementCache.replace(j+1, ElementCache.prev());
2153 ElementCache.replace(j, pe);
2154 pe = ElementCache.next();
2159 ElementCache.getLast()->
getCenter(x2, y2);
2160 ElementCache.getFirst()->getCenter(x1, y1);
2164 if(count > 1) dx = (x2-x1)/(count-1);
2167 for(pe = ElementCache.last(); pe != 0; pe = ElementCache.prev())
2182 x1 = pw->
x2 - pw->
x1;
2183 pw->
x1 = x - (x1 >> 1);
2184 pw->
x2 = pw->
x1 + x1;
2186 else pw->
x1 = pw->
x2 = x;
2192 pe->
cx = x - (pe->
x2 >> 1);
2209 x1 = pw->
x2 - pw->
x1;
2210 pe->
cx += x - (x1 >> 1) - pw->
x1;
2212 else pe->
cx += x - pw->
x1;
2224 ElementCache.clear();
2225 if(count < 2)
return false;
2235 int bx1, by1, bx2, by2;
2236 Q3PtrList<Element> ElementCache;
2237 int count =
copyElements(x1, y1, x2, y2, &ElementCache);
2238 if(count < 1)
return false;
2243 for(
int i = count-1; i>0; i--)
2245 pe = ElementCache.first();
2246 for(
int j=0; j<i; j++)
2249 pe=ElementCache.next();
2253 ElementCache.replace(j+1, ElementCache.prev());
2254 ElementCache.replace(j, pe);
2255 pe = ElementCache.next();
2260 ElementCache.getLast()->
getCenter(x2, y2);
2261 ElementCache.getFirst()->getCenter(x1, y1);
2265 if(count > 1) dy = (y2-y1)/(count-1);
2268 for(pe = ElementCache.last(); pe != 0; pe = ElementCache.prev())
2284 y1 = pw->
y2 - pw->
y1;
2285 pw->
y1 = y - (y1 >> 1);
2286 pw->
y2 = pe->
y1 + y1;
2293 pe->
cy = y + (pe->
y2 >> 1);
2309 y1 = pw->
y2 - pw->
y1;
2310 pe->
cy += y - (y1 >> 1) - pw->
y1;
2312 else pe->
cy += y - pw->
y1;
2324 ElementCache.clear();
2325 if(count < 2)
return false;
2327 setChanged(
true,
true);
2344 if(pp->
Name !=
"Num")
return;
2347 QString s = pp->
Value;
2348 QString cSign = c->
Model;
2352 if(pc->
Model == cSign)
2353 if(pc->
Props.getFirst()->Value == s)
break;
2359 s = QString::number(n);
2362 if(pc->
Model == cSign)
2363 if(pc->
Props.getFirst()->Value == s)
break;
2376 for(pp = c->
Ports.first(); pp != 0; pp = c->
Ports.next())
2379 if(noOptimize)
return;
2383 Q3PtrList<Element> *pL;
2386 for(pp = c->
Ports.next(); pp != 0; pp = c->
Ports.next())
2392 if(((
Wire*)pe)->Port1 == pn) pL = &(((
Wire*)pe)->Port2->Connections);
2393 else pL = &(((
Wire*)pe)->Port1->Connections);
2395 for(pe1 = pL->first(); pe1!=0; pe1 = pL->next())
2414 if(c->
Model ==
"GND")
2432 int PortCount = Comp->
Ports.count();
2439 for(pp = Comp->
Ports.first(); pp != 0; pp = Comp->
Ports.next())
2449 int x = Comp->
tx, y = Comp->
ty;
2450 int x1 = Comp->
x1, x2 = Comp->
x2, y1 = Comp->
y1, y2 = Comp->
y2;
2451 QString tmp = Comp->
Name;
2470 for(pp = Comp->
Ports.first(); pp != 0; pp = Comp->
Ports.next())
2479 if((--PortCount) < 1)
break;
2481 for( ; PortCount > 0; PortCount--)
2498 int max=1, len = c->
Name.length(), z;
2499 if(c->
Name.isEmpty())
2502 if(c->
Model ==
"GND")
2519 if(pc->Name.left(len) == c->
Name)
2521 s = pc->Name.right(pc->Name.length()-len);
2523 if(ok)
if(z >= max) max = z + 1;
2525 c->
Name += QString::number(max);
2535 bool changed =
false;
2536 int cx1, cy1, cx2, cy2, a;
2538 cx1 = (x1 < x2) ? x1 : x2;
2539 cx2 = (x1 > x2) ? x1 : x2;
2540 cy1 = (y1 < y2) ? y1 : y2;
2541 cy2 = (y1 > y2) ? y1 : y2;
2550 pc->Bounding(cx1, cy1, cx2, cy2);
2551 if(cx1 >= x1)
if(cx2 <= x2)
if(cy1 >= y1)
if(cy2 <= y2)
2553 a = pc->isActive - 1;
2555 if(pc->Ports.count() > 1)
2565 if(pc->Model ==
"GND")
2566 oneLabel(pc->Ports.getFirst()->Connection);
2578 int x1, y1, x2, y2, a;
2581 pc->Bounding(x1, y1, x2, y2);
2582 if(x >= x1)
if(x <= x2)
if(y >= y1)
if(y <= y2)
2584 a = pc->isActive - 1;
2586 if(pc->Ports.count() > 1)
2596 if(pc->Model ==
"GND")
2597 oneLabel(pc->Ports.getFirst()->Connection);
2614 a = pc->isActive - 1;
2616 if(pc->Ports.count() > 1)
2626 if(pc->Model ==
"GND")
2627 oneLabel(pc->Ports.getFirst()->Connection);
2642 Q3PtrList<WireLabel> LabelCache;
2644 for(pp = pc->
Ports.first(); pp!=0; pp = pc->
Ports.next())
2653 LabelCache.append(pl);
2654 pl->
cx = pp->
x + pc->
cx;
2655 pl->
cy = pp->
y + pc->
cy;
2668 for(pp = pc->
Ports.first(); pp!=0; pp = pc->
Ports.next())
2671 for(pl = LabelCache.first(); pl != 0; pl = LabelCache.next())
2682 a = pc->
cx + pc->tx;
2683 if(x_ < a)
continue;
2684 b = pc->cy + pc->ty;
2685 if(y_ < b)
continue;
2687 pc->textSize(dx, dy);
2688 if(x_ > a+dx)
continue;
2689 if(y_ > b+dy)
continue;
2706 if(!pc->isSelected)
continue;
2707 if(pc->Model !=
"Sub")
2708 if(pc->Model !=
"VHDL")
2709 if(pc->Model !=
"Verilog")
continue;
2711 if(sub != 0)
return 0;
2722 if(pc->getSelected(x, y))
2735 for(pn = c->
Ports.first(); pn!=0; pn = c->
Ports.next())
2757 Q3PtrList<Element> *ElementCache)
2760 int bx1, by1, bx2, by2, count=0;
2767 if(bx1 < x1) x1 = bx1;
2768 if(bx2 > x2) x2 = bx2;
2769 if(by1 < y1) y1 = by1;
2770 if(by2 > y2) y2 = by2;
2773 ElementCache->append(pc);
2776 for(pp = pc->
Ports.first(); pp != 0; pp = pc->
Ports.next())
2801 Q3PtrList<Element> *ElementCache)
2810 if(pc->
cx < x1) x1 = pc->
cx;
2811 if(pc->
cx > x2) x2 = pc->
cx;
2812 if(pc->
cy < y1) y1 = pc->
cy;
2813 if(pc->
cy > y2) y2 = pc->
cy;
2815 ElementCache->append(pc);
2818 for(pp = pc->
Ports.first(); pp != 0; pp = pc->
Ports.next())
2852 Q3PtrList<Node> Cons;
2854 for(pn =
Nodes->first(); pn!=0; pn =
Nodes->next())
2859 for(pn = Cons.first(); pn!=0; pn = Cons.next())
2895 else pNode = pw->
Port2;
2897 if(pNode->
y1)
continue;
2927 for(pn =
Nodes->first(); pn != 0; pn =
Nodes->next())
2928 if(pn->
cx == x)
if(pn->
cy == y)
break;
2959 Q3PtrList<Node> Cons;
2961 for(pn =
Nodes->first(); pn!=0; pn =
Nodes->next())
2966 for(pn = Cons.first(); pn!=0; pn = Cons.next())
2967 if(pn->
Label)
return pn;
2974 if(((
Component*)pe)->Model ==
"GND")
return pe;
2979 if(pw->
Label)
return pw;
2982 else pNode = pw->
Port2;
2984 if(pNode->
y1)
continue;
3022 Q3PtrList<Element> *ElementCache)
3031 if(pl->
x1 < x1) x1 = pl->
x1;
3032 if(pl->
y1-pl->
y2 < y1) y1 = pl->
y1-pl->
y2;
3033 if(pl->
x1+pl->
x2 > x2) x2 = pl->
x1+pl->
x2;
3034 if(pl->
y1 > y2) y2 = pl->
y1;
3035 ElementCache->append(pl);
3044 if(pl->
x1 < x1) x1 = pl->
x1;
3045 if(pl->
y1-pl->
y2 < y1) y1 = pl->
y1-pl->
y2;
3046 if(pl->
x1+pl->
x2 > x2) x2 = pl->
x1+pl->
x2;
3047 if(pl->
y1 > y2) y2 = pl->
y1;
3048 ElementCache->append(pl);
3064 float Corr = 5.0 /
Scale;
3067 if(pp->getSelected(fX, fY, Corr))
3075 Q3PtrList<Element> *ElementCache)
3078 int bx1, by1, bx2, by2;
3084 if(bx1 < x1) x1 = bx1;
3085 if(bx2 > x2) x2 = bx2;
3086 if(by1 < y1) y1 = by1;
3087 if(by2 > y2) y2 = by2;
3089 ElementCache->append(pp);
Q3PtrList< Marker > Markers
void deleteComp(Component *)
int insertWireNode2(Wire *)
bool distributeVertical()
bool getSelected(int, int)
bool connectHWires2(Wire *)
bool connectHWires1(Wire *)
Marker * setMarker(int, int)
int copyElements(int &, int &, int &, int &, Q3PtrList< Element > *)
label for Node and Wire classes
Node * selectedNode(int, int)
int insertWireNode1(Wire *)
int selectElements(int, int, int, int, bool)
void copyPaintings(int &, int &, int &, int &, Q3PtrList< Element > *)
bool activateSelectedComponents()
int copyWires(int &, int &, int &, int &, Q3PtrList< Element > *)
Node * insertNode(int, int, Element *)
void insertRawComponent(Component *, bool noOptimize=true)
int getSelected(int, int)
void setHighlighted(bool newval)
Painting * selectedPainting(float, float)
#define isDigitalComponent
Q3PtrList< Diagram > * Diagrams
bool copyComps2WiresPaints(int &, int &, int &, int &, Q3PtrList< Element > *)
Wire * splitWire(Wire *, Node *)
bool connectVWires1(Wire *)
int copySelectedElements(Q3PtrList< Element > *)
Q3PtrList< Component > * Components
Element * selectElement(float, float, bool, int *index=0)
Q3PtrList< Property > Props
Component * selectCompText(int, int, int &, int &)
Component * selectedComponent(int, int)
Q3PtrList< Element > Connections
int placeNodeLabel(WireLabel *)
Q3PtrList< Node > * Nodes
bool distributeHorizontal()
Q3PtrList< Graph > Graphs
void copyComponents2(int &, int &, int &, int &, Q3PtrList< Element > *)
void newMovingWires(Q3PtrList< Element > *, Node *, int)
void setCompPorts(Component *)
virtual void getCenter(int &, int &)
#define isAnalogComponent
Superclass of all schematic drawing elements.
void setCenter(int, int, bool relative=false)
void insertComponentNodes(Component *, bool)
void Bounding(int &, int &, int &, int &)
bool connectVWires2(Wire *)
bool activateSpecifiedComponent(int, int)
int copyComponents(int &, int &, int &, int &, Q3PtrList< Element > *)
void markerLeftRight(bool, Q3PtrList< Element > *)
Element * getWireLabel(Node *)
Component * searchSelSubcircuit()
void markerUpDown(bool, Q3PtrList< Element > *)
void copyLabels(int &, int &, int &, int &, Q3PtrList< Element > *)
Wire * selectedWire(int, int)
void selectWireLine(Element *, Node *, bool)
void setComponentNumber(Component *)
void setCenter(int, int, bool relative=false)
void activateCompsWithinRect(int, int, int, int)
void recreateComponent(Component *)
void sizeOfAll(int &, int &, int &, int &)
void deselectElements(Element *)
Q3PtrList< Painting > * Paintings
Q3PtrList< Wire > * Wires
virtual void Bounding(int &, int &, int &, int &)
void insertComponent(Component *)
void setName(const QString &, const QString &, int delta_=0, int x_=0, int y_=0)
bool getSelected(int, int)
virtual void recreate(Schematic *)
void highlightWireLabels(void)
virtual void setCenter(int, int, bool relative=false)
void setChanged(bool, bool fillStack=false, char Op='*')
void insertNodeLabel(WireLabel *)