Struct cxx_qt_lib::QMarginsF

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

The QMarginsF class defines the four margins of a rectangle.

Implementations§

source§

impl QMarginsF

source

pub fn bottom(&self) -> f64

Returns the bottom margin.

source§

impl QMarginsF

source

pub fn is_null(&self) -> bool

Returns true if all margins are very close to 0; otherwise returns false.

source§

impl QMarginsF

source

pub fn left(&self) -> f64

Returns the left margin.

source§

impl QMarginsF

source

pub fn right(&self) -> f64

Returns the right margin.

source§

impl QMarginsF

source

pub fn set_bottom(&mut self, bottom: f64)

Sets the bottom margin to abottom (which must be finite).

source§

impl QMarginsF

source

pub fn set_left(&mut self, left: f64)

Sets the left margin to aleft (which must be finite).

source§

impl QMarginsF

source

pub fn set_right(&mut self, right: f64)

Sets the right margin to aright (which must be finite).

source§

impl QMarginsF

source

pub fn set_top(&mut self, top: f64)

Sets the top margin to atop (which must be finite).

source§

impl QMarginsF

source

pub fn to_margins(&self) -> QMargins

Returns an integer-based copy of this margins object.

Note that the components in the returned margins will be rounded to the nearest integer.

source§

impl QMarginsF

source

pub fn top(&self) -> f64

Returns the top margin.

source§

impl QMarginsF

source

pub fn new(left: f64, top: f64, right: f64, bottom: f64) -> Self

Constructs margins with the given left, top, right, and bottom. All parameters must be finite.

Trait Implementations§

source§

impl Add<QMarginsF> for QRectF

§

type Output = QRectF

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add<f64> for QMarginsF

§

type Output = QMarginsF

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Add for QMarginsF

§

type Output = QMarginsF

The resulting type after applying the + operator.
source§

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

Performs the + operation. Read more
source§

impl Clone for QMarginsF

source§

fn clone(&self) -> QMarginsF

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 QMarginsF

source§

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

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

impl Default for QMarginsF

source§

fn default() -> Self

Constructs a margins object with all margins set to 0.

source§

impl Display for QMarginsF

source§

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

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

impl Div<f64> for QMarginsF

§

type Output = QMarginsF

The resulting type after applying the / operator.
source§

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

Performs the / operation. Read more
source§

impl ExternType for QMarginsF

§

type Id = (Q, M, a, r, g, i, n, s, F)

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

type Kind = Trivial

source§

impl From<&QMargins> for QMarginsF

source§

fn from(margins: &QMargins) -> Self

Constructs margins copied from the given margins.

source§

impl From<&QMarginsF> for QMargins

source§

fn from(value: &QMarginsF) -> Self

Returns an integer-based copy of this margins object.

Note that the components in the returned margins will be rounded to the nearest integer.

source§

impl Mul<f64> for QMarginsF

§

type Output = QMarginsF

The resulting type after applying the * operator.
source§

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

Performs the * operation. Read more
source§

impl PartialEq for QMarginsF

source§

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

§

type TypeId = (Q, L, i, s, t, __, Q, M, a, r, g, i, n, s, 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 QVectorElement for QMarginsF

§

type TypeId = (Q, V, e, c, t, o, r, __, Q, M, a, r, g, i, n, s, 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<QMarginsF> for QRectF

§

type Output = QRectF

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub<f64> for QMarginsF

§

type Output = QMarginsF

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl Sub for QMarginsF

§

type Output = QMarginsF

The resulting type after applying the - operator.
source§

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

Performs the - operation. Read more
source§

impl StructuralPartialEq for QMarginsF

Auto Trait Implementations§

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.