[][src]Struct qt_widgets::q_scroller_properties::ScrollMetric

#[repr(transparent)]
pub struct ScrollMetric(_);

This enum contains the different scroll metric types. When not indicated otherwise the setScrollMetric function expects a QVariant of type qreal.

C++ enum: QScrollerProperties::ScrollMetric.

C++ documentation:

This enum contains the different scroll metric types. When not indicated otherwise the setScrollMetric function expects a QVariant of type qreal.

See the QScroller documentation for further details of the concepts behind the different values.

Methods

impl ScrollMetric[src]

pub fn to_int(&self) -> c_int[src]

impl ScrollMetric[src]

pub const MousePressEventDelay: ScrollMetric[src]

This is the time a mouse press event is delayed when starting a flick gesture in [s]. If the gesture is triggered within that time, no mouse press or release is sent to the scrolled object. If it triggers after that delay the delayed mouse press plus a faked release event at global position QPoint(-QWIDGETSIZE_MAX, -QWIDGETSIZE_MAX) is sent. If the gesture is canceled, then both the delayed mouse press plus the real release event are delivered. (C++ enum variant: MousePressEventDelay = 0)

pub const DragStartDistance: ScrollMetric[src]

This is the minimum distance the touch or mouse point needs to be moved before the flick gesture is triggered in m. (C++ enum variant: DragStartDistance = 1)

pub const DragVelocitySmoothingFactor: ScrollMetric[src]

A value that describes to which extent new drag velocities are included in the final scrolling velocity. This value should be in the range between 0 and 1. The lower the value, the more smoothing is applied to the dragging velocity. (C++ enum variant: DragVelocitySmoothingFactor = 2)

pub const AxisLockThreshold: ScrollMetric[src]

Restricts the movement to one axis if the movement is inside an angle around the axis. The threshold must be in the range 0 to 1. (C++ enum variant: AxisLockThreshold = 3)

pub const ScrollingCurve: ScrollMetric[src]

The QEasingCurve used when decelerating the scrolling velocity after an user initiated flick. Please note that this is the easing curve for the positions, not the velocity: the default is QEasingCurve::OutQuad, which results in a linear decrease in velocity (1st derivative) and a constant deceleration (2nd derivative). (C++ enum variant: ScrollingCurve = 4)

pub const DecelerationFactor: ScrollMetric[src]

This factor influences how long it takes the scroller to decelerate to 0 velocity. The actual value depends on the chosen ScrollingCurve. For most types the value should be in the range from 0.1 to 2.0 (C++ enum variant: DecelerationFactor = 5)

pub const MinimumVelocity: ScrollMetric[src]

The minimum velocity that is needed after ending the touch or releasing the mouse to start scrolling in m/s. (C++ enum variant: MinimumVelocity = 6)

pub const MaximumVelocity: ScrollMetric[src]

This is the maximum velocity that can be reached in m/s. (C++ enum variant: MaximumVelocity = 7)

pub const MaximumClickThroughVelocity: ScrollMetric[src]

This is the maximum allowed scroll speed for a click-through in m/s. This means that a click on a currently (slowly) scrolling object will not only stop the scrolling but the click event will also be delivered to the UI control. This is useful when using exponential-type scrolling curves. (C++ enum variant: MaximumClickThroughVelocity = 8)

pub const AcceleratingFlickMaximumTime: ScrollMetric[src]

This is the maximum time in seconds that a flick gesture can take to be recognized as an accelerating flick. If set to zero no such gesture is detected. An "accelerating flick" is a flick gesture executed on an already scrolling object. In such cases the scrolling speed is multiplied by AcceleratingFlickSpeedupFactor in order to accelerate it. (C++ enum variant: AcceleratingFlickMaximumTime = 9)

pub const AcceleratingFlickSpeedupFactor: ScrollMetric[src]

The current speed is multiplied by this number if an accelerating flick is detected. Should be >= 1. (C++ enum variant: AcceleratingFlickSpeedupFactor = 10)

pub const SnapPositionRatio: ScrollMetric[src]

This is the distance that the user must drag the area beween two snap points in order to snap it to the next position. 0.33 means that the scroll must only reach one third of the distance between two snap points to snap to the next one. The ratio must be between 0 and 1. (C++ enum variant: SnapPositionRatio = 11)

pub const SnapTime: ScrollMetric[src]

This is the time factor for the scrolling curve. A lower value means that the scrolling will take longer. The scrolling distance is independet of this value. (C++ enum variant: SnapTime = 12)

pub const OvershootDragResistanceFactor: ScrollMetric[src]

This value is the factor between the mouse dragging and the actual scroll area movement (during overshoot). The factor must be between 0 and 1. (C++ enum variant: OvershootDragResistanceFactor = 13)

pub const OvershootDragDistanceFactor: ScrollMetric[src]

This is the maximum distance for overshoot movements while dragging. The actual overshoot distance is calculated by multiplying this value with the viewport size of the scrolled object. The factor must be between 0 and 1. (C++ enum variant: OvershootDragDistanceFactor = 14)

pub const OvershootScrollDistanceFactor: ScrollMetric[src]

This is the maximum distance for overshoot movements while scrolling. The actual overshoot distance is calculated by multiplying this value with the viewport size of the scrolled object. The factor must be between 0 and 1. (C++ enum variant: OvershootScrollDistanceFactor = 15)

pub const OvershootScrollTime: ScrollMetric[src]

This is the time in seconds that is used to play the complete overshoot animation. (C++ enum variant: OvershootScrollTime = 16)

pub const HorizontalOvershootPolicy: ScrollMetric[src]

This is the horizontal overshooting policy (see OvershootPolicy). (C++ enum variant: HorizontalOvershootPolicy = 17)

pub const VerticalOvershootPolicy: ScrollMetric[src]

This is the horizontal overshooting policy (see OvershootPolicy). (C++ enum variant: VerticalOvershootPolicy = 18)

pub const FrameRate: ScrollMetric[src]

This is the frame rate which should be used while dragging or scrolling. QScroller uses a QAbstractAnimation timer internally to sync all scrolling operations to other animations that might be active at the same time. If the standard value of 60 frames per second is too fast, it can be lowered with this setting, while still being in-sync with QAbstractAnimation. Please note that only the values of the FrameRates enum are allowed here. (C++ enum variant: FrameRate = 19)

pub const ScrollMetricCount: ScrollMetric[src]

This is always the last entry. (C++ enum variant: ScrollMetricCount = 20)

Trait Implementations

impl Clone for ScrollMetric[src]

impl Copy for ScrollMetric[src]

impl Debug for ScrollMetric[src]

impl Eq for ScrollMetric[src]

impl From<ScrollMetric> for c_int[src]

impl From<i32> for ScrollMetric[src]

impl PartialEq<ScrollMetric> for ScrollMetric[src]

impl StructuralEq for ScrollMetric[src]

impl StructuralPartialEq for ScrollMetric[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.