Skip to content

Class QAccelPlot::Internal::PointerTracker

ClassList > QAccelPlot > Internal > PointerTracker

Tracks the pointer over a plot from the plot's mouse and hover events. More...

  • #include <PointerTracker.hpp>

Inherits the following classes: QObject

Inheritance diagram

flowchart TB
  classQAccelPlot_1_1Internal_1_1PointerTracker["QAccelPlot::Internal::PointerTracker"]

  external_base_classQAccelPlot_1_1Internal_1_1PointerTracker_1["QObject"]
  external_base_classQAccelPlot_1_1Internal_1_1PointerTracker_1 --> classQAccelPlot_1_1Internal_1_1PointerTracker

Public Signals

Type Name
signal void changed
Emitted when the pointer moves, appears, or leaves.

Public Functions

Type Name
PointerTracker (QObject * parent=nullptr)
Constructs a tracker owned by parent .
void hoverEnter (const QHoverEvent & event)
Places the pointer where the hover enters, unless a touch is in progress.
void hoverLeave ()
Removes the pointer when the mouse leaves; a touch pointer stays.
void hoverMove (const QHoverEvent & event)
Places the pointer at a hover move, which always comes from the mouse.
void mouseMove (const QMouseEvent & event)
Places the pointer at a move, except the button-less move Qt Quick sends after a touch release.
std::optional< QPointF > position () const
Returns the pointer position in plot-local logical pixels, or nothing while no pointer is over the plot.
void press (const QMouseEvent & event)
Places the pointer at a mouse or touch press.
void release ()
Ends a press, on release or when the plot loses its grab.

Detailed Description

A touch places the pointer where the finger is and leaves it there after the release, until the next tap or mouse movement.

Public Signals Documentation

signal changed

Emitted when the pointer moves, appears, or leaves.

void QAccelPlot::Internal::PointerTracker::changed;


Public Functions Documentation

function PointerTracker

Constructs a tracker owned by parent .

explicit QAccelPlot::Internal::PointerTracker::PointerTracker (
    QObject * parent=nullptr
) 


function hoverEnter

Places the pointer where the hover enters, unless a touch is in progress.

void QAccelPlot::Internal::PointerTracker::hoverEnter (
    const QHoverEvent & event
) 


function hoverLeave

Removes the pointer when the mouse leaves; a touch pointer stays.

void QAccelPlot::Internal::PointerTracker::hoverLeave () 


function hoverMove

Places the pointer at a hover move, which always comes from the mouse.

void QAccelPlot::Internal::PointerTracker::hoverMove (
    const QHoverEvent & event
) 


function mouseMove

Places the pointer at a move, except the button-less move Qt Quick sends after a touch release.

void QAccelPlot::Internal::PointerTracker::mouseMove (
    const QMouseEvent & event
) 


function position

Returns the pointer position in plot-local logical pixels, or nothing while no pointer is over the plot.

std::optional< QPointF > QAccelPlot::Internal::PointerTracker::position () const


function press

Places the pointer at a mouse or touch press.

void QAccelPlot::Internal::PointerTracker::press (
    const QMouseEvent & event
) 


function release

Ends a press, on release or when the plot loses its grab.

void QAccelPlot::Internal::PointerTracker::release () 



The documentation for this class was generated from the following file QAccelPlot/src/QAccelPlot/internal/PointerTracker.hpp