[][src]Struct qt_core::QMargins

#[repr(C)]
pub struct QMargins { /* fields omitted */ }

The QMargins class defines the four margins of a rectangle.

C++ class: QMargins.

C++ documentation:

The QMargins class defines the four margins of a rectangle.

QMargin defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle.

The isNull() function returns true only if all margins are set to zero.

QMargin objects can be streamed as well as compared.

Methods

impl QMargins[src]

pub unsafe fn bottom(&self) -> c_int[src]

Returns the bottom margin.

Calls C++ function: int QMargins::bottom() const.

C++ documentation:

Returns the bottom margin.

See also setBottom().

pub unsafe fn copy_from(
    &mut self,
    other: impl CastInto<Ref<QMargins>>
) -> MutRef<QMargins>
[src]

The QMargins class defines the four margins of a rectangle.

Calls C++ function: QMargins& QMargins::operator=(const QMargins& other).

C++ documentation:

The QMargins class defines the four margins of a rectangle.

QMargin defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle.

The isNull() function returns true only if all margins are set to zero.

QMargin objects can be streamed as well as compared.

pub unsafe fn is_null(&self) -> bool[src]

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

Calls C++ function: bool QMargins::isNull() const.

C++ documentation:

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

pub unsafe fn left(&self) -> c_int[src]

Returns the left margin.

Calls C++ function: int QMargins::left() const.

C++ documentation:

Returns the left margin.

See also setLeft().

pub unsafe fn neg(&self) -> CppBox<QMargins>[src]

Calls C++ function: QMargins operator-(const QMargins& margins).

pub unsafe fn new_0a() -> CppBox<QMargins>[src]

Constructs a margins object with all margins set to 0.

Calls C++ function: [constructor] void QMargins::QMargins().

C++ documentation:

Constructs a margins object with all margins set to 0.

See also isNull().

pub unsafe fn new_4a(
    left: c_int,
    top: c_int,
    right: c_int,
    bottom: c_int
) -> CppBox<QMargins>
[src]

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

Calls C++ function: [constructor] void QMargins::QMargins(int left, int top, int right, int bottom).

C++ documentation:

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

See also setLeft(), setRight(), setTop(), and setBottom().

pub unsafe fn new_copy(other: impl CastInto<Ref<QMargins>>) -> CppBox<QMargins>[src]

The QMargins class defines the four margins of a rectangle.

Calls C++ function: [constructor] void QMargins::QMargins(const QMargins& other).

C++ documentation:

The QMargins class defines the four margins of a rectangle.

QMargin defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle.

The isNull() function returns true only if all margins are set to zero.

QMargin objects can be streamed as well as compared.

pub unsafe fn right(&self) -> c_int[src]

Returns the right margin.

Calls C++ function: int QMargins::right() const.

C++ documentation:

Returns the right margin.

See also setRight().

pub unsafe fn set_bottom(&mut self, bottom: c_int)[src]

Sets the bottom margin to bottom.

Calls C++ function: void QMargins::setBottom(int bottom).

C++ documentation:

Sets the bottom margin to bottom.

See also bottom().

pub unsafe fn set_left(&mut self, left: c_int)[src]

Sets the left margin to left.

Calls C++ function: void QMargins::setLeft(int left).

C++ documentation:

Sets the left margin to left.

See also left().

pub unsafe fn set_right(&mut self, right: c_int)[src]

Sets the right margin to right.

Calls C++ function: void QMargins::setRight(int right).

C++ documentation:

Sets the right margin to right.

See also right().

pub unsafe fn set_top(&mut self, top: c_int)[src]

Sets the Top margin to Top.

Calls C++ function: void QMargins::setTop(int top).

C++ documentation:

Sets the Top margin to Top.

See also top().

pub unsafe fn top(&self) -> c_int[src]

Returns the top margin.

Calls C++ function: int QMargins::top() const.

C++ documentation:

Returns the top margin.

See also setTop().

pub unsafe fn unary_plus(&self) -> CppBox<QMargins>[src]

Calls C++ function: QMargins operator+(const QMargins& margins).

Trait Implementations

impl<'_> Add<Ref<QMargins>> for &'_ QMargins[src]

type Output = CppBox<QMargins>

The resulting type after applying the + operator.

fn add(self, m2: Ref<QMargins>) -> CppBox<QMargins>[src]

Calls C++ function: QMargins operator+(const QMargins& m1, const QMargins& m2).

impl<'_> Add<Ref<QRect>> for &'_ QMargins[src]

type Output = CppBox<QRect>

The resulting type after applying the + operator.

fn add(self, rectangle: Ref<QRect>) -> CppBox<QRect>[src]

Calls C++ function: QRect operator+(const QMargins& margins, const QRect& rectangle).

impl<'_> Add<i32> for &'_ QMargins[src]

type Output = CppBox<QMargins>

The resulting type after applying the + operator.

fn add(self, rhs: c_int) -> CppBox<QMargins>[src]

Calls C++ function: QMargins operator+(const QMargins& lhs, int rhs).

impl AddAssign<Ref<QMargins>> for QMargins[src]

fn add_assign(&mut self, margins: Ref<QMargins>)[src]

Add each component of margins to the respective component of this object and returns a reference to it.

Calls C++ function: QMargins& QMargins::operator+=(const QMargins& margins).

C++ documentation:

Add each component of margins to the respective component of this object and returns a reference to it.

This function was introduced in Qt 5.1.

See also operator-=().

impl AddAssign<i32> for QMargins[src]

fn add_assign(&mut self, arg1: c_int)[src]

This is an overloaded function.

Calls C++ function: QMargins& QMargins::operator+=(int arg1).

C++ documentation:

This is an overloaded function.

Adds the addend to each component of this object and returns a reference to it.

See also operator-=().

impl CppDeletable for QMargins[src]

unsafe fn delete(&mut self)[src]

The QMargins class defines the four margins of a rectangle.

Calls C++ function: [destructor] void QMargins::~QMargins().

C++ documentation:

The QMargins class defines the four margins of a rectangle.

QMargin defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle.

The isNull() function returns true only if all margins are set to zero.

QMargin objects can be streamed as well as compared.

impl<'_> Div<f64> for &'_ QMargins[src]

type Output = CppBox<QMargins>

The resulting type after applying the / operator.

fn div(self, divisor: c_double) -> CppBox<QMargins>[src]

This is an overloaded function.

Calls C++ function: QMargins operator/(const QMargins& margins, double divisor).

C++ documentation:

This is an overloaded function.

Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.

This function was introduced in Qt 5.1.

See also QMargins::operator*=() and QMargins::operator/=().

impl<'_> Div<i32> for &'_ QMargins[src]

type Output = CppBox<QMargins>

The resulting type after applying the / operator.

fn div(self, divisor: c_int) -> CppBox<QMargins>[src]

Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.

Calls C++ function: QMargins operator/(const QMargins& margins, int divisor).

C++ documentation:

Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.

This function was introduced in Qt 5.1.

See also QMargins::operator*=() and QMargins::operator/=().

impl DivAssign<f64> for QMargins[src]

fn div_assign(&mut self, arg1: c_double)[src]

This is an overloaded function.

Calls C++ function: QMargins& QMargins::operator/=(double arg1).

C++ documentation:

This is an overloaded function.

This function was introduced in Qt 5.1.

See also operator*=().

impl DivAssign<i32> for QMargins[src]

fn div_assign(&mut self, arg1: c_int)[src]

Divides each component of this object by divisor and returns a reference to it.

Calls C++ function: QMargins& QMargins::operator/=(int arg1).

C++ documentation:

Divides each component of this object by divisor and returns a reference to it.

This function was introduced in Qt 5.1.

See also operator*=().

impl<'_> Mul<f64> for &'_ QMargins[src]

type Output = CppBox<QMargins>

The resulting type after applying the * operator.

fn mul(self, factor: c_double) -> CppBox<QMargins>[src]

This is an overloaded function.

Calls C++ function: QMargins operator*(const QMargins& margins, double factor).

C++ documentation:

This is an overloaded function.

Returns a QMargins object that is formed by multiplying each component of the given margins by factor.

This function was introduced in Qt 5.1.

See also QMargins::operator*=() and QMargins::operator/=().

impl<'_> Mul<i32> for &'_ QMargins[src]

type Output = CppBox<QMargins>

The resulting type after applying the * operator.

fn mul(self, factor: c_int) -> CppBox<QMargins>[src]

Returns a QMargins object that is formed by multiplying each component of the given margins by factor.

Calls C++ function: QMargins operator*(const QMargins& margins, int factor).

C++ documentation:

Returns a QMargins object that is formed by multiplying each component of the given margins by factor.

This function was introduced in Qt 5.1.

See also QMargins::operator*=() and QMargins::operator/=().

impl MulAssign<f64> for QMargins[src]

fn mul_assign(&mut self, arg1: c_double)[src]

This is an overloaded function.

Calls C++ function: QMargins& QMargins::operator*=(double arg1).

C++ documentation:

This is an overloaded function.

Multiplies each component of this object by factor and returns a reference to it.

This function was introduced in Qt 5.1.

See also operator/=().

impl MulAssign<i32> for QMargins[src]

fn mul_assign(&mut self, arg1: c_int)[src]

Multiplies each component of this object by factor and returns a reference to it.

Calls C++ function: QMargins& QMargins::operator*=(int arg1).

C++ documentation:

Multiplies each component of this object by factor and returns a reference to it.

This function was introduced in Qt 5.1.

See also operator/=().

impl PartialEq<Ref<QMargins>> for QMargins[src]

fn eq(&self, m2: &Ref<QMargins>) -> bool[src]

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

Calls C++ function: bool operator==(const QMargins& m1, const QMargins& m2).

Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(QChar c1, QChar c2):

Returns true if c1 and c2 are the same Unicode character; otherwise returns false.

impl<'_> Sub<Ref<QMargins>> for &'_ QMargins[src]

type Output = CppBox<QMargins>

The resulting type after applying the - operator.

fn sub(self, m2: Ref<QMargins>) -> CppBox<QMargins>[src]

Calls C++ function: QMargins operator-(const QMargins& m1, const QMargins& m2).

impl<'_> Sub<i32> for &'_ QMargins[src]

type Output = CppBox<QMargins>

The resulting type after applying the - operator.

fn sub(self, rhs: c_int) -> CppBox<QMargins>[src]

Calls C++ function: QMargins operator-(const QMargins& lhs, int rhs).

impl SubAssign<Ref<QMargins>> for QMargins[src]

fn sub_assign(&mut self, margins: Ref<QMargins>)[src]

Subtract each component of margins from the respective component of this object and returns a reference to it.

Calls C++ function: QMargins& QMargins::operator-=(const QMargins& margins).

C++ documentation:

Subtract each component of margins from the respective component of this object and returns a reference to it.

This function was introduced in Qt 5.1.

See also operator+=().

impl SubAssign<i32> for QMargins[src]

fn sub_assign(&mut self, arg1: c_int)[src]

This is an overloaded function.

Calls C++ function: QMargins& QMargins::operator-=(int arg1).

C++ documentation:

This is an overloaded function.

Subtracts the subtrahend from each component of this object and returns a reference to it.

See also operator+=().

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.