Struct cxx_qt_lib::QSizeF

source ·
#[repr(C)]
pub struct QSizeF { /* private fields */ }
Expand description

The QSizeF class defines the size of a two-dimensional object using floating point precision.

Implementations§

source§

impl QSizeF

source

pub fn bounded_to(&self, other_size: &QSizeF) -> QSizeF

Returns a size holding the minimum width and height of this size and the given otherSize.

source§

impl QSizeF

source

pub fn expanded_to(&self, other_size: &QSizeF) -> QSizeF

Returns a size holding the maximum width and height of this size and the given otherSize.

source§

impl QSizeF

source

pub fn height(&self) -> f64

Returns the height.

source§

impl QSizeF

source

pub fn is_empty(&self) -> bool

Returns true if either of the width and height is less than or equal to 0; otherwise returns false.

source§

impl QSizeF

source

pub fn is_null(&self) -> bool

Returns true if both the width and height are 0.0 (ignoring the sign); otherwise returns false.

source§

impl QSizeF

source

pub fn is_valid(&self) -> bool

Returns true if both the width and height are equal to or greater than 0; otherwise returns false.

source§

impl QSizeF

source

pub fn grown_by(&self, margins: QMarginsF) -> QSizeF

Returns the size that results from growing this size by margins.

source§

impl QSizeF

source

pub fn scale(&mut self, size: &QSizeF, mode: AspectRatioMode)

Scales the size to a rectangle with the given size, according to the specified mode.

source§

impl QSizeF

source

pub fn scaled(&self, s: &QSizeF, mode: AspectRatioMode) -> QSizeF

Returns a size scaled to a rectangle with the given size s, according to the specified mode.

source§

impl QSizeF

source

pub fn set_height(&mut self, height: f64)

Sets the height to the given finite height.

source§

impl QSizeF

source

pub fn set_width(&mut self, width: f64)

Sets the width to the given finite width.

source§

impl QSizeF

source

pub fn shrunk_by(&self, margins: QMarginsF) -> QSizeF

Returns the size that results from shrinking this size by margins.

source§

impl QSizeF

source

pub fn to_size(&self) -> QSize

Returns an integer based copy of this size.

Note that the coordinates in the returned size will be rounded to the nearest integer.

source§

impl QSizeF

source

pub fn transpose(&mut self)

Swaps the width and height values.

source§

impl QSizeF

source

pub fn transposed(&self) -> QSizeF

Returns the size with width and height values swapped.

source§

impl QSizeF

source

pub fn width(&self) -> f64

Returns the width.

source§

impl QSizeF

source

pub fn new(w: f64, h: f64) -> Self

Constructs a size with the given width and height.

Trait Implementations§

source§

impl Add for QSizeF

§

type Output = QSizeF

The resulting type after applying the + operator.
source§

fn add(self, other: Self) -> Self

Performs the + operation. Read more
source§

impl Clone for QSizeF

source§

fn clone(&self) -> QSizeF

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 QSizeF

source§

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

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

impl Default for QSizeF

source§

fn default() -> Self

Constructs an invalid size.

source§

impl Display for QSizeF

source§

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

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

impl Div<f64> for QSizeF

§

type Output = QSizeF

The resulting type after applying the / operator.
source§

fn div(self, rhs: f64) -> Self

Performs the / operation. Read more
source§

impl ExternType for QSizeF

§

type Id = (Q, S, i, z, e, F)

A type-level representation of the type’s C++ namespace and type name. Read more
§

type Kind = Trivial

source§

impl From<&QSize> for QSizeF

source§

fn from(size: &QSize) -> Self

Constructs a size with floating point accuracy from the given size.

source§

impl From<QSizeF> for QSize

source§

fn from(size: QSizeF) -> Self

Returns an integer based copy of this size.

Note that the coordinates in the returned size will be rounded to the nearest integer.

source§

impl Mul<f64> for QSizeF

§

type Output = QSizeF

The resulting type after applying the * operator.
source§

fn mul(self, rhs: f64) -> Self

Performs the * operation. Read more
source§

impl PartialEq for QSizeF

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl QListElement for QSizeF

§

type TypeId = (Q, L, i, s, t, __, Q, S, i, z, e, F)

source§

fn append(list: &mut QList<Self>, value: Self)

source§

fn append_clone(list: &mut QList<Self>, value: &Self)

source§

fn clear(list: &mut QList<Self>)

source§

fn clone(list: &QList<Self>) -> QList<Self>

source§

fn contains(list: &QList<Self>, value: &Self) -> bool

source§

fn default() -> QList<Self>

source§

fn drop(list: &mut QList<Self>)

source§

unsafe fn get_unchecked(list: &QList<Self>, pos: isize) -> &Self

Safety Read more
source§

fn index_of(list: &QList<Self>, value: &Self) -> isize

source§

fn insert(list: &mut QList<Self>, pos: isize, value: Self)

source§

fn insert_clone(list: &mut QList<Self>, pos: isize, value: &Self)

source§

fn len(list: &QList<Self>) -> isize

source§

fn remove(list: &mut QList<Self>, pos: isize)

source§

fn reserve(list: &mut QList<Self>, size: isize)

source§

impl QVariantValue for QSizeF

source§

impl QVectorElement for QSizeF

§

type TypeId = (Q, V, e, c, t, o, r, __, Q, S, i, z, e, F)

source§

fn append(vector: &mut QVector<Self>, value: Self)

source§

fn append_clone(vector: &mut QVector<Self>, value: &Self)

source§

fn clear(vector: &mut QVector<Self>)

source§

fn clone(vector: &QVector<Self>) -> QVector<Self>

source§

fn contains(vector: &QVector<Self>, value: &Self) -> bool

source§

fn default() -> QVector<Self>

source§

fn drop(vector: &mut QVector<Self>)

source§

unsafe fn get_unchecked(vector: &QVector<Self>, pos: isize) -> &Self

Safety Read more
source§

fn index_of(vector: &QVector<Self>, value: &Self) -> isize

source§

fn insert(vector: &mut QVector<Self>, pos: isize, value: Self)

source§

fn insert_clone(vector: &mut QVector<Self>, pos: isize, value: &Self)

source§

fn len(vector: &QVector<Self>) -> isize

source§

fn remove(vector: &mut QVector<Self>, pos: isize)

source§

fn reserve(vector: &mut QVector<Self>, size: isize)

source§

impl Sub for QSizeF

§

type Output = QSizeF

The resulting type after applying the - operator.
source§

fn sub(self, other: Self) -> Self

Performs the - operation. Read more
source§

impl StructuralPartialEq for QSizeF

Auto Trait Implementations§

§

impl Freeze for QSizeF

§

impl RefUnwindSafe for QSizeF

§

impl Send for QSizeF

§

impl Sync for QSizeF

§

impl Unpin for QSizeF

§

impl UnwindSafe for QSizeF

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> 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> ToOwned for T
where T: Clone,

§

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

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>,

§

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.