Qt 4.8
Public Functions | Public Variables | List of all members
QDeclarativeFlickablePrivate::AxisData Struct Reference

#include <qdeclarativeflickable_p_p.h>

Public Functions

void addVelocitySample (qreal v, qreal maxVelocity)
 
 AxisData (QDeclarativeFlickablePrivate *fp, void(QDeclarativeFlickablePrivate::*func)(qreal))
 
void reset ()
 
void updateVelocity ()
 

Public Variables

bool atBeginning: 1
 
bool atEnd: 1
 
qreal dragMaxBound
 
qreal dragMinBound
 
qreal dragStartOffset
 
bool fixingUp: 1
 
bool flicking: 1
 
qreal flickTarget
 
bool inOvershoot: 1
 
QDeclarativeTimeLineValueProxy< QDeclarativeFlickablePrivatemove
 
bool moving: 1
 
qreal pressPos
 
QDeclarativeFlickablePrivate::Velocity smoothVelocity
 
qreal velocity
 
QPODVector< qreal, 10 > velocityBuffer
 
qreal viewSize
 

Detailed Description

Definition at line 99 of file qdeclarativeflickable_p_p.h.

Constructors and Destructors

◆ AxisData()

QDeclarativeFlickablePrivate::AxisData::AxisData ( QDeclarativeFlickablePrivate fp,
void(QDeclarativeFlickablePrivate::*)(qreal func 
)
inline

Functions

◆ addVelocitySample()

void QDeclarativeFlickablePrivate::AxisData::addVelocitySample ( qreal  v,
qreal  maxVelocity 
)

Definition at line 220 of file qdeclarativeflickable.cpp.

221 {
222  if (v > maxVelocity)
223  v = maxVelocity;
224  else if (v < -maxVelocity)
225  v = -maxVelocity;
229 }
#define QML_FLICK_SAMPLEBUFFER
void append(const T &v)
Definition: qpodvector_p.h:85
int count() const
Definition: qpodvector_p.h:148
void remove(int idx, int count=1)
Definition: qpodvector_p.h:118

◆ reset()

void QDeclarativeFlickablePrivate::AxisData::reset ( )
inline

◆ updateVelocity()

void QDeclarativeFlickablePrivate::AxisData::updateVelocity ( )

Definition at line 231 of file qdeclarativeflickable.cpp.

232 {
233  velocity = 0;
236  for (int i = 0; i < count; ++i) {
237  qreal v = velocityBuffer.at(i);
238  velocity += v;
239  }
240  velocity /= count;
241  }
242 }
const T & at(int idx) const
Definition: qpodvector_p.h:69
double qreal
Definition: qglobal.h:1193
#define QML_FLICK_DISCARDSAMPLES
int count() const
Definition: qpodvector_p.h:148

Properties

◆ atBeginning

bool QDeclarativeFlickablePrivate::AxisData::atBeginning

◆ atEnd

bool QDeclarativeFlickablePrivate::AxisData::atEnd

◆ dragMaxBound

qreal QDeclarativeFlickablePrivate::AxisData::dragMaxBound

Definition at line 120 of file qdeclarativeflickable_p_p.h.

◆ dragMinBound

qreal QDeclarativeFlickablePrivate::AxisData::dragMinBound

Definition at line 119 of file qdeclarativeflickable_p_p.h.

◆ dragStartOffset

qreal QDeclarativeFlickablePrivate::AxisData::dragStartOffset

◆ fixingUp

bool QDeclarativeFlickablePrivate::AxisData::fixingUp

◆ flicking

bool QDeclarativeFlickablePrivate::AxisData::flicking

Definition at line 130 of file qdeclarativeflickable_p_p.h.

Referenced by QDeclarativeFlickablePrivate::flick().

◆ flickTarget

qreal QDeclarativeFlickablePrivate::AxisData::flickTarget

◆ inOvershoot

bool QDeclarativeFlickablePrivate::AxisData::inOvershoot

◆ move

QDeclarativeTimeLineValueProxy<QDeclarativeFlickablePrivate> QDeclarativeFlickablePrivate::AxisData::move

◆ moving

bool QDeclarativeFlickablePrivate::AxisData::moving

Definition at line 129 of file qdeclarativeflickable_p_p.h.

◆ pressPos

qreal QDeclarativeFlickablePrivate::AxisData::pressPos

◆ smoothVelocity

QDeclarativeFlickablePrivate::Velocity QDeclarativeFlickablePrivate::AxisData::smoothVelocity

Definition at line 123 of file qdeclarativeflickable_p_p.h.

◆ velocity

qreal QDeclarativeFlickablePrivate::AxisData::velocity

◆ velocityBuffer

QPODVector<qreal,10> QDeclarativeFlickablePrivate::AxisData::velocityBuffer

Definition at line 124 of file qdeclarativeflickable_p_p.h.

◆ viewSize

qreal QDeclarativeFlickablePrivate::AxisData::viewSize

Definition at line 116 of file qdeclarativeflickable_p_p.h.


The documentation for this struct was generated from the following files: