28 int _x1,
int _y1,
int _Type)
81 if(relative) {
x1 += x_;
cx += x_; }
82 else {
x1 = x_;
cx = x_; }
85 if(relative) {
y1 += y_;
cy += y_; }
86 else {
y1 = y_;
cy = y_; }
92 else {
x1 = x_;
y1 = y_; }
111 QFont font = p->
Painter->font();
117 p->
Painter->setPen(QPen(Qt::darkBlue,3));
118 font.setWeight (QFont::DemiBold);
122 font.setWeight (QFont::Normal);
123 p->
Painter->setPen(QPen(Qt::black,1));
128 int xpaint=0, ypaint=4, phi=0;
130 case isVWireLabel: ypaint=0; xpaint=4; phi=16*140;
break;
137 int a = int(
double(
x2) / p->
Scale) >> 1;
138 int b = int(
double(
y2) / p->
Scale) >> 1;
141 if(phi == 16*50) phi += 16*180;
145 p->
map(
cx+xpaint,
cy+ypaint, xpaint, ypaint);
148 if(phi != 0) phi += 16*180;
153 p->
map(
cx+xpaint,
cy-ypaint, xpaint, ypaint);
162 p->
map(
cx-xpaint,
cy+ypaint, xpaint, ypaint);
165 if(phi > 16*90) phi += 16*180;
171 p->
map(
cx-xpaint,
cy-ypaint, xpaint, ypaint);
176 p->
Painter->setPen(QPen(Qt::darkMagenta,0));
178 p->
Painter->setPen(QPen(Qt::red,0));
181 p->
Painter->drawLine(a, b, c, b);
182 p->
Painter->drawLine(a, b, a, d);
183 p->
Painter->drawLine(xpaint, ypaint, a, b);
190 p->
Painter->setPen(QPen(Qt::darkGray,3));
203 QSize r = metrics.size(0,
Name);
217 s += QString::number(
cx)+
" "+QString::number(
cy)+
" "
218 + QString::number(
cx)+
" "+QString::number(
cy)
220 + QString::number(
x1)+
" "+QString::number(
y1)+
" 0 \""
bool getSelected(int, int)
void map(int, int, int &, int &)
void setName(const QString &Name_)
Definitions and declarations for the main application.
void paint(ViewPainter *)
void paintScheme(QPainter *p)
int drawText(const QString &, int, int, int *Height=0)
void drawRoundRect(int, int, int, int)
void setCenter(int x, int y, bool relative=false)
void drawArc(int, int, int, int, int, int)
WireLabel(const QString &_Name=0, int _cx=0, int _cy=0, int _x1=0, int _y1=0, int _Type=isNodeLabel)