Struct Type

Source
pub struct Type(/* private fields */);
Expand description

The type of easing curve.

C++ enum: QEasingCurve::Type.

C++ documentation:

The type of easing curve.

See also addCubicBezierSegment() and addTCBSegment().

Implementations§

Source§

impl Type

Source

pub fn to_int(&self) -> c_int

Source§

impl Type

Source

pub const Linear: Type

Easing curve for a linear (t) function: velocity is constant.

(C++ enum variant: ```Linear = 0```)
Source

pub const InQuad: Type

Easing curve for a quadratic (t^2) function: accelerating from zero velocity.

(C++ enum variant: ```InQuad = 1```)
Source

pub const OutQuad: Type

Easing curve for a quadratic (t^2) function: decelerating to zero velocity.

(C++ enum variant: ```OutQuad = 2```)
Source

pub const InOutQuad: Type

Easing curve for a quadratic (t^2) function: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutQuad = 3```)
Source

pub const OutInQuad: Type

Easing curve for a quadratic (t^2) function: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInQuad = 4```)
Source

pub const InCubic: Type

Easing curve for a cubic (t^3) function: accelerating from zero velocity.

(C++ enum variant: ```InCubic = 5```)
Source

pub const OutCubic: Type

Easing curve for a cubic (t^3) function: decelerating to zero velocity.

(C++ enum variant: ```OutCubic = 6```)
Source

pub const InOutCubic: Type

Easing curve for a cubic (t^3) function: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutCubic = 7```)
Source

pub const OutInCubic: Type

Easing curve for a cubic (t^3) function: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInCubic = 8```)
Source

pub const InQuart: Type

Easing curve for a quartic (t^4) function: accelerating from zero velocity.

(C++ enum variant: ```InQuart = 9```)
Source

pub const OutQuart: Type

Easing curve for a quartic (t^4) function: decelerating to zero velocity.

(C++ enum variant: ```OutQuart = 10```)
Source

pub const InOutQuart: Type

Easing curve for a quartic (t^4) function: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutQuart = 11```)
Source

pub const OutInQuart: Type

Easing curve for a quartic (t^4) function: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInQuart = 12```)
Source

pub const InQuint: Type

Easing curve for a quintic (t^5) easing in: accelerating from zero velocity.

(C++ enum variant: ```InQuint = 13```)
Source

pub const OutQuint: Type

Easing curve for a quintic (t^5) function: decelerating to zero velocity.

(C++ enum variant: ```OutQuint = 14```)
Source

pub const InOutQuint: Type

Easing curve for a quintic (t^5) function: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutQuint = 15```)
Source

pub const OutInQuint: Type

Easing curve for a quintic (t^5) function: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInQuint = 16```)
Source

pub const InSine: Type

Easing curve for a sinusoidal (sin(t)) function: accelerating from zero velocity.

(C++ enum variant: ```InSine = 17```)
Source

pub const OutSine: Type

Easing curve for a sinusoidal (sin(t)) function: decelerating to zero velocity.

(C++ enum variant: ```OutSine = 18```)
Source

pub const InOutSine: Type

Easing curve for a sinusoidal (sin(t)) function: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutSine = 19```)
Source

pub const OutInSine: Type

Easing curve for a sinusoidal (sin(t)) function: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInSine = 20```)
Source

pub const InExpo: Type

Easing curve for an exponential (2^t) function: accelerating from zero velocity.

(C++ enum variant: ```InExpo = 21```)
Source

pub const OutExpo: Type

Easing curve for an exponential (2^t) function: decelerating to zero velocity.

(C++ enum variant: ```OutExpo = 22```)
Source

pub const InOutExpo: Type

Easing curve for an exponential (2^t) function: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutExpo = 23```)
Source

pub const OutInExpo: Type

Easing curve for an exponential (2^t) function: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInExpo = 24```)
Source

pub const InCirc: Type

Easing curve for a circular (sqrt(1-t^2)) function: accelerating from zero velocity.

(C++ enum variant: ```InCirc = 25```)
Source

pub const OutCirc: Type

Easing curve for a circular (sqrt(1-t^2)) function: decelerating to zero velocity.

(C++ enum variant: ```OutCirc = 26```)
Source

pub const InOutCirc: Type

Easing curve for a circular (sqrt(1-t^2)) function: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutCirc = 27```)
Source

pub const OutInCirc: Type

Easing curve for a circular (sqrt(1-t^2)) function: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInCirc = 28```)
Source

pub const InElastic: Type

Easing curve for an elastic (exponentially decaying sine wave) function: accelerating from zero velocity. The peak amplitude can be set with the amplitude parameter, and the period of decay by the period parameter.

(C++ enum variant: ```InElastic = 29```)
Source

pub const OutElastic: Type

Easing curve for an elastic (exponentially decaying sine wave) function: decelerating to zero velocity. The peak amplitude can be set with the amplitude parameter, and the period of decay by the period parameter.

(C++ enum variant: ```OutElastic = 30```)
Source

pub const InOutElastic: Type

Easing curve for an elastic (exponentially decaying sine wave) function: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutElastic = 31```)
Source

pub const OutInElastic: Type

Easing curve for an elastic (exponentially decaying sine wave) function: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInElastic = 32```)
Source

pub const InBack: Type

Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in: accelerating from zero velocity.

(C++ enum variant: ```InBack = 33```)
Source

pub const OutBack: Type

Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing out: decelerating to zero velocity.

(C++ enum variant: ```OutBack = 34```)
Source

pub const InOutBack: Type

Easing curve for a back (overshooting cubic function: (s+1)*t^3 - s*t^2) easing in/out: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutBack = 35```)
Source

pub const OutInBack: Type

Easing curve for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out/in: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInBack = 36```)
Source

pub const InBounce: Type

Easing curve for a bounce (exponentially decaying parabolic bounce) function: accelerating from zero velocity.

(C++ enum variant: ```InBounce = 37```)
Source

pub const OutBounce: Type

Easing curve for a bounce (exponentially decaying parabolic bounce) function: decelerating from zero velocity.

(C++ enum variant: ```OutBounce = 38```)
Source

pub const InOutBounce: Type

Easing curve for a bounce (exponentially decaying parabolic bounce) function easing in/out: acceleration until halfway, then deceleration.

(C++ enum variant: ```InOutBounce = 39```)
Source

pub const OutInBounce: Type

Easing curve for a bounce (exponentially decaying parabolic bounce) function easing out/in: deceleration until halfway, then acceleration.

(C++ enum variant: ```OutInBounce = 40```)
Source

pub const InCurve: Type

C++ enum variant: InCurve = 41

Source

pub const OutCurve: Type

C++ enum variant: OutCurve = 42

Source

pub const SineCurve: Type

C++ enum variant: SineCurve = 43

Source

pub const CosineCurve: Type

C++ enum variant: CosineCurve = 44

Source

pub const BezierSpline: Type

Allows defining a custom easing curve using a cubic bezier spline (C++ enum variant: BezierSpline = 45)

Source

pub const TCBSpline: Type

Allows defining a custom easing curve using a TCB spline (C++ enum variant: TCBSpline = 46)

Source

pub const Custom: Type

This is returned if the user specified a custom curve type with setCustomType(). Note that you cannot call setType() with this value, but type() can return it. (C++ enum variant: Custom = 47)

Source

pub const NCurveTypes: Type

C++ enum variant: NCurveTypes = 48

Trait Implementations§

Source§

impl Clone for Type

Source§

fn clone(&self) -> Type

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Type

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Type> for c_int

Source§

fn from(value: Type) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for Type

Source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Type

Source§

fn eq(&self, other: &Type) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Type

Source§

impl Eq for Type

Source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> StaticUpcast<T> for T

Source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.