Struct QMargins

Source
#[repr(C)]
pub struct QMargins { /* private fields */ }
Expand description

The QMargins class defines the four margins of a rectangle.

Implementations§

Source§

impl QMargins

Source

pub fn bottom(&self) -> i32

Returns the bottom margin.

Source§

impl QMargins

Source

pub fn is_null(&self) -> bool

Returns true if all margins are is 0; otherwise returns false.

Source§

impl QMargins

Source

pub fn left(&self) -> i32

Returns the left margin.

Source§

impl QMargins

Source

pub fn right(&self) -> i32

Returns the right margin.

Source§

impl QMargins

Source

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

Sets the bottom margin to bottom.

Source§

impl QMargins

Source

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

Sets the left margin to left.

Source§

impl QMargins

Source

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

Sets the right margin to right.

Source§

impl QMargins

Source

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

Sets the Top margin to Top.

Source§

impl QMargins

Source

pub fn to_marginsf(&self) -> QMarginsF

Returns these margins as margins with floating point accuracy. since Qt6.4

Source§

impl QMargins

Source

pub fn top(&self) -> i32

Returns the top margin.

Source§

impl QMargins

Source

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

Constructs margins with the given left, top, right, and bottom

Trait Implementations§

Source§

impl Add<QMargins> for QRect

Source§

type Output = QRect

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i32> for QMargins

Source§

type Output = QMargins

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add for QMargins

Source§

type Output = QMargins

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Clone for QMargins

Source§

fn clone(&self) -> QMargins

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 QMargins

Source§

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

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

impl Default for QMargins

Source§

fn default() -> Self

Constructs a margins object with all margins set to 0.

Source§

impl Display for QMargins

Source§

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

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

impl Div<f64> for QMargins

Source§

type Output = QMargins

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i32> for QMargins

Source§

type Output = QMargins

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl ExternType for QMargins

Source§

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

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 QMargins

Source§

type Output = QMargins

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i32> for QMargins

Source§

type Output = QMargins

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl PartialEq for QMargins

Source§

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

Source§

type TypeId = (Q, L, i, s, t, __, Q, M, a, r, g, i, n, s)

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 QMargins

Source§

type TypeId = (Q, V, e, c, t, o, r, __, Q, M, a, r, g, i, n, s)

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<QMargins> for QRect

Source§

type Output = QRect

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i32> for QMargins

Source§

type Output = QMargins

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub for QMargins

Source§

type Output = QMargins

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Eq for QMargins

Source§

impl StructuralPartialEq for QMargins

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.