91 if(
x1-5 <= x_)
if(
x2+5 >= x_)
if(
y1-5 <= y_)
if(
y2+5 >= y_)
111 p->
Painter->setPen(QPen(QPen::darkGray,6));
113 p->
Painter->setPen(QPen(QPen::lightGray,2));
117 p->
Painter->setPen(QPen(QPen::darkBlue,2));
129 void Wire::setName(
const QString& Name_,
const QString& Value_,
int delta_,
int x_,
int y_)
131 if(Name_.isEmpty() && Value_.isEmpty()) {
153 QString
s =
"<"+QString::number(
x1)+
" "+QString::number(
y1);
154 s +=
" "+QString::number(
x2)+
" "+QString::number(
y2);
157 s += QString::number(
Label->
x1)+
" "+QString::number(
Label->
y1)+
" ";
161 else { s +=
" \"\" 0 0 0 \"\">"; }
172 if(s.at(0) !=
'<')
return false;
173 if(s.at(s.length()-1) !=
'>')
return false;
174 s = s.mid(1, s.length()-2);
177 n = s.section(
' ',0,0);
179 if(!ok)
return false;
181 n = s.section(
' ',1,1);
183 if(!ok)
return false;
185 n = s.section(
' ',2,2);
187 if(!ok)
return false;
189 n = s.section(
' ',3,3);
191 if(!ok)
return false;
193 n = s.section(
'"',1,1);
195 int nx = s.section(
' ',5,5).toInt(&ok);
196 if(!ok)
return false;
198 int ny = s.section(
' ',6,6).toInt(&ok);
199 if(!ok)
return false;
201 int delta = s.section(
' ',7,7).toInt(&ok);
202 if(!ok)
return false;
204 setName(n, s.section(
'"',3,3), delta, nx, ny);