libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::MoveAccumulator Class Reference

#include <libosmscout-client-qt/include/osmscoutclientqt/InputHandler.h>

Inheritance diagram for osmscout::MoveAccumulator:
Collaboration diagram for osmscout::MoveAccumulator:

Public Member Functions

 MoveAccumulator (int memory=100, double factor=4, double vectorLengthTreshold=5)
 ~MoveAccumulator () override=default
MoveAccumulatoroperator+= (const QPointF p)
QVector2D collect ()

Detailed Description

Helper class that accumulates move (touch events) within some time period (time defined FIFO queue). It helps to MoveHandler determine of move vector when drag gesture ends. It is used for animate move momentum.

Constructor & Destructor Documentation

◆ MoveAccumulator()

osmscout::MoveAccumulator::MoveAccumulator ( int memory = 100,
double factor = 4,
double vectorLengthTreshold = 5 )
inline
Parameters
memory- in milliseconds for finger position points
factor- momentum movement length (vector returned from collect method) will be equal to recorded length * factor
vectorLengthTreshold- movement (between two points) have to be longer than treshold (in pixels) for change move vector

◆ ~MoveAccumulator()

osmscout::MoveAccumulator::~MoveAccumulator ( )
overridedefault

Member Function Documentation

◆ collect()

QVector2D osmscout::MoveAccumulator::collect ( )

◆ operator+=()

MoveAccumulator & osmscout::MoveAccumulator::operator+= ( const QPointF p)

The documentation for this class was generated from the following file: