+void drawFlag( RouteDialog *rD, QPainter *p, int x, int y)
+{
+ /*QPolygon pg;
+
+ pg.setPoint(0,x, y-25);
+ pg.setPoint(1,x+10,y-20);
+ pg.setPoint(2,x, y-15);
+ pg.setPoint(3,x,y-20);*/
+ if (y> (rD->getTop() + 25))
+ {
+ // Upside
+ p->drawLine(x,y,x,y-15);
+ if (x <= (rD->getRight()-20))
+ {
+ // flag right
+ p->drawLine( x, y-25, x+10, y-20);
+ p->drawLine( x+10, y-20, x, y-15);
+ p->drawLine( x, y-15, x, y-25);
+ }
+ else
+ {
+ // Flag left
+ p->drawLine( x, y-25, x-10, y-20);
+ p->drawLine( x-10, y-20, x, y-15);
+ p->drawLine( x, y-15, x, y-25);
+ }
+
+ }
+ else if (y <= (rD->getTop() + 25))
+ {
+ // downside
+ p->drawLine(x,y,x,y+15);
+ if (x <= (rD->getRight()-20))
+ {
+ // flag right
+ p->drawLine( x, y+25, x+10, y+20);
+ p->drawLine( x+10, y+20, x, y+15);
+ p->drawLine( x, y+15, x, y+25);
+ }
+ else
+ {
+ // Flag left
+ p->drawLine( x, y+25, x-10, y+20);
+ p->drawLine( x-10, y+20, x, y+15);
+ p->drawLine( x, y+15, x, y+25);
+ }
+ }
+ //p->drawPolygon();
+ // p->drawPolygon( pg,Qt::OddEvenFill);
+ //p->drawPolyline( &pg);
+ //p->drawPoints( pg);
+}