void ScreenPainter::setupState(bool rect) { if (selected() && rect) { // we are drawing a selection rect QColor color = qApp->palette().color(QPalette::Active, QPalette::Highlight); m_painter->setBrush(color); m_painter->setPen(color, strokeWidth(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); } else if (selected()) { // we are drawing selected text QColor color = qApp->palette().color(QPalette::Active, QPalette::HighlightedText); m_painter->setBrush(color); m_painter->setPen(color, strokeWidth(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); } else { QColor tmp; if (m_fillColor != fillColor()) { m_item->SetQColor(&tmp, fillColor().color, fillColor().shade); m_fillQColor = tmp; m_fillColor = fillColor(); } if (m_strokeColor != strokeColor()) { m_item->SetQColor(&tmp, strokeColor().color, strokeColor().shade); m_fillStrokeQColor = tmp; m_strokeColor = strokeColor(); } m_painter->setBrush(m_fillQColor); m_painter->setPen(m_fillStrokeQColor, strokeWidth(), Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); } m_painter->translate(x(), y()); if (scaleH() != 1.0 || scaleV() != 1.0) m_painter->scale(scaleH(), scaleV()); if (matrix() != QTransform()) { m_painter->setWorldMatrix(matrix() * m_painter->worldMatrix()); } }
void main(){ int checkHigh, checkLow; char chump[33]; initAll(); while(1){ if(ATD0STAT0); (void)sprintf(chump,"%4d mV \n L%d H%d", scaleV((uint)ATD0DR2),checkLow,checkHigh); LCDshark(chump); if(checkHigh < ATD0DR2) checkHigh = ATD0DR2 ; if(checkLow > ATD0DR2) checkLow = ATD0DR2; } }