[][src]Struct qt_core::QMarginsF

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

The QMarginsF class defines the four margins of a rectangle.

C++ class: QMarginsF.

C++ documentation:

The QMarginsF class defines the four margins of a rectangle.

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

QMarginsF objects can be streamed as well as compared.

Methods

impl QMarginsF[src]

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

Returns the bottom margin.

Calls C++ function: double QMarginsF::bottom() const.

C++ documentation:

Returns the bottom margin.

See also setBottom().

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

The QMarginsF class defines the four margins of a rectangle.

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

C++ documentation:

The QMarginsF class defines the four margins of a rectangle.

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

QMarginsF objects can be streamed as well as compared.

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

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

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

C++ documentation:

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

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

Returns the left margin.

Calls C++ function: double QMarginsF::left() const.

C++ documentation:

Returns the left margin.

See also setLeft().

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

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

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

Constructs a margins object with all margins set to 0.

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

C++ documentation:

Constructs a margins object with all margins set to 0.

See also isNull().

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

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

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

C++ documentation:

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

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

pub unsafe fn new_1a(margins: impl CastInto<Ref<QMargins>>) -> CppBox<QMarginsF>[src]

Constructs margins copied from the given margins

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

C++ documentation:

Constructs margins copied from the given margins

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

The QMarginsF class defines the four margins of a rectangle.

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

C++ documentation:

The QMarginsF class defines the four margins of a rectangle.

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

QMarginsF objects can be streamed as well as compared.

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

Returns the right margin.

Calls C++ function: double QMarginsF::right() const.

C++ documentation:

Returns the right margin.

See also setRight().

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

Sets the bottom margin to bottom.

Calls C++ function: void QMarginsF::setBottom(double bottom).

C++ documentation:

Sets the bottom margin to bottom.

See also bottom().

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

Sets the left margin to left.

Calls C++ function: void QMarginsF::setLeft(double left).

C++ documentation:

Sets the left margin to left.

See also left().

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

Sets the right margin to right.

Calls C++ function: void QMarginsF::setRight(double right).

C++ documentation:

Sets the right margin to right.

See also right().

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

Sets the Top margin to Top.

Calls C++ function: void QMarginsF::setTop(double top).

C++ documentation:

Sets the Top margin to Top.

See also top().

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

Returns an integer based copy of this margins object.

Calls C++ function: QMargins QMarginsF::toMargins() const.

C++ documentation:

Returns an integer based copy of this margins object.

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

See also QMarginsF().

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

Returns the top margin.

Calls C++ function: double QMarginsF::top() const.

C++ documentation:

Returns the top margin.

See also setTop().

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

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

Trait Implementations

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

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

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

Calls C++ function: bool operator==(const QMarginsF& lhs, const QMarginsF& rhs).

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<'_> Div<f64> for &'_ QMarginsF[src]

type Output = CppBox<QMarginsF>

The resulting type after applying the / operator.

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

Calls C++ function: QMarginsF operator/(const QMarginsF& lhs, double divisor).

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

type Output = CppBox<QMarginsF>

The resulting type after applying the - operator.

fn sub(self, rhs: Ref<QMarginsF>) -> CppBox<QMarginsF>[src]

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

impl<'_> Sub<f64> for &'_ QMarginsF[src]

type Output = CppBox<QMarginsF>

The resulting type after applying the - operator.

fn sub(self, rhs: c_double) -> CppBox<QMarginsF>[src]

Calls C++ function: QMarginsF operator-(const QMarginsF& lhs, double rhs).

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

type Output = CppBox<QMarginsF>

The resulting type after applying the + operator.

fn add(self, rhs: Ref<QMarginsF>) -> CppBox<QMarginsF>[src]

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

impl<'_> Add<f64> for &'_ QMarginsF[src]

type Output = CppBox<QMarginsF>

The resulting type after applying the + operator.

fn add(self, rhs: c_double) -> CppBox<QMarginsF>[src]

Calls C++ function: QMarginsF operator+(const QMarginsF& lhs, double rhs).

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

type Output = CppBox<QRectF>

The resulting type after applying the + operator.

fn add(self, rhs: Ref<QRectF>) -> CppBox<QRectF>[src]

Calls C++ function: QRectF operator+(const QMarginsF& lhs, const QRectF& rhs).

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

type Output = CppBox<QMarginsF>

The resulting type after applying the * operator.

fn mul(self, rhs: c_double) -> CppBox<QMarginsF>[src]

Calls C++ function: QMarginsF operator*(const QMarginsF& lhs, double rhs).

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

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

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

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

C++ documentation:

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

See also operator-=().

impl AddAssign<f64> for QMarginsF[src]

fn add_assign(&mut self, addend: c_double)[src]

This is an overloaded function.

Calls C++ function: QMarginsF& QMarginsF::operator+=(double addend).

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 SubAssign<Ref<QMarginsF>> for QMarginsF[src]

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

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

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

C++ documentation:

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

See also operator+=().

impl SubAssign<f64> for QMarginsF[src]

fn sub_assign(&mut self, subtrahend: c_double)[src]

This is an overloaded function.

Calls C++ function: QMarginsF& QMarginsF::operator-=(double subtrahend).

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+=().

impl MulAssign<f64> for QMarginsF[src]

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

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

Calls C++ function: QMarginsF& QMarginsF::operator*=(double factor).

C++ documentation:

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

See also operator/=().

impl DivAssign<f64> for QMarginsF[src]

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

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

Calls C++ function: QMarginsF& QMarginsF::operator/=(double divisor).

C++ documentation:

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

See also operator*=().

impl CppDeletable for QMarginsF[src]

unsafe fn delete(&mut self)[src]

The QMarginsF class defines the four margins of a rectangle.

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

C++ documentation:

The QMarginsF class defines the four margins of a rectangle.

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

QMarginsF objects can be streamed as well as compared.

Auto Trait Implementations

Blanket Implementations

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

impl<T> From<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.

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

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

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

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

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