Hi
i have been trying to show the progress as a pie through drawPie function in Painter,so the pie is shown in 4 stages on first button click it is required to be drawn upto 90 degress ,on second button click it is required to draw upto 180 degress and in the same way when fourth button is clicked it should show a whole circle..
Now what i have achive is the same thing through drawPie but my code is realy messy and the value of cordinates doesnt makes sense,so i have to copy paste my code couple of time
Qt Code:
  1. painter.drawPie( (MID_POINT_OUTER_X -40 ), (MID_POINT_OUTER_Y-70) ,
  2. ( OUTER_ELLIPSE_WIDTH - (6*INNER_ELLIPSE_WIDTH) ) ,
  3. ( OUTER_ELLIPSE_HEIGHT - (4.5*INNER_ELLIPSE_HEIGHT ) ) ,
  4. 90*16 , -90*16 );
  5. painter.drawPie((MID_POINT_OUTER_X -40 ), (MID_POINT_OUTER_Y-68) ,
  6. ( OUTER_ELLIPSE_WIDTH - (6*INNER_ELLIPSE_WIDTH) ) ,
  7. ( OUTER_ELLIPSE_HEIGHT - (4*INNER_ELLIPSE_HEIGHT ) ) ,
  8. 0*16 , -90*16 );
  9. ..
  10. painter.drawPie( (MID_POINT_OUTER_X -69 ), (MID_POINT_OUTER_Y-70) ,
  11. ( OUTER_ELLIPSE_WIDTH - (6*INNER_ELLIPSE_WIDTH) ) ,
  12. ( OUTER_ELLIPSE_HEIGHT - (4.5*INNER_ELLIPSE_HEIGHT ) ) ,
  13. -180*16 , -90*16 );
To copy to clipboard, switch view to plain text mode 
what i require here is that some how i can build a single function and just pass painter pointer and the starting and ending angle as paramters to that fuction but the first four parameters of drawPie in my case dont follow any sensible pattern or sequence so i have to pass seven parameters and do some mess in function,which doesnt make any sense...any idea on this..