Struct cxx_qt_lib::QSize

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

The QSize struct defines the size of a two-dimensional object using integer point precision.

Implementations§

source§

impl QSize

source

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

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

source§

impl QSize

source

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

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

source§

impl QSize

source

pub fn height(&self) -> i32

Returns the height.

source§

impl QSize

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 QSize

source

pub fn is_null(&self) -> bool

Returns true if both the width and height is 0; otherwise returns false.

source§

impl QSize

source

pub fn is_valid(&self) -> bool

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

source§

impl QSize

source

pub fn grown_by(&self, margins: QMargins) -> QSize

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

source§

impl QSize

source

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

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

source§

impl QSize

source

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

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

source§

impl QSize

source

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

Sets the height to the given height.

source§

impl QSize

source

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

Sets the width to the given width.

source§

impl QSize

source

pub fn shrunk_by(&self, margins: QMargins) -> QSize

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

source§

impl QSize

source

pub fn transpose(&mut self)

Swaps the width and height values.

source§

impl QSize

source

pub fn transposed(&self) -> QSize

Returns a QSize with width and height swapped.

source§

impl QSize

source

pub fn width(&self) -> i32

Returns the width.

source§

impl QSize

source

pub fn new(width: i32, height: i32) -> Self

Constructs a size with the given width and height.

Trait Implementations§

source§

impl Add for QSize

§

type Output = QSize

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Clone for QSize

source§

fn clone(&self) -> QSize

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 QSize

source§

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

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

impl Default for QSize

source§

fn default() -> Self

Constructs a size with an invalid width and height

source§

impl Display for QSize

source§

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

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

impl Div<f64> for QSize

§

type Output = QSize

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl ExternType for QSize

§

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

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 QSize

§

type Output = QSize

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl PartialEq for QSize

source§

fn eq(&self, other: &QSize) -> 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 QSize

§

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

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 QSize

source§

impl QVectorElement for QSize

§

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

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 QSize

§

type Output = QSize

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Eq for QSize

source§

impl StructuralPartialEq for QSize

Auto Trait Implementations§

§

impl Freeze for QSize

§

impl RefUnwindSafe for QSize

§

impl Send for QSize

§

impl Sync for QSize

§

impl Unpin for QSize

§

impl UnwindSafe for QSize

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.