[−][src]Struct qt_core::QMargins
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.
Methods
impl QMargins
[src]
pub unsafe fn bottom(&self) -> c_int
[src]
Returns the bottom margin.
Calls C++ function: int QMargins::bottom() const
.
Returns the bottom margin.
See also setBottom().
pub unsafe fn copy_from(
&mut self,
other: impl CastInto<Ref<QMargins>>
) -> MutRef<QMargins>
[src]
&mut self,
other: impl CastInto<Ref<QMargins>>
) -> MutRef<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.
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
.
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
.
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()
.
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]
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)
.
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)
.
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
.
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)
.
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)
.
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)
.
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)
.
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
.
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)
.
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)
.
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()
.
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)
.
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)
.
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)
.
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)
.
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)
.
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)
.
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)
.
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)
.
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
.
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
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)
.
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)
.
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
impl RefUnwindSafe for QMargins
impl Send for QMargins
impl Sync for QMargins
impl Unpin for QMargins
impl UnwindSafe for QMargins
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,