m_Image = new QImage(m_iWidth, m_iHeight, QImage::Format_RGB32); m_Painter = new QPainter(m_Image);
void MapWindow::drawMap(QPainter &p){ p.drawImage(QPoint(0, 0), *m_Image);}
m_Painter->setPen(QPen(Qt::lightGray,1,Qt::SolidLine)); m_Painter->setBrush(Qt::blue); m_Painter->drawEllipse(QPoint(m_cX, m_cY), m_r, m_r);
void MapWindow::drawMap(QPainter &p){ m_Painter->setPen(QPen(Qt::lightGray,1,Qt::SolidLine)); m_Painter->setBrush(Qt::blue); m_Painter->drawEllipse(QPoint(m_cX, m_cY), m_r, m_r); p.drawImage(QPoint(0, 0), *m_Image);}
void MapWindow::drawMap(QPainter &p)
void MapPaintWidget::paintEvent(QPaintEvent *){ QPainter p(this); CalcWindow(this->parentWidget()).mapWindow->drawMap(p);}
void MapWindow::drawMap(QPainter &p){ QPainter p2(m_Image); p2.setPen(QPen(Qt::lightGray,1,Qt::SolidLine)); p2.setBrush(Qt::blue); p2.drawEllipse(QPoint(m_cX, m_cY), m_r, m_r); p.drawImage(QPoint(0, 0), *m_Image);}
void MapWindow::createMap(){ QPainter p2(m_Image); p2.setPen(QPen(Qt::lightGray,1,Qt::SolidLine)); p2.setBrush(Qt::blue); p2.drawEllipse(QPoint(m_cX, m_cY), m_r, m_r);}void MapWindow::drawMap(QPainter &p){ p.drawImage(QPoint(0, 0), *m_Image);}
void MapPaintWidget::paintEvent(QPaintEvent *){ QPainter p(this); CalcWindow(this->parentWidget()).mapWindow->createMap(); CalcWindow(this->parentWidget()).mapWindow->drawMap(p);}