//////////////////////////////////////////////////////////////////////////////////////////////////
/*!
Draw the contents inside the scale
Paints nothing.
\param painter Painter
\param center Center of the contents circle
\param radius Radius of the contents circle
*///////////////////////////////////////////////////////////////////////////////////////////////////
void myQwtDial
::drawScaleContents( QPainter *painter,
const QPointF ¢er,
double radius
) const {
qDebug() << "X: " << center.x() << "Y : " << center.y();
qDebug() << "RADIUS" << radius;
QRectF rectangle
(center.
x()-radius, center.
y()-radius, radius
*2, radius
*2);
painter
->setBrush
(QBrush(Qt
::darkGreen));
painter->drawPie(rectangle, (0 * 16), (180 * 16) );
painter
->setBrush
(QBrush(Qt
::blue));
painter->drawPie(rectangle, (180 * 16), (90 * 16) );
painter
->setBrush
(QBrush(Qt
::red));
painter->drawPie(rectangle, (270 * 16), (90 * 16) );
}
//////////////////////////////////////////////////////////////////////////////////////////////////
/*!
Draw the contents inside the scale
Paints nothing.
\param painter Painter
\param center Center of the contents circle
\param radius Radius of the contents circle
*///////////////////////////////////////////////////////////////////////////////////////////////////
void myQwtDial::drawScaleContents( QPainter *painter, const QPointF ¢er, double radius ) const {
qDebug() << "X: " << center.x() << "Y : " << center.y();
qDebug() << "RADIUS" << radius;
QRectF rectangle(center.x()-radius, center.y()-radius, radius*2, radius*2);
painter->setBrush(QBrush(Qt::darkGreen));
painter->drawPie(rectangle, (0 * 16), (180 * 16) );
painter->setBrush(QBrush(Qt::blue));
painter->drawPie(rectangle, (180 * 16), (90 * 16) );
painter->setBrush(QBrush(Qt::red));
painter->drawPie(rectangle, (270 * 16), (90 * 16) );
}
To copy to clipboard, switch view to plain text mode
Bookmarks