MCPcopy Create free account
hub / github.com/CieNTi/serial_port_plotter / onMouseMoveInPlot

Method onMouseMoveInPlot

mainwindow.cpp:561–568  ·  view source on GitHub ↗

* @brief Prints coordinates of mouse pointer in status bar on mouse release * @param event */

Source from the content-addressed store, hash-verified

559 * @param event
560 */
561void MainWindow::onMouseMoveInPlot(QMouseEvent *event)
562{
563 int xx = int(ui->plot->xAxis->pixelToCoord(event->x()));
564 int yy = int(ui->plot->yAxis->pixelToCoord(event->y()));
565 QString coordinates("X: %1 Y: %2");
566 coordinates = coordinates.arg(xx).arg(yy);
567 ui->statusBar->showMessage(coordinates);
568}
569/** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
570
571/**

Callers

nothing calls this directly

Calls 1

pixelToCoordMethod · 0.80

Tested by

no test coverage detected