| 59 | } |
| 60 | |
| 61 | void |
| 62 | ShapesWidget::paintEvent(QPaintEvent*) { |
| 63 | QPainter painter(this); |
| 64 | painter.setRenderHint(QPainter::Antialiasing, true); |
| 65 | painter.drawPixmap(0, height() - logo_.height(), logo_); |
| 66 | if (showCurrentFilter_) { |
| 67 | QBrush brush(QColor(0x99,0x99,0x99,0x99), Qt::SolidPattern); |
| 68 | painter.setBrush(brush); |
| 69 | painter.drawRect(currentFilter_); |
| 70 | } |
| 71 | ShapeList::iterator index = shapeList_.begin(); |
| 72 | while (index != shapeList_.end()) { |
| 73 | (*index)->paint(painter); |
| 74 | ++index; |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | void |
| 79 | ShapesWidget::addFilter(const QRect& filter) { |