23 Turtle(QWidget* pwgt = 0) : QWidget(pwgt)
27 setFixedSize(m_pix.size());
34 m_pix.fill(Qt::yellow);
35 m_painter.translate(rect().center());
36 m_painter.rotate(-90);
41 QPainter painter(
this);
42 painter.drawPixmap(rect(), m_pix);
48 m_painter.drawLine(0, 0, n, 0);
49 m_painter.translate(n, 0);
55 m_painter.drawLine(0, 0, -n, 0);
56 m_painter.translate(-n, 0);
62 m_painter.rotate(-nAngle);
67 m_painter.rotate(nAngle);
72 m_painter.resetTransform();
virtual void paintEvent(QPaintEvent *)