@brief Forwards mouse-press events to the backing widget after offsetting for the line-number * gutter. */
| 583 | /** @brief Forwards mouse-press events to the backing widget after offsetting for the line-number |
| 584 | * gutter. */ |
| 585 | void DataModel::OutputCodeEditor::mousePressEvent(QMouseEvent* event) |
| 586 | { |
| 587 | const auto lineNumWidth = m_widget.lineNumberArea()->sizeHint().width(); |
| 588 | QMouseEvent copy(event->type(), |
| 589 | event->position() - QPointF(lineNumWidth, 0), |
| 590 | event->globalPosition(), |
| 591 | event->button(), |
| 592 | event->buttons(), |
| 593 | event->modifiers(), |
| 594 | event->pointingDevice()); |
| 595 | QCoreApplication::sendEvent(m_widget.viewport(), ©); |
| 596 | forceActiveFocus(); |
| 597 | renderWidget(); |
| 598 | } |
| 599 | |
| 600 | /** @brief Forwards mouse-move events to the backing widget after offsetting for the line-number |
| 601 | * gutter. */ |
nothing calls this directly
no test coverage detected