7#include <QtCore/qhashfunctions.h>
8#include <QtCore/qmargins.h>
9#include <QtCore/qsize.h>
10#include <QtCore/qpoint.h>
13#error qrect.h must be included before any header file that defines topLeft
16#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
19#if defined(Q_OS_WASM) || defined(Q_QDOC)
37 constexpr inline bool isNull() const noexcept;
38 constexpr inline
bool isEmpty() const noexcept;
39 constexpr inline
bool isValid() const noexcept;
41 constexpr inline
int left() const noexcept;
42 constexpr inline
int top() const noexcept;
43 constexpr inline
int right() const noexcept;
44 constexpr inline
int bottom() const noexcept;
47 constexpr inline
int x() const noexcept;
48 constexpr inline
int y() const noexcept;
49 constexpr inline
void setLeft(
int pos) noexcept;
50 constexpr inline
void setTop(
int pos) noexcept;
51 constexpr inline
void setRight(
int pos) noexcept;
52 constexpr inline
void setBottom(
int pos) noexcept;
53 constexpr inline
void setX(
int x) noexcept;
54 constexpr inline
void setY(
int y) noexcept;
56 constexpr inline
void setTopLeft(const
QPoint &
p) noexcept;
57 constexpr inline
void setBottomRight(const
QPoint &
p) noexcept;
58 constexpr inline
void setTopRight(const
QPoint &
p) noexcept;
59 constexpr inline
void setBottomLeft(const
QPoint &
p) noexcept;
61 constexpr inline
QPoint topLeft() const noexcept;
62 constexpr inline
QPoint bottomRight() const noexcept;
63 constexpr inline
QPoint topRight() const noexcept;
64 constexpr inline
QPoint bottomLeft() const noexcept;
65 constexpr inline
QPoint center() const noexcept;
67 constexpr inline
void moveLeft(
int pos) noexcept;
68 constexpr inline
void moveTop(
int pos) noexcept;
69 constexpr inline
void moveRight(
int pos) noexcept;
70 constexpr inline
void moveBottom(
int pos) noexcept;
71 constexpr inline
void moveTopLeft(const
QPoint &
p) noexcept;
72 constexpr inline
void moveBottomRight(const
QPoint &
p) noexcept;
73 constexpr inline
void moveTopRight(const
QPoint &
p) noexcept;
74 constexpr inline
void moveBottomLeft(const
QPoint &
p) noexcept;
75 constexpr inline
void moveCenter(const
QPoint &
p) noexcept;
77 constexpr inline
void translate(
int dx,
int dy) noexcept;
79 [[nodiscard]] constexpr inline
QRect translated(
int dx,
int dy) const noexcept;
80 [[nodiscard]] constexpr inline
QRect translated(const
QPoint &
p) const noexcept;
81 [[nodiscard]] constexpr inline
QRect transposed() const noexcept;
83 constexpr inline
void moveTo(
int x,
int t) noexcept;
84 constexpr inline
void moveTo(const
QPoint &
p) noexcept;
86 constexpr inline
void setRect(
int x,
int y,
int w,
int h) noexcept;
87 constexpr inline
void getRect(
int *
x,
int *
y,
int *
w,
int *
h) const;
90 constexpr inline
void getCoords(
int *
x1,
int *
y1,
int *
x2,
int *
y2) const;
92 constexpr inline
void adjust(
int x1,
int y1,
int x2,
int y2) noexcept;
93 [[nodiscard]] constexpr inline
QRect adjusted(
int x1,
int y1,
int x2,
int y2) const noexcept;
95 constexpr inline
QSize size() const noexcept;
96 constexpr inline
int width() const noexcept;
97 constexpr inline
int height() const noexcept;
98 constexpr inline
void setWidth(
int w) noexcept;
99 constexpr inline
void setHeight(
int h) noexcept;
100 constexpr inline
void setSize(const
QSize &
s) noexcept;
109 inline
bool contains(
int x,
int y) const noexcept;
110 inline
bool contains(
int x,
int y,
bool proper) const noexcept;
112 [[nodiscard]] inline
QRect intersected(const
QRect &
other) const noexcept;
113 bool intersects(const
QRect &
r) const noexcept;
115 constexpr inline
QRect marginsAdded(const
QMargins &margins) const noexcept;
116 constexpr inline
QRect marginsRemoved(const
QMargins &margins) const noexcept;
117 constexpr inline
QRect &operator+=(const
QMargins &margins) noexcept;
118 constexpr inline
QRect &operator-=(const
QMargins &margins) noexcept;
122 friend constexpr inline
bool operator==(const
QRect &
r1, const
QRect &
r2) noexcept
126 friend constexpr inline size_t qHash(
const QRect &,
size_t)
noexcept;
128#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
129 [[nodiscard]] CGRect toCGRect() const noexcept;
131 [[nodiscard]]
constexpr inline QRectF toRectF() const noexcept;
145#ifndef QT_NO_DATASTREAM
154constexpr inline QRect::QRect(
int aleft,
int atop,
int awidth,
int aheight) noexcept
155 :
x1(aleft),
y1(atop),
x2(aleft + awidth - 1),
y2(atop + aheight - 1) {}
158 :
x1(atopLeft.x()),
y1(atopLeft.y()),
x2(abottomRight.x()),
y2(abottomRight.y()) {}
161 :
x1(atopLeft.x()),
y1(atopLeft.y()),
x2(atopLeft.x()+asize.width() - 1),
y2(atopLeft.y()+asize.height() - 1) {}
164{
return x2 ==
x1 - 1 &&
y2 ==
y1 - 1; }
203{
x1 =
p.x();
y1 =
p.y(); }
206{
x2 =
p.x();
y2 =
p.y(); }
209{
x2 =
p.x();
y1 =
p.y(); }
212{
x1 =
p.x();
y2 =
p.y(); }
236{
return x2 -
x1 + 1; }
239{
return y2 -
y1 + 1; }
267{
return QRect(topLeft(),
size().transposed()); }
372constexpr inline void QRect::adjust(
int dx1,
int dy1,
int dx2,
int dy2)
noexcept
381{
x2 = (
x1 +
w - 1); }
384{
y2 = (
y1 +
h - 1); }
388 x2 = (
s.width() +
x1 - 1);
389 y2 = (
s.height() +
y1 - 1);
416 return *
this &
other;
431 return QRect(
QPoint(rectangle.left() - margins.left(), rectangle.top() - margins.top()),
432 QPoint(rectangle.right() + margins.right(), rectangle.bottom() + margins.bottom()));
437 return QRect(
QPoint(rectangle.left() - margins.left(), rectangle.top() - margins.top()),
438 QPoint(rectangle.right() + margins.right(), rectangle.bottom() + margins.bottom()));
443 return QRect(
QPoint(lhs.left() + rhs.left(), lhs.top() + rhs.top()),
444 QPoint(lhs.right() - rhs.right(), lhs.bottom() - rhs.bottom()));
450 QPoint(
x2 + margins.right(),
y2 + margins.bottom()));
456 QPoint(
x2 - margins.right(),
y2 - margins.bottom()));
461 *
this = marginsAdded(margins);
467 *
this = marginsRemoved(margins);
477#ifndef QT_NO_DEBUG_STREAM
485 constexpr QRectF() noexcept : xp(0.), yp(0.),
w(0.),
h(0.) {}
491 constexpr inline bool isNull() const noexcept;
492 constexpr inline
bool isEmpty() const noexcept;
493 constexpr inline
bool isValid() const noexcept;
496 constexpr inline
qreal left() const noexcept {
return xp; }
497 constexpr inline qreal top() const noexcept {
return yp; }
501 constexpr inline qreal x() const noexcept;
502 constexpr inline
qreal y() const noexcept;
503 constexpr inline
void setLeft(
qreal pos) noexcept;
504 constexpr inline
void setTop(
qreal pos) noexcept;
505 constexpr inline
void setRight(
qreal pos) noexcept;
506 constexpr inline
void setBottom(
qreal pos) noexcept;
514 constexpr inline QPointF center() const noexcept;
516 constexpr inline
void setTopLeft(const
QPointF &
p) noexcept;
517 constexpr inline
void setBottomRight(const
QPointF &
p) noexcept;
518 constexpr inline
void setTopRight(const
QPointF &
p) noexcept;
519 constexpr inline
void setBottomLeft(const
QPointF &
p) noexcept;
521 constexpr inline
void moveLeft(
qreal pos) noexcept;
522 constexpr inline
void moveTop(
qreal pos) noexcept;
523 constexpr inline
void moveRight(
qreal pos) noexcept;
524 constexpr inline
void moveBottom(
qreal pos) noexcept;
525 constexpr inline
void moveTopLeft(const
QPointF &
p) noexcept;
526 constexpr inline
void moveBottomRight(const
QPointF &
p) noexcept;
527 constexpr inline
void moveTopRight(const
QPointF &
p) noexcept;
528 constexpr inline
void moveBottomLeft(const
QPointF &
p) noexcept;
529 constexpr inline
void moveCenter(const
QPointF &
p) noexcept;
534 [[nodiscard]] constexpr inline
QRectF translated(
qreal dx,
qreal dy) const noexcept;
535 [[nodiscard]] constexpr inline
QRectF translated(const
QPointF &
p) const noexcept;
537 [[nodiscard]] constexpr inline
QRectF transposed() const noexcept;
539 constexpr inline
void moveTo(
qreal x,
qreal y) noexcept;
540 constexpr inline
void moveTo(const
QPointF &
p) noexcept;
551 constexpr inline
QSizeF size() const noexcept;
552 constexpr inline
qreal width() const noexcept;
554 constexpr inline
void setWidth(
qreal w) noexcept;
555 constexpr inline
void setHeight(
qreal h) noexcept;
556 constexpr inline
void setSize(const
QSizeF &
s) noexcept;
568 bool intersects(const
QRectF &
r) const noexcept;
570 constexpr inline
QRectF marginsAdded(const
QMarginsF &margins) const noexcept;
571 constexpr inline
QRectF marginsRemoved(const
QMarginsF &margins) const noexcept;
572 constexpr inline
QRectF &operator+=(const
QMarginsF &margins) noexcept;
573 constexpr inline
QRectF &operator-=(const
QMarginsF &margins) noexcept;
586 [[nodiscard]]
constexpr inline QRect toRect() const noexcept;
587 [[nodiscard]]
QRect toAlignedRect() const noexcept;
589#if defined(Q_OS_DARWIN) || defined(Q_QDOC)
590 [[nodiscard]]
static QRectF fromCGRect(CGRect
rect)
noexcept;
591 [[nodiscard]] CGRect toCGRect() const noexcept;
594#if defined(Q_OS_WASM) || defined(Q_QDOC)
595 [[nodiscard]]
static QRectF fromDOMRect(emscripten::val domRect);
596 [[nodiscard]] emscripten::val toDOMRect()
const;
611#ifndef QT_NO_DATASTREAM
621 : xp(aleft), yp(atop),
w(awidth),
h(aheight)
626 : xp(atopLeft.x()), yp(atopLeft.y()),
w(asize.width()),
h(asize.height())
632 : xp(atopLeft.x()), yp(atopLeft.y()),
w(abottomRight.x() - atopLeft.x()),
h(abottomRight.y() - atopLeft.y())
637 : xp(
r.x()), yp(
r.y()),
w(
r.width()),
h(
r.height())
645{
return w == 0. &&
h == 0.; }
648{
return w <= 0. ||
h <= 0.; }
653{
return w > 0. &&
h > 0.; }
662{
qreal diff =
pos - xp; xp += diff;
w -= diff; }
668{
qreal diff =
pos - yp; yp += diff;
h -= diff; }
674{ setLeft(
p.x()); setTop(
p.y()); }
677{ setRight(
p.x()); setTop(
p.y()); }
680{ setLeft(
p.x()); setBottom(
p.y()); }
683{ setRight(
p.x()); setBottom(
p.y()); }
701{ moveLeft(
p.x()); moveTop(
p.y()); }
704{ moveRight(
p.x()); moveTop(
p.y()); }
707{ moveLeft(
p.x()); moveBottom(
p.y()); }
710{ moveRight(
p.x()); moveBottom(
p.y()); }
713{ xp =
p.x() -
w/2; yp =
p.y() -
h/2; }
750 return QRectF(xp + dx, yp + dy,
w,
h);
754{
return QRectF(xp +
p.x(), yp +
p.y(),
w,
h); }
757{
return QRectF(topLeft(),
size().transposed()); }
801 return QRectF(xp + xp1, yp + yp1,
w + xp2 - xp1,
h + yp2 - yp1);
850 const int nxp =
qRound(xp);
851 const int nyp =
qRound(yp);
852 const int nw =
qRound(
w + (xp - nxp) / 2);
853 const int nh =
qRound(
h + (yp - nyp) / 2);
854 return QRect(nxp, nyp, nw, nh);
859 return QRectF(
QPointF(lhs.left() - rhs.left(), lhs.top() - rhs.top()),
860 QSizeF(lhs.width() + rhs.left() + rhs.right(), lhs.height() + rhs.top() + rhs.bottom()));
865 return QRectF(
QPointF(rhs.left() - lhs.left(), rhs.top() - lhs.top()),
866 QSizeF(rhs.width() + lhs.left() + lhs.right(), rhs.height() + lhs.top() + lhs.bottom()));
871 return QRectF(
QPointF(lhs.left() + rhs.left(), lhs.top() + rhs.top()),
872 QSizeF(lhs.width() - rhs.left() - rhs.right(), lhs.height() - rhs.top() - rhs.bottom()));
877 return QRectF(
QPointF(xp - margins.left(), yp - margins.top()),
878 QSizeF(
w + margins.left() + margins.right(),
h + margins.top() + margins.bottom()));
883 return QRectF(
QPointF(xp + margins.left(), yp + margins.top()),
884 QSizeF(
w - margins.left() - margins.right(),
h - margins.top() - margins.bottom()));
889 *
this = marginsAdded(margins);
895 *
this = marginsRemoved(margins);
899#ifndef QT_NO_DEBUG_STREAM
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
friend constexpr bool operator!=(const QRectF &r1, const QRectF &r2) noexcept
Returns true if the rectangles r1 and r2 are sufficiently different, otherwise returns false.
constexpr void moveCenter(const QPointF &p) noexcept
Moves the rectangle, leaving the center point at the given position.
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr void moveTo(qreal x, qreal y) noexcept
Moves the rectangle, leaving the top-left corner at the given position (x, y).
constexpr qreal bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr void getCoords(qreal *x1, qreal *y1, qreal *x2, qreal *y2) const
Extracts the position of the rectangle's top-left corner to *x1 and *y1, and the position of the bott...
constexpr void setBottom(qreal pos) noexcept
Sets the bottom edge of the rectangle to the given finite y coordinate.
constexpr void setRight(qreal pos) noexcept
Sets the right edge of the rectangle to the given finite x coordinate.
constexpr void getRect(qreal *x, qreal *y, qreal *w, qreal *h) const
Extracts the position of the rectangle's top-left corner to *x and y, and its dimensions to *width an...
constexpr void setLeft(qreal pos) noexcept
Sets the left edge of the rectangle to the given finite x coordinate.
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr void setCoords(qreal x1, qreal y1, qreal x2, qreal y2) noexcept
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its botto...
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
QRectF & operator&=(const QRectF &r) noexcept
Intersects this rectangle with the given rectangle.
constexpr QRectF marginsRemoved(const QMarginsF &margins) const noexcept
constexpr QRectF translated(qreal dx, qreal dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
constexpr QRectF & operator+=(const QMarginsF &margins) noexcept
constexpr void setTopLeft(const QPointF &p) noexcept
Set the top-left corner of the rectangle to the given position.
constexpr void setTop(qreal pos) noexcept
Sets the top edge of the rectangle to the given finite y coordinate.
bool contains(const QRectF &r) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
constexpr QRectF & operator-=(const QMarginsF &margins) noexcept
constexpr QPointF bottomLeft() const noexcept
Returns the position of the rectangle's bottom-left corner.
constexpr QRectF() noexcept
Constructs a null rectangle.
constexpr void moveRight(qreal pos) noexcept
Moves the rectangle horizontally, leaving the rectangle's right edge at the given finite x coordinate...
constexpr void setY(qreal pos) noexcept
Sets the top edge of the rectangle to the given finite y coordinate.
constexpr void moveTopLeft(const QPointF &p) noexcept
Moves the rectangle, leaving the top-left corner at the given position.
constexpr QRectF marginsAdded(const QMarginsF &margins) const noexcept
constexpr QRectF adjusted(qreal x1, qreal y1, qreal x2, qreal y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
constexpr void setBottomLeft(const QPointF &p) noexcept
Set the bottom-left corner of the rectangle to the given position.
constexpr void moveBottomLeft(const QPointF &p) noexcept
Moves the rectangle, leaving the bottom-left corner at the given position.
constexpr void setWidth(qreal w) noexcept
Sets the width of the rectangle to the given finite width.
constexpr void moveBottom(qreal pos) noexcept
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given finite y coordinate.
constexpr void setBottomRight(const QPointF &p) noexcept
Set the bottom-right corner of the rectangle to the given position.
constexpr void setSize(const QSizeF &s) noexcept
Sets the size of the rectangle to the given finite size.
constexpr bool isNull() const noexcept
Returns true if the rectangle is a null rectangle, otherwise returns false.
constexpr void moveBottomRight(const QPointF &p) noexcept
Moves the rectangle, leaving the bottom-right corner at the given position.
constexpr QPointF topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr QPointF center() const noexcept
Returns the center point of the rectangle.
constexpr void moveLeft(qreal pos) noexcept
Moves the rectangle horizontally, leaving the rectangle's left edge at the given finite x coordinate.
constexpr QPointF bottomRight() const noexcept
Returns the position of the rectangle's bottom-right corner.
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
constexpr QRect toRect() const noexcept
Returns a QRect based on the values of this rectangle.
constexpr void adjust(qreal x1, qreal y1, qreal x2, qreal y2) noexcept
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
constexpr void translate(qreal dx, qreal dy) noexcept
Moves the rectangle dx along the x-axis and dy along the y-axis, relative to the current position.
constexpr qreal top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr void setHeight(qreal h) noexcept
Sets the height of the rectangle to the given finite height.
constexpr bool isValid() const noexcept
Returns true if the rectangle is valid, otherwise returns false.
constexpr void moveTop(qreal pos) noexcept
Moves the rectangle vertically, leaving the rectangle's top line at the given finite y coordinate.
constexpr void setTopRight(const QPointF &p) noexcept
Set the top-right corner of the rectangle to the given position.
constexpr QPointF topRight() const noexcept
Returns the position of the rectangle's top-right corner.
QRectF & operator|=(const QRectF &r) noexcept
Unites this rectangle with the given rectangle.
constexpr QRectF transposed() const noexcept
QRectF intersected(const QRectF &other) const noexcept
constexpr void moveTopRight(const QPointF &p) noexcept
Moves the rectangle, leaving the top-right corner at the given position.
QRectF united(const QRectF &other) const noexcept
constexpr qreal right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
constexpr void setRect(qreal x, qreal y, qreal w, qreal h) noexcept
Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to the given width an...
\inmodule QtCore\reentrant
constexpr void moveBottomRight(const QPoint &p) noexcept
Moves the rectangle, leaving the bottom-right corner at the given position.
constexpr QRect & operator+=(const QMargins &margins) noexcept
Adds the margins to the rectangle, growing it.
constexpr QPoint bottomLeft() const noexcept
Returns the position of the rectangle's bottom-left corner.
constexpr void setBottomLeft(const QPoint &p) noexcept
Set the bottom-left corner of the rectangle to the given position.
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr void getCoords(int *x1, int *y1, int *x2, int *y2) const
Extracts the position of the rectangle's top-left corner to *x1 and *y1, and the position of the bott...
constexpr void moveTopLeft(const QPoint &p) noexcept
Moves the rectangle, leaving the top-left corner at the given position.
constexpr QRect marginsAdded(const QMargins &margins) const noexcept
Returns a rectangle grown by the margins.
constexpr void adjust(int x1, int y1, int x2, int y2) noexcept
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
constexpr void moveBottom(int pos) noexcept
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate.
constexpr void moveRight(int pos) noexcept
Moves the rectangle horizontally, leaving the rectangle's right edge at the given x coordinate.
constexpr void moveCenter(const QPoint &p) noexcept
Moves the rectangle, leaving the center point at the given position.
constexpr QRect & operator-=(const QMargins &margins) noexcept
Returns a rectangle shrunk by the margins.
constexpr void getRect(int *x, int *y, int *w, int *h) const
Extracts the position of the rectangle's top-left corner to *x and *y, and its dimensions to *width a...
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr bool isValid() const noexcept
Returns true if the rectangle is valid, otherwise returns false.
constexpr bool isNull() const noexcept
Returns true if the rectangle is a null rectangle, otherwise returns false.
QRect intersected(const QRect &other) const noexcept
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr QRect marginsRemoved(const QMargins &margins) const noexcept
Removes the margins from the rectangle, shrinking it.
constexpr void setRight(int pos) noexcept
Sets the right edge of the rectangle to the given x coordinate.
constexpr QPoint topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr void setSize(const QSize &s) noexcept
Sets the size of the rectangle to the given size.
constexpr QRect adjusted(int x1, int y1, int x2, int y2) const noexcept
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of ...
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr QPoint topRight() const noexcept
Returns the position of the rectangle's top-right corner.
constexpr void moveLeft(int pos) noexcept
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate.
constexpr void setBottom(int pos) noexcept
Sets the bottom edge of the rectangle to the given y coordinate.
bool contains(const QRect &r, bool proper=false) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
static constexpr QRect span(const QPoint &p1, const QPoint &p2) noexcept
Returns a rectangle spanning the two points p1 and p2, including both and everything in between.
constexpr void setLeft(int pos) noexcept
Sets the left edge of the rectangle to the given x coordinate.
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr void setRect(int x, int y, int w, int h) noexcept
Sets the coordinates of the rectangle's top-left corner to ({x}, {y}), and its size to the given widt...
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
QRect & operator&=(const QRect &r) noexcept
Intersects this rectangle with the given rectangle.
constexpr void setWidth(int w) noexcept
Sets the width of the rectangle to the given width.
constexpr QRect() noexcept
Constructs a null rectangle.
constexpr void setX(int x) noexcept
Sets the left edge of the rectangle to the given x coordinate.
constexpr void moveBottomLeft(const QPoint &p) noexcept
Moves the rectangle, leaving the bottom-left corner at the given position.
constexpr QSize size() const noexcept
Returns the size of the rectangle.
constexpr void setTopLeft(const QPoint &p) noexcept
Set the top-left corner of the rectangle to the given position.
constexpr QRect transposed() const noexcept
constexpr void translate(int dx, int dy) noexcept
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position.
constexpr QRectF toRectF() const noexcept
constexpr void setCoords(int x1, int y1, int x2, int y2) noexcept
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its botto...
constexpr QPoint bottomRight() const noexcept
Returns the position of the rectangle's bottom-right corner.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
QRect united(const QRect &other) const noexcept
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr void moveTopRight(const QPoint &p) noexcept
Moves the rectangle, leaving the top-right corner at the given position.
friend constexpr bool operator!=(const QRect &r1, const QRect &r2) noexcept
Returns true if the rectangles r1 and r2 are different, otherwise returns false.
constexpr void setHeight(int h) noexcept
Sets the height of the rectangle to the given height.
constexpr void moveTo(int x, int t) noexcept
Moves the rectangle, leaving the top-left corner at the given position (x, y).
constexpr void setBottomRight(const QPoint &p) noexcept
Set the bottom-right corner of the rectangle to the given position.
constexpr void moveTop(int pos) noexcept
Moves the rectangle vertically, leaving the rectangle's top edge at the given y coordinate.
QRect & operator|=(const QRect &r) noexcept
Unites this rectangle with the given rectangle.
constexpr QPoint center() const noexcept
Returns the center point of the rectangle.
constexpr void setY(int y) noexcept
Sets the top edge of the rectangle to the given y coordinate.
constexpr void setTopRight(const QPoint &p) noexcept
Set the top-right corner of the rectangle to the given position.
constexpr int right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
constexpr void setTop(int pos) noexcept
Sets the top edge of the rectangle to the given y coordinate.
Combined button and popup list for selecting options.
#define QT_WARNING_DISABLE_FLOAT_COMPARE
constexpr timespec operator+(const timespec &t1, const timespec &t2)
constexpr timespec operator-(const timespec &t1, const timespec &t2)
size_t qHash(const QFileSystemWatcherPathKey &key, size_t seed=0)
int qRound(qfloat16 d) noexcept
constexpr QtPrivate::QHashMultiReturnType< T... > qHashMulti(size_t seed, const T &... args) noexcept(std::conjunction_v< QtPrivate::QNothrowHashable< T >... >)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qMax(const T &a, const T &b)
static bool contains(const QJsonArray &haystack, unsigned needle)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLfloat GLfloat GLfloat x1
GLdouble GLdouble GLdouble GLdouble top
GLfloat GLfloat GLfloat GLfloat h
GLfixed GLfixed GLfixed y2
GLenum GLenum GLsizei void GLsizei void void * span
GLint GLenum GLboolean normalized
static void setCoords(GLfloat *coords, const QOpenGLRect &rect)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
#define Q_DECLARE_TYPEINFO(TYPE, FLAGS)
static bool translate(xcb_connection_t *connection, xcb_window_t child, xcb_window_t parent, int *x, int *y)