| 465 | } |
| 466 | |
| 467 | bool MathTrace::measure(const QPointF &p) |
| 468 | { |
| 469 | _hover_en = false; |
| 470 | if (!enabled()) |
| 471 | return false; |
| 472 | |
| 473 | const QRectF window = get_view_rect(); |
| 474 | if (!window.contains(p)) |
| 475 | return false; |
| 476 | |
| 477 | _hover_index = _view->pixel2index(p.x()); |
| 478 | if (_hover_index >= _math_stack->get_sample_num()) |
| 479 | return false; |
| 480 | |
| 481 | bool bError; |
| 482 | _hover_point = get_point(_hover_index, _hover_voltage, bError); |
| 483 | _hover_en = true; |
| 484 | |
| 485 | return !bError; |
| 486 | } |
| 487 | |
| 488 | QPointF MathTrace::get_point(uint64_t index, float &value, bool &out_Error) |
| 489 | { |
nothing calls this directly
no test coverage detected