0
0
mirror of https://github.com/fralx/LimeReport.git synced 2025-10-01 11:31:10 +03:00

Qt4 build fixed

This commit is contained in:
Arin Alexander
2017-10-26 13:24:06 +04:00
parent 7ba2b1d5b3
commit 40bafebbbd
15 changed files with 95 additions and 16 deletions

View File

@@ -461,7 +461,12 @@ void PieChart::drawPercent(QPainter *painter, QRectF chartRect, qreal startAngle
QPointF center(chartRect.left()+chartRect.width()/2,chartRect.top()+chartRect.height()/2);
qreal percent = angle/3.6;
#ifdef HAVE_QT4
qreal radAngle = (angle/2+startAngle)*(M_PI/180);
#endif
#ifdef HAVE_QT5
qreal radAngle = qDegreesToRadians(angle/2+startAngle);
#endif
qreal radius = painter->fontMetrics().width("99,9%");
qreal border = chartRect.height()*0.02;
qreal length = (chartRect.height())/2-(radius/2+border);