#[repr(C)]pub struct QMarginsF { /* private fields */ }
Expand description
The QMarginsF class defines the four margins of a rectangle.
C++ class: QMarginsF
.
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
impl QMarginsF
sourcepub unsafe fn add_assign_q_margins_f(
&self,
margins: impl CastInto<Ref<QMarginsF>>
) -> Ref<QMarginsF>
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)
.
Add each component of margins to the respective component of this object and returns a reference to it.
See also operator-=().
sourcepub unsafe fn add_assign_double(&self, addend: c_double) -> Ref<QMarginsF>
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)
.
This is an overloaded function.
Adds the addend to each component of this object and returns a reference to it.
See also operator-=().
sourcepub unsafe fn bottom(&self) -> c_double
pub unsafe fn bottom(&self) -> c_double
Returns the bottom margin.
Calls C++ function: double QMarginsF::bottom() const
.
Returns the bottom margin.
See also setBottom().
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QMarginsF>>
) -> Ref<QMarginsF>
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)
.
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.
sourcepub unsafe fn div_assign(&self, divisor: c_double) -> Ref<QMarginsF>
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)
.
Divides each component of this object by divisor and returns a reference to it.
See also operator*=().
sourcepub unsafe fn is_null(&self) -> bool
pub unsafe fn is_null(&self) -> bool
Returns true
if all margins are 0; otherwise returns false.
Calls C++ function: bool QMarginsF::isNull() const
.
Returns true
if all margins are 0; otherwise returns false.
sourcepub unsafe fn left(&self) -> c_double
pub unsafe fn left(&self) -> c_double
Returns the left margin.
Calls C++ function: double QMarginsF::left() const
.
Returns the left margin.
See also setLeft().
sourcepub unsafe fn mul_assign(&self, factor: c_double) -> Ref<QMarginsF>
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)
.
Multiplies each component of this object by factor and returns a reference to it.
See also operator/=().
sourcepub unsafe fn neg(&self) -> CppBox<QMarginsF>
pub unsafe fn neg(&self) -> CppBox<QMarginsF>
Calls C++ function: QMarginsF operator-(const QMarginsF& margins)
.
sourcepub unsafe fn new_0a() -> CppBox<QMarginsF>
pub unsafe fn new_0a() -> CppBox<QMarginsF>
Constructs a margins object with all margins set to 0.
Calls C++ function: [constructor] void QMarginsF::QMarginsF()
.
Constructs a margins object with all margins set to 0.
See also isNull().
sourcepub unsafe fn new_4a(
left: c_double,
top: c_double,
right: c_double,
bottom: c_double
) -> CppBox<QMarginsF>
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)
.
sourcepub unsafe fn new_1a(margins: impl CastInto<Ref<QMargins>>) -> CppBox<QMarginsF>
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)
.
Constructs margins copied from the given margins
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QMarginsF>>
) -> CppBox<QMarginsF>
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)
.
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.
sourcepub unsafe fn right(&self) -> c_double
pub unsafe fn right(&self) -> c_double
Returns the right margin.
Calls C++ function: double QMarginsF::right() const
.
Returns the right margin.
See also setRight().
sourcepub unsafe fn set_bottom(&self, bottom: c_double)
pub unsafe fn set_bottom(&self, bottom: c_double)
Sets the bottom margin to bottom.
Calls C++ function: void QMarginsF::setBottom(double bottom)
.
Sets the bottom margin to bottom.
See also bottom().
sourcepub unsafe fn set_left(&self, left: c_double)
pub unsafe fn set_left(&self, left: c_double)
Sets the left margin to left.
Calls C++ function: void QMarginsF::setLeft(double left)
.
Sets the left margin to left.
See also left().
sourcepub unsafe fn set_right(&self, right: c_double)
pub unsafe fn set_right(&self, right: c_double)
Sets the right margin to right.
Calls C++ function: void QMarginsF::setRight(double right)
.
Sets the right margin to right.
See also right().
sourcepub unsafe fn set_top(&self, top: c_double)
pub unsafe fn set_top(&self, top: c_double)
Sets the Top margin to Top.
Calls C++ function: void QMarginsF::setTop(double top)
.
Sets the Top margin to Top.
See also top().
sourcepub unsafe fn sub_assign_q_margins_f(
&self,
margins: impl CastInto<Ref<QMarginsF>>
) -> Ref<QMarginsF>
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)
.
Subtract each component of margins from the respective component of this object and returns a reference to it.
See also operator+=().
sourcepub unsafe fn sub_assign_double(&self, subtrahend: c_double) -> Ref<QMarginsF>
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)
.
This is an overloaded function.
Subtracts the subtrahend from each component of this object and returns a reference to it.
See also operator+=().
sourcepub unsafe fn to_margins(&self) -> CppBox<QMargins>
pub unsafe fn to_margins(&self) -> CppBox<QMargins>
Returns an integer based copy of this margins object.
Calls C++ function: QMargins QMarginsF::toMargins() const
.
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().
sourcepub unsafe fn top(&self) -> c_double
pub unsafe fn top(&self) -> c_double
Returns the top margin.
Calls C++ function: double QMarginsF::top() const
.
Returns the top margin.
See also setTop().
sourcepub unsafe fn unary_plus(&self) -> CppBox<QMarginsF>
pub unsafe fn unary_plus(&self) -> CppBox<QMarginsF>
Calls C++ function: QMarginsF operator+(const QMarginsF& margins)
.
Trait Implementations§
source§impl CppDeletable for QMarginsF
impl CppDeletable for QMarginsF
source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QMarginsF class defines the four margins of a rectangle.
Calls C++ function: [destructor] void QMarginsF::~QMarginsF()
.
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 PartialEq<Ref<QMarginsF>> for QMarginsF
impl PartialEq<Ref<QMarginsF>> for QMarginsF
source§fn eq(&self, rhs: &Ref<QMarginsF>) -> bool
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
.