23 const QString& nameStr_)
34 QSize r = metrics.size(0,
nameStr);
36 y1 = -((r.height() + 8) >> 1);
48 p->
Painter->setPen(QPen(QPen::red,1));
55 y1 = -((r.height() +
Unit) >> 1);
59 QWMatrix wm = p->
Painter->worldMatrix();
60 QWMatrix Mat(1.0, 0.0, 0.0, 1.0, p->
DX +
float(
cx) * p->
Scale,
62 p->
Painter->setWorldMatrix(Mat);
65 tx = x1 + (Unit >> 1);
66 ty =
y1 + (Unit >> 1);
80 tmp =
x1; x1 =
y1;
y1 = tmp;
91 p->
Painter->setWorldXForm(
false);
92 x1 = int(
float(x1) / p->
Scale);
97 p->
Painter->setPen(Qt::lightGray);
101 p->
Painter->setPen(QPen(QPen::darkGray,3));
109 p->drawEllipse(
cx-4,
cy-4, 8, 8);
124 if(relative) {
cx +=
x;
cy += y; }
125 else {
cx =
x;
cy = y; }
134 n = s.section(
' ',1,1);
136 if(!ok)
return false;
138 n = s.section(
' ',2,2);
140 if(!ok)
return false;
145 n = s.section(
' ',4,4);
146 if(n.isEmpty())
return true;
147 Angel = n.toInt(&ok);
148 if(!ok)
return false;
156 QString
s =
Name+QString::number(
cx)+
" "+QString::number(
cy)+
" ";
165 QString (
"new Port (%1, %2)").
167 s =
"Ports.append (" + s +
"); /* " +
nameStr +
" */";
175 if(
int(fX) <
cx+
x1)
return false;
176 if(
int(fY) <
cy+
y1)
return false;
177 if(
int(fX) >
cx+
x1+
x2)
return false;
178 if(
int(fY) >
cy+
y1+
y2)
return false;