//! Draw the whole QwtThermo. void QwtThermo::draw(QPainter *p, const QRect& ur) { if ( !d_data->thermoRect.contains(ur) ) { if (d_data->scalePos != NoScale) { #if QT_VERSION < 0x040000 scaleDraw()->draw(p, colorGroup()); #else scaleDraw()->draw(p, palette()); #endif } qDrawShadePanel(p, d_data->thermoRect.x() - d_data->borderWidth, d_data->thermoRect.y() - d_data->borderWidth, d_data->thermoRect.width() + 2*d_data->borderWidth, d_data->thermoRect.height() + 2*d_data->borderWidth, #if QT_VERSION < 0x040000 colorGroup(), #else palette(), #endif true, d_data->borderWidth,0); } drawThermo(p); }
/*! Draw the whole QwtThermo. \param painter Painter \param rect Update rectangle */ void QwtThermo::draw( QPainter *painter, const QRect& rect ) { if ( !d_data->thermoRect.contains( rect ) ) { if ( d_data->scalePos != NoScale ) scaleDraw()->draw( painter, palette() ); qDrawShadePanel( painter, d_data->thermoRect.x() - d_data->borderWidth, d_data->thermoRect.y() - d_data->borderWidth, d_data->thermoRect.width() + 2 * d_data->borderWidth, d_data->thermoRect.height() + 2 * d_data->borderWidth, palette(), true, d_data->borderWidth, 0 ); } drawThermo( painter ); }