13QQuickDragAxis::QQuickDragAxis(QQuickPointerHandler *handler,
const QString &propertyName, qreal initValue)
14 : QObject(handler), m_accumulatedValue(initValue), m_propertyName(propertyName)
45void QQuickDragAxis::onActiveChanged(
bool active, qreal initActiveValue)
47 m_activeValue = initActiveValue;
48 m_startValue = m_accumulatedValue;
49 qCDebug(lcDragAxis) << parent() << m_propertyName << active <<
": init active" << m_activeValue
50 <<
"target start" << m_startValue;
53void QQuickDragAxis::updateValue(qreal activeValue, qreal accumulatedValue, qreal delta)
58 m_activeValue = activeValue;
59 m_accumulatedValue = qBound(m_minimum, accumulatedValue, m_maximum);
60 qCDebug(lcDragAxis) << parent() << m_propertyName <<
"values: active" << activeValue
61 <<
"accumulated" << m_accumulatedValue <<
"delta" << delta;
62 emit activeValueChanged(delta);