| 313 | } |
| 314 | |
| 315 | int Trace::pt_in_rect(int y, int right, const QPoint &point) |
| 316 | { |
| 317 | const QRectF color = get_rect("color", y, right); |
| 318 | const QRectF name = get_rect("name", y, right); |
| 319 | const QRectF label = get_rect("label", get_zero_vpos(), right); |
| 320 | |
| 321 | if (color.contains(point) && enabled()) |
| 322 | return COLOR; |
| 323 | else if (name.contains(point) && enabled()) |
| 324 | return NAME; |
| 325 | else if (label.contains(point) && enabled()) |
| 326 | return LABEL; |
| 327 | else |
| 328 | return 0; |
| 329 | } |
| 330 | |
| 331 | void Trace::compute_text_size(QPainter &p) |
| 332 | { |