Struct cxx_qt_lib::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 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

§

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

§

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

§

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

§

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

§

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

§

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
§

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

§

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

§

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

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 QMargins

§

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

§

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

§

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

§

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

§

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