Skip to main content

QRect

Struct QRect 

Source
pub struct QRect { /* private fields */ }
Expand description

C++ class: QRect.

Implementations§

Source§

impl QRect

Source

pub unsafe fn add_assign( &self, margins: impl CastInto<Ref<QMargins>>, ) -> Ref<QRect>

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

Source

pub unsafe fn adjust(&self, x1: c_int, y1: c_int, x2: c_int, y2: c_int)

Calls C++ function: void QRect::adjust(int x1, int y1, int x2, int y2).

Source

pub unsafe fn adjusted( &self, x1: c_int, y1: c_int, x2: c_int, y2: c_int, ) -> CppBox<QRect>

Calls C++ function: QRect QRect::adjusted(int x1, int y1, int x2, int y2) const.

Source

pub unsafe fn bit_and_assign(&self, r: impl CastInto<Ref<QRect>>) -> Ref<QRect>

Calls C++ function: QRect& QRect::operator&=(const QRect& r).

Source

pub unsafe fn bit_or_assign(&self, r: impl CastInto<Ref<QRect>>) -> Ref<QRect>

Calls C++ function: QRect& QRect::operator|=(const QRect& r).

Source

pub unsafe fn bottom(&self) -> c_int

Calls C++ function: int QRect::bottom() const.

Source

pub unsafe fn bottom_left(&self) -> CppBox<QPoint>

Calls C++ function: QPoint QRect::bottomLeft() const.

Source

pub unsafe fn bottom_right(&self) -> CppBox<QPoint>

Calls C++ function: QPoint QRect::bottomRight() const.

Source

pub unsafe fn center(&self) -> CppBox<QPoint>

Calls C++ function: QPoint QRect::center() const.

Source

pub unsafe fn contains_q_rect_bool( &self, r: impl CastInto<Ref<QRect>>, proper: bool, ) -> bool

Calls C++ function: bool QRect::contains(const QRect& r, bool proper = …) const.

Source

pub unsafe fn contains_q_point_bool( &self, p: impl CastInto<Ref<QPoint>>, proper: bool, ) -> bool

Calls C++ function: bool QRect::contains(const QPoint& p, bool proper = …) const.

Source

pub unsafe fn contains_2_int(&self, x: c_int, y: c_int) -> bool

Calls C++ function: bool QRect::contains(int x, int y) const.

Source

pub unsafe fn contains_2_int_bool( &self, x: c_int, y: c_int, proper: bool, ) -> bool

Calls C++ function: bool QRect::contains(int x, int y, bool proper) const.

Source

pub unsafe fn contains_q_rect(&self, r: impl CastInto<Ref<QRect>>) -> bool

Calls C++ function: bool QRect::contains(const QRect& r) const.

Source

pub unsafe fn contains_q_point(&self, p: impl CastInto<Ref<QPoint>>) -> bool

Calls C++ function: bool QRect::contains(const QPoint& p) const.

Source

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

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

Source

pub unsafe fn get_coords( &self, x1: *mut c_int, y1: *mut c_int, x2: *mut c_int, y2: *mut c_int, )

Calls C++ function: void QRect::getCoords(int* x1, int* y1, int* x2, int* y2) const.

Source

pub unsafe fn get_rect( &self, x: *mut c_int, y: *mut c_int, w: *mut c_int, h: *mut c_int, )

Calls C++ function: void QRect::getRect(int* x, int* y, int* w, int* h) const.

Source

pub unsafe fn height(&self) -> c_int

Calls C++ function: int QRect::height() const.

Source

pub unsafe fn intersected( &self, other: impl CastInto<Ref<QRect>>, ) -> CppBox<QRect>

Calls C++ function: QRect QRect::intersected(const QRect& other) const.

Source

pub unsafe fn intersects(&self, r: impl CastInto<Ref<QRect>>) -> bool

Calls C++ function: bool QRect::intersects(const QRect& r) const.

Source

pub unsafe fn is_empty(&self) -> bool

Calls C++ function: bool QRect::isEmpty() const.

Source

pub unsafe fn is_null(&self) -> bool

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

Source

pub unsafe fn is_valid(&self) -> bool

Calls C++ function: bool QRect::isValid() const.

Source

pub unsafe fn left(&self) -> c_int

Calls C++ function: int QRect::left() const.

Source

pub unsafe fn margins_added( &self, margins: impl CastInto<Ref<QMargins>>, ) -> CppBox<QRect>

Calls C++ function: QRect QRect::marginsAdded(const QMargins& margins) const.

Source

pub unsafe fn margins_removed( &self, margins: impl CastInto<Ref<QMargins>>, ) -> CppBox<QRect>

Calls C++ function: QRect QRect::marginsRemoved(const QMargins& margins) const.

Source

pub unsafe fn move_bottom(&self, pos: c_int)

Calls C++ function: void QRect::moveBottom(int pos).

Source

pub unsafe fn move_bottom_left(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::moveBottomLeft(const QPoint& p).

Source

pub unsafe fn move_bottom_right(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::moveBottomRight(const QPoint& p).

Source

pub unsafe fn move_center(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::moveCenter(const QPoint& p).

Source

pub unsafe fn move_left(&self, pos: c_int)

Calls C++ function: void QRect::moveLeft(int pos).

Source

pub unsafe fn move_right(&self, pos: c_int)

Calls C++ function: void QRect::moveRight(int pos).

Source

pub unsafe fn move_to_2a(&self, x: c_int, t: c_int)

Calls C++ function: void QRect::moveTo(int x, int t).

Source

pub unsafe fn move_to_1a(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::moveTo(const QPoint& p).

Source

pub unsafe fn move_top(&self, pos: c_int)

Calls C++ function: void QRect::moveTop(int pos).

Source

pub unsafe fn move_top_left(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::moveTopLeft(const QPoint& p).

Source

pub unsafe fn move_top_right(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::moveTopRight(const QPoint& p).

Source

pub unsafe fn new() -> CppBox<QRect>

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

Source

pub unsafe fn from_2_q_point( topleft: impl CastInto<Ref<QPoint>>, bottomright: impl CastInto<Ref<QPoint>>, ) -> CppBox<QRect>

Calls C++ function: [constructor] void QRect::QRect(const QPoint& topleft, const QPoint& bottomright).

Source

pub unsafe fn from_q_point_q_size( topleft: impl CastInto<Ref<QPoint>>, size: impl CastInto<Ref<QSize>>, ) -> CppBox<QRect>

Calls C++ function: [constructor] void QRect::QRect(const QPoint& topleft, const QSize& size).

Source

pub unsafe fn from_4_int( left: c_int, top: c_int, width: c_int, height: c_int, ) -> CppBox<QRect>

Calls C++ function: [constructor] void QRect::QRect(int left, int top, int width, int height).

Source

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

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

Source

pub unsafe fn normalized(&self) -> CppBox<QRect>

Calls C++ function: QRect QRect::normalized() const.

Source

pub unsafe fn right(&self) -> c_int

Calls C++ function: int QRect::right() const.

Source

pub unsafe fn set_bottom(&self, pos: c_int)

Calls C++ function: void QRect::setBottom(int pos).

Source

pub unsafe fn set_bottom_left(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::setBottomLeft(const QPoint& p).

Source

pub unsafe fn set_bottom_right(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::setBottomRight(const QPoint& p).

Source

pub unsafe fn set_coords(&self, x1: c_int, y1: c_int, x2: c_int, y2: c_int)

Calls C++ function: void QRect::setCoords(int x1, int y1, int x2, int y2).

Source

pub unsafe fn set_height(&self, h: c_int)

Calls C++ function: void QRect::setHeight(int h).

Source

pub unsafe fn set_left(&self, pos: c_int)

Calls C++ function: void QRect::setLeft(int pos).

Source

pub unsafe fn set_rect(&self, x: c_int, y: c_int, w: c_int, h: c_int)

Calls C++ function: void QRect::setRect(int x, int y, int w, int h).

Source

pub unsafe fn set_right(&self, pos: c_int)

Calls C++ function: void QRect::setRight(int pos).

Source

pub unsafe fn set_size(&self, s: impl CastInto<Ref<QSize>>)

Calls C++ function: void QRect::setSize(const QSize& s).

Source

pub unsafe fn set_top(&self, pos: c_int)

Calls C++ function: void QRect::setTop(int pos).

Source

pub unsafe fn set_top_left(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::setTopLeft(const QPoint& p).

Source

pub unsafe fn set_top_right(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::setTopRight(const QPoint& p).

Source

pub unsafe fn set_width(&self, w: c_int)

Calls C++ function: void QRect::setWidth(int w).

Source

pub unsafe fn set_x(&self, x: c_int)

Calls C++ function: void QRect::setX(int x).

Source

pub unsafe fn set_y(&self, y: c_int)

Calls C++ function: void QRect::setY(int y).

Source

pub unsafe fn size(&self) -> CppBox<QSize>

Calls C++ function: QSize QRect::size() const.

Source

pub unsafe fn sub_assign( &self, margins: impl CastInto<Ref<QMargins>>, ) -> Ref<QRect>

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

Source

pub unsafe fn top(&self) -> c_int

Calls C++ function: int QRect::top() const.

Source

pub unsafe fn top_left(&self) -> CppBox<QPoint>

Calls C++ function: QPoint QRect::topLeft() const.

Source

pub unsafe fn top_right(&self) -> CppBox<QPoint>

Calls C++ function: QPoint QRect::topRight() const.

Source

pub unsafe fn translate_2a(&self, dx: c_int, dy: c_int)

Calls C++ function: void QRect::translate(int dx, int dy).

Source

pub unsafe fn translate_1a(&self, p: impl CastInto<Ref<QPoint>>)

Calls C++ function: void QRect::translate(const QPoint& p).

Source

pub unsafe fn translated_2a(&self, dx: c_int, dy: c_int) -> CppBox<QRect>

Calls C++ function: QRect QRect::translated(int dx, int dy) const.

Source

pub unsafe fn translated_1a( &self, p: impl CastInto<Ref<QPoint>>, ) -> CppBox<QRect>

Calls C++ function: QRect QRect::translated(const QPoint& p) const.

Source

pub unsafe fn transposed(&self) -> CppBox<QRect>

Calls C++ function: QRect QRect::transposed() const.

Source

pub unsafe fn united(&self, other: impl CastInto<Ref<QRect>>) -> CppBox<QRect>

Calls C++ function: QRect QRect::united(const QRect& other) const.

Source

pub unsafe fn width(&self) -> c_int

Calls C++ function: int QRect::width() const.

Source

pub unsafe fn x(&self) -> c_int

Calls C++ function: int QRect::x() const.

Source

pub unsafe fn y(&self) -> c_int

Calls C++ function: int QRect::y() const.

Trait Implementations§

Source§

impl Add<Ref<QMargins>> for &QRect

Source§

fn add(self, margins: Ref<QMargins>) -> CppBox<QRect>

Calls C++ function: QRect operator+(const QRect& rectangle, const QMargins& margins).

Source§

type Output = CppBox<QRect>

The resulting type after applying the + operator.
Source§

impl BitAnd<Ref<QRect>> for &QRect

Source§

fn bitand(self, r: Ref<QRect>) -> CppBox<QRect>

Calls C++ function: QRect QRect::operator&(const QRect& r) const.

Source§

type Output = CppBox<QRect>

The resulting type after applying the & operator.
Source§

impl BitOr<Ref<QRect>> for &QRect

Source§

fn bitor(self, r: Ref<QRect>) -> CppBox<QRect>

Calls C++ function: QRect QRect::operator|(const QRect& r) const.

Source§

type Output = CppBox<QRect>

The resulting type after applying the | operator.
Source§

impl CppDeletable for QRect

Source§

unsafe fn delete(&self)

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

Source§

impl PartialEq<Ref<QRect>> for QRect

Source§

fn eq(&self, arg2: &Ref<QRect>) -> bool

Calls C++ function: bool operator==(const QRect& arg1, const QRect& arg2).

1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Size for QRect

Source§

unsafe fn size(&self) -> usize

Calls C++ function: QSize QRect::size() const.

Source§

impl Sub<Ref<QMargins>> for &QRect

Source§

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

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

Source§

type Output = CppBox<QRect>

The resulting type after applying the - operator.

Auto Trait Implementations§

§

impl Freeze for QRect

§

impl RefUnwindSafe for QRect

§

impl Send for QRect

§

impl Sync for QRect

§

impl Unpin for QRect

§

impl UnsafeUnpin for QRect

§

impl UnwindSafe for QRect

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>,

Source§

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>,

Source§

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.