equal
deleted
inserted
replaced
13 QLabel::paintEvent(event); |
13 QLabel::paintEvent(event); |
14 QPainter p(this); |
14 QPainter p(this); |
15 |
15 |
16 p.fillRect(QRect(0, 0, 1024, 512), QBrush(Qt::black)); |
16 p.fillRect(QRect(0, 0, 1024, 512), QBrush(Qt::black)); |
17 |
17 |
18 p.setPen(QPen(Qt::white)); |
|
19 p.drawRects(rects.toVector()); |
|
20 |
|
21 if (rects.size()) |
18 if (rects.size()) |
22 { |
19 { |
|
20 p.setPen(QPen(Qt::lightGray)); |
|
21 QVector<QPoint> centers; |
|
22 for(QList<QRect>::const_iterator it = rects.begin(); it != rects.end(); ++it) |
|
23 centers.push_back((*it).center()); |
|
24 p.drawPolyline(QPolygon(centers)); |
|
25 |
|
26 p.setPen(QPen(Qt::white)); |
|
27 p.drawRects(rects.toVector()); |
|
28 |
23 p.setPen(QPen(Qt::yellow)); |
29 p.setPen(QPen(Qt::yellow)); |
24 p.drawRect(rects.last()); |
30 p.drawRect(rects.last()); |
25 } |
31 } |
26 } |
32 } |
27 |
33 |