#[repr(C)]pub struct QMargins { /* private fields */ }
Expand description
The QMargins class defines the four margins of a rectangle.
C++ class: QMargins
.
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.
Implementations§
source§impl QMargins
impl QMargins
sourcepub unsafe fn add_assign_q_margins(
&self,
margins: impl CastInto<Ref<QMargins>>
) -> Ref<QMargins>
pub unsafe fn add_assign_q_margins( &self, margins: impl CastInto<Ref<QMargins>> ) -> Ref<QMargins>
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)
.
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-=().
sourcepub unsafe fn add_assign_int(&self, arg1: c_int) -> Ref<QMargins>
pub unsafe fn add_assign_int(&self, arg1: c_int) -> Ref<QMargins>
This is an overloaded function.
Calls C++ function: QMargins& QMargins::operator+=(int arg1)
.
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_int
pub unsafe fn bottom(&self) -> c_int
Returns the bottom margin.
Calls C++ function: int QMargins::bottom() const
.
Returns the bottom margin.
See also setBottom().
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QMargins>>
) -> Ref<QMargins>
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QMargins>> ) -> Ref<QMargins>
The QMargins class defines the four margins of a rectangle.
Calls C++ function: QMargins& QMargins::operator=(const QMargins& other)
.
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.
sourcepub unsafe fn div_assign_int(&self, arg1: c_int) -> Ref<QMargins>
pub unsafe fn div_assign_int(&self, arg1: c_int) -> Ref<QMargins>
Divides each component of this object by divisor and returns a reference to it.
Calls C++ function: QMargins& QMargins::operator/=(int arg1)
.
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*=().
sourcepub unsafe fn div_assign_double(&self, arg1: c_double) -> Ref<QMargins>
pub unsafe fn div_assign_double(&self, arg1: c_double) -> Ref<QMargins>
This is an overloaded function.
Calls C++ function: QMargins& QMargins::operator/=(double arg1)
.
sourcepub unsafe fn is_null(&self) -> bool
pub unsafe fn is_null(&self) -> bool
Returns true
if all margins are is 0; otherwise returns false.
Calls C++ function: bool QMargins::isNull() const
.
Returns true
if all margins are is 0; otherwise returns false.
sourcepub unsafe fn left(&self) -> c_int
pub unsafe fn left(&self) -> c_int
Returns the left margin.
Calls C++ function: int QMargins::left() const
.
Returns the left margin.
See also setLeft().
sourcepub unsafe fn mul_assign_int(&self, arg1: c_int) -> Ref<QMargins>
pub unsafe fn mul_assign_int(&self, arg1: c_int) -> Ref<QMargins>
Multiplies each component of this object by factor and returns a reference to it.
Calls C++ function: QMargins& QMargins::operator*=(int arg1)
.
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/=().
sourcepub unsafe fn mul_assign_double(&self, arg1: c_double) -> Ref<QMargins>
pub unsafe fn mul_assign_double(&self, arg1: c_double) -> Ref<QMargins>
This is an overloaded function.
Calls C++ function: QMargins& QMargins::operator*=(double arg1)
.
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/=().
sourcepub unsafe fn neg(&self) -> CppBox<QMargins>
pub unsafe fn neg(&self) -> CppBox<QMargins>
Calls C++ function: QMargins operator-(const QMargins& margins)
.
sourcepub unsafe fn new_0a() -> CppBox<QMargins>
pub unsafe fn new_0a() -> CppBox<QMargins>
Constructs a margins object with all margins set to 0.
Calls C++ function: [constructor] void QMargins::QMargins()
.
Constructs a margins object with all margins set to 0.
See also isNull().
sourcepub unsafe fn new_4a(
left: c_int,
top: c_int,
right: c_int,
bottom: c_int
) -> CppBox<QMargins>
pub unsafe fn new_4a( left: c_int, top: c_int, right: c_int, bottom: c_int ) -> CppBox<QMargins>
Constructs margins with the given left, top, right, bottom
Calls C++ function: [constructor] void QMargins::QMargins(int left, int top, int right, int bottom)
.
sourcepub unsafe fn new_copy(other: impl CastInto<Ref<QMargins>>) -> CppBox<QMargins>
pub unsafe fn new_copy(other: impl CastInto<Ref<QMargins>>) -> CppBox<QMargins>
The QMargins class defines the four margins of a rectangle.
Calls C++ function: [constructor] void QMargins::QMargins(const QMargins& other)
.
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.
sourcepub unsafe fn right(&self) -> c_int
pub unsafe fn right(&self) -> c_int
Returns the right margin.
Calls C++ function: int QMargins::right() const
.
Returns the right margin.
See also setRight().
sourcepub unsafe fn set_bottom(&self, bottom: c_int)
pub unsafe fn set_bottom(&self, bottom: c_int)
Sets the bottom margin to bottom.
Calls C++ function: void QMargins::setBottom(int bottom)
.
Sets the bottom margin to bottom.
See also bottom().
sourcepub unsafe fn set_left(&self, left: c_int)
pub unsafe fn set_left(&self, left: c_int)
Sets the left margin to left.
Calls C++ function: void QMargins::setLeft(int left)
.
Sets the left margin to left.
See also left().
sourcepub unsafe fn set_right(&self, right: c_int)
pub unsafe fn set_right(&self, right: c_int)
Sets the right margin to right.
Calls C++ function: void QMargins::setRight(int right)
.
Sets the right margin to right.
See also right().
sourcepub unsafe fn set_top(&self, top: c_int)
pub unsafe fn set_top(&self, top: c_int)
Sets the Top margin to Top.
Calls C++ function: void QMargins::setTop(int top)
.
Sets the Top margin to Top.
See also top().
sourcepub unsafe fn sub_assign_q_margins(
&self,
margins: impl CastInto<Ref<QMargins>>
) -> Ref<QMargins>
pub unsafe fn sub_assign_q_margins( &self, margins: impl CastInto<Ref<QMargins>> ) -> Ref<QMargins>
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)
.
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+=().
sourcepub unsafe fn sub_assign_int(&self, arg1: c_int) -> Ref<QMargins>
pub unsafe fn sub_assign_int(&self, arg1: c_int) -> Ref<QMargins>
This is an overloaded function.
Calls C++ function: QMargins& QMargins::operator-=(int arg1)
.
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 top(&self) -> c_int
pub unsafe fn top(&self) -> c_int
Returns the top margin.
Calls C++ function: int QMargins::top() const
.
Returns the top margin.
See also setTop().
sourcepub unsafe fn unary_plus(&self) -> CppBox<QMargins>
pub unsafe fn unary_plus(&self) -> CppBox<QMargins>
Calls C++ function: QMargins operator+(const QMargins& margins)
.
Trait Implementations§
source§impl CppDeletable for QMargins
impl CppDeletable for QMargins
source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QMargins class defines the four margins of a rectangle.
Calls C++ function: [destructor] void QMargins::~QMargins()
.
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.
source§impl Div<f64> for &QMargins
impl Div<f64> for &QMargins
source§fn div(self, divisor: c_double) -> CppBox<QMargins>
fn div(self, divisor: c_double) -> CppBox<QMargins>
This is an overloaded function.
Calls C++ function: QMargins operator/(const QMargins& margins, double divisor)
.
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/=().
source§impl Div<i32> for &QMargins
impl Div<i32> for &QMargins
source§fn div(self, divisor: c_int) -> CppBox<QMargins>
fn div(self, divisor: c_int) -> CppBox<QMargins>
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)
.
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/=().
source§impl Mul<f64> for &QMargins
impl Mul<f64> for &QMargins
source§fn mul(self, factor: c_double) -> CppBox<QMargins>
fn mul(self, factor: c_double) -> CppBox<QMargins>
This is an overloaded function.
Calls C++ function: QMargins operator*(const QMargins& margins, double factor)
.
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/=().
source§impl Mul<i32> for &QMargins
impl Mul<i32> for &QMargins
source§fn mul(self, factor: c_int) -> CppBox<QMargins>
fn mul(self, factor: c_int) -> CppBox<QMargins>
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)
.
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/=().
source§impl PartialEq<Ref<QMargins>> for QMargins
impl PartialEq<Ref<QMargins>> for QMargins
source§fn eq(&self, m2: &Ref<QMargins>) -> bool
fn eq(&self, m2: &Ref<QMargins>) -> bool
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
.