Struct 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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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
Source§

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

Source§

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

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 QListElement for QMarginsF

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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.