![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtCore\reentrant More...
#include <qrect.h>
Public Member Functions | |
constexpr | QRect () noexcept |
Constructs a null rectangle. | |
constexpr | QRect (const QPoint &topleft, const QPoint &bottomright) noexcept |
Constructs a rectangle with the given topLeft and bottomRight corners, both included. | |
constexpr | QRect (const QPoint &topleft, const QSize &size) noexcept |
Constructs a rectangle with the given topLeft corner and the given size. | |
constexpr | QRect (int left, int top, int width, int height) noexcept |
Constructs a rectangle with (x, y) as its top-left corner and the given width and height. | |
constexpr bool | isNull () const noexcept |
Returns true if the rectangle is a null rectangle, otherwise returns false . | |
constexpr bool | isEmpty () const noexcept |
Returns true if the rectangle is empty, otherwise returns false . | |
constexpr bool | isValid () const noexcept |
Returns true if the rectangle is valid, otherwise returns false . | |
constexpr int | left () const noexcept |
Returns the x-coordinate of the rectangle's left edge. | |
constexpr int | top () const noexcept |
Returns the y-coordinate of the rectangle's top edge. | |
constexpr int | right () const noexcept |
Returns the x-coordinate of the rectangle's right edge. | |
constexpr int | bottom () const noexcept |
Returns the y-coordinate of the rectangle's bottom edge. | |
QRect | normalized () const noexcept |
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height. | |
constexpr int | x () const noexcept |
Returns the x-coordinate of the rectangle's left edge. | |
constexpr int | y () const noexcept |
Returns the y-coordinate of the rectangle's top edge. | |
constexpr void | setLeft (int pos) noexcept |
Sets the left edge of the rectangle to the given x coordinate. | |
constexpr void | setTop (int pos) noexcept |
Sets the top edge of the rectangle to the given y coordinate. | |
constexpr void | setRight (int pos) noexcept |
Sets the right edge of the rectangle to the given x coordinate. | |
constexpr void | setBottom (int pos) noexcept |
Sets the bottom edge of the rectangle to the given y coordinate. | |
constexpr void | setX (int x) noexcept |
Sets the left edge of the rectangle to the given x coordinate. | |
constexpr void | setY (int y) noexcept |
Sets the top edge of the rectangle to the given y coordinate. | |
constexpr void | setTopLeft (const QPoint &p) noexcept |
Set the top-left corner of the rectangle to the given position. | |
constexpr void | setBottomRight (const QPoint &p) noexcept |
Set the bottom-right corner of the rectangle to the given position. | |
constexpr void | setTopRight (const QPoint &p) noexcept |
Set the top-right corner of the rectangle to the given position. | |
constexpr void | setBottomLeft (const QPoint &p) noexcept |
Set the bottom-left corner of the rectangle to the given position. | |
constexpr QPoint | topLeft () const noexcept |
Returns the position of the rectangle's top-left corner. | |
constexpr QPoint | bottomRight () const noexcept |
Returns the position of the rectangle's bottom-right corner. | |
constexpr QPoint | topRight () const noexcept |
Returns the position of the rectangle's top-right corner. | |
constexpr QPoint | bottomLeft () const noexcept |
Returns the position of the rectangle's bottom-left corner. | |
constexpr QPoint | center () const noexcept |
Returns the center point of the rectangle. | |
constexpr void | moveLeft (int pos) noexcept |
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate. | |
constexpr void | moveTop (int pos) noexcept |
Moves the rectangle vertically, leaving the rectangle's top 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 | moveBottom (int pos) noexcept |
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate. | |
constexpr void | moveTopLeft (const QPoint &p) noexcept |
Moves the rectangle, leaving the top-left corner at the given position. | |
constexpr void | moveBottomRight (const QPoint &p) noexcept |
Moves the rectangle, leaving the bottom-right corner at the given position. | |
constexpr void | moveTopRight (const QPoint &p) noexcept |
Moves the rectangle, leaving the top-right corner at the given position. | |
constexpr void | moveBottomLeft (const QPoint &p) noexcept |
Moves the rectangle, leaving the bottom-left corner at the given position. | |
constexpr void | moveCenter (const QPoint &p) noexcept |
Moves the rectangle, leaving the center point at the given position. | |
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 void | translate (const QPoint &p) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Moves the rectangle {offset}. | |
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, relative to the current position. | |
constexpr QRect | translated (const QPoint &p) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a copy of the rectangle that is translated {offset}. | |
constexpr QRect | transposed () const noexcept |
constexpr void | moveTo (int x, int t) noexcept |
Moves the rectangle, leaving the top-left corner at the given position (x, y). | |
constexpr void | moveTo (const QPoint &p) noexcept |
Moves the rectangle, leaving the top-left corner at the given position. | |
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 width and height. | |
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 and *height. | |
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 bottom-right corner to (x2, y2). | |
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 bottom-right corner to *x2 and *y2. | |
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 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 this rectangle. | |
constexpr QSize | size () const noexcept |
Returns the size of the rectangle. | |
constexpr int | width () const noexcept |
Returns the width of the rectangle. | |
constexpr int | height () const noexcept |
Returns the height of the rectangle. | |
constexpr void | setWidth (int w) noexcept |
Sets the width of the rectangle to the given width. | |
constexpr void | setHeight (int h) noexcept |
Sets the height of the rectangle to the given height. | |
constexpr void | setSize (const QSize &s) noexcept |
Sets the size of the rectangle to the given size. | |
QRect | operator| (const QRect &r) const noexcept |
Returns the bounding rectangle of this rectangle and the given rectangle. | |
QRect | operator& (const QRect &r) const noexcept |
Returns the intersection of this rectangle and the given rectangle. | |
QRect & | operator|= (const QRect &r) noexcept |
Unites this rectangle with the given rectangle. | |
QRect & | operator&= (const QRect &r) noexcept |
Intersects this rectangle with the given rectangle. | |
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 only in what argument(s) it accepts.Returns true if the given rectangle is inside this rectangle. | |
bool | contains (const QPoint &p, bool proper=false) const noexcept |
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false . | |
bool | contains (int x, int y) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if the point (x, y) is inside this rectangle, otherwise returns false . | |
bool | contains (int x, int y, bool proper) const noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true if the point (x, y) is inside or on the edge of the rectangle, otherwise returns false . | |
QRect | united (const QRect &other) const noexcept |
QRect | intersected (const QRect &other) const noexcept |
bool | intersects (const QRect &r) const noexcept |
Returns true if this rectangle intersects with the given rectangle (i.e., there is at least one pixel that is within both rectangles), otherwise returns false . | |
constexpr QRect | marginsAdded (const QMargins &margins) const noexcept |
Returns a rectangle grown by the margins. | |
constexpr QRect | marginsRemoved (const QMargins &margins) const noexcept |
Removes the margins from the rectangle, shrinking it. | |
constexpr QRect & | operator+= (const QMargins &margins) noexcept |
Adds the margins to the rectangle, growing it. | |
constexpr QRect & | operator-= (const QMargins &margins) noexcept |
Returns a rectangle shrunk by the margins. | |
constexpr QRectF | toRectF () const noexcept |
Static Public Member Functions | |
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. | |
Friends | |
constexpr bool | operator== (const QRect &r1, const QRect &r2) noexcept |
Returns true if the rectangles r1 and r2 are equal, otherwise returns false . | |
constexpr bool | operator!= (const QRect &r1, const QRect &r2) noexcept |
Returns true if the rectangles r1 and r2 are different, otherwise returns false . | |
constexpr size_t | qHash (const QRect &, size_t) noexcept |
Related Symbols | |
(Note that these are not member symbols.) | |
QRect | operator+ (const QRect &rectangle, const QMargins &margins) |
Returns the rectangle grown by the margins. | |
QRect | operator+ (const QMargins &margins, const QRect &rectangle) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the rectangle grown by the margins. | |
QRect | operator- (const QRect &lhs, const QMargins &rhs) |
Returns the lhs rectangle shrunk by the rhs margins. | |
QDataStream & | operator<< (QDataStream &stream, const QRect &rectangle) |
Writes the given rectangle to the given stream, and returns a reference to the stream. | |
QDataStream & | operator>> (QDataStream &stream, QRect &rectangle) |
Reads a rectangle from the given stream into the given rectangle, and returns a reference to the stream. | |
\inmodule QtCore
\reentrant
The QRect class defines a rectangle in the plane using integer precision.
A rectangle is normally expressed as a top-left corner and a size. The size (width and height) of a QRect is always equivalent to the mathematical rectangle that forms the basis for its rendering.
A QRect can be constructed with a set of left, top, width and height integers, or from a QPoint and a QSize. The following code creates two identical rectangles.
There is a third constructor that creates a QRect using the top-left and bottom-right coordinates, but we recommend that you avoid using it. The rationale is that for historical reasons the values returned by the bottom() and right() functions deviate from the true bottom-right corner of the rectangle.
The QRect class provides a collection of functions that return the various rectangle coordinates, and enable manipulation of these. QRect also provides functions to move the rectangle relative to the various coordinates. In addition there is a moveTo() function that moves the rectangle, leaving its top left corner at the given coordinates. Alternatively, the translate() function moves the rectangle the given offset relative to the current position, and the translated() function returns a translated copy of this rectangle.
The size() function returns the rectangle's dimensions as a QSize. The dimensions can also be retrieved separately using the width() and height() functions. To manipulate the dimensions use the setSize(), setWidth() or setHeight() functions. Alternatively, the size can be changed by applying either of the functions setting the rectangle coordinates, for example, setBottom() or setRight().
The contains() function tells whether a given point is inside the rectangle or not, and the intersects() function returns true
if this rectangle intersects with a given rectangle. The QRect class also provides the intersected() function which returns the intersection rectangle, and the united() function which returns the rectangle that encloses the given rectangle and this:
\table \row
The isEmpty() function returns true
if left() > right() or top() > bottom(). Note that an empty rectangle is not valid: The isValid() function returns true
if left() <= right() and top() <= bottom(). A null rectangle (isNull() == true) on the other hand, has both width and height set to 0.
Note that due to the way QRect and QRectF are defined, an empty QRect is defined in essentially the same way as QRectF.
Finally, QRect objects can be streamed as well as compared.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Constructs a rectangle with the given topLeft and bottomRight corners, both included.
If bottomRight is to higher and to the left of topLeft, the rectangle defined is instead non-inclusive of the corners.
Constructs a rectangle with the given topLeft corner and the given size.
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
Definition at line 372 of file qrect.h.
Referenced by dockedGeometry(), QLabelPrivate::documentRect(), QItemDelegate::doLayout(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QAndroidStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), QGraphicsScenePrivate::drawItemHelper(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QGraphicsScenePrivate::drawSubtreeRecursive(), QScrollArea::ensureWidgetVisible(), QDockAreaLayoutInfo::findSeparator(), QDockAreaLayout::findSeparator(), QFrame::frameRect(), QMenuBarPrivate::menuRect(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QQuickUniversalFocusRectangle::paint(), QPagePreview::paintEvent(), QLabel::paintEvent(), QGraphicsWidget::paintWindowFrame(), QMainWindowLayout::plug(), QListViewPrivate::prepareItemsLayout(), QWindowsIntegration::setApplicationBadge(), QFrame::setFrameRect(), QFormLayout::setGeometry(), QMdiSubWindowPrivate::setMaximizeMode(), QTabBarPrivate::setupMovableTab(), QComboBox::showPopup(), QAndroidStyle::subControlRect(), QQC2::QCommonStyle::subElementRect(), QCommonStyle::subElementRect(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), QGraphicsViewPrivate::updateRegion(), and QGraphicsView::updateScene().
|
inlineconstexprnoexcept |
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of this rectangle.
Definition at line 369 of file qrect.h.
Referenced by QSGRhiAtlasTexture::Texture::atlasSubRectWithoutPadding(), QGraphicsItem::boundingRegion(), QWidgetPrivate::checkRestoredGeometry(), QQC2_NAMESPACE::QMacStyle::drawComplexControl(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QSplashScreen::drawContents(), QAndroidStyle::AndroidControl::drawControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), QGraphicsScenePrivate::drawItemHelper(), QGraphicsScenePrivate::drawItems(), QWindowsVistaStyle::drawPrimitive(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QGraphicsViewPrivate::findItems(), QToolBarAreaLayout::fitLayout(), QtPrivate::QWellArray::paintCell(), QPagePreview::paintEvent(), QFocusFrame::paintEvent(), QPlainTextEdit::paintEvent(), qt_mapFillRect(), QGraphicsView::render(), QOutlineMapper::setClipRect(), QWasmWindow::setGeometry(), QQC2::QWindowsStyle::styleHint(), QCommonStyle::styleHint(), QQC2::QCommonStyle::styleHint(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQC2::QCommonStyle::subControlRect(), QMacStyle::subControlRect(), QCommonStyle::subControlRect(), QAndroidStyle::subControlRect(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QQC2::QCommonStyle::subElementRect(), QCommonStyle::subElementRect(), QAndroidStyle::AndroidControl::subElementRect(), QAndroidStyle::AndroidProgressBarControl::subElementRect(), QCommandLinkButtonPrivate::titleRect(), QIOSScreen::updateProperties(), and src_gui_painting_qpainter2::MyWidget::wrapper15().
|
inlineconstexprnoexcept |
Returns the y-coordinate of the rectangle's bottom edge.
Note that for historical reasons this function returns top() + height() - 1; use y() + height() to retrieve the true y-coordinate.
Definition at line 181 of file qrect.h.
Referenced by QQuickStyleMargins::QQuickStyleMargins(), QSpanBuffer::addSpan(), QWaylandXdgPositionerData::anchorPoint(), QDockAreaLayoutInfo::apply(), QToolBarAreaLayout::apply(), QWindowGeometrySpecification::applyTo(), QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStylePrivate::calculateElidedText(), QGroupBoxPrivate::calculateFrame(), QWidgetPrivate::checkRestoredGeometry(), clipStraightLine(), QListViewPrivate::closestIndex(), QDockAreaLayout::constrainedRect(), QWaylandQtShellChromePrivate::constrainPoint(), convolute(), RenderHelpers::correctViewportCoordinates(), QToolBarAreaLayoutInfo::distance(), QGridLayoutPrivate::distribute(), QLabelPrivate::documentRect(), QAndroidStyle::Android9PatchDrawable::draw(), QDirectFbBlitter::drawCachedGlyphs(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), drawPixel(), drawPixelARGB32(), drawPixelARGB32Opaque(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QPixmapStyle::drawProgressBarFill(), QMacStylePrivate::drawToolbarButtonArrow(), QTreeView::drawTree(), QBoxLayoutPrivate::effectiveMargins(), QPlainTextEditPrivate::ensureCursorVisible(), QScrollArea::ensureWidgetVisible(), QRasterPaintEngine::fillPath(), QToolBarAreaLayoutInfo::fitLayout(), QWidget::frameGeometry(), QWidget::frameSize(), QDockAreaLayout::gapRect(), QDockAreaLayout::getGrid(), grayscale(), QtWaylandClient::QWaylandBradientDecoration::handleMouse(), QtWaylandClient::QWaylandBradientDecoration::handleTouch(), QIntersectionFinder::hasIntersections(), QRasterPaintEnginePrivate::isUnclipped(), QRasterPaintEnginePrivate::isUnclipped_normalized(), QWidgetResizeHandler::keyPressEvent(), QTabBarPrivate::layoutTabs(), QTabBarPrivate::makeVisible(), QWidgetResizeHandler::mouseMoveEvent(), QComboBoxPrivateScroller::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QAbstractButtonPrivate::moveFocus(), QTabBarPrivate::normalizedScrollRect(), operator<<(), QtWaylandClient::QWaylandBradientDecoration::paint(), QMenu::paintEvent(), QTabBar::paintEvent(), QHeaderView::paintEvent(), QPlainTextEdit::paintEvent(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), QMenuBarPrivate::popupAction(), QDateTimeEditPrivate::positionCalendarPopup(), QQC2::qDrawBorderPixmap(), QSGSoftwareHelpers::qDrawBorderPixmap(), qRectIntersects(), qt_intersect_spans(), qt_scrollRectInImage(), QRasterizer::rasterize(), QRasterizer::rasterize(), QRasterizer::rasterizeLine(), read_jpeg_image(), QMdi::RegularTiler::rearrange(), rect_intersects(), QPdfDocument::render(), QAndroidPlatformWindow::safeAreaMargins(), QListViewPrivate::scrollElasticBandBy(), QMenuPrivate::scrollMenu(), QFrame::setFrameRect(), QBoxLayout::setGeometry(), QDockWidgetLayout::setGeometry(), QDockAreaLayout::setGrid(), QWidgetPrivate::setLayoutItemMargins(), QComboBox::showPopup(), QMenu::sizeHint(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), QWaylandQtShellChromePrivate::updateDecorationInteraction(), QFramePrivate::updateStyledFrameWidths(), useScrollBar(), QCommonListViewBase::verticalScrollToValue(), QTreeView::viewportSizeHint(), and QTreeView::visualRegionForSelection().
|
inlineconstexprnoexcept |
Returns the position of the rectangle's bottom-left corner.
Note that for historical reasons this function returns QPoint(left(), top() + height() - 1).
Definition at line 229 of file qrect.h.
Referenced by QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QMenuSloppyState::processMouseEvent(), QComboBox::showPopup(), and QWidgetPlatformMenu::showPopup().
|
inlineconstexprnoexcept |
Returns the position of the rectangle's bottom-right corner.
Note that for historical reasons this function returns QPoint(left() + width() -1, top() + height() - 1).
Definition at line 223 of file qrect.h.
Referenced by QWidgetResizeHandler::doResize(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QWidgetResizeHandler::eventFilter(), QWidgetResizeHandler::mouseMoveEvent(), QPlainTextEdit::paintEvent(), QMenuSloppyState::processMouseEvent(), QRasterizer::rasterizeLine(), QWidgetPrivate::safeAreaMargins(), QComboBox::showPopup(), toBottomLeftRect(), and toBottomLeftRect().
|
inlineconstexprnoexcept |
Returns the center point of the rectangle.
Definition at line 232 of file qrect.h.
Referenced by calcPosition(), QQuickViewTestUtils::centerOnScreen(), QQuickVisualTestUtils::centerOnScreen(), QListViewPrivate::closestIndex(), correctMVPForScissor(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QWindowsVistaStyle::drawControl(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QPlainTextEditPrivate::ensureCursorVisible(), QScrollArea::ensureWidgetVisible(), QPlainTextEdit::event(), QTextEdit::event(), QWindowsGeometryHint::frame(), QWidgetWindow::handleContextMenuEvent(), QPlatformWindow::initialGeometry(), QQuickTest::initView(), QMenu::keyPressEvent(), QAbstractItemView::keyPressEvent(), QScrollBar::mousePressEvent(), QSlider::mousePressEvent(), QAbstractItemView::mousePressEvent(), QAbstractButtonPrivate::moveFocus(), output6ForWindow(), QPlatformWindow::screenForGeometry(), QWindowPrivate::screenForGeometry(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QMacStyle::subElementRect(), QPlainTextEdit::timerEvent(), and QTextEdit::timerEvent().
Returns true
if the given point is inside or on the edge of the rectangle, otherwise returns false
.
If proper is true, this function only returns true
if the given point is inside the rectangle (i.e., not on the edge).
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true
if the given rectangle is inside this rectangle.
otherwise returns false
. If proper is true, this function only returns true
if the rectangle is entirely inside this rectangle (not on the edge).
Definition at line 851 of file qrect.cpp.
Referenced by _q_paintIntoCache(), QMenuBarPrivate::actionAt(), QQuickTurbulenceAffector::affectSystem(), calcPosition(), QWidgetPrivate::checkRestoredGeometry(), childWindowAt(), QApplicationPrivate::closePopup(), QPathClipper::contains(), QQuickMaskExtruder::contains(), QDialog::contextMenuEvent(), QCocoaWindow::createNSWindow(), QWindowsOleDropTarget::DragOver(), QGraphicsScenePrivate::drawItemHelper(), QItemDelegate::editorEvent(), QStyledItemDelegate::editorEvent(), QScrollArea::ensureWidgetVisible(), QTipLabel::eventFilter(), QWidgetResizeHandler::eventFilter(), QCalendarWidget::eventFilter(), QImageTextureGlyphCache::fillTexture(), QDockAreaLayoutInfo::findSeparator(), QDockAreaLayout::findSeparator(), QToolBarAreaLayoutInfo::gapIndex(), getWindowUnderPointer(), QColorDialogPrivate::handleColorPickingMouseMove(), QEglFSScreen::handleCursorMove(), QtWaylandClient::QWaylandWindow::handleMouse(), QWidgetWindow::handleMouseEvent(), QXcbWindow::hide(), QRadioButton::hitButton(), QAbstractButton::hitButton(), QCheckBox::hitButton(), QPushButton::hitButton(), QPathClipper::intersect(), QWidgetPrivate::invalidateBackingStore_resizeHelper(), QTreeViewPrivate::itemDecorationAt(), QDockWidgetPrivate::mouseDoubleClickEvent(), QMenuPrivate::mouseEventTaken(), QMenu::mouseMoveEvent(), QScrollBar::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QTipLabel::mouseMoveEvent(), QPlainTextEdit::mouseMoveEvent(), QTextEdit::mouseMoveEvent(), QMenu::mousePressEvent(), QToolButton::mousePressEvent(), QCalendarPopup::mousePressEvent(), QDockWidgetPrivate::mousePressEvent(), MainWindow::mousePressEvent(), QHeaderView::mouseReleaseEvent(), QXcbDrag::move(), QSliderPrivate::newHoverControl(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QSGAbstractSoftwareRenderer::optimizeRenderList(), output6ForWindow(), QQuickPointerHandler::parentContains(), QMenuPrivate::popup(), qt_scrollRectInImage(), QPlatformWindow::screenForGeometry(), QWindowPrivate::screenForGeometry(), QPlatformScreen::screenForPosition(), QWaylandSurfacePrivate::surface_commit(), QTabBar::tabAt(), QTipLabel::tipChanged(), QWasmScreen::topLevelAt(), QQnxScreen::topLevelAt(), QWindowsMouseHandler::translateMouseEvent(), QMenuBarPrivate::updateGeometries(), QGraphicsWidget::windowFrameSectionAt(), windowInteractsWithPosition(), and QWaylandXdgSurfacePrivate::xdg_surface_get_popup().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true
if the point (x, y) is inside this rectangle, otherwise returns false
.
Definition at line 397 of file qrect.h.
References contains().
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns true
if the point (x, y) is inside or on the edge of the rectangle, otherwise returns false
.
If proper is true, this function only returns true
if the point is entirely inside the rectangle(not on the edge).
Definition at line 392 of file qrect.h.
References contains().
|
inlineconstexpr |
Extracts the position of the rectangle's top-left corner to *x1 and *y1, and the position of the bottom-right corner to *x2 and *y2.
|
inlineconstexpr |
Extracts the position of the rectangle's top-left corner to *x and *y, and its dimensions to *width and *height.
Definition at line 337 of file qrect.h.
Referenced by QQC2::QCommonStyle::drawControl(), QCommonStyle::drawControl(), and QtAndroid::insertNativeView().
|
inlineconstexprnoexcept |
Returns the height of the rectangle.
Definition at line 238 of file qrect.h.
Referenced by QAndroidPlatformWindow::QAndroidPlatformWindow(), QVncDirtyMap::QVncDirtyMap(), QWindowCreationContext::QWindowCreationContext(), QSGRhiAtlasTexture::Texture::Texture(), QPrintPreviewWidgetPrivate::_q_fit(), QDialog::adjustPosition(), QWaylandXdgPositionerData::anchorPoint(), QDockAreaLayoutInfo::apply(), QQnxScreen::availableGeometry(), QPainter::begin(), QOpenGLFramebufferObject::blitFramebuffer(), QRasterPaintEnginePrivate::blitImage(), QGraphicsItem::boundingRegion(), QQC2::calcArrow(), QPrintPreviewWidgetPrivate::calcCurrentPage(), QQC2::QStyleHelper::calcLines(), calcPosition(), QQC2::QStyleHelper::calcRadialPos(), QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStylePrivate::calculateElidedText(), QAndroidPlatformOpenGLWindow::checkNativeSurface(), QWidgetPrivate::checkRestoredGeometry(), clippedBlit(), QQC2_NAMESPACE::cocoaControlType(), cocoaControlType(), QWaylandQtShellSurfacePrivate::configure(), QDockAreaLayout::constrainedRect(), QPathClipper::contains(), correctMVPForScissor(), QQuickContext2DTile::createPainter(), QtAndroid::createSurface(), QIBusPlatformInputContext::cursorRectChanged(), determineGeometry(), determineGeometry(), QItemDelegate::doLayout(), QAndroidStyle::AndroidImageDrawable::draw(), QAndroidStyle::AndroidGradientDrawable::draw(), QPainterPrivate::draw_helper(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QQC2_NAMESPACE::QMacStyle::drawComplexControl(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), QItemDelegate::drawDisplay(), QRasterPaintEnginePrivate::drawImage(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QStyle::drawItemPixmap(), QQC2::QStyle::drawItemPixmap(), QDirectFbBlitter::drawPixmapOpacity(), QWindowsVistaStyle::drawPrimitive(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QAndroidStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QPaintEngine::drawRects(), QPainter::drawRects(), QQC2_NAMESPACE::drawTabBase(), QQC2_NAMESPACE::drawTabShape(), dumpNativeWindowsRecursion(), QOutlineMapper::endOutline(), QScrollArea::ensureWidgetVisible(), QGeoTiledMapNokia::evaluateCopyrights(), QBlitterPaintEngine::fillRect(), fillRect_normalized(), QDockAreaLayout::fitLayout(), QWindowsBackingStore::flush(), QXcbNativeBackingStore::flush(), QWindowsDirect2DWindow::flush(), QXcbWindow::frameMargins(), QDockAreaLayout::gapRect(), QDockAreaLayout::getGrid(), QBsdFbScreen::grabWindow(), QEglFSScreen::grabWindow(), QIntegrityFbScreen::grabWindow(), QLinuxFbScreen::grabWindow(), QVncScreen::grabWindow(), QOffscreenBackingStore::grabWindow(), QOffscreenScreen::grabWindow(), QQnxScreen::grabWindow(), QXcbWindow::handleConfigureNotifyEvent(), QWindowsWindow::handleGeometryChangingMessage(), QPlatformWindow::initialGeometry(), QIntegrityFbScreen::initialize(), QBsdFbScreen::initialize(), QLinuxFbScreen::initialize(), QVncScreen::initialize(), QSpanData::initTexture(), QColorDialogPrivate::initWidgets(), QPathClipper::intersect(), QQnxInputContext::keyboardRect(), QMdiSubWindow::keyPressEvent(), QPicture::metric(), QPaintDeviceWindow::metric(), QWidget::metric(), QOpenGLWidget::metric(), QTabBar::mouseMoveEvent(), QScrollBar::mousePressEvent(), QSizeGrip::mousePressEvent(), QTabBar::mouseReleaseEvent(), moveToVirtualScreen(), QWindowsWindow::moveTransientChildren(), QMacPrintEnginePrivate::newPage_helper(), operator<<(), operator<<(), QPdfEnginePrivate::pageMatrix(), QSGOpenVGPainterNode::paint(), QSGSoftwarePainterNode::paint(), QSGDefaultPainterNode::paint(), QtWaylandClient::QWaylandBradientDecoration::paint(), QSGSoftwareInternalRectangleNode::paint(), QmlJSDebugger::SelectionHighlight::paint(), QFontFamilyDelegate::paint(), QPagePreview::paintEvent(), QLabel::paintEvent(), QLineEdit::paintEvent(), QPlainTextEdit::paintEvent(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), QTipLabel::placeTip(), QMenuPrivate::popup(), QLineEditPrivate::positionSideWidgets(), QQuick3DSGRenderNode::prepare(), prepareDrawForRenderToTextureWidget(), QSSGLayerRenderData::prepareForRender(), QWindowsDirect2DWindow::present(), QGraphicsScenePrivate::processDirtyItemsRecursive(), QGuiApplicationPrivate::processGeometryChangeEvent(), QQC2::qDrawBorderPixmap(), QSGSoftwareHelpers::qDrawBorderPixmap(), qDrawRoundedCorners(), qNormalizeRadii(), qt_scrollRectInImage(), qt_transform_image_rasterize(), QRasterPaintEnginePrivate::rasterize(), read_jpeg_image(), QMdi::RegularTiler::rearrange(), QMdi::SimpleCascader::rearrange(), QMdi::IconTiler::rearrange(), QVideoWindowPrivate::render(), QGraphicsView::render(), QAndroidPlatformOpenGLWindow::repaint(), QProgressBarPrivate::repaintRequired(), QEvdevTabletData::report(), QEvdevTouchScreenData::reportPoints(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QEglFSKmsEglDeviceWindow::resetSurface(), QXcbNativeBackingStore::resize(), QMdiAreaPrivate::resizeToMinimumTileSize(), QQC2_NAMESPACE::rotateTabPainter(), QAlphaWidget::run(), QDockAreaLayoutInfo::saveState(), QWhatsThisPrivate::say(), QWindowsTabletDeviceData::scaleCoordinates(), QQC2::QWindowsXPStylePrivate::scrollBarGripperBounds(), QMenuPrivate::scrollMenu(), QMenuPrivate::scrollMenu(), QAndroidPlatformScreen::setAvailableGeometry(), QPolygonClipper< InType, OutType, CastType >::setBoundingRect(), QWindowsWindow::setCustomMargins(), setDisplayMetrics(), QMenuPrivate::setFirstActionActive(), QWasmWindow::setGeometry(), QBoxLayout::setGeometry(), QDockWidgetLayout::setGeometry(), QWindow::setGeometry(), QAndroidPlatformOpenGLWindow::setGeometry(), QAndroidPlatformVulkanWindow::setGeometry(), QFormLayout::setGeometry(), QWindowsBaseWindow::setGeometry_sys(), QAbstractItemViewPrivate::setHoverIndex(), QMdiSubWindowPrivate::setMaximizeMode(), QMdiSubWindowPrivate::setNewGeometry(), QEglFSKmsGbmCursor::setPos(), QQnxScreen::setRotation(), QLinuxMediaDevice::setSubdevSelection(), QtAndroid::setSurfaceGeometry(), QXcbWindow::setTransparentForMouseEvents(), QAndroidPlatformWindow::setVisible(), QtAndroidMenu::showContextMenu(), QComboBox::showPopup(), QCocoaMenu::showPopup(), QGtk3Menu::showPopup(), QLabelPrivate::sizeForWidth(), QQC2::QCommonStyle::sizeFromContents(), QAndroidStyle::sizeFromContents(), QCommonStyle::sizeFromContents(), QMenu::sizeHint(), QMenuBar::sizeHint(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQC2::QCommonStyle::subControlRect(), QMacStyle::subControlRect(), QCommonStyle::subControlRect(), QAndroidStyle::subControlRect(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QQC2::QCommonStyle::subElementRect(), QMacStyle::subElementRect(), QCommonStyle::subElementRect(), QAndroidPlatformOpenGLWindow::surfaceChanged(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), QMdiSubWindowPrivate::titleBarHeight(), to_d2d_rect_u(), toBottomLeftRect(), toBottomLeftRect(), QRasterPlatformPixmap::toImage(), QWindowsThemeData::toRECT(), QQC2::XPThemeData::toRECT(), QWindowsMouseHandler::translateTouchEvent(), QSGSoftwareInternalRectangleNode::update(), QMenuPrivate::updateActionRects(), QMenuBarPrivate::updateGeometries(), QTableView::updateGeometries(), QWin32PrintEnginePrivate::updateMetrics(), QtWaylandClient::QWaylandScreen::updateOutputProperties(), QScreenPrivate::updatePrimaryOrientation(), QIOSScreen::updateProperties(), QMdiAreaPrivate::updateScrollBars(), QQuickTableViewPrivate::updateSelection(), QQuickTreeViewPrivate::updateSelection(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), QtWaylandClient::QWaylandTextInputv4::updateState(), QWasmVideoOutput::updateVideoElementGeometry(), updateWindow(), useScrollBar(), QCommonListViewBase::verticalScrollToValue(), and QQC2::QCommonStylePrivate::viewItemLayout().
Returns the intersection of this rectangle and the given rectangle. Note that {r.intersected(s)} is equivalent to
{r & s}.
Definition at line 414 of file qrect.h.
References other().
Referenced by adjustedArea(), QOpenGL2PaintEngineEx::clip(), QQuickContext2DImageTexture::compositeTile(), QPixmapBlurFilter::draw(), QPixmapColorizeFilter::draw(), QX11PaintEngine::drawEllipse(), QRasterPaintEngine::drawImage(), QRasterPaintEngine::drawPixmap(), QBlitterPaintEngine::fillRect(), QCocoaScreen::grabWindow(), QRasterPaintEnginePrivate::initializeRasterizer(), QWidgetRepaintManager::markDirty(), QWidgetPrivate::moveRect(), QQuickContext2DTexture::paint(), src_gui_painting_qregion::MyWidget::paintEvent(), read_jpeg_image(), QVideoWindowPrivate::render(), QXcbNativeBackingStore::resize(), QXcbBackingStoreImage::scroll(), QQuickContext2DTexture::setDirtyRect(), QIOSWindow::setWindowState(), QSGSoftwareRenderableNode::update(), QOpenGL2PaintEngineExPrivate::updateClipScissorTest(), QItemDelegate::updateEditorGeometry(), QIOSScreen::updateProperties(), and src_gui_painting_qregion_unix::wrapper().
|
noexcept |
Returns true
if this rectangle intersects with the given rectangle (i.e., there is at least one pixel that is within both rectangles), otherwise returns false
.
The intersection rectangle can be retrieved using the intersected() function.
Definition at line 1065 of file qrect.cpp.
Referenced by QFbCursor::changeCursor(), QAbstractItemViewPrivate::draggablePaintPairs(), QFbCursor::drawCursor(), QGraphicsScenePrivate::drawItemHelper(), QWidgetResizeHandler::mouseMoveEvent(), QMenu::paintEvent(), QFbCursor::pointerEvent(), QPlatformWindow::screenForGeometry(), QWindowPrivate::screenForGeometry(), QGraphicsItem::scroll(), QFbCursor::setPos(), QGraphicsView::updateScene(), QListView::visualRegionForSelection(), QTableView::visualRegionForSelection(), and QTreeView::visualRegionForSelection().
|
inlineconstexprnoexcept |
Returns true
if the rectangle is empty, otherwise returns false
.
An empty rectangle has a left() > right() or top() > bottom(). An empty rectangle is not valid (i.e., isEmpty() == !isValid()).
Use the normalized() function to retrieve a rectangle where the corners are swapped.
Definition at line 166 of file qrect.h.
Referenced by QXcbScreen::QXcbScreen(), QSpanData::adjustSpanMethods(), QPainter::begin(), QPlatformGraphicsBufferHelper::bindSWToTexture(), QRasterPaintEnginePrivate::blitImage(), clippedBlit(), QPixmap::copy(), QAbstractItemView::dataChanged(), QWindowsVistaStylePrivate::drawBackground(), QQC2::QWindowsXPStylePrivate::drawBackground(), QQC2::QWindowsXPStyle::drawComplexControl(), QRasterPaintEnginePrivate::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QMenuPrivate::drawScroller(), QGraphicsScenePrivate::drawSubtreeRecursive(), QMenuPrivate::drawTearOff(), QBlitterPaintEnginePrivate::fillRect(), QOffscreenBackingStore::grabWindow(), QAndroidPlatformWindow::isExposed(), QCocoaWindow::isExposed(), QIOSWindow::isExposed(), QTransform::map(), QGraphicsProxyWidget::paint(), QQuickContext2DTexture::paint(), QMenu::paintEvent(), QMenuBar::paintEvent(), prepareDrawForRenderToTextureWidget(), qDrawRoundedCorners(), qt_scrollRectInImage(), qt_span_fill_clipRect(), QRasterizer::rasterizeLine(), QWebpHandler::read(), read_jpeg_image(), QXcbNativeBackingStore::resize(), QPlatformWindow::screenForGeometry(), QXcbScreen::setMonitor(), QFbWindow::setVisible(), QWidgetRepaintManager::staticContents(), QQC2::QCommonStyle::subElementRect(), QCommonStyle::subElementRect(), QWidgetPrivate::subtractOpaqueChildren(), QMenuPrivate::ScrollerTearOffItem::updateScrollerRects(), QWidget::visibleRegion(), and src_gui_painting_qregion_unix::wrapper().
|
inlineconstexprnoexcept |
Returns true
if the rectangle is a null rectangle, otherwise returns false
.
A null rectangle has both the width and the height set to 0 (i.e., right() == left() - 1 and bottom() == top() - 1). A null rectangle is also empty, and hence is not valid.
Definition at line 163 of file qrect.h.
Referenced by QWidgetAnimator::animate(), QSGPainterTexture::commitTextureOperations(), QtAndroid::createSurface(), QAndroidStyle::Android9PatchDrawable::draw(), QFbCursor::drawCursor(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QTipLabel::eventFilter(), QDockAreaLayoutInfo::findSeparator(), QDockAreaLayout::findSeparator(), QOffscreenBackingStore::flush(), QXcbNativeBackingStore::flush(), QXcbBackingStore::flush(), QMenuBarPrivate::focusFirstAction(), QDockAreaLayoutInfo::gapIndex(), QMinimalEglScreen::geometry(), QMenuBarPrivate::getNextAction(), QCocoaScreen::grabWindow(), QSpanData::initTexture(), QtAndroid::insertNativeView(), QTableViewPrivate::intersectedRect(), QTipLabel::mouseMoveEvent(), QTabBarPrivate::normalizedScrollRect(), QSGOpenVGPainterNode::paint(), QSGSoftwarePainterNode::paint(), QSGDefaultPainterNode::paint(), QImageReader::read(), readImage(), QLibInputTouch::registerDevice(), QEvdevTouchScreenData::reportPoints(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QWidgetPrivate::safeAreaMargins(), QMenuPrivate::scrollMenu(), QMenuPrivate::setFirstActionActive(), QStackedLayout::setStackingMode(), QtAndroid::setSurfaceGeometry(), QMenu::sizeHint(), QItemDelegatePrivate::textLayoutBounds(), QTipLabel::tipChanged(), QMenuPrivate::updateActionRects(), and QGraphicsWidgetPrivate::windowFrameHoverMoveEvent().
|
inlineconstexprnoexcept |
Returns true
if the rectangle is valid, otherwise returns false
.
A valid rectangle has a left() <= right() and top() <= bottom(). Note that non-trivial operations like intersections are not defined for invalid rectangles. A valid rectangle is not empty (i.e., isValid() == !isEmpty()).
Definition at line 169 of file qrect.h.
Referenced by AndroidSurfaceView::AndroidSurfaceView(), QWindowCreationContext::QWindowCreationContext(), QWidgetAnimator::animate(), QQuickContext2DTexture::canvasChanged(), QDockAreaLayout::constrainedRect(), determineGeometry(), determineGeometry(), QItemDelegate::doLayout(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QPixmapStyle::drawSlider(), dumpNativeWindowsRecursion(), QVsp2BlendingDevice::enableInput(), QBlitterPaintEngine::fillRect(), QCocoaScreen::grabWindow(), QWaylandOutputPrivate::handleWindowPixelSizeChanged(), QDockAreaLayout::isValid(), QMainWindowLayoutState::isValid(), QQuickStyleItem::layoutMargins(), QToolButton::mousePressEvent(), QXcbDrag::move(), QWidgetPrivate::moveRect(), QWindowsWindow::normalGeometry(), QPagePreview::paintEvent(), QToolBar::paintEvent(), QMdi::MinOverlapPlacer::place(), QImageReader::read(), QSvgIOHandler::read(), QPdfIOHandler::read(), QPdfDocument::render(), QWaylandQtShellSurface::requestWindowGeometry(), QWidget::restoreGeometry(), QWidgetPrivate::scrollRect(), QQuickContext2DTexture::setDirtyRect(), QFrame::setFrameRect(), QWidgetPrivate::setLayoutItemMargins(), QLinuxMediaDevice::setSubdevSelection(), QQC2::QCommonStyle::sizeFromContents(), QCommonStyle::sizeFromContents(), QQC2::QCommonStylePrivate::viewItemLayout(), QQC2::QCommonStylePrivate::viewItemSize(), and QTreeView::viewportSizeHint().
|
inlineconstexprnoexcept |
Returns the x-coordinate of the rectangle's left edge.
Equivalent to x().
Definition at line 172 of file qrect.h.
Referenced by QQuickStyleMargins::QQuickStyleMargins(), QSpanBuffer::addSpan(), QWaylandXdgPositionerData::anchorPoint(), QDockAreaLayoutInfo::apply(), QToolBarAreaLayout::apply(), QWindowGeometrySpecification::applyTo(), QOpenGLFramebufferObject::blitFramebuffer(), calcPosition(), QGroupBoxPrivate::calculateFrame(), QWidgetPrivate::checkRestoredGeometry(), clipStraightLine(), QDockAreaLayout::constrainedRect(), QWaylandQtShellChromePrivate::constrainPoint(), convolute(), QQuickContext2DTile::createPainter(), QToolBarAreaLayoutInfo::distance(), QLabelPrivate::documentRect(), QFbScreen::doRedraw(), QLayoutPrivate::doResize(), QAbstractItemViewPrivate::draggablePaintPairs(), QListViewPrivate::draggablePaintPairs(), QAndroidStyle::Android9PatchDrawable::draw(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), QGraphicsScenePrivate::drawItemHelper(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QPixmapStyle::drawProgressBarFill(), QBoxLayoutPrivate::effectiveMargins(), QPlainTextEditPrivate::ensureCursorVisible(), QScrollArea::ensureWidgetVisible(), QRasterPaintEngine::fillPath(), QDockAreaLayout::fitLayout(), QToolBarAreaLayoutInfo::fitLayout(), QToolBarAreaLayout::fitLayout(), QWidget::frameGeometry(), QWidget::frameSize(), QDockAreaLayout::gapRect(), QDockAreaLayout::getGrid(), grayscale(), QWindowsWindow::handleGeometryChangingMessage(), QtWaylandClient::QWaylandBradientDecoration::handleMouse(), QtWaylandClient::QWaylandBradientDecoration::handleTouch(), QIntersectionFinder::hasIntersections(), if(), QRasterPaintEnginePrivate::isUnclipped(), QRasterPaintEnginePrivate::isUnclipped_normalized(), QMenu::keyPressEvent(), QWidgetResizeHandler::keyPressEvent(), QTabBarPrivate::makeVisible(), QWidgetResizeHandler::mouseMoveEvent(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QTabBarPrivate::normalizedScrollRect(), QtWaylandClient::QWaylandBradientDecoration::paint(), QPagePreview::paintEvent(), QTabBar::paintEvent(), QHeaderView::paintEvent(), QPlainTextEdit::paintEvent(), QMenuPrivate::popup(), QMenuBarPrivate::popupAction(), QDateTimeEditPrivate::positionCalendarPopup(), QLineEditPrivate::positionSideWidgets(), QWindowsDirect2DWindow::present(), QQC2::qDrawBorderPixmap(), QSGSoftwareHelpers::qDrawBorderPixmap(), QRectF_intersects(), qRectIntersects(), qt_intersect_spans(), qt_scrollRectInImage(), qt_transform_image_rasterize(), QRasterizer::rasterize(), QRasterizer::rasterize(), QRasterizer::rasterizeLine(), rect_intersects(), QPdfDocument::render(), QGraphicsView::render(), QAndroidPlatformOpenGLWindow::repaint(), QEvdevTouchScreenData::reportPoints(), QAndroidPlatformWindow::safeAreaMargins(), QListViewPrivate::scrollElasticBandBy(), setDisplayMetrics(), QFrame::setFrameRect(), QDockAreaLayout::setGrid(), QWidgetPrivate::setLayoutItemMargins(), QLinuxMediaDevice::setSubdevSelection(), QCocoaMenu::showPopup(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQC2::QCommonStyle::subControlRect(), QMacStyle::subControlRect(), QCommonStyle::subControlRect(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QQC2::QCommonStyle::subElementRect(), QMacStyle::subElementRect(), QCommonStyle::subElementRect(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), QWaylandQtShellChromePrivate::updateDecorationInteraction(), QMenuBarPrivate::updateGeometries(), QTableView::updateGeometries(), QTreeView::updateGeometries(), QMdiAreaPrivate::updateScrollBars(), QFramePrivate::updateStyledFrameWidths(), QWasmVideoOutput::updateVideoElementGeometry(), useScrollBar(), and QQC2::QCommonStylePrivate::viewItemLayout().
Returns a rectangle grown by the margins.
Definition at line 447 of file qrect.h.
Referenced by QWidgetResizeHandler::eventFilter(), and QtWaylandClient::QWaylandWindow::surfaceSize().
Removes the margins from the rectangle, shrinking it.
Definition at line 453 of file qrect.h.
Referenced by QLineEditPrivate::adjustedContentsRect(), QWindowsBaseWindow::geometry_sys(), QtWaylandClient::QWaylandWindow::handleMouse(), QLineEdit::paintEvent(), QWindowsWindow::setCustomMargins(), and QWasmWindow::setGeometry().
|
inlineconstexprnoexcept |
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate.
The rectangle's size is unchanged.
Definition at line 297 of file qrect.h.
References pos.
Referenced by QToolBarAreaLayout::apply(), QWidgetPrivate::checkRestoredGeometry(), QDockAreaLayout::constrainedRect(), QListViewPrivate::scrollElasticBandBy(), QMainWindowLayout::setGeometry(), and QComboBox::showPopup().
Moves the rectangle, leaving the bottom-left corner at the given position.
The rectangle's size is unchanged.
Definition at line 321 of file qrect.h.
Referenced by QSizeGrip::mouseMoveEvent(), and QComboBox::showPopup().
Moves the rectangle, leaving the bottom-right corner at the given position.
The rectangle's size is unchanged.
Definition at line 309 of file qrect.h.
Referenced by QSizeGrip::mouseMoveEvent().
Moves the rectangle, leaving the center point at the given position.
The rectangle's size is unchanged.
Definition at line 327 of file qrect.h.
Referenced by QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), QPlatformWindow::initialGeometry(), QPagePreview::paintEvent(), and QVideoWindowPrivate::render().
|
inlineconstexprnoexcept |
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate.
The rectangle's size is unchanged.
Definition at line 285 of file qrect.h.
References pos.
Referenced by QToolBarAreaLayout::apply(), QWidgetPrivate::checkRestoredGeometry(), QDockAreaLayout::constrainedRect(), QTabBar::mouseMoveEvent(), QTabWidget::paintEvent(), QLineEditPrivate::positionSideWidgets(), QListViewPrivate::scrollElasticBandBy(), QComboBox::showPopup(), QAndroidStyle::sizeFromContents(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QMacStyle::subControlRect(), and QAndroidStyle::subControlRect().
|
inlineconstexprnoexcept |
Moves the rectangle horizontally, leaving the rectangle's right edge at the given x coordinate.
The rectangle's size is unchanged.
Definition at line 291 of file qrect.h.
References pos.
Referenced by QToolBarAreaLayout::apply(), QWidgetPrivate::checkRestoredGeometry(), QDockAreaLayout::constrainedRect(), fixToolBarOrientation(), and QListViewPrivate::scrollElasticBandBy().
|
inlineconstexprnoexcept |
Moves the rectangle, leaving the top-left corner at the given position (x, y).
The rectangle's size is unchanged.
Definition at line 269 of file qrect.h.
Referenced by QQC2_NAMESPACE::QMacStyle::drawControl(), QMacStyle::drawControl(), grayscale(), QCalendarPopup::mousePressEvent(), QQuickLabsPlatformMenu::open(), QWindowsWindow::setCustomMargins(), QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(), and QGraphicsWidgetPrivate::windowFrameMouseReleaseEvent().
|
inlineconstexprnoexcept |
Moves the rectangle vertically, leaving the rectangle's top edge at the given y coordinate.
The rectangle's size is unchanged.
Definition at line 288 of file qrect.h.
References pos.
Referenced by QToolBarAreaLayout::apply(), QWidgetPrivate::checkRestoredGeometry(), QDockAreaLayout::constrainedRect(), QWindowsVistaStyle::drawControl(), QPixmapStyle::eventFilter(), QTabBar::mouseMoveEvent(), QTabWidget::paintEvent(), QListViewPrivate::scrollElasticBandBy(), QMenuPrivate::scrollMenu(), QWasmWindow::setGeometry(), QComboBox::showPopup(), QQC2_NAMESPACE::QMacStyle::subControlRect(), and QMacStyle::subControlRect().
Moves the rectangle, leaving the top-left corner at the given position.
The rectangle's size is unchanged.
Definition at line 303 of file qrect.h.
Referenced by QTabWidget::initStyleOption(), QSizeGrip::mouseMoveEvent(), moveToVirtualScreen(), QtWaylandClient::QWaylandScreen::output_geometry(), QMainWindowLayout::plug(), QMenuPrivate::popup(), QWidgetPrivate::show_sys(), QComboBox::showPopup(), QToolBarPrivate::unplug(), and QtWaylandClient::QWaylandScreen::zxdg_output_v1_logical_position().
Moves the rectangle, leaving the top-right corner at the given position.
The rectangle's size is unchanged.
Definition at line 315 of file qrect.h.
Referenced by QToolBarAreaLayout::apply(), and QSizeGrip::mouseMoveEvent().
|
noexcept |
Returns a normalized rectangle; i.e., a rectangle that has a non-negative width and height.
If width() < 0 the function swaps the left and right corners, and it swaps the top and bottom corners if height() < 0. The corners are at the same time changed from being non-inclusive to inclusive.
Definition at line 273 of file qrect.cpp.
Referenced by QWindowsDirect2DPaintEngine::drawRects(), QGraphicsScenePrivate::drawSubtreeRecursive(), QSGSoftwarePixmapRenderer::render(), QQuickTableViewPrivate::updateSelection(), and QQuickTreeViewPrivate::updateSelection().
Returns the intersection of this rectangle and the given rectangle.
Returns an empty rectangle if there is no intersection.
Definition at line 993 of file qrect.cpp.
References qMax(), qMin(), r1, r2, and t2.
Intersects this rectangle with the given rectangle.
Adds the margins to the rectangle, growing it.
Returns a rectangle shrunk by the margins.
Unites this rectangle with the given rectangle.
|
inlineconstexprnoexcept |
Returns the x-coordinate of the rectangle's right edge.
Note that for historical reasons this function returns left() + width() - 1; use x() + width() to retrieve the true x-coordinate.
Definition at line 178 of file qrect.h.
Referenced by QQuickStyleMargins::QQuickStyleMargins(), QSpanBuffer::addSpan(), QWaylandXdgPositionerData::anchorPoint(), QDockAreaLayoutInfo::apply(), QToolBarAreaLayout::apply(), QWindowGeometrySpecification::applyTo(), QGroupBoxPrivate::calculateFrame(), QWidgetPrivate::checkRestoredGeometry(), clipStraightLine(), QListViewPrivate::closestIndex(), QDockAreaLayout::constrainedRect(), QWaylandQtShellChromePrivate::constrainPoint(), convolute(), QToolBarAreaLayoutInfo::distance(), QGridLayoutPrivate::distribute(), QLabelPrivate::documentRect(), QAbstractItemViewPrivate::draggablePaintPairs(), QListViewPrivate::draggablePaintPairs(), QAndroidStyle::Android9PatchDrawable::draw(), QDirectFbBlitter::drawCachedGlyphs(), QQC2::QCommonStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), drawPixel(), drawPixelARGB32(), drawPixelARGB32Opaque(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QPixmapStyle::drawProgressBarFill(), QMacStylePrivate::drawToolbarButtonArrow(), QBoxLayoutPrivate::effectiveMargins(), QPlainTextEditPrivate::ensureCursorVisible(), QScrollArea::ensureWidgetVisible(), QRasterPaintEngine::fillPath(), QToolBarAreaLayoutInfo::fitLayout(), fixToolBarOrientation(), QWidget::frameGeometry(), QWidget::frameSize(), QDockAreaLayout::gapRect(), QDockAreaLayout::getGrid(), grayscale(), QtWaylandClient::QWaylandBradientDecoration::handleMouse(), QtWaylandClient::QWaylandBradientDecoration::handleTouch(), QIntersectionFinder::hasIntersections(), if(), QRasterPaintEnginePrivate::isUnclipped(), QRasterPaintEnginePrivate::isUnclipped_normalized(), QMenu::keyPressEvent(), QWidgetResizeHandler::keyPressEvent(), QTabBarPrivate::layoutTabs(), QTabBarPrivate::makeVisible(), QWidgetResizeHandler::mouseMoveEvent(), QComboBoxPrivateScroller::mouseMoveEvent(), QSizeGrip::mousePressEvent(), QAbstractButtonPrivate::moveFocus(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QTabBarPrivate::normalizedScrollRect(), operator<<(), QtWaylandClient::QWaylandBradientDecoration::paint(), QTabBar::paintEvent(), QHeaderView::paintEvent(), QPlainTextEdit::paintEvent(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), QMenuPrivate::popup(), QMenuBarPrivate::popupAction(), QDateTimeEditPrivate::positionCalendarPopup(), QQC2::qDrawBorderPixmap(), QSGSoftwareHelpers::qDrawBorderPixmap(), qRectIntersects(), qt_intersect_spans(), QRasterizer::rasterize(), QRasterizer::rasterize(), QRasterizer::rasterizeLine(), read_jpeg_image(), QMdi::RegularTiler::rearrange(), rect_intersects(), QPdfDocument::render(), QAndroidPlatformWindow::safeAreaMargins(), QListViewPrivate::scrollElasticBandBy(), QFrame::setFrameRect(), QBoxLayout::setGeometry(), QDockWidgetLayout::setGeometry(), QDockAreaLayout::setGrid(), QWidgetPrivate::setLayoutItemMargins(), QMenu::sizeHint(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQC2::QCommonStyle::subControlRect(), QMacStyle::subControlRect(), QCommonStyle::subControlRect(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QQC2::QCommonStyle::subElementRect(), QMacStyle::subElementRect(), QCommonStyle::subElementRect(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), QWaylandQtShellChromePrivate::updateDecorationInteraction(), QMenuBarPrivate::updateGeometries(), QTableView::updateGeometries(), QMdiAreaPrivate::updateScrollBars(), QAndroidInputContext::updateSelectionHandles(), QFramePrivate::updateStyledFrameWidths(), useScrollBar(), QStyle::visualRect(), and QQC2::QStyle::visualRect().
|
inlineconstexprnoexcept |
Sets the bottom edge of the rectangle to the given y coordinate.
May change the height, but will never change the top edge of the rectangle.
Definition at line 199 of file qrect.h.
References pos.
Referenced by QToolBarAreaLayout::apply(), QLabelPrivate::documentRect(), QWindowsVistaStyle::drawPrimitive(), QPixmapStyle::drawProgressBarFill(), QToolBarAreaLayoutInfo::fitLayout(), QDockAreaLayout::getGrid(), QBspTree::init(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QMenu::paintEvent(), QMenuPrivate::scrollMenu(), and QListView::setSelection().
Set the bottom-left corner of the rectangle to the given position.
May change the size, but will never change the top-right corner of the rectangle.
Set the bottom-right corner of the rectangle to the given position.
May change the size, but will never change the top-left corner of the rectangle.
|
inlineconstexprnoexcept |
Sets the coordinates of the rectangle's top-left corner to (x1, y1), and the coordinates of its bottom-right corner to (x2, y2).
Definition at line 361 of file qrect.h.
Referenced by QQC2::QCommonStyle::drawControl(), and QCommonStyle::drawControl().
|
inlineconstexprnoexcept |
Sets the height of the rectangle to the given height.
The bottom edge is changed, but not the top one.
Definition at line 383 of file qrect.h.
Referenced by QWidgetPrivate::checkRestoredGeometry(), QDockAreaLayout::constrainedRect(), QItemDelegate::doLayout(), QQC2_NAMESPACE::QMacStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QOffscreenBackingStore::grabWindow(), QTabBarPrivate::layoutTabs(), QFontFamilyDelegate::paint(), QGraphicsWidget::paintWindowFrame(), QMdiAreaPrivate::resizeToMinimumTileSize(), QMenuPrivate::scrollMenu(), QDockAreaLayout::setGrid(), QComboBox::showPopup(), QAndroidStyle::sizeFromContents(), QWindowsVistaStyle::styleHint(), QQC2::QWindowsXPStyle::styleHint(), QAndroidStyle::subControlRect(), QAndroidStyle::AndroidProgressBarControl::subElementRect(), QQC2::QCommonStylePrivate::viewItemLayout(), QGraphicsWidgetPrivate::windowFrameHoverMoveEvent(), QGraphicsWidgetPrivate::windowFrameMouseReleaseEvent(), and QGraphicsWidget::windowFrameSectionAt().
|
inlineconstexprnoexcept |
Sets the left edge of the rectangle to the given x coordinate.
May change the width, but will never change the right edge of the rectangle.
Equivalent to setX().
Definition at line 190 of file qrect.h.
References pos.
Referenced by QToolBarAreaLayout::apply(), QLabelPrivate::documentRect(), QQC2::QCommonStyle::drawControl(), QCommonStyle::drawControl(), QPixmapStyle::drawProgressBarFill(), QToolBarAreaLayoutInfo::fitLayout(), QDockAreaLayout::getGrid(), if(), QBspTree::init(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QtWaylandClient::QWaylandBradientDecoration::paint(), QDockWidgetLayout::setGeometry(), QDockAreaLayout::setGrid(), and QListView::setSelection().
|
inlineconstexprnoexcept |
Sets the coordinates of the rectangle's top-left corner to ({x}, {y}), and its size to the given width and height.
Definition at line 345 of file qrect.h.
Referenced by QItemDelegate::doLayout(), QQC2::QCommonStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QCommonStyle::drawControl(), QTreeView::drawRow(), QClipData::fixup(), QHeaderView::mouseReleaseEvent(), QMenu::paintEvent(), QHeaderView::paintEvent(), QQC2_NAMESPACE::rotateTabPainter(), QWidgetPrivate::setLayoutItemMargins(), QQC2::QCommonStyle::subControlRect(), QCommonStyle::subControlRect(), QWindowsVistaStyle::subElementRect(), and QQC2::QCommonStylePrivate::viewItemLayout().
|
inlineconstexprnoexcept |
Sets the right edge of the rectangle to the given x coordinate.
May change the width, but will never change the left edge of the rectangle.
Definition at line 196 of file qrect.h.
References pos.
Referenced by QToolBarAreaLayout::apply(), QLabelPrivate::documentRect(), QQC2::QCommonStyle::drawControl(), QCommonStyle::drawControl(), QPixmapStyle::drawProgressBarFill(), QPixmapStyle::drawSlider(), QToolBarAreaLayoutInfo::fitLayout(), QDockAreaLayout::getGrid(), if(), QBspTree::init(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QtWaylandClient::QWaylandBradientDecoration::paint(), QPlainTextEdit::paintEvent(), and QListView::setSelection().
Sets the size of the rectangle to the given size.
The top-left corner is not moved.
Definition at line 386 of file qrect.h.
Referenced by QToolBarAreaLayout::apply(), QQuickStyleItemGroupBox::calculateGeometry(), QWindowsWindow::handleDpiChanged(), QPlatformWindow::initialGeometry(), QIntegrityFbScreen::initialize(), QBsdFbScreen::initialize(), QLinuxFbScreen::initialize(), QVncScreen::initialize(), QtWaylandClient::QWaylandScreen::output_mode(), QWidget::restoreGeometry(), QWasmWindow::setGeometry(), QMdiSubWindowPrivate::setNewGeometry(), QMdiSubWindowPrivate::setNewGeometry(), QMdiSubWindowPrivate::setNormalMode(), QComboBox::showPopup(), QLabelPrivate::sizeForWidth(), QQC2_NAMESPACE::QMacStyle::sizeFromContents(), QAndroidStyle::sizeFromContents(), QMacStyle::sizeFromContents(), QPushButton::sizeHint(), QToolButton::sizeHint(), QAndroidStyle::subControlRect(), and QtWaylandClient::QWaylandScreen::zxdg_output_v1_logical_size().
|
inlineconstexprnoexcept |
Sets the top edge of the rectangle to the given y coordinate.
May change the height, but will never change the bottom edge of the rectangle.
Equivalent to setY().
Definition at line 193 of file qrect.h.
References pos.
Referenced by QToolBarAreaLayout::apply(), QLabelPrivate::documentRect(), QLayoutPrivate::doResize(), QWindowsVistaStyle::drawPrimitive(), QPixmapStyle::drawProgressBarFill(), QToolBarAreaLayoutInfo::fitLayout(), QDockAreaLayout::getGrid(), QBspTree::init(), QMenu::paintEvent(), QMenuPrivate::scrollMenu(), QDockAreaLayout::setGrid(), QListView::setSelection(), QQC2::QCommonStyle::subControlRect(), and QCommonStyle::subControlRect().
Set the top-left corner of the rectangle to the given position.
May change the size, but will never change the bottom-right corner of the rectangle.
Definition at line 202 of file qrect.h.
Referenced by QIntegrityFbScreen::initialize(), QBsdFbScreen::initialize(), QLinuxFbScreen::initialize(), and QMdiSubWindowPrivate::setNewGeometry().
Set the top-right corner of the rectangle to the given position.
May change the size, but will never change the bottom-left corner of the rectangle.
|
inlineconstexprnoexcept |
Sets the width of the rectangle to the given width.
The right edge is changed, but not the left one.
Definition at line 380 of file qrect.h.
Referenced by QWidgetPrivate::adjustedSize(), QWidgetPrivate::checkRestoredGeometry(), QDockAreaLayout::constrainedRect(), QTreeView::currentChanged(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QOffscreenBackingStore::grabWindow(), QTabBarPrivate::layoutTabs(), QmlJSDebugger::SelectionHighlight::paint(), QMdiAreaPrivate::resizeToMinimumTileSize(), QOutlineMapper::setClipRect(), QDockAreaLayout::setGrid(), QComboBox::showPopup(), QAndroidStyle::sizeFromContents(), QAndroidStyle::subControlRect(), QAndroidStyle::AndroidControl::subElementRect(), QMenuPrivate::updateActionRects(), QComboBoxPrivate::updateLineEditGeometry(), and QQC2::QCommonStylePrivate::viewItemSize().
|
inlineconstexprnoexcept |
Sets the left edge of the rectangle to the given x coordinate.
May change the width, but will never change the right edge of the rectangle.
Equivalent to setLeft().
Definition at line 214 of file qrect.h.
Referenced by QTreeView::currentChanged(), QRasterPaintEnginePrivate::isUnclipped(), QTabBarPrivate::layoutTabs(), QWasmBackingStore::updateTexture(), and QTreeView::visualRegionForSelection().
|
inlineconstexprnoexcept |
Sets the top edge of the rectangle to the given y coordinate.
May change the height, but will never change the bottom edge of the rectangle.
Equivalent to setTop().
Definition at line 217 of file qrect.h.
Referenced by QQC2_NAMESPACE::QMacStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), and QTabBarPrivate::layoutTabs().
|
inlineconstexprnoexcept |
Returns the size of the rectangle.
Definition at line 241 of file qrect.h.
Referenced by QQnxEglWindow::QQnxEglWindow(), QMoviePrivate::_q_loadNextFrame(), _q_paintIntoCache(), QStyle::alignedRect(), QQC2::QStyle::alignedRect(), QToolBarAreaLayout::apply(), QtWaylandClient::QWaylandWlShellSurface::applyConfigure(), QWindowGeometrySpecification::applyTo(), QScreen::availableVirtualSize(), QQuickContext2DImageTexture::beginPainting(), QQuickContext2DTexture::canvasChanged(), clippedBlit(), QtWaylandClient::QWaylandEglWindow::contentFBO(), QItemDelegate::doLayout(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QWindowsVistaStyle::drawControl(), QGraphicsScenePrivate::drawItemHelper(), QWindowsVistaStyle::drawPrimitive(), QPixmapStyle::drawSlider(), QScrollArea::ensureWidgetVisible(), QDockAreaLayoutInfo::fitItems(), QToolBarAreaLayoutLine::fitLayout(), QWindowsDirect2DWindow::flush(), fromLayoutItemSize(), QHighDpi::fromNativeScreenGeometry(), QtWaylandClient::QWaylandScreen::geometry(), QDockAreaLayout::getGrid(), QOpenGLCompositor::grab(), QEglFSScreen::grabWindow(), QWindowsScreen::grabWindow(), QCocoaScreen::grabWindow(), QXcbScreen::grabWindow(), QXcbWindow::handleConfigureNotifyEvent(), QWindowsWindow::handleDpiChanged(), QWindowsWindow::handleDpiChangedAfterParent(), QWindowsWindow::handleDpiScaledSize(), QPlatformWindow::initialGeometry(), QBsdFbScreen::initialize(), QLinuxFbScreen::initialize(), QFbScreen::initializeCompositor(), QEglFSKmsVsp2Screen::initQtLayer(), QColorDialogPrivate::initWidgets(), QAbstractItemView::inputMethodQuery(), QDockAreaLayoutInfo::insertGap(), QWaylandXdgPositionerData::isComplete(), QDockAreaLayoutInfo::itemRect(), QQuickIconLabelPrivate::layout(), QPlatformScreen::modes(), QWidgetResizeHandler::mouseMoveEvent(), QToolBarAreaLayoutInfo::moveToolBar(), moveToVirtualScreen(), QPdfEnginePrivate::newPage(), output6ForWindow(), QtWaylandClient::QWaylandScreen::output_mode(), QQuickStyleItemScrollBar::paintEvent(), QPagePreview::paintEvent(), QLabel::paintEvent(), QEglFSKmsScreen::physicalSize(), QPrintPreviewWidgetPrivate::populateScene(), prepareDrawForRenderToTextureWidget(), QGuiApplicationPrivate::processGeometryChangeEvent(), QEglFSWindow::raise(), QEglFSEmulatorScreen::rawGeometry(), QSvgIOHandler::read(), QPdfIOHandler::read(), read_jpeg_image(), QWindowsVistaStylePrivate::region(), QQC2::QWindowsXPStylePrivate::region(), QVideoWindowPrivate::render(), QWidgetPrivate::render_helper(), QEglFSWindow::requestActivateWindow(), QEglFSWindow::resetSurface(), QWidget::restoreGeometry(), QMainWindowLayoutState::restoreState(), QDockAreaLayout::saveState(), screenInputItemRectangle(), QCALayerBackingStore::scroll(), QDockAreaLayoutInfo::separatorRect(), QAndroidPlatformScreen::setAvailableGeometry(), QWasmWindow::setGeometry(), QFbScreen::setGeometry(), QQnxEglWindow::setGeometry(), QQnxWindow::setGeometry(), QMdiSubWindowPrivate::setNewGeometry(), QMdiSubWindowPrivate::setNewGeometry(), QQnxScreen::setRotation(), QTabBarPrivate::setupMovableTab(), QEglFSWindow::setVisible(), QWidgetPrivate::show_sys(), QComboBox::showPopup(), QDockAreaLayoutInfo::size(), QWindow::size(), QFontMetrics::size(), QQC2_NAMESPACE::QMacStyle::sizeFromContents(), QQC2::QCommonStyle::sizeFromContents(), QAndroidStyle::sizeFromContents(), QMacStyle::sizeFromContents(), QQC2::QWindowsXPStyle::sizeFromContents(), QCheckBox::sizeHint(), QRadioButton::sizeHint(), QTabWidget::sizeHint(), QComboMenuDelegate::sizeHint(), QSplitterPrivate::storeSizes(), QMacStyle::styleHint(), QQC2_NAMESPACE::QMacStyle::styleHint(), QAndroidStyle::subControlRect(), QtWaylandClient::QWaylandWindow::surfaceSize(), QQuick3DSceneRenderer::synchronize(), QSGRhiAtlasTexture::Texture::textureSize(), toLayoutItemSize(), QScreenPrivate::updateGeometry(), QXcbScreen::updateGeometry(), QComboBoxPrivate::updateLineEditGeometry(), QQuickTextPrivate::updateSize(), QWasmVideoOutput::updateVideoElementGeometry(), QQC2::QCommonStylePrivate::viewItemLayout(), QScreen::virtualSize(), QtWaylandClient::QWaylandXdgSurface::xdg_surface_configure(), and QtWaylandClient::QWaylandQtSurface::zqt_shell_surface_v1_set_frame_margins().
Returns a rectangle spanning the two points p1 and p2, including both and everything in between.
Definition at line 471 of file qrect.h.
References p1, p2, qMax(), and qMin().
Referenced by qt_mapFillRect().
|
inlineconstexprnoexcept |
Returns the y-coordinate of the rectangle's top edge.
Equivalent to y().
Definition at line 175 of file qrect.h.
Referenced by QQuickStyleMargins::QQuickStyleMargins(), QSpanBuffer::addSpan(), QWaylandXdgPositionerData::anchorPoint(), QDockAreaLayoutInfo::apply(), QToolBarAreaLayout::apply(), QWindowGeometrySpecification::applyTo(), QOpenGLFramebufferObject::blitFramebuffer(), calcPosition(), QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStylePrivate::calculateElidedText(), QGroupBoxPrivate::calculateFrame(), QWidgetPrivate::checkRestoredGeometry(), clipStraightLine(), QDockAreaLayout::constrainedRect(), QWaylandQtShellChromePrivate::constrainPoint(), convolute(), QQuickContext2DTile::createPainter(), QToolBarAreaLayoutInfo::distance(), QLabelPrivate::documentRect(), QFbScreen::doRedraw(), QLayoutPrivate::doResize(), QAndroidStyle::Android9PatchDrawable::draw(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QGraphicsScenePrivate::drawItemHelper(), QWindowsVistaStyle::drawPrimitive(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QPixmapStyle::drawProgressBarFill(), QBoxLayoutPrivate::effectiveMargins(), QPlainTextEditPrivate::ensureCursorVisible(), QScrollArea::ensureWidgetVisible(), QPixmapStyle::eventFilter(), QRasterPaintEngine::fillPath(), QDockAreaLayout::fitLayout(), QToolBarAreaLayoutInfo::fitLayout(), QToolBarAreaLayout::fitLayout(), QWidget::frameGeometry(), QWidget::frameSize(), QDockAreaLayout::gapRect(), QDockAreaLayout::getGrid(), grayscale(), QWindowsWindow::handleGeometryChangingMessage(), QtWaylandClient::QWaylandBradientDecoration::handleMouse(), QtWaylandClient::QWaylandBradientDecoration::handleTouch(), QIntersectionFinder::hasIntersections(), QRasterPaintEnginePrivate::isUnclipped(), QRasterPaintEnginePrivate::isUnclipped_normalized(), QWidgetResizeHandler::keyPressEvent(), QTabBarPrivate::makeVisible(), QWidgetResizeHandler::mouseMoveEvent(), QToolBarAreaLayoutInfo::moveToolBar(), QDockWidgetPrivate::nonClientAreaMouseEvent(), QTabBarPrivate::normalizedScrollRect(), QtWaylandClient::QWaylandBradientDecoration::paint(), QPagePreview::paintEvent(), QMenu::paintEvent(), QTabBar::paintEvent(), QHeaderView::paintEvent(), QPlainTextEdit::paintEvent(), QMenuBarPrivate::popupAction(), QDateTimeEditPrivate::positionCalendarPopup(), QQC2::qDrawBorderPixmap(), QSGSoftwareHelpers::qDrawBorderPixmap(), qRectIntersects(), qt_intersect_spans(), qt_scrollRectInImage(), qt_transform_image_rasterize(), QRasterizer::rasterize(), QRasterizer::rasterize(), QRasterizer::rasterizeLine(), rect_intersects(), QVideoWindowPrivate::render(), QPdfDocument::render(), QGraphicsView::render(), QAndroidPlatformOpenGLWindow::repaint(), QEvdevTouchScreenData::reportPoints(), QAndroidPlatformWindow::safeAreaMargins(), QListViewPrivate::scrollElasticBandBy(), QMenuPrivate::scrollMenu(), setDisplayMetrics(), QFrame::setFrameRect(), QMainWindowLayout::setGeometry(), QDockAreaLayout::setGrid(), QWidgetPrivate::setLayoutItemMargins(), QLinuxMediaDevice::setSubdevSelection(), QBoxLayoutPrivate::setupGeom(), QComboBox::showPopup(), QCocoaMenu::showPopup(), spacingHelper(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQC2::QCommonStyle::subControlRect(), QMacStyle::subControlRect(), QCommonStyle::subControlRect(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QQC2::QCommonStyle::subElementRect(), QMacStyle::subElementRect(), QCommonStyle::subElementRect(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), QWaylandQtShellChromePrivate::updateDecorationInteraction(), QTableView::updateGeometries(), QTreeView::updateGeometries(), QMdiAreaPrivate::updateScrollBars(), QFramePrivate::updateStyledFrameWidths(), QWasmVideoOutput::updateVideoElementGeometry(), useScrollBar(), QCommonListViewBase::verticalScrollToValue(), QQC2::QCommonStylePrivate::viewItemLayout(), and QTreeView::visualRegionForSelection().
|
inlineconstexprnoexcept |
Returns the position of the rectangle's top-left corner.
Definition at line 220 of file qrect.h.
Referenced by _q_paintIntoCache(), QQuickTextNodeEngine::addTextBlock(), QWindowGeometrySpecification::applyTo(), QGraphicsItem::boundingRegion(), QQuickStyleItemGroupBox::calculateGeometry(), QFbCursor::changeCursor(), clippedBlit(), QWidgetPrivate::clipToEffectiveMask(), QQuickContext2DImageTexture::compositeTile(), QDockAreaLayout::constrainedRect(), convolute(), QCocoaWindow::createNSWindow(), QFbScreen::doRedraw(), QPixmapConvolutionFilter::draw(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), QFbCursor::drawCursor(), QItemDelegate::drawDecoration(), QItemDelegate::drawDisplay(), QGraphicsScenePrivate::drawItemHelper(), QTextDocumentLayoutPrivate::drawListItem(), QRasterPaintEngine::drawPixmap(), QWindowsVistaStyle::drawPrimitive(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QGraphicsScenePrivate::drawSubtreeRecursive(), QScrollArea::ensureWidgetVisible(), QDockWidget::event(), QDockAreaLayoutInfo::fitItems(), fixToolBarOrientation(), QBackingStore::flush(), QHighDpi::fromNativeScreenGeometry(), QToolBarAreaLayoutInfo::gapIndex(), QtWaylandClient::QWaylandScreen::geometry(), QWidgetPrivate::getOpaqueChildren(), QWidget::grab(), QBsdFbScreen::grabWindow(), QEglFSScreen::grabWindow(), QIntegrityFbScreen::grabWindow(), QLinuxFbScreen::grabWindow(), QVncScreen::grabWindow(), QCocoaScreen::grabWindow(), QWindowsWindow::handleDpiChangedAfterParent(), QWindowSystemInterface::handleScreenGeometryChange(), QPlatformWindow::initialGeometry(), QTabWidget::initStyleOption(), QAbstractItemView::inputMethodQuery(), QDockAreaLayoutInfo::itemRect(), QQuickIconLabelPrivate::layout(), QLabelPrivate::layoutPoint(), QWasmScreen::mapFromLocal(), QHighDpiScaling::mapPositionFromNative(), QHighDpiScaling::mapPositionToNative(), QtPrivate::QColorPicker::mouseMoveEvent(), QTabBar::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QtPrivate::QColorPicker::mousePressEvent(), QScrollBar::mousePressEvent(), QCalendarPopup::mousePressEvent(), QSlider::mousePressEvent(), moveToVirtualScreen(), output6ForWindow(), QWidgetPrivate::overlappedRegion(), QtPrivate::PageItem::paint(), QGraphicsProxyWidget::paint(), QQuickStyleItemScrollBar::paintEvent(), QLineEdit::paintEvent(), QHeaderView::paintSection(), QMainWindowLayout::plug(), QFbCursor::pointerEvent(), QMenuPrivate::popup(), prepareDrawForRenderToTextureWidget(), QGuiApplicationPrivate::processGeometryChangeEvent(), QMenuSloppyState::processMouseEvent(), QXcbBackingStoreImage::put(), QRasterizer::rasterizeLine(), QSvgIOHandler::read(), QPdfIOHandler::read(), read_jpeg_image(), QWindowsVistaStylePrivate::region(), QQC2::QWindowsXPStylePrivate::region(), QWidgetPrivate::render(), QXcbSystemTrayBackingStore::render(), QWidgetPrivate::render_helper(), QFbWindow::repaint(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QWidget::restoreGeometry(), QMainWindowLayoutState::restoreState(), QHighDpiScaling::scaleAndOrigin(), QPlatformWindow::screenForGeometry(), screenInputItemRectangle(), QCALayerBackingStore::scroll(), QQC2::QWindowsXPStylePrivate::scrollBarGripperBounds(), QDockAreaLayoutInfo::separatorRect(), QWaylandOutput::setAvailableGeometry(), QWindowsWindow::setCustomMargins(), QFbScreen::setDirty(), QWasmWindow::setGeometry(), QAndroidPlatformOpenGLWindow::setGeometry(), QAndroidPlatformVulkanWindow::setGeometry(), QWindowsBaseWindow::setGeometry_sys(), QMdiSubWindowPrivate::setNewGeometry(), QXcbWindow::setParent(), QFbCursor::setPos(), QEglFSKmsGbmCursor::setPos(), QComboBox::showPopup(), QWindowsPopupMenu::showPopup(), showSystemMenu(), QWidgetPrivate::subtractOpaqueSiblings(), QQuick3DSceneRenderer::synchronize(), QScreenPrivate::updateGeometry(), QPaintEnginePrivate::updateSystemClip(), QWasmVideoOutput::updateVideoElementGeometry(), QQuickScreenInfo::virtualX(), QQuickScreenInfo::virtualY(), windowPlacementOffset(), and QtWaylandClient::QWaylandQtSurface::zqt_shell_surface_v1_set_frame_margins().
|
inlineconstexprnoexcept |
Returns the position of the rectangle's top-right corner.
Note that for historical reasons this function returns QPoint(left() + width() -1, top()).
Definition at line 226 of file qrect.h.
Referenced by QToolBarAreaLayout::apply(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), QWindowsVistaStyle::drawPrimitive(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QTabBar::mouseMoveEvent(), QMenuSloppyState::processMouseEvent(), and QAndroidStyle::AndroidSpinnerControl::subControlRect().
|
inlineconstexprnoexcept |
Returns this rectangle as a rectangle with floating point accuracy.
Definition at line 843 of file qrect.h.
Referenced by QWasmScreen::clipPoint().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Moves the rectangle {offset}.
\l{QPoint::x()}{x()} along the x axis and {offset}.\l{QPoint::y()}{y()} along the y axis, relative to the current position.
|
inlineconstexprnoexcept |
Moves the rectangle dx along the x axis and dy along the y axis, relative to the current position.
Positive values move the rectangle to the right and down.
Definition at line 244 of file qrect.h.
Referenced by QPlainTextEditPrivate::_q_repaintContents(), QTextEditPrivate::_q_repaintContents(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QCocoaScreen::grabWindow(), QMenuPrivate::mouseEventTaken(), QWidgetPrivate::overlappedRegion(), QtPrivate::QWellArray::paintEvent(), QWhatsThat::paintEvent(), QMenu::paintEvent(), QHeaderView::paintEvent(), QMenuPrivate::ScrollerTearOffItem::paintEvent(), prepareDrawForRenderToTextureWidget(), QGraphicsScenePrivate::processDirtyItemsRecursive(), read_jpeg_image(), QAndroidStyle::sizeFromContents(), QAndroidStyle::subControlRect(), QQC2::QCommonStyle::subElementRect(), QCommonStyle::subElementRect(), QTabBar::tabRect(), and QMenuPrivate::updateActionRects().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns a copy of the rectangle that is translated {offset}.
\l{QPoint::x()}{x()} along the x axis and {offset}.\l{QPoint::y()}{y()} along the y axis, relative to the current position.
|
inlineconstexprnoexcept |
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis, relative to the current position.
Positive values move the rectangle to the right and down.
Definition at line 260 of file qrect.h.
Referenced by QTabBarPrivate::_q_scrollTabs(), QLineEditPrivate::adjustedControlRect(), QGraphicsItem::boundingRegion(), QFbCursor::changeCursor(), clippedBlit(), QFbScreen::doRedraw(), QListViewPrivate::draggablePaintPairs(), QQC2::QCommonStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QFbCursor::drawCursor(), QRasterPaintEngine::drawImage(), QBackingStoreDefaultCompositor::flush(), QOffscreenBackingStore::flush(), QWindowsBackingStore::flush(), QXcbNativeBackingStore::flush(), QXcbBackingStore::flush(), QOffscreenBackingStore::grabWindow(), QWidgetPrivate::mapFromWS(), QGraphicsViewPrivate::mapToViewRect(), QWidgetPrivate::mapToWS(), QWidgetRepaintManager::markDirty(), QAbstractButtonPrivate::moveFocus(), QWidgetPrivate::moveRect(), QQuickLabsPlatformMenu::open(), QWidgetPrivate::overlappedRegion(), QFbCursor::pointerEvent(), prepareDrawForRenderToTextureWidget(), QXcbBackingStoreImage::put(), qt_scrollRectInImage(), QXcbSystemTrayBackingStore::render(), QXcbBackingStoreImage::scroll(), QWidget::scroll(), QPixmap::scroll(), QGraphicsItem::scroll(), QWidgetPrivate::scrollRect(), QFbScreen::setDirty(), QWindowsBaseWindow::setGeometry_sys(), QFbCursor::setPos(), QWidgetRepaintManager::staticContents(), QWidgetPrivate::subtractOpaqueSiblings(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), and QtWaylandClient::QWaylandTextInputv4::updateState().
|
inlineconstexprnoexcept |
Returns a copy of the rectangle that has its width and height exchanged:
Definition at line 266 of file qrect.h.
Referenced by QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QQC2_NAMESPACE::QMacStyle::subElementRect(), and QMacStyle::subElementRect().
Returns the bounding rectangle of this rectangle and the given rectangle.
Definition at line 419 of file qrect.h.
Referenced by QQC2::QCommonStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QAndroidStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QMenu::paintEvent(), QAndroidStyle::sizeFromContents(), QWindowsVistaStyle::subElementRect(), and src_gui_painting_qregion_unix::wrapper().
|
inlineconstexprnoexcept |
Returns the width of the rectangle.
Definition at line 235 of file qrect.h.
Referenced by QAndroidPlatformWindow::QAndroidPlatformWindow(), QVncDirtyMap::QVncDirtyMap(), QWhatsThat::QWhatsThat(), QWindowCreationContext::QWindowCreationContext(), QSGRhiAtlasTexture::Texture::Texture(), QQuickTextNodeEngine::addTextBlock(), QDialog::adjustPosition(), QWaylandXdgPositionerData::anchorPoint(), QDockAreaLayoutInfo::apply(), QFormLayoutPrivate::arrangeWidgets(), QQnxScreen::availableGeometry(), QXcbVirtualDesktop::availableGeometry(), QPainter::begin(), QOpenGLFramebufferObject::blitFramebuffer(), QRasterPaintEnginePrivate::blitImage(), QGraphicsItem::boundingRegion(), QQC2::calcArrow(), QPrintPreviewWidgetPrivate::calcCurrentPage(), QQC2::QStyleHelper::calcLines(), calcPosition(), QQC2::QStyleHelper::calcRadialPos(), QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStylePrivate::calculateElidedText(), QAndroidPlatformOpenGLWindow::checkNativeSurface(), QWidgetPrivate::checkRestoredGeometry(), QWaylandQtShellSurfacePrivate::configure(), QDockAreaLayout::constrainedRect(), QPathClipper::contains(), correctMVPForScissor(), QCocoaWindow::createNSWindow(), QQuickContext2DTile::createPainter(), QtAndroid::createSurface(), QIBusPlatformInputContext::cursorRectChanged(), determineGeometry(), determineGeometry(), QItemDelegate::doLayout(), QLayoutPrivate::doResize(), QAndroidStyle::AndroidGradientDrawable::draw(), QPainterPrivate::draw_helper(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QQC2::QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawControl(), QItemDelegate::drawDisplay(), QRasterPaintEnginePrivate::drawImage(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QStyle::drawItemPixmap(), QQC2::QStyle::drawItemPixmap(), QTextDocumentLayoutPrivate::drawListItem(), QDirectFbBlitter::drawPixmapOpacity(), QWindowsVistaStyle::drawPrimitive(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QAndroidStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QQC2::QWindowsXPStyle::drawPrimitive(), QPaintEngine::drawRects(), QPainter::drawRects(), QTreeView::drawRow(), QQC2_NAMESPACE::drawTabBase(), QQC2_NAMESPACE::drawTabShape(), dumpNativeWindowsRecursion(), QOutlineMapper::endOutline(), QPlainTextEditPrivate::ensureCursorVisible(), QScrollArea::ensureWidgetVisible(), QGeoTiledMapNokia::evaluateCopyrights(), QBlitterPaintEngine::fillRect(), fillRect_normalized(), QDockAreaLayout::fitLayout(), QToolBarAreaLayout::fitLayout(), QWindowsBackingStore::flush(), QXcbNativeBackingStore::flush(), QWindowsDirect2DWindow::flush(), QXcbWindow::frameMargins(), QDockAreaLayout::gapRect(), QDockAreaLayout::getGrid(), QBsdFbScreen::grabWindow(), QEglFSScreen::grabWindow(), QIntegrityFbScreen::grabWindow(), QLinuxFbScreen::grabWindow(), QVncScreen::grabWindow(), QOffscreenBackingStore::grabWindow(), QOffscreenScreen::grabWindow(), QQnxScreen::grabWindow(), QXcbWindow::handleConfigureNotifyEvent(), QWindowsWindow::handleGeometryChangingMessage(), QTableViewPrivate::heightHintForIndex(), QPlatformWindow::initialGeometry(), QClipData::initialize(), QIntegrityFbScreen::initialize(), QBsdFbScreen::initialize(), QLinuxFbScreen::initialize(), QVncScreen::initialize(), QTabBar::initStyleOption(), QGraphicsWidgetPrivate::initStyleOptionTitleBar(), QSpanData::initTexture(), QColorDialogPrivate::initWidgets(), QPathClipper::intersect(), QQnxInputContext::keyboardRect(), QMdiSubWindow::keyPressEvent(), QTabBarPrivate::makeVisible(), QPicture::metric(), QPaintDeviceWindow::metric(), QWidget::metric(), QOpenGLWidget::metric(), QCalendarWidget::minimumSizeHint(), QMenuBar::minimumSizeHint(), QTabBar::mouseMoveEvent(), QScrollBar::mousePressEvent(), QSizeGrip::mousePressEvent(), QTabBar::mouseReleaseEvent(), moveToVirtualScreen(), QWindowsWindow::moveTransientChildren(), QQC2_NAMESPACE::QMacStyle::ninePatchMargins(), operator<<(), operator<<(), QSGOpenVGPainterNode::paint(), QSGSoftwarePainterNode::paint(), QSGDefaultPainterNode::paint(), QtWaylandClient::QWaylandBradientDecoration::paint(), QSGSoftwareInternalRectangleNode::paint(), QmlJSDebugger::SelectionHighlight::paint(), QQuickUniversalFocusRectangle::paint(), QPagePreview::paintEvent(), QFileDialogComboBox::paintEvent(), QLabel::paintEvent(), QLineEdit::paintEvent(), QPlainTextEdit::paintEvent(), QMdiSubWindow::paintEvent(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), QTipLabel::placeTip(), QMenuPrivate::popup(), QMenuBarPrivate::popupAction(), QLineEditPrivate::positionSideWidgets(), QQuick3DSGRenderNode::prepare(), QSSGLayerRenderData::prepareForRender(), QWindowsDirect2DWindow::present(), QGraphicsScenePrivate::processDirtyItemsRecursive(), QGuiApplicationPrivate::processGeometryChangeEvent(), QQC2::qDrawBorderPixmap(), QSGSoftwareHelpers::qDrawBorderPixmap(), qDrawRoundedCorners(), qNormalizeRadii(), QRectF_intersects(), qt_scrollRectInImage(), qt_transform_image_rasterize(), QRasterPaintEnginePrivate::rasterize(), read_jpeg_image(), QMdi::RegularTiler::rearrange(), QMdi::SimpleCascader::rearrange(), QMdi::IconTiler::rearrange(), QComboBoxPrivate::recomputeSizeHint(), QVideoWindowPrivate::render(), QGraphicsView::render(), QAndroidPlatformOpenGLWindow::repaint(), QProgressBarPrivate::repaintRequired(), QEvdevTabletData::report(), QEvdevTouchScreenData::reportPoints(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QEglFSKmsEglDeviceWindow::resetSurface(), QXcbNativeBackingStore::resize(), QMdiAreaPrivate::resizeToMinimumTileSize(), QWidget::restoreGeometry(), QQC2_NAMESPACE::rotateTabPainter(), QAlphaWidget::run(), QDockAreaLayoutInfo::saveState(), QWhatsThisPrivate::say(), QWindowsTabletDeviceData::scaleCoordinates(), QQC2::QWindowsXPStylePrivate::scrollBarGripperBounds(), QPixmapStyle::scrollBarSubControlRect(), QAndroidPlatformScreen::setAvailableGeometry(), QPolygonClipper< InType, OutType, CastType >::setBoundingRect(), QWindowsWindow::setCustomMargins(), setDisplayMetrics(), QWasmWindow::setGeometry(), QBoxLayout::setGeometry(), QDockWidgetLayout::setGeometry(), QWindow::setGeometry(), QAndroidPlatformOpenGLWindow::setGeometry(), QAndroidPlatformVulkanWindow::setGeometry(), QFormLayout::setGeometry(), QWindowsBaseWindow::setGeometry_sys(), QMdiSubWindowPrivate::setMaximizeMode(), QMdiSubWindowPrivate::setNewGeometry(), QEglFSKmsGbmCursor::setPos(), QQnxScreen::setRotation(), QLinuxMediaDevice::setSubdevSelection(), QtAndroid::setSurfaceGeometry(), QXcbWindow::setTransparentForMouseEvents(), QAndroidPlatformWindow::setVisible(), QtAndroidMenu::showContextMenu(), QComboBox::showPopup(), QLabelPrivate::sizeForWidth(), QMacStyle::sizeFromContents(), QMenu::sizeHint(), QMenuBar::sizeHint(), QQC2_NAMESPACE::QMacStyle::subControlRect(), QQC2::QCommonStyle::subControlRect(), QMacStyle::subControlRect(), QCommonStyle::subControlRect(), QAndroidStyle::AndroidSpinnerControl::subControlRect(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QQC2::QCommonStyle::subElementRect(), QMacStyle::subElementRect(), QCommonStyle::subElementRect(), QAndroidPlatformOpenGLWindow::surfaceChanged(), QQC2::QMacStylePrivate::tabLayout(), QItemDelegatePrivate::textLayoutBounds(), QPlainTextEdit::timerEvent(), QTextEdit::timerEvent(), to_d2d_rect_u(), toBottomLeftRect(), toBottomLeftRect(), QRasterPlatformPixmap::toImage(), QQC2::QCommonStylePrivate::toolButtonElideText(), QWindowsThemeData::toRECT(), QQC2::XPThemeData::toRECT(), QX11PlatformPixmap::transformed(), glyph_metrics_t::transformed(), QWindowsMouseHandler::translateTouchEvent(), QSGSoftwareInternalRectangleNode::update(), QTableView::updateGeometries(), QTreeView::updateGeometries(), QComboBoxPrivate::updateLineEditGeometry(), QWin32PrintEnginePrivate::updateMetrics(), QtWaylandClient::QWaylandScreen::updateOutputProperties(), QScreenPrivate::updatePrimaryOrientation(), QIOSScreen::updateProperties(), QMdiAreaPrivate::updateScrollBars(), QQuickTableViewPrivate::updateSelection(), QQuickTreeViewPrivate::updateSelection(), QTipLabel::updateSize(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), QtWaylandClient::QWaylandTextInputv4::updateState(), QWasmBackingStore::updateTexture(), QWasmVideoOutput::updateVideoElementGeometry(), updateWindow(), useScrollBar(), QQC2::QCommonStylePrivate::viewItemDrawText(), QQC2::QCommonStylePrivate::viewItemLayout(), QQC2::QCommonStylePrivate::viewItemSize(), QStyle::visualRect(), and QQC2::QStyle::visualRect().
|
inlineconstexprnoexcept |
Returns the x-coordinate of the rectangle's left edge.
Equivalent to left().
Definition at line 184 of file qrect.h.
Referenced by QWindowCreationContext::QWindowCreationContext(), QSGRhiAtlasTexture::Texture::Texture(), QLineEditPrivate::adjustedControlRect(), QDialog::adjustPosition(), QStyle::alignedRect(), QQC2::QStyle::alignedRect(), QFormLayoutPrivate::arrangeWidgets(), QQnxScreen::availableGeometry(), QRasterPaintEnginePrivate::blitImage(), QCommonStylePrivate::calculateElidedText(), QQC2::QCommonStylePrivate::calculateElidedText(), QListViewPrivate::closestIndex(), QWaylandQtShellSurfacePrivate::configure(), QPathClipper::contains(), QQuickContext2DTile::createPainter(), QtAndroid::createSurface(), QIBusPlatformInputContext::cursorRectChanged(), determineGeometry(), determineGeometry(), QAndroidStyle::AndroidImageDrawable::draw(), QPainterPrivate::draw_helper(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QDirectFbBlitter::drawCachedGlyphs(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QRasterPaintEnginePrivate::drawImage(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QStyle::drawItemPixmap(), QQC2::QStyle::drawItemPixmap(), drawPixel(), drawPixelARGB32(), drawPixelARGB32Opaque(), QDirectFbBlitter::drawPixmapOpacity(), QWindowsVistaStyle::drawPrimitive(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QAndroidStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QQC2::QWindowsXPStyle::drawPrimitive(), QPaintEngine::drawRects(), QPaintEngineEx::drawRects(), dumpNativeWindowsRecursion(), QOutlineMapper::endOutline(), QAlphaWidget::eventFilter(), QBlitterPaintEngine::fillRect(), fillRect_normalized(), QWindowsBackingStore::flush(), QXcbNativeBackingStore::flush(), QColorDialogPrivate::grabScreenColor(), grabScreenColor(), QWindowsScreen::grabWindow(), QQnxScreen::grabWindow(), QXcbScreen::grabWindow(), QClipData::initialize(), QBsdFbScreen::initialize(), QLinuxFbScreen::initialize(), QSpanData::initTexture(), QLineEditPrivate::inSelection(), QPathClipper::intersect(), QWidgetPrivate::invalidateBackingStore_resizeHelper(), QQnxInputContext::keyboardRect(), QMdiSubWindow::keyPressEvent(), QTabBar::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QScrollBar::mousePressEvent(), QSizeGrip::mousePressEvent(), QAbstractButtonPrivate::moveFocus(), QMacPrintEnginePrivate::newPage_helper(), QTabBarPrivate::normalizedScrollRect(), operator<<(), operator<<(), QSGOpenVGPainterNode::paint(), QSGSoftwarePainterNode::paint(), QSGDefaultPainterNode::paint(), QPagePreview::paintEvent(), QLabel::paintEvent(), QTabWidget::paintEvent(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), QTipLabel::placeTip(), QMenuBarPrivate::popupAction(), QSSGLayerRenderData::prepareForRender(), QWindowsDirect2DWindow::present(), QGraphicsScenePrivate::processDirtyItemsRecursive(), QGuiApplicationPrivate::processGeometryChangeEvent(), QRasterPaintEnginePrivate::rasterize(), read_jpeg_image(), QWidgetPrivate::render_helper(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QXcbNativeBackingStore::resize(), QAlphaWidget::run(), QRollEffect::run(), QDockAreaLayoutInfo::saveState(), QWhatsThisPrivate::say(), QWindowsTabletDeviceData::scaleCoordinates(), QPolygonClipper< InType, OutType, CastType >::setBoundingRect(), QWindowsWindow::setCustomMargins(), QBoxLayout::setGeometry(), QWindow::setGeometry(), QWindowsBaseWindow::setGeometry_sys(), QMdiSubWindowPrivate::setNewGeometry(), QtAndroid::setSurfaceGeometry(), QDirectFbWindow::setVisible(), QtAndroidMenu::showContextMenu(), QGtk3Menu::showPopup(), QMenu::sizeHint(), QMenuBar::sizeHint(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QQC2::QCommonStyle::subElementRect(), QMacStyle::subElementRect(), QCommonStyle::subElementRect(), to_d2d_rect_u(), toBottomLeftRect(), toBottomLeftRect(), QRasterPlatformPixmap::toImage(), QWindowsThemeData::toRECT(), QQC2::XPThemeData::toRECT(), QQuickTableViewPrivate::updateSelection(), QQuickTreeViewPrivate::updateSelection(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), QtWaylandClient::QWaylandTextInputv4::updateState(), QScrollAreaPrivate::updateWidgetPosition(), and QLineEditPrivate::xToPos().
|
inlineconstexprnoexcept |
Returns the y-coordinate of the rectangle's top edge.
Equivalent to top().
Definition at line 187 of file qrect.h.
Referenced by QWindowCreationContext::QWindowCreationContext(), QSGRhiAtlasTexture::Texture::Texture(), QDialog::adjustPosition(), QStyle::alignedRect(), QQC2::QStyle::alignedRect(), QQnxScreen::availableGeometry(), QRasterPaintEnginePrivate::blitImage(), QListViewPrivate::closestIndex(), QWaylandQtShellSurfacePrivate::configure(), QPathClipper::contains(), QQuickContext2DTile::createPainter(), QtAndroid::createSurface(), QIBusPlatformInputContext::cursorRectChanged(), determineGeometry(), determineGeometry(), QAndroidStyle::AndroidImageDrawable::draw(), QPainterPrivate::draw_helper(), QWindowsVistaStylePrivate::drawBackgroundThruNativeBuffer(), QQC2::QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QDirectFbBlitter::drawCachedGlyphs(), QQC2_NAMESPACE::QMacStyle::drawComplexControl(), QQC2::QCommonStyle::drawComplexControl(), QQC2::QWindowsStyle::drawComplexControl(), QMacStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QQC2::QWindowsXPStyle::drawComplexControl(), QWindowsVistaStyle::drawComplexControl(), QQC2_NAMESPACE::QMacStyle::drawControl(), QQC2::QCommonStyle::drawControl(), QQC2::QWindowsStyle::drawControl(), QMacStyle::drawControl(), QCommonStyle::drawControl(), QRasterPaintEnginePrivate::drawImage(), QRasterPaintEngine::drawImage(), QGraphicsScenePrivate::drawItemHelper(), QStyle::drawItemPixmap(), QQC2::QStyle::drawItemPixmap(), drawPixel(), drawPixelARGB32(), drawPixelARGB32Opaque(), QDirectFbBlitter::drawPixmapOpacity(), QWindowsVistaStyle::drawPrimitive(), QQC2_NAMESPACE::QMacStyle::drawPrimitive(), QQC2::QCommonStyle::drawPrimitive(), QQC2::QWindowsStyle::drawPrimitive(), QAndroidStyle::drawPrimitive(), QMacStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QQC2::QWindowsXPStyle::drawPrimitive(), QPaintEngine::drawRects(), QPainter::drawRects(), dumpNativeWindowsRecursion(), QOutlineMapper::endOutline(), QAlphaWidget::eventFilter(), QBlitterPaintEngine::fillRect(), fillRect_normalized(), QWindowsBackingStore::flush(), QXcbNativeBackingStore::flush(), QColorDialogPrivate::grabScreenColor(), grabScreenColor(), QWindowsScreen::grabWindow(), QQnxScreen::grabWindow(), QXcbScreen::grabWindow(), QBsdFbScreen::initialize(), QLinuxFbScreen::initialize(), QSpanData::initTexture(), QPathClipper::intersect(), QMdiSubWindow::keyPressEvent(), QTabBar::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QScrollBar::mousePressEvent(), QSizeGrip::mousePressEvent(), QAbstractButtonPrivate::moveFocus(), QMacPrintEnginePrivate::newPage_helper(), QTabBarPrivate::normalizedScrollRect(), operator<<(), operator<<(), QSGOpenVGPainterNode::paint(), QSGSoftwarePainterNode::paint(), QSGDefaultPainterNode::paint(), QPagePreview::paintEvent(), QLabel::paintEvent(), QTabWidget::paintEvent(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), QTipLabel::placeTip(), QMenuBarPrivate::popupAction(), QSSGLayerRenderData::prepareForRender(), QWindowsDirect2DWindow::present(), QGraphicsScenePrivate::processDirtyItemsRecursive(), QGuiApplicationPrivate::processGeometryChangeEvent(), QRasterPaintEnginePrivate::rasterize(), read_jpeg_image(), QWidgetPrivate::render_helper(), QSGRhiDistanceFieldGlyphCache::requestGlyphs(), QXcbNativeBackingStore::resize(), QQC2_NAMESPACE::rotateTabPainter(), QAlphaWidget::run(), QRollEffect::run(), QDockAreaLayoutInfo::saveState(), QWhatsThisPrivate::say(), QWindowsTabletDeviceData::scaleCoordinates(), QPolygonClipper< InType, OutType, CastType >::setBoundingRect(), QWindowsWindow::setCustomMargins(), QWasmWindow::setGeometry(), QBoxLayout::setGeometry(), QWindow::setGeometry(), QFormLayout::setGeometry(), QWindowsBaseWindow::setGeometry_sys(), QAbstractItemViewPrivate::setHoverIndex(), QMdiSubWindowPrivate::setNewGeometry(), QtAndroid::setSurfaceGeometry(), QDirectFbWindow::setVisible(), QtAndroidMenu::showContextMenu(), QGtk3Menu::showPopup(), QMenu::sizeHint(), QMenuBar::sizeHint(), QQC2_NAMESPACE::QMacStyle::subElementRect(), QQC2::QCommonStyle::subElementRect(), QMacStyle::subElementRect(), QCommonStyle::subElementRect(), to_d2d_rect_u(), QRasterPlatformPixmap::toImage(), QWindowsThemeData::toRECT(), QQC2::XPThemeData::toRECT(), QQuickTableViewPrivate::updateSelection(), QQuickTreeViewPrivate::updateSelection(), QtWaylandClient::QWaylandTextInputv1::updateState(), QtWaylandClient::QWaylandTextInputv2::updateState(), QtWaylandClient::QWaylandTextInputv4::updateState(), and QScrollAreaPrivate::updateWidgetPosition().
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Returns the rectangle grown by the margins.
|
related |
|
related |
|
friend |