void MyLabel::drawRam( QPainter *pp, QColor cc, QColor ccc ){ pp->save(); pp->setPen( QPen( ccc, 6) ); pp->setBrush( NoBrush ); pp->drawRect( rx, ry, 210, 70 ); pp->drawRect(rx, ry, 120, 35); pp->drawRect(rx + 120, ry, 90, 35); pp->drawRect(rx, ry + 35, 120, 35); pp->drawRect(rx + 120, ry + 35, 90, 35); pp->drawRect(rx, ry + 70, 210, 35); pp->drawLine(rx + 160, ry + 70, 160, 106); pp->setPen( QPen( cc, 2, Qt::SolidLine) ); pp->drawRect( rx, ry, 210, 70 );//ПУОПЧОБС ТБНЛБ pp->drawRect(rx, ry, 120, 35); pp->drawRect(rx + 120, ry, 90, 35); pp->drawRect(rx, ry + 35, 120, 35); pp->drawRect(rx + 120, ry + 35, 90, 35); pp->drawRect(rx, ry + 70, 210, 35); pp->drawLine(rx + 160, ry + 70, 160, 106); /* Собственно тут рисование нужного круга*/ pp->setPen( QPen( Qt::blue, 2, Qt::SolidLine )); pp->setBrush( Qt::red, Qt::SolidPattern ) ); pp->drawEllipse( 175, 75, 25 ,25); drawColoredText( (char*)"Tahoma", 16, rx + 5, ry + 20, QString(tr("дП лф N")), pp, cc, ccc); drawColoredText( (char*)"Tahoma", 16, rx + 5, ry + 50, QString(tr("дП РХОЛФБ")), pp, cc, ccc); drawColoredText( (char*)"Tahoma", 16, rx + 5, ry + 65, QString(tr("ОБЪОБЮЕОЙС")), pp, cc, ccc); drawColoredText( (char*)"Tahoma", 15, rx + 5, ry + 86, QString(tr("рТЙЪОБЛ")), pp, cc, ccc); drawColoredText( (char*)"Tahoma", 15, rx + 5, ry + 100, QString(tr("ОБИПЦДЕОЙС Ч ър")), pp, cc, ccc); drawColoredText( (char*)"Tahoma", 16, rx + 130, ry + 25, ktKm_d, pp, cc, ccc); drawColoredText( (char*)"Tahoma", 16, rx + 135, ry + 60, pnKm_d, pp, cc, ccc); pp->restore();}
void QPainter::drawEllipse ( int x, int y, int w, int h )
pp->drawEllipse( 175, 75, 175 + 25 , 75 + 25);