Struct qt_core::QMarginsF

source ·
#[repr(C)]
pub struct QMarginsF { /* private fields */ }
Expand description

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.

Implementations§

source§

impl QMarginsF

source

pub unsafe fn add_assign_q_margins_f( &self, margins: impl CastInto<Ref<QMarginsF>> ) -> Ref<QMarginsF>

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

source

pub unsafe fn add_assign_double(&self, addend: c_double) -> Ref<QMarginsF>

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

source

pub unsafe fn bottom(&self) -> c_double

Returns the bottom margin.

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

C++ documentation:

Returns the bottom margin.

See also setBottom().

source

pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QMarginsF>> ) -> Ref<QMarginsF>

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.

source

pub unsafe fn div_assign(&self, divisor: c_double) -> Ref<QMarginsF>

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

source

pub unsafe fn is_null(&self) -> bool

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.

source

pub unsafe fn left(&self) -> c_double

Returns the left margin.

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

C++ documentation:

Returns the left margin.

See also setLeft().

source

pub unsafe fn mul_assign(&self, factor: c_double) -> Ref<QMarginsF>

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

source

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

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

source

pub unsafe fn new_0a() -> CppBox<QMarginsF>

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

source

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

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

source

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

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

source

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

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.

source

pub unsafe fn right(&self) -> c_double

Returns the right margin.

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

C++ documentation:

Returns the right margin.

See also setRight().

source

pub unsafe fn set_bottom(&self, bottom: c_double)

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

source

pub unsafe fn set_left(&self, left: c_double)

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

source

pub unsafe fn set_right(&self, right: c_double)

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

source

pub unsafe fn set_top(&self, top: c_double)

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

source

pub unsafe fn sub_assign_q_margins_f( &self, margins: impl CastInto<Ref<QMarginsF>> ) -> Ref<QMarginsF>

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

source

pub unsafe fn sub_assign_double(&self, subtrahend: c_double) -> Ref<QMarginsF>

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

source

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

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

source

pub unsafe fn top(&self) -> c_double

Returns the top margin.

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

C++ documentation:

Returns the top margin.

See also setTop().

source

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

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

Trait Implementations§

source§

impl Add<Ref<QMarginsF>> for &QMarginsF

source§

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

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

§

type Output = CppBox<QMarginsF>

The resulting type after applying the + operator.
source§

impl Add<Ref<QRectF>> for &QMarginsF

source§

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

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

§

type Output = CppBox<QRectF>

The resulting type after applying the + operator.
source§

impl Add<f64> for &QMarginsF

source§

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

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

§

type Output = CppBox<QMarginsF>

The resulting type after applying the + operator.
source§

impl CppDeletable for QMarginsF

source§

unsafe fn delete(&self)

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.

source§

impl Div<f64> for &QMarginsF

source§

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

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

§

type Output = CppBox<QMarginsF>

The resulting type after applying the / operator.
source§

impl Mul<f64> for &QMarginsF

source§

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

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

§

type Output = CppBox<QMarginsF>

The resulting type after applying the * operator.
source§

impl PartialEq<Ref<QMarginsF>> for QMarginsF

source§

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

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.

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 Sub<Ref<QMarginsF>> for &QMarginsF

source§

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

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

§

type Output = CppBox<QMarginsF>

The resulting type after applying the - operator.
source§

impl Sub<f64> for &QMarginsF

source§

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

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

§

type Output = CppBox<QMarginsF>

The resulting type after applying the - operator.

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, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. 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> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. 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.