The headless drag-to-value engine that DragBox and DragNumber share. More...
| Header: | #include <dragmotor> |
The functions here turn a stream of mouse-pixel deltas into a value, given a per-axis AxisConfig: its range and clamping, step snapping, sensitivity and mapping curve. They know no QObject and no widget. All live state for an axis is in an AxisState that the caller owns and passes in, so every function is reentrant and changes nothing but that state. This is what lets the tests drive the engine with no display.
A widget calls beginStroke() when a drag starts, computeNewValue() for each mouse delta, and endStroke() when the drag ends.
See also DragNumber.