rem: switch (mode)
context: static QPixmap pixmap (const kpToolRectangle::Mode mode,                       kpDocument *document, const QRect &rect,                       const QPoint &startPoint, const QPoint &endPoint,                       const QPen &pen, const QBrush &brush){    QPixmap pixmap = document->getPixmapAt (rect);    QPainter painter (&pixmap);    painter.setPen (pen);    painter.setBrush (brush);    switch (mode)    {    case kpToolRectangle::Rectangle:        painter.drawRect (QRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ()));        break;    case kpToolRectangle::RoundedRectangle:        painter.drawRoundRect (QRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ()));        break;    case kpToolRectangle::Ellipse:        painter.drawEllipse (QRect (startPoint - rect.topLeft (), endPoint - rect.topLeft ()));        break;    default:        kdError () << "kptoolrectangle.cpp::pixmap() passed unknown mode: " << int (mode) << endl;        break;    }    return pixmap;}