Update GeoPainter::drawRoundRect() to GeoPainter::drawRoundedRect()

QPainter::drawRoundRect() was deprecated for Qt 4.8,
no longer official part of Qt5 API (though still in code)
parent 80701e53
......@@ -46,7 +46,7 @@ public:
QRegion regionFromPolygon (const Marble::GeoDataLinearRing& linearRing, Qt::FillRule fillRule, qreal strokeWidth = 3) const;
QRegion regionFromRect (const Marble::GeoDataCoordinates& centerPosition, qreal width, qreal height, bool isGeoProjected = 0, qreal strokeWidth = 3) const;
GeoPainter (QPaintDevice* paintDevice, const Marble::ViewportParams* viewportParams, Marble::MapQuality mapQuality = NormalQuality);
void drawRoundRect (const Marble::GeoDataCoordinates& centerPosition, int width, int height, int xRnd = 25, int yRnd = 25);
void drawRoundedRect(const Marble::GeoDataCoordinates& centerPosition, int width, int height, int xRnd = 25, int yRnd = 25);
};
// GeoPainter
......
......@@ -899,7 +899,7 @@ QRegion GeoPainter::regionFromRect ( const GeoDataCoordinates & centerCoordinate
}
void GeoPainter::drawRoundRect ( const GeoDataCoordinates &centerPosition,
void GeoPainter::drawRoundedRect(const GeoDataCoordinates &centerPosition,
int width, int height,
int xRnd, int yRnd )
{
......@@ -913,7 +913,7 @@ void GeoPainter::drawRoundRect ( const GeoDataCoordinates &centerPosition,
if ( visible ) {
// Draw all the x-repeat-instances of the point on the screen
for( int it = 0; it < pointRepeatNum; ++it ) {
QPainter::drawRoundRect( d->m_x[it] - ( width / 2 ), y - ( height / 2 ), width, height, xRnd, yRnd );
QPainter::drawRoundedRect(d->m_x[it] - ( width / 2 ), y - ( height / 2 ), width, height, xRnd, yRnd);
}
}
}
......@@ -128,7 +128,7 @@ class MARBLE_EXPORT GeoPainter : public ClipPainter
chosen for the painter is used to paint the background of the bubble
The optional parameters which describe the layout of the bubble are
similar to those used by QPainter::drawRoundRect().
similar to those used by QPainter::drawRoundedRect().
Unlike in QPainter the rounded corners are not specified in percentage
but in pixels to provide for optimal aesthetics.
By choosing a positive or negative bubbleOffset it's possible to
......@@ -441,7 +441,7 @@ class MARBLE_EXPORT GeoPainter : public ClipPainter
\see GeoDataCoordinates
*/
void drawRoundRect ( const GeoDataCoordinates & centerPosition,
void drawRoundedRect(const GeoDataCoordinates &centerPosition,
int width, int height,
int xRnd = 25, int yRnd = 25 );
......
......@@ -150,7 +150,7 @@ bool TestPlugin::render( GeoPainter *painter, ViewportParams *viewport, const QS
brush.setStyle( Qt::DiagCrossPattern );
painter->setBrush( brush );
painter->drawRoundRect( moscow, 40, 40 );
painter->drawRoundedRect(moscow, 40, 40);
// Example: draw earth orbit
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment