#include <qrect.h>
A rectangle is normally expressed as an upper-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 provide 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 rectange'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:
qrect-intersect.png qrect-unite.png intersected() united()
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.
Finally, QRect objects can be streamed as well as compared.
When using an \l {QPainter::Antialiasing}{anti-aliased} painter, the boundary line of a QRect will be rendered symmetrically on both sides of the mathematical rectangle's boundary line. But when using an aliased painter (the default) other rules apply. Then, when rendering with a one pixel wide pen the QRect's boundary line will be rendered to the right and below the mathematical rectangle's boundary line. When rendering with a two pixels wide pen the boundary line will be split in the middle by the mathematical rectangle. This will be the case whenever the pen is set to an even number of pixels, while rendering with a pen with an odd number of pixels, the spare pixel will be rendered to the right and below the mathematical rectangle as in the one pixel case. \table \row \o \inlineimage qrect-diagram-zero.png \o \inlineimage qrect-diagram-one.png \row \o Logical representation \o One pixel wide pen \row \o \inlineimage qrect-diagram-two.png \o \inlineimage qrect-diagram-three.png \row \o Two pixel wide pen \o Three pixel wide pen \endtable @section Coordinates The QRect class provides a collection of functions that return the various rectangle coordinates, and enable manipulation of these. QRect also provide functions to move the rectangle relative to the various coordinates. For example the left(), setLeft() and moveLeft() functions as an example: left() returns the x-coordinate of the rectangle's left edge, setLeft() sets the left edge of the rectangle to the given x coordinate (it may change the width, but will never change the rectangle's right edge) and moveLeft() moves the entire rectangle horizontally, leaving the rectangle's left edge at the given x coordinate and its size unchanged. \image qrect-coordinates.png Note that for historical reasons the values returned by the bottom() and right() functions deviate from the true bottom-right corner of the rectangle: The right() function returns \e { left() + width() - 1} and the bottom() function returns \e {top() + height() - 1}. The same is the case for the point returned by the bottomRight() convenience function. In addition, the x and y coordinate of the topRight() and bottomLeft() functions, respectively, contain the same deviation from the true right and bottom edges. We recommend that you use x() + width() and y() + height() to find the true bottom-right corner, and avoid right() and bottom(). Another solution is to use QRectF: The QRectF class defines a rectangle in the plane using floating point accuracy for coordinates, and the QRectF::right() and QRectF::bottom() functions \e do return the true bottom-right corner. It is also possible to add offsets to this rectangle's coordinates using the adjust() function, as well as retrieve a new rectangle based on adjustments of the original one using the adjusted() function. If either of the width and height is negative, use the normalized() function to retrieve a rectangle where the corners are swapped. In addition, QRect provides the getCoords() function which extracts the position of the rectangle's top-left and bottom-right corner, and the getRect() function which extracts the rectangle's top-left corner, width and height. Use the setCoords() and setRect() function to manipulate the rectangle's coordinates and dimensions in one go. \sa QRectF, QRegion Definition at line 38 of file qrect.h.
Public Member Functions | |
| QRect () | |
| QRect (const QPoint &topleft, const QPoint &bottomright) | |
| QRect (const QPoint &topleft, const QSize &size) | |
| QRect (int left, int top, int width, int height) | |
| bool | isNull () const |
| bool | isEmpty () const |
| bool | isValid () const |
| int | left () const |
| int | top () const |
| int | right () const |
| int | bottom () const |
| QRect | normalized () const |
| int | x () const |
| int | y () const |
| void | setLeft (int pos) |
| void | setTop (int pos) |
| void | setRight (int pos) |
| void | setBottom (int pos) |
| void | setX (int x) |
| void | setY (int y) |
| void | setTopLeft (const QPoint &p) |
| void | setBottomRight (const QPoint &p) |
| void | setTopRight (const QPoint &p) |
| void | setBottomLeft (const QPoint &p) |
| QPoint | topLeft () const |
| QPoint | bottomRight () const |
| QPoint | topRight () const |
| QPoint | bottomLeft () const |
| QPoint | center () const |
| void | moveLeft (int pos) |
| void | moveTop (int pos) |
| void | moveRight (int pos) |
| void | moveBottom (int pos) |
| void | moveTopLeft (const QPoint &p) |
| void | moveBottomRight (const QPoint &p) |
| void | moveTopRight (const QPoint &p) |
| void | moveBottomLeft (const QPoint &p) |
| void | moveCenter (const QPoint &p) |
| void | translate (int dx, int dy) |
| void | translate (const QPoint &p) |
| QRect | translated (int dx, int dy) const |
| QRect | translated (const QPoint &p) const |
| void | moveTo (int x, int t) |
| void | moveTo (const QPoint &p) |
| void | setRect (int x, int y, int w, int h) |
| void | getRect (int *x, int *y, int *w, int *h) const |
| void | setCoords (int x1, int y1, int x2, int y2) |
| void | getCoords (int *x1, int *y1, int *x2, int *y2) const |
| void | adjust (int x1, int y1, int x2, int y2) |
| QRect | adjusted (int x1, int y1, int x2, int y2) const |
| QSize | size () const |
| int | width () const |
| int | height () const |
| void | setWidth (int w) |
| void | setHeight (int h) |
| void | setSize (const QSize &s) |
| QRect | operator| (const QRect &r) const |
| QRect | operator & (const QRect &r) const |
| QRect & | operator|= (const QRect &r) |
| QRect & | operator &= (const QRect &r) |
| bool | contains (const QPoint &p, bool proper=false) const |
| bool | contains (int x, int y) const |
| bool | contains (int x, int y, bool proper) const |
| bool | contains (const QRect &r, bool proper=false) const |
| QRect | unite (const QRect &r) const |
| QRect | united (const QRect &other) const |
| QRect | intersect (const QRect &r) const |
| QRect | intersected (const QRect &other) const |
| bool | intersects (const QRect &r) const |
Private Attributes | |
| int | x1 |
| int | y1 |
| int | x2 |
| int | y2 |
Friends | |
| Q_CORE_EXPORT_INLINE bool | operator== (const QRect &, const QRect &) |
| Q_CORE_EXPORT_INLINE bool | operator!= (const QRect &, const QRect &) |
Related Functions | |
| (Note that these are not member functions.) | |
| QDataStream & | operator<< (QDataStream &stream, const QRect &rectangle) |
| QDataStream & | operator>> (QDataStream &stream, QRect &rectangle) |
| QRect::QRect | ( | ) | [inline] |
Constructs a null rectangle.
Definition at line 41 of file qrect.h.
Referenced by adjusted(), operator &(), and translated().
Constructs a rectangle with the given topLeft and bottomRight corners.
Definition at line 194 of file qrect.h.
References QPoint::x(), x1, x2, QPoint::y(), y1, and y2.
00195 { 00196 x1 = atopLeft.x(); 00197 y1 = atopLeft.y(); 00198 x2 = abottomRight.x(); 00199 y2 = abottomRight.y(); 00200 }
Here is the call graph for this function:

Constructs a rectangle with the given topLeft corner and the given size.
Definition at line 202 of file qrect.h.
References QSize::height(), QSize::width(), QPoint::x(), x1, x2, QPoint::y(), y1, and y2.
00203 { 00204 x1 = atopLeft.x(); 00205 y1 = atopLeft.y(); 00206 x2 = (x1+asize.width() - 1); 00207 y2 = (y1+asize.height() - 1); 00208 }
Here is the call graph for this function:

| QRect::QRect | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) | [inline] |
| bool QRect::isNull | ( | ) | const [inline] |
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 210 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by QMenuPrivate::actionRect(), QWidget::adjustSize(), QWidgetAnimator::animate(), QMenuPrivate::calcActionRects(), contains(), QImage::copy(), Q3SimpleRichText::draw(), Q3TextDocument::draw(), QPlastiqueStyle::drawControl(), QTipLabel::eventFilter(), QGraphicsView::fitInView(), QDockAreaLayoutInfo::gapIndex(), intersects(), Q3TableHeader::mouseReleaseEvent(), normalized(), operator &(), operator|(), QPdfBaseEnginePrivate::pageRect(), Q3TextParagraph::paint(), QPdfBaseEnginePrivate::paperRect(), Q3ComboBox::popup(), qt_plastique_draw_mdibutton(), QImageReader::read(), QVFbView::refreshDisplay(), QGraphicsView::render(), Skin::secondaryScreenSize(), QDesignerSettings::setGeometryFor(), QGraphicsView::setSceneRect(), QToolTip::showText(), QDragManager::timerEvent(), QGraphicsView::updateScene(), and Skin::updateSecondaryScreen().
| bool QRect::isEmpty | ( | ) | const [inline] |
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 213 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by QPainter::begin(), Q3Canvas::changeBounds(), QItemDelegate::doLayout(), QWindowsXPStylePrivate::drawBackground(), QWindowsXPStyle::drawComplexControl(), Q3ListView::drawContentsOffset(), QPainter::drawEllipse(), QWorkspacePrivate::hideChild(), QListView::moveCursor(), operator &(), QMenuBar::paintEvent(), qt_testCollision(), QAccessibleTextEdit::rect(), QVFbView::refreshDisplay(), QTreeView::scrollTo(), QMainWindowLayout::setGeometry(), QWidgetPrivate::setMinimumSize_helper(), QCommonStyle::subElementRect(), and Q3ListView::updateDirtyItems().
| bool QRect::isValid | ( | ) | const [inline] |
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 216 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by QWidgetAnimator::animate(), Q3CanvasItem::chunks(), QRenderRule::contentsSize(), QStyleSheetBorderImageData::cutBorderImage(), QItemDelegate::doLayout(), Q3TextDocument::draw(), QRenderRule::drawBorderImage(), QItemDelegate::drawCheck(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), ArthurStyle::drawComplexControl(), Q3ListView::drawContentsOffset(), QCommonStyle::drawControl(), QItemDelegate::drawDecoration(), QItemDelegate::drawFocus(), QPSPrintEnginePrivate::emitHeader(), Q3IconView::handleItemChange(), QRenderRule::hasContentsSize(), QCommonStyle::hitTestComplexControl(), Q3ListView::inputMethodQuery(), QDockWidgetLayout::isValid(), Q3AccessibleTextEdit::itemRect(), Q3ListView::keyPressEvent(), QGraphicsView::mapFromScene(), QGraphicsView::mapToScene(), QListViewPrivate::mapToViewport(), QDragManager::move(), QWidgetPrivate::moveRect(), PuzzleWidget::paintEvent(), QHeaderView::paintSection(), QRenderRule::QRenderRule(), QImageReader::read(), QWidget::restoreGeometry(), QWidget::scroll(), QWidgetPrivate::scrollRect(), QFrame::setFrameRect(), QCompleterPrivate::showPopup(), QAbstractItemView::updateEditorGeometries(), and PieView::visualRect().
| int QRect::left | ( | ) | const [inline] |
Returns the x-coordinate of the rectangle's left edge. Equivalent to x().
Definition at line 219 of file qrect.h.
References x1.
Referenced by QLabelPrivate::_q_movieUpdated(), Q3CanvasText::addToChunks(), QView3DWidget::addWidget(), QDockAreaLayoutInfo::apply(), QBalloonTip::balloon(), QPicturePaintEngine::begin(), qdesigner_internal::FormWindowManager::beginDrag(), qdesigner_internal::GridLayout::buildGrid(), QGroupBoxPrivate::calculateFrame(), Q3CanvasText::changeChunks(), qdesigner_internal::FormWindow::checkPreviewGeometry(), Q3CanvasItem::chunks(), qdesigner_internal::closestEdge(), QWidgetPrivate::create_sys(), QGridLayoutPrivate::distribute(), QLabelPrivate::documentRect(), QListViewPrivate::doDynamicLayout(), QItemDelegate::doLayout(), QListViewPrivate::doStaticLayout(), QAbstractItemView::dragMoveEvent(), Q3TextHorizontalLine::draw(), Q3TextTable::draw(), Q3Canvas::drawBackground(), qdesigner_internal::TreeWidget::drawBranches(), QTreeView::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), Q3TextEdit::drawContents(), Q3ListView::drawContentsOffset(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), Q3TextParagraph::drawLabel(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QPSPrintEnginePrivate::emitHeader(), QPicturePaintEngine::end(), QLayoutSupport::extendedGeometry(), QDockWidgetLayout::fitLayout(), QWindowsXPStylePrivate::fixAlphaChannel(), QWidget::frameGeometry(), QWidget::frameSize(), QWorkspaceChild::frameWidth(), QDockWidgetLayout::gapIndex(), QDockWidgetLayout::getGrid(), Q3IconView::handleItemChange(), QDesignerMenu::handleMouseDoubleClickEvent(), QDesignerMenu::handleMousePressEvent(), Q3ListView::handleSizeChange(), QWindowsXPStylePrivate::hasAlphaChannel(), QWindowsXPStylePrivate::hasAnyData(), QWidgetPrivate::hide_sys(), include(), qdesigner_internal::TabOrderEditor::indicatorRect(), QListViewPrivate::initStaticLayout(), QMenuBarPrivate::isVisible(), QWidgetResizeHandler::keyPressEvent(), QMenu::keyPressEvent(), QAbstractScrollAreaPrivate::layoutChildren(), QTabBarPrivate::layoutTabs(), qdesigner_internal::lineEntryPos(), QTabBarPrivate::makeVisible(), QMatrix::mapRect(), miCoalesce(), miSetExtents(), miSubtractO(), QWidgetResizeHandler::mouseMoveEvent(), QDateTimeEdit::mousePressEvent(), Bubble::move(), QListView::moveCursor(), QAccessibleWidget::navigate(), operator<<(), QPdfBaseEnginePrivate::pageRect(), qdesigner_internal::SheetDelegate::paint(), qdesigner_internal::TreeWidgetDelegate::paint(), Q3TextParagraph::paint(), QFontFamilyDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), QToolBoxButton::paintEvent(), Q3TableHeader::paintEvent(), QHeaderView::paintEvent(), TetrixBoard::paintEvent(), qdesigner_internal::StyledButton::paintEvent(), CharacterWidget::paintEvent(), Q3Header::paintEvent(), qdesigner_internal::paintGround(), QWorkspacePrivate::place(), qdesigner_internal::pointInsideRect(), QWidgetPrivate::pointToRect(), PolygonRegion(), QMenu::popup(), QMenuBarPrivate::popupAction(), QToolButtonPrivate::popupTimerDone(), QWidget::pos(), PtsToRegion(), QPolygon::QPolygon(), QPolygonalProcessor::QPolygonalProcessor(), qRectIntersects(), qt_cleanlooks_draw_gradient(), qt_cleanlooks_draw_mdibutton(), qt_plastique_draw_frame(), qt_plastique_draw_handle(), qt_plastique_draw_mdibutton(), qt_plastique_drawFrame(), rect_intersects(), RectInRegion(), Q3CanvasText::removeFromChunks(), QGraphicsView::render(), QWidget::restoreGeometry(), QListView::scrollTo(), PieView::scrollTo(), QDockWidgetLayout::separatorRect(), QFrame::setFrameRect(), QSplitterPrivate::setGeo(), QDesignerSettings::setGeometryHelper(), QDockWidgetLayout::setGrid(), QTableView::setSelection(), QTreeView::setSelection(), QWidget::setWindowState(), QWidgetPrivate::show_sys(), QTreeViewPrivate::startAndEndColumns(), Q3ListViewItem::startRename(), QPlastiqueStyle::styleHint(), QStyleSheetStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QStyleSheetStyle::subElementRect(), QWindowsXPStylePrivate::swapAlphaChannel(), UnionRegion(), QXIMInputContext::update(), QTableView::updateGeometries(), QMenuBarPrivate::updateGeometries(), qdesigner_internal::Connection::updateKneeList(), Q3ComboBoxData::updateLinedGeometry(), Q3DockWindow::updatePosition(), QFramePrivate::updateStyledFrameWidths(), QWorkspacePrivate::updateWorkspace(), Q3ListView::viewportResizeEvent(), and PieView::visualRect().
00220 { return x1; }
| int QRect::top | ( | ) | const [inline] |
Returns the y-coordinate of the rectangle's top edge. Equivalent to y().
Definition at line 222 of file qrect.h.
References y1.
Referenced by QLabelPrivate::_q_movieUpdated(), Q3CanvasText::addToChunks(), Launcher::addVersionAndCopyright(), QView3DWidget::addWidget(), Q3TextTable::adjustCells(), QDockAreaLayoutInfo::apply(), QPicturePaintEngine::begin(), qdesigner_internal::FormWindowManager::beginDrag(), qdesigner_internal::GridLayout::buildGrid(), QGroupBoxPrivate::calculateFrame(), Q3CanvasText::changeChunks(), qdesigner_internal::FormWindow::checkPreviewGeometry(), Q3CanvasItem::chunks(), qdesigner_internal::closestEdge(), QWidgetPrivate::create_sys(), QGridLayoutPrivate::distribute(), QLabelPrivate::documentRect(), QListViewPrivate::doDynamicLayout(), QItemDelegate::doLayout(), QLayoutPrivate::doResize(), QListViewPrivate::doStaticLayout(), QAbstractItemView::dragMoveEvent(), Q3TextTable::draw(), Q3Canvas::drawBackground(), qdesigner_internal::TreeWidget::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), QTreeView::drawBranches(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), Q3ListView::drawContentsOffset(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), Q3TextParagraph::drawLabel(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QPSPrintEnginePrivate::emitHeader(), QPicturePaintEngine::end(), QLayoutSupport::extendedGeometry(), QDockWidgetLayout::fitLayout(), QWindowsXPStylePrivate::fixAlphaChannel(), Q3TextEdit::formatMore(), QWidget::frameGeometry(), QWidget::frameSize(), QDockWidgetLayout::gapIndex(), QDockWidgetLayout::getGrid(), Q3IconView::handleItemChange(), QWindowsXPStylePrivate::hasAlphaChannel(), QWindowsXPStylePrivate::hasAnyData(), Q3TextDocument::height(), QWidgetPrivate::hide_sys(), include(), qdesigner_internal::TabOrderEditor::indicatorRect(), QListViewPrivate::initStaticLayout(), Q3ListView::keyPressEvent(), QWidgetResizeHandler::keyPressEvent(), QAbstractScrollAreaPrivate::layoutChildren(), QTabBarPrivate::layoutTabs(), qdesigner_internal::lineEntryPos(), QTabBarPrivate::makeVisible(), QMatrix::mapRect(), miCoalesce(), miRegionOp(), miSetExtents(), QWidgetResizeHandler::mouseMoveEvent(), QDateTimeEdit::mousePressEvent(), Bubble::move(), QListView::moveCursor(), QAccessibleWidget::navigate(), operator<<(), QPdfBaseEnginePrivate::pageRect(), qdesigner_internal::SheetDelegate::paint(), QToolBoxButton::paintEvent(), Q3TableHeader::paintEvent(), QHeaderView::paintEvent(), qdesigner_internal::StyledButton::paintEvent(), CharacterWidget::paintEvent(), Q3Header::paintEvent(), qdesigner_internal::paintGround(), QWorkspacePrivate::place(), qdesigner_internal::pointInsideRect(), QWidgetPrivate::pointToRect(), PolygonRegion(), QMenu::popup(), QMenuBarPrivate::popupAction(), QWidget::pos(), QAbstractItemViewPrivate::position(), PtsToRegion(), QPolygon::QPolygon(), QPolygonalProcessor::QPolygonalProcessor(), qRectIntersects(), qt_cleanlooks_draw_gradient(), qt_cleanlooks_draw_mdibutton(), qt_plastique_draw_frame(), qt_plastique_draw_handle(), qt_plastique_draw_mdibutton(), qt_plastique_drawFrame(), rect_intersects(), RectInRegion(), Q3CanvasText::removeFromChunks(), QGraphicsView::render(), QTreeViewPrivate::renderTreeToPixmap(), QWidget::restoreGeometry(), QMenuPrivate::scrollMenu(), QListView::scrollTo(), PieView::scrollTo(), QTreeView::scrollTo(), QDockWidgetLayout::separatorRect(), QFrame::setFrameRect(), QMainWindowLayout::setGeometry(), QDesignerSettings::setGeometryHelper(), QDockWidgetLayout::setGrid(), QTableView::setSelection(), QTreeView::setSelection(), QWidget::setWindowState(), QWidgetPrivate::show_sys(), QComboBox::showPopup(), QPlastiqueStyle::styleHint(), QPlastiqueStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QWindowsXPStylePrivate::swapAlphaChannel(), UnionRegion(), QTableView::updateGeometries(), qdesigner_internal::Connection::updateKneeList(), Q3DockWindow::updatePosition(), QFramePrivate::updateStyledFrameWidths(), QWorkspacePrivate::updateWorkspace(), PieView::visualRect(), and QTreeView::visualRegionForSelection().
00223 { return y1; }
| int QRect::right | ( | ) | const [inline] |
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 225 of file qrect.h.
References x2.
Referenced by Q3CanvasText::addToChunks(), QView3DWidget::addWidget(), QWidgetAnimator::animate(), QDockAreaLayoutInfo::apply(), QBalloonTip::balloon(), qdesigner_internal::FormWindowManager::beginDrag(), qdesigner_internal::GridLayout::buildGrid(), QGroupBoxPrivate::calculateFrame(), Q3CanvasText::changeChunks(), qdesigner_internal::FormWindow::checkPreviewGeometry(), Q3CanvasItem::chunks(), qdesigner_internal::closestEdge(), Q3IconViewItem::contains(), QGridLayoutPrivate::distribute(), QLabelPrivate::documentRect(), QListViewPrivate::doDynamicLayout(), QItemDelegate::doLayout(), FlowLayout::doLayout(), QListViewPrivate::doStaticLayout(), Q3TextHorizontalLine::draw(), Q3TextTable::draw(), Q3Canvas::drawBackground(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), qdesigner_internal::TreeWidget::drawBranches(), QTreeView::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), Q3TextEdit::drawContents(), Q3ListView::drawContentsOffset(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), Q3TextParagraph::drawLabel(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QPSPrintEnginePrivate::emitHeader(), QLayoutSupport::extendedGeometry(), Q3Table::finishContentsResze(), QWidget::frameGeometry(), QWidget::frameSize(), QDockWidgetLayout::gapIndex(), QVFbView::getBuffer(), QDockWidgetLayout::getGrid(), Q3IconView::handleItemChange(), include(), Q3IconView::keyPressEvent(), QWidgetResizeHandler::keyPressEvent(), QMenu::keyPressEvent(), QAbstractScrollAreaPrivate::layoutChildren(), QTabBarPrivate::layoutTabs(), qdesigner_internal::lineEntryPos(), QTabBarPrivate::makeVisible(), QMatrix::mapRect(), mapToDevice(), QListViewPrivate::mapToViewport(), miCoalesce(), miSetExtents(), miSubtractO(), QWidgetResizeHandler::mouseMoveEvent(), QComboBoxPrivateScroller::mouseMoveEvent(), QDateTimeEdit::mousePressEvent(), Bubble::move(), QListView::moveCursor(), QAccessibleWidget::navigate(), operator<<(), qdesigner_internal::TreeWidgetDelegate::paint(), Q3TextParagraph::paint(), QFontFamilyDelegate::paint(), qdesigner_internal::ColorDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), Q3TableHeader::paintEvent(), QToolBoxButton::paintEvent(), QHeaderView::paintEvent(), ArthurFrame::paintEvent(), CharacterWidget::paintEvent(), Q3Header::paintEvent(), paintGrid(), qdesigner_internal::paintGround(), Q3Header::paintSectionLabel(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), QWorkspacePrivate::place(), qdesigner_internal::pointInsideRect(), QWidgetPrivate::pointToRect(), PolygonRegion(), QMenu::popup(), QMenuBarPrivate::popupAction(), Q3TextBrowser::popupDetail(), QToolButtonPrivate::popupTimerDone(), PtsToRegion(), QPolygonalProcessor::QPolygonalProcessor(), qRectIntersects(), qt_cleanlooks_draw_gradient(), qt_cleanlooks_draw_mdibutton(), qt_plastique_draw_frame(), qt_plastique_draw_mdibutton(), qt_plastique_drawFrame(), rect_intersects(), RectInRegion(), QDockWidgetPrivate::relayout(), Q3CanvasText::removeFromChunks(), QWidget::restoreGeometry(), QListView::scrollTo(), PieView::scrollTo(), QDockWidgetLayout::separatorRect(), QFrame::setFrameRect(), QBoxLayout::setGeometry(), QDesignerSettings::setGeometryHelper(), QDockWidgetLayout::setGrid(), QTableView::setSelection(), QTreeView::setSelection(), QWidget::setWindowState(), CannonField::shotRect(), QWidgetPrivate::show_sys(), Q3Table::showEvent(), Q3DockWindow::showEvent(), QComboBox::showPopup(), QCommonStyle::sizeFromContents(), QTreeViewPrivate::startAndEndColumns(), QPlastiqueStyle::styleHint(), QPlastiqueStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QMotifStyle::subElementRect(), QCommonStyle::subElementRect(), UnionRegion(), QXIMInputContext::update(), QTableView::updateGeometries(), Q3IconView::updateItemContainer(), qdesigner_internal::Connection::updateKneeList(), Q3DockWindow::updatePosition(), QFramePrivate::updateStyledFrameWidths(), QWorkspacePrivate::updateWorkspace(), QStyle::visualPos(), and QStyle::visualRect().
00226 { return x2; }
| int QRect::bottom | ( | ) | const [inline] |
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 228 of file qrect.h.
References y2.
Referenced by Q3CanvasText::addToChunks(), QView3DWidget::addWidget(), Q3TextTable::adjustCells(), QWidgetAnimator::animate(), QDockAreaLayoutInfo::apply(), qdesigner_internal::FormWindowManager::beginDrag(), qdesigner_internal::GridLayout::buildGrid(), QGroupBoxPrivate::calculateFrame(), Q3CanvasText::changeChunks(), qdesigner_internal::FormWindow::checkPreviewGeometry(), Q3CanvasItem::chunks(), qdesigner_internal::closestEdge(), Q3IconViewItem::contains(), QGridLayoutPrivate::distribute(), QLabelPrivate::documentRect(), QListViewPrivate::doDynamicLayout(), QListViewPrivate::doStaticLayout(), QAbstractItemView::dragMoveEvent(), Q3TextTable::draw(), Q3Canvas::drawBackground(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), qdesigner_internal::TreeWidget::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), Q3TextEdit::drawContents(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QPSPrintEnginePrivate::emitHeader(), QLayoutSupport::extendedGeometry(), Q3Table::finishContentsResze(), Q3TextEdit::formatMore(), QWidget::frameGeometry(), QWidget::frameSize(), QDockWidgetLayout::gapIndex(), QDockWidgetLayout::getGrid(), Q3IconView::handleItemChange(), Q3TextDocument::height(), include(), Q3ListView::keyPressEvent(), Q3IconView::keyPressEvent(), QWidgetResizeHandler::keyPressEvent(), QAbstractScrollAreaPrivate::layoutChildren(), QTabBarPrivate::layoutTabs(), qdesigner_internal::lineEntryPos(), QTabBarPrivate::makeVisible(), QMatrix::mapRect(), mapToDevice(), miCoalesce(), miRegionOp(), miSetExtents(), QWidgetResizeHandler::mouseMoveEvent(), QComboBoxPrivateScroller::mouseMoveEvent(), QDateTimeEdit::mousePressEvent(), Bubble::move(), QListView::moveCursor(), QAccessibleWidget::navigate(), operator<<(), qdesigner_internal::TreeWidgetDelegate::paint(), qdesigner_internal::ColorDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), Q3TableHeader::paintEvent(), QHeaderView::paintEvent(), ArthurFrame::paintEvent(), TetrixBoard::paintEvent(), CharacterWidget::paintEvent(), Q3Header::paintEvent(), paintGrid(), qdesigner_internal::paintGround(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), QWorkspacePrivate::place(), qdesigner_internal::pointInsideRect(), QWidgetPrivate::pointToRect(), PolygonRegion(), QMenu::popup(), QMenuBarPrivate::popupAction(), Q3TextBrowser::popupDetail(), QToolButtonPrivate::popupTimerDone(), QAbstractItemViewPrivate::position(), PtsToRegion(), QPolygonalProcessor::QPolygonalProcessor(), qRectIntersects(), qt_cleanlooks_draw_gradient(), qt_cleanlooks_draw_mdibutton(), qt_plastique_draw_frame(), qt_plastique_draw_mdibutton(), qt_plastique_drawFrame(), rect_intersects(), RectInRegion(), Q3CanvasText::removeFromChunks(), QWidget::restoreGeometry(), QMenuPrivate::scrollMenu(), QListView::scrollTo(), QTreeView::scrollTo(), PieView::scrollTo(), QDockWidgetLayout::separatorRect(), QFrame::setFrameRect(), QBoxLayout::setGeometry(), QMainWindowLayout::setGeometry(), QDesignerSettings::setGeometryHelper(), QDockWidgetLayout::setGrid(), QTableView::setSelection(), QTreeView::setSelection(), QWidget::setWindowState(), QWidgetPrivate::show_sys(), Q3Table::showEvent(), Q3DockWindow::showEvent(), QComboBox::showPopup(), QPlastiqueStyle::styleHint(), QPlastiqueStyle::subControlRect(), UnionRegion(), QXIMInputContext::update(), Q3IconView::updateItemContainer(), qdesigner_internal::Connection::updateKneeList(), Q3DockWindow::updatePosition(), QFramePrivate::updateStyledFrameWidths(), QWorkspacePrivate::updateWorkspace(), and QTreeView::visualRegionForSelection().
00229 { return y2; }
| QRect QRect::normalized | ( | ) | const |
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.
Definition at line 275 of file qrect.cpp.
References height(), isNull(), width(), x1, x2, y1, and y2.
Referenced by Q3Painter::adjustedRectangle(), contains(), Q3IconView::contentsMousePressEventEx(), qdesigner_internal::FormWindow::continueRectDraw(), Q3IconView::doAutoScroll(), QPainter::drawEllipse(), QRasterPaintEngine::drawRects(), Q3IconView::drawRubber(), fillRect(), QRegion::intersects(), intersects(), QListView::mouseMoveEvent(), Q3ListBox::mouseMoveEvent(), operator &(), operator|(), QHeaderView::resizeSection(), PieView::setSelection(), QTreeView::timerEvent(), QTableView::timerEvent(), and Q3ListBox::viewportPaintEvent().
00276 { 00277 if (isNull() || width() == 0 || height() == 0) 00278 return *this; 00279 QRect r; 00280 if (x2 < x1) { // swap bad x values 00281 r.x1 = x2; 00282 r.x2 = x1; 00283 } else { 00284 r.x1 = x1; 00285 r.x2 = x2; 00286 } 00287 if (y2 < y1) { // swap bad y values 00288 r.y1 = y2; 00289 r.y2 = y1; 00290 } else { 00291 r.y1 = y1; 00292 r.y2 = y2; 00293 } 00294 return r; 00295 }
Here is the call graph for this function:

| int QRect::x | ( | ) | const [inline] |
Returns the x-coordinate of the rectangle's left edge. Equivalent to left().
Definition at line 231 of file qrect.h.
References x1.
Referenced by QTextEditPrivate::_q_ensureVisible(), QLabelPrivate::_q_movieUpdated(), Q3CanvasClusterizer::add(), QPolygonalProcessor::add(), PrintOut::addBox(), QLayoutSupport::adjustIndicator(), QDialog::adjustPosition(), QWidget::adjustSize(), QStyle::alignedRect(), QLayout::alignmentRect(), QBalloonTip::balloon(), QPainter::boundingRect(), PrintOut::breakPage(), Q3IconViewItem::cancelRenameItem(), Q3IconViewItem::checkRect(), clipLine(), Q3IconView::contentsDropEvent(), QImage::copy(), QAbstractFormBuilder::createProperty(), QLineEditPrivate::cursorRect(), VariantDelegate::displayText(), QGridLayoutPrivate::distribute(), do_size_hints(), Q3TextParagraph::documentX(), FlowLayout::doLayout(), QPolygonalProcessor::doSpans(), Q3TextTable::down(), Q3IconView::dragObject(), Q3TextTableCell::draw(), Q3TextDocument::draw(), Q3Canvas::drawBackground(), QRenderRule::drawBackgroundImage(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), qdesigner_internal::TreeWidget::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), ArthurStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), Q3IconView::drawContents(), QSplashScreen::drawContents(), Q3Table::drawContents(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QCommonStyle::drawControl(), QX11PaintEngine::drawEllipse(), QPainter::drawEllipse(), Q3SVGPaintEngine::drawEllipse(), drawEllipsePoints(), QFrame::drawFrame(), ArthurStyle::drawHoverRect(), QRenderRule::drawImage(), QStyle::drawItemPixmap(), Q3TextDocument::drawParagraph(), QCommonStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QPaintEngine::drawRects(), QRasterPaintEngine::drawRects(), QPainter::drawText(), Q3Canvas::drawViewArea(), PuzzleWidget::dropEvent(), BookDelegate::editorEvent(), QItemDelegate::editorEvent(), Q3GridView::ensureCellVisible(), Q3TextTable::enterAt(), QDesignerTabWidget::eventFilter(), qdesigner_internal::expand(), QX11PaintEnginePrivate::fillPolygon_dev(), OublietteLevel::fillRect(), fillRect(), Q3IconView::findFirstVisibleItem(), Q3IconView::findLastVisibleItem(), qdesigner_internal::fixRect(), fixRect(), QListViewPrivate::flipX(), QX11WindowSurface::flush(), QRasterWindowSurface::flush(), Q3TextParagraph::format(), get_combo_parameters(), QVFbView::getBuffer(), Q3TextCursor::globalX(), QPixmap::grabWidget(), Q3IconView::handleItemChange(), Q3ListView::handleSizeChange(), QWidgetPrivate::hide_sys(), QListViewPrivate::initDynamicLayout(), Q3IconView::insertInGrid(), Q3AccessibleTextEdit::itemRect(), Q3IconView::keyPressEvent(), QLabelPrivate::layoutRect(), QMatrix::mapRect(), mapToDevice(), QMatrix::mapToPolygon(), QWidgetResizeHandler::mouseMoveEvent(), Q3ListBox::mouseMoveEvent(), PuzzleWidget::mousePressEvent(), QScrollBar::mousePressEvent(), QWidget::move(), Q3DockArea::moveDockWindow(), QAbstractButtonPrivate::moveFocus(), QListViewPrivate::moveItem(), CannonField::moveShot(), Q3TextTable::next(), Q3MainWindow::operator<<(), operator<<(), Q3TextEdit::optimDrawContents(), Q3DateTimeEditorPrivate::paint(), qdesigner_internal::TreeWidgetDelegate::paint(), BookDelegate::paint(), Q3TextParagraph::paint(), qdesigner_internal::ColorDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), PixelDelegate::paint(), ArthurFrame::paintDescription(), QLineEdit::paintEvent(), ArthurFrame::paintEvent(), QWhatsThat::paintEvent(), PieView::paintEvent(), QLabel::paintEvent(), QWellArray::paintEvent(), QPixelTool::paintEvent(), Q3ComboBox::paintEvent(), Q3CheckListItem::paintFocus(), paintGrid(), Q3IconViewItem::paintItem(), Oubliette::paintOubliette(), Q3Header::paintSection(), Q3Header::paintSectionLabel(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), Q3IconViewItem::pixmapRect(), place_line(), Q3ComboBox::popup(), QMenuBarPrivate::popupAction(), QToolButtonPrivate::popupTimerDone(), Q3IconViewItem::pos(), Q3TextTable::prev(), ScribbleArea::print(), ImageViewer::print(), MainWindow::printImage(), Q3CanvasRectangle::Q3CanvasRectangle(), qDrawPlainRect(), qDrawShadePanel(), qDrawShadeRect(), qDrawWinButton(), qDrawWinPanel(), QPolygon::QPolygon(), qt_testCollision(), Q3AccessibleHeader::rect(), QAccessibleSpinBox::rect(), QAccessibleTabBar::rect(), QAccessibleMenu::rect(), QAccessibleMenuBar::rect(), QAccessibleSlider::rect(), QAccessibleComboBox::rect(), Q3AccessibleTitleBar::rect(), QAccessibleToolButton::rect(), QAccessibleScrollBar::rect(), QVFbView::refreshDisplay(), Q3IconViewItem::rename(), Q3IconViewItem::renameItem(), render_string(), Q3DataTable::repaintCell(), Q3Table::repaintCell(), Q3ScrollView::repaintContents(), QWorkspaceChild::resizeEvent(), QWhatsThisPrivate::say(), QRasterWindowSurface::scroll(), QWidget::scroll(), QX11WindowSurface::scroll(), QPolygonClipper< QRasterFloatPoint, QRasterFloatPoint, qreal >::setBoundingRect(), Q3Table::setCellWidget(), Q3Canvas::setChanged(), QPainter::setClipRegion(), QSplitterPrivate::setGeo(), QBoxLayout::setGeometry(), QWidgetItem::setGeometry(), BorderLayout::setGeometry(), QWidget::setGeometry(), Q3IconViewItem::setPicture(), Q3IconViewItem::setPixmap(), QSplitter::setRubberBand(), Q3IconViewItem::setText(), Q3Canvas::setUnchanged(), qdesigner_internal::RectProperty::setValue(), Skin::setView(), QPainter::setViewport(), QPainter::setWindow(), QWidget::setWindowState(), Skin::setZoom(), QWidgetPrivate::show_sys(), Q3DockWindow::showEvent(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), QToolTip::showText(), space_left(), start_pos(), Q3ListViewItem::startRename(), QFileListBox::startRename(), Q3FileDialogQFileListView::startRename(), QCommonStyle::subElementRect(), Q3IconView::takeItem(), Q3IconViewItem::textRect(), XPThemeData::toRECT(), Q3TextTable::up(), QXIMInputContext::update(), Q3Table::updateCell(), Q3ScrollView::updateContents(), Q3ListView::updateDirtyItems(), Skin::updateSecondaryScreen(), QScrollAreaPrivate::updateWidgetPosition(), QSettingsPrivate::variantToString(), Q3ScrollView::viewportPaintEvent(), Q3ListView::viewportResizeEvent(), Q3IconViewItem::x(), and QLineEditPrivate::xToPos().
00232 { return x1; }
| int QRect::y | ( | ) | const [inline] |
Returns the y-coordinate of the rectangle's top edge. Equivalent to top().
Definition at line 234 of file qrect.h.
References y1.
Referenced by QTextEditPrivate::_q_ensureVisible(), QLabelPrivate::_q_movieUpdated(), Q3CanvasClusterizer::add(), QPolygonalProcessor::add(), QDialog::adjustPosition(), QWidget::adjustSize(), QStyle::alignedRect(), QLayout::alignmentRect(), QPainter::boundingRect(), Q3IconViewItem::cancelRenameItem(), Q3IconViewItem::checkRect(), clipLine(), Q3IconView::contentsDropEvent(), QImage::copy(), QAbstractFormBuilder::createProperty(), QLineEditPrivate::cursorRect(), VariantDelegate::displayText(), QGridLayoutPrivate::distribute(), Q3ListView::doAutoScroll(), Q3TextParagraph::documentY(), FlowLayout::doLayout(), QPolygonalProcessor::doSpans(), Q3TextTable::down(), Q3IconView::dragObject(), Q3TextTableCell::draw(), Q3TextDocument::draw(), Q3Canvas::drawBackground(), QRenderRule::drawBackgroundImage(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), ArthurStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), Q3IconView::drawContents(), QSplashScreen::drawContents(), Q3Table::drawContents(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QCommonStyle::drawControl(), QX11PaintEngine::drawEllipse(), QPainter::drawEllipse(), Q3SVGPaintEngine::drawEllipse(), drawEllipsePoints(), ArthurStyle::drawHoverRect(), QRenderRule::drawImage(), QStyle::drawItemPixmap(), Q3TextDocument::drawParagraph(), QCommonStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QPaintEngine::drawRects(), QRasterPaintEngine::drawRects(), QPainter::drawRects(), QTreeView::drawRow(), QPainter::drawText(), Q3Canvas::drawViewArea(), PuzzleWidget::dropEvent(), QItemDelegate::editorEvent(), Q3GridView::ensureCellVisible(), Q3TextTable::enterAt(), QDesignerTabWidget::eventFilter(), qdesigner_internal::expand(), QX11PaintEnginePrivate::fillPolygon_dev(), OublietteLevel::fillRect(), fillRect(), Q3IconView::findFirstVisibleItem(), Q3IconView::findLastVisibleItem(), qdesigner_internal::fixRect(), fixRect(), QListViewPrivate::flipX(), QX11WindowSurface::flush(), QRasterWindowSurface::flush(), Q3TextFormatterBreakInWords::format(), Q3TextParagraph::format(), Q3TextFormatterBreakWords::format(), Q3TextFormatter::formatVertically(), get_combo_parameters(), QVFbView::getBuffer(), Q3TextCursor::globalY(), Q3TextCursor::gotoIntoNested(), QPixmap::grabWidget(), Q3IconView::handleItemChange(), Q3ListView::handleSizeChange(), QWidgetPrivate::hide_sys(), QListViewPrivate::initDynamicLayout(), Q3TextCursor::insert(), Q3IconView::insertInGrid(), Q3AccessibleTextEdit::itemRect(), Q3IconView::keyPressEvent(), QLabelPrivate::layoutRect(), QMatrix::mapRect(), mapToDevice(), QMatrix::mapToPolygon(), QWidgetResizeHandler::mouseMoveEvent(), Q3ListBox::mouseMoveEvent(), PuzzleWidget::mousePressEvent(), QScrollBar::mousePressEvent(), Q3ComboBox::mousePressEvent(), QWidget::move(), Q3DockArea::moveDockWindow(), QAbstractButtonPrivate::moveFocus(), QListViewPrivate::moveItem(), CannonField::moveShot(), Q3TextTable::next(), Q3MainWindow::operator<<(), operator<<(), Q3TextEdit::optimDrawContents(), Q3DateTimeEditorPrivate::paint(), qdesigner_internal::TreeWidgetDelegate::paint(), BookDelegate::paint(), Q3TextParagraph::paint(), qdesigner_internal::ColorDelegate::paint(), qdesigner_internal::QPropertyEditorDelegate::paint(), PixelDelegate::paint(), ArthurFrame::paintDescription(), QLineEdit::paintEvent(), ArthurFrame::paintEvent(), QWhatsThat::paintEvent(), PieView::paintEvent(), QLabel::paintEvent(), QWellArray::paintEvent(), QPixelTool::paintEvent(), Q3ComboBox::paintEvent(), Q3CheckListItem::paintFocus(), paintGrid(), Q3IconViewItem::paintItem(), Oubliette::paintOubliette(), Q3Header::paintSection(), Q3Header::paintSectionLabel(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), Q3IconViewItem::pixmapRect(), Q3TextCursor::place(), place_line(), QMenu::popup(), Q3ComboBox::popup(), QMenuBarPrivate::popupAction(), Q3IconViewItem::pos(), Q3TextTable::prev(), ScribbleArea::print(), ImageViewer::print(), MainWindow::printImage(), Q3TextCursor::processNesting(), Q3CanvasRectangle::Q3CanvasRectangle(), qDrawPlainRect(), qDrawShadePanel(), qDrawShadeRect(), qDrawWinButton(), qDrawWinPanel(), QPolygon::QPolygon(), qt_testCollision(), QWorkspaceChild::QWorkspaceChild(), Q3AccessibleHeader::rect(), QAccessibleSpinBox::rect(), QAccessibleTabBar::rect(), QAccessibleMenu::rect(), QAccessibleMenuBar::rect(), QAccessibleSlider::rect(), QAccessibleComboBox::rect(), Q3AccessibleTitleBar::rect(), QAccessibleScrollBar::rect(), QVFbView::refreshDisplay(), Q3IconViewItem::rename(), Q3IconViewItem::renameItem(), render_string(), Q3DataTable::repaintCell(), Q3Table::repaintCell(), Q3ScrollView::repaintContents(), QWorkspaceChild::resizeEvent(), QWhatsThisPrivate::say(), QRasterWindowSurface::scroll(), QWidget::scroll(), QX11WindowSurface::scroll(), QPolygonClipper< QRasterFloatPoint, QRasterFloatPoint, qreal >::setBoundingRect(), Q3Table::setCellWidget(), Q3Canvas::setChanged(), QPainter::setClipRegion(), QSplitterPrivate::setGeo(), QBoxLayout::setGeometry(), QWidgetItem::setGeometry(), BorderLayout::setGeometry(), QWidget::setGeometry(), Q3IconViewItem::setPicture(), Q3IconViewItem::setPixmap(), QSplitter::setRubberBand(), Q3IconViewItem::setText(), Q3Canvas::setUnchanged(), qdesigner_internal::RectProperty::setValue(), Skin::setView(), QPainter::setViewport(), QPainter::setWindow(), QWidget::setWindowState(), Skin::setZoom(), QWidgetPrivate::show_sys(), Q3DockWindow::showEvent(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), QToolTip::showText(), space_left(), start_pos(), Q3ListViewItem::startRename(), QFileListBox::startRename(), Q3FileDialogQFileListView::startRename(), QStyleSheetStyle::subElementRect(), QCommonStyle::subElementRect(), Q3IconView::takeItem(), Q3IconViewItem::textRect(), XPThemeData::toRECT(), Q3TextTable::up(), QXIMInputContext::update(), Q3Table::updateCell(), Q3ScrollView::updateContents(), Skin::updateSecondaryScreen(), QScrollAreaPrivate::updateWidgetPosition(), QSettingsPrivate::variantToString(), Q3ScrollView::viewportPaintEvent(), Q3ListView::viewportResizeEvent(), and Q3IconViewItem::y().
00235 { return y1; }
| void QRect::setLeft | ( | int | x | ) | [inline] |
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 237 of file qrect.h.
References x1.
Referenced by Q3IconViewItem::contains(), QLabelPrivate::documentRect(), QWindowsXPStyle::drawComplexControl(), Q3TextEdit::drawContents(), Q3ListView::drawContentsOffset(), QWindowsStyle::drawControl(), QCommonStyle::drawControl(), QWindowsStyle::drawPrimitive(), Q3TextParagraph::drawString(), QDesignerTabWidget::eventFilter(), QDockWidgetLayout::getGrid(), handle_xdnd_position(), Q3IconView::handleItemChange(), QDesignerMenu::handleMouseDoubleClickEvent(), QDesignerMenu::handleMousePressEvent(), Q3ListView::handleSizeChange(), include(), QBspTree::init(), QMenuBarPrivate::isVisible(), QListViewPrivate::mapToViewport(), miSetExtents(), QListView::moveCursor(), QFontFamilyDelegate::paint(), PolygonRegion(), PtsToRegion(), QPolygonalProcessor::QPolygonalProcessor(), QWhatsThat::QWhatsThat(), QMainWindowLayout::setGeometry(), QDockWidgetLayout::setGrid(), Q3ListViewItem::startRename(), QStyleSheetStyle::subControlRect(), QPlastiqueStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QMenuBarPrivate::updateGeometries(), Q3ComboBoxData::updateLinedGeometry(), and Q3ListView::viewportResizeEvent().
00238 { x1 = pos; }
| void QRect::setTop | ( | int | y | ) | [inline] |
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 240 of file qrect.h.
References y1.
Referenced by Q3IconViewItem::contains(), QLabelPrivate::documentRect(), QLayoutPrivate::doResize(), QWindowsXPStyle::drawComplexControl(), Q3TextEdit::drawContents(), QCommonStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QDockWidgetLayout::getGrid(), Q3IconView::handleItemChange(), include(), QBspTree::init(), miSetExtents(), QListView::moveCursor(), PolygonRegion(), QPolygonalProcessor::QPolygonalProcessor(), QWhatsThat::QWhatsThat(), QMenuPrivate::scrollMenu(), QMainWindowLayout::setGeometry(), QDockWidgetLayout::setGrid(), QStyleSheetStyle::subControlRect(), QCommonStyle::subControlRect(), and QCleanlooksStyle::subControlRect().
00241 { y1 = pos; }
| void QRect::setRight | ( | int | x | ) | [inline] |
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 243 of file qrect.h.
References x2.
Referenced by Q3IconView::doAutoScroll(), QLabelPrivate::documentRect(), QListViewPrivate::doStaticLayout(), Q3TextEdit::drawContents(), Q3ListView::drawContentsOffset(), QWindowsStyle::drawControl(), QCommonStyle::drawControl(), Q3TextParagraph::drawString(), QDockWidgetLayout::getGrid(), Q3IconView::handleItemChange(), include(), QBspTree::init(), miSetExtents(), QListView::moveCursor(), QFontFamilyDelegate::paint(), PtsToRegion(), QPolygonalProcessor::QPolygonalProcessor(), QMainWindowLayout::setGeometry(), QDockWidgetLayout::setGrid(), QPlastiqueStyle::subControlRect(), and QCleanlooksStyle::subControlRect().
00244 { x2 = pos; }
| void QRect::setBottom | ( | int | y | ) | [inline] |
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 246 of file qrect.h.
References y2.
Referenced by Q3IconView::doAutoScroll(), QLabelPrivate::documentRect(), QListViewPrivate::doStaticLayout(), Q3TextEdit::drawContents(), QCommonStyle::drawControl(), QCommonStyle::drawPrimitive(), QDockWidgetLayout::getGrid(), Q3IconView::handleItemChange(), include(), QBspTree::init(), miCoalesce(), miSetExtents(), QListView::moveCursor(), PtsToRegion(), QPolygonalProcessor::QPolygonalProcessor(), QMenuPrivate::scrollMenu(), QMainWindowLayout::setGeometry(), and QDockWidgetLayout::setGrid().
00247 { y2 = pos; }
| void QRect::setX | ( | int | x | ) | [inline] |
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 261 of file qrect.h.
References x1.
Referenced by Q3IconDragPrivate::decode(), QCleanlooksStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), Q3ListView::handleSizeChange(), QMenuBarPrivate::popupAction(), qt_polygon_trapezoidation(), qt_tesselate_polygon(), Q3ListViewItem::startRename(), and Q3ListView::viewportResizeEvent().
00262 { x1 = ax; }
| void QRect::setY | ( | int | y | ) | [inline] |
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 264 of file qrect.h.
References y1.
Referenced by Q3IconDragPrivate::decode(), QCleanlooksStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), qt_polygon_trapezoidation(), and qt_tesselate_polygon().
00265 { y1 = ay; }
| void QRect::setTopLeft | ( | const QPoint & | position | ) | [inline] |
Set the top-left corner of the rectangle to the given position. May change the size, but will the never change the bottom-right corner of the rectangle.
Definition at line 249 of file qrect.h.
Referenced by QApplication::notify().
| void QRect::setBottomRight | ( | const QPoint & | position | ) | [inline] |
| void QRect::setTopRight | ( | const QPoint & | position | ) | [inline] |
| void QRect::setBottomLeft | ( | const QPoint & | position | ) | [inline] |
| QPoint QRect::topLeft | ( | ) | const [inline] |
Returns the position of the rectangle's top-left corner.
Definition at line 267 of file qrect.h.
Referenced by QLabelPrivate::_q_movieUpdated(), QPushButtonPrivate::_q_popupPressed(), Launcher::addVersionAndCopyright(), QWidgetBackingStore::bltRect(), qdesigner_internal::Connection::checkWidgets(), Q3ListBox::contentsContextMenuEvent(), Q3ListView::contentsContextMenuEvent(), Q3ListView::contentsMousePressEventEx(), Q3IconView::contentsMouseReleaseEvent(), QDockAreaLayoutInfo::convertToWidget(), dockPos(), QSplitterPrivate::doResize(), QItemDelegate::drawBackground(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), ArthurStyle::drawComplexControl(), Q3Table::drawContents(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QItemDelegate::drawDisplay(), QX11PaintEngine::drawEllipse(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), qdesigner_internal::FormWindow::dropWidgets(), qdesigner_internal::ButtonTaskMenu::editText(), qdesigner_internal::LineEditTaskMenu::editText(), qdesigner_internal::GroupBoxTaskMenu::editTitle(), ellipseSpansClipped(), QDockAreaLayoutInfo::fitItems(), QX11WindowSurface::flush(), QRasterWindowSurface::flush(), NewForm::formPreviewIcon(), QDockWidgetLayout::gapRect(), QX11WindowSurface::geometry(), QRasterWindowSurface::geometry(), QSplitterPrivate::getRange(), QPixmap::grabWidget(), grabWidget_helper(), Q3ListView::handleSizeChange(), qdesigner_internal::QDesignerDnDItem::init(), QDockAreaLayoutInfo::insertGap(), QListView::internalDrop(), QWidgetPrivate::isOverlapped(), QDockAreaLayoutInfo::itemRect(), QAbstractScrollAreaPrivate::layoutChildren(), QLabelPrivate::layoutPoint(), QGraphicsView::mapFromScene(), QGraphicsView::mapToScene(), QColorPicker::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QColorPicker::mousePressEvent(), ShapedClock::mousePressEvent(), QDateTimeEdit::mousePressEvent(), PuzzleWidget::mousePressEvent(), QCalendarPopup::mousePressEvent(), DragLabel::mousePressEvent(), QScrollBar::mousePressEvent(), QSlider::mousePressEvent(), Q3DockArea::moveDockWindow(), QWidgetPrivate::moveRect(), QApplication::notify(), QWellArray::paintCellContents(), ArthurFrame::paintDescription(), QLineEdit::paintEvent(), QColorPicker::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), QLabel::paintEvent(), Skin::paintEvent(), qdesigner_internal::ConnectionEdit::paintLabel(), PreviewDialog::paintPreview(), Q3Header::paintSection(), QHeaderView::paintSection(), QMainWindowLayout::plug(), Q3ComboBox::popup(), QToolButtonPrivate::popupTimerDone(), QAccessibleToolButton::rect(), QAbstractItemViewPrivate::renderToPixmap(), Q3Table::repaintSelections(), QWorkspaceChild::resizeEvent(), qdesigner_internal::FormWindow::resizeWidget(), QWidget::restoreGeometry(), qdesigner_internal::FormWindow::selectWidgets(), QVFbView::sendMouseData(), QDockAreaLayoutInfo::separatorRect(), QWidgetPrivate::setGeometry_sys(), HelpWindow::setSource(), QWidgetPrivate::show_helper(), QComboBox::showPopup(), QAbstractItemView::startDrag(), Q3ListViewItem::startRename(), QWidgetPrivate::subtractOpaqueChildren(), QDesignerWorkbench::switchToDockedMode(), QDesignerWorkbench::switchToNeutralMode(), QDesignerWorkbench::switchToTopLevelMode(), QETWidget::translateConfigEvent(), QDockWidgetPrivate::unplug(), qdesigner_internal::Connection::updateKneeList(), Q3DockWindow::updatePosition(), and Q3ListView::viewportResizeEvent().
| QPoint QRect::bottomRight | ( | ) | const [inline] |
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 270 of file qrect.h.
Referenced by Q3IconView::contentsMouseReleaseEvent(), Q3IconView::doAutoScroll(), QListViewPrivate::doDynamicLayout(), QWidgetResizeHandler::doMove(), QWidgetResizeHandler::doResize(), QListViewPrivate::doStaticLayout(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsStyle::drawControl(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), ellipseSpansClipped(), QWidgetResizeHandler::eventFilter(), QAbstractScrollAreaPrivate::layoutChildren(), QGraphicsView::mapFromScene(), QGraphicsView::mapToScene(), QWidgetResizeHandler::mouseMoveEvent(), QDateTimeEdit::mousePressEvent(), BookDelegate::paint(), QWellArray::paintCellContents(), Q3Table::paintEvent(), QToolButtonPrivate::popupTimerDone(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), QPlastiqueStyle::styleHint(), QMotifStyle::subControlRect(), and qdesigner_internal::Connection::updateKneeList().
| QPoint QRect::topRight | ( | ) | const [inline] |
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 273 of file qrect.h.
Referenced by Q3IconView::appendItemContainer(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), NewForm::formPreviewIcon(), QGraphicsView::mapFromScene(), QGraphicsView::mapToScene(), QDateTimeEdit::mousePressEvent(), BookDelegate::paint(), QWellArray::paintCellContents(), RenderArea::paintEvent(), Q3Table::paintEvent(), QToolButtonPrivate::popupTimerDone(), and qdesigner_internal::Connection::updateKneeList().
| QPoint QRect::bottomLeft | ( | ) | const [inline] |
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 276 of file qrect.h.
Referenced by Q3IconView::appendItemContainer(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QCleanlooksStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), NewForm::formPreviewIcon(), QGraphicsView::mapFromScene(), QGraphicsView::mapToScene(), QDateTimeEdit::mousePressEvent(), BookDelegate::paint(), QWellArray::paintCellContents(), RenderArea::paintEvent(), Q3Table::paintEvent(), QToolButtonPrivate::popupTimerDone(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), and QPlastiqueStyle::styleHint().
| QPoint QRect::center | ( | ) | const [inline] |
Returns the center point of the rectangle.
Definition at line 279 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by Launcher::addVersionAndCopyright(), QListViewPrivate::closestIndex(), Q3IconView::contentsContextMenuEvent(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), ArthurStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QCommonStyle::drawControl(), XFormView::drawVectorType(), QTextEdit::event(), QGraphicsView::fitInView(), Q3IconView::handleItemChange(), QAbstractItemView::keyPressEvent(), Q3IconView::keyPressEvent(), QMenu::keyPressEvent(), main(), QTest::mouseEvent(), QScrollBar::mousePressEvent(), QSlider::mousePressEvent(), QAbstractItemView::mousePressEvent(), qdesigner_internal::WidgetHandle::mouseReleaseEvent(), QListView::moveCursor(), QAbstractButtonPrivate::moveFocus(), QAccessibleWidget::navigate(), Q3IconView::neighbourItem(), TicTacToe::paintEvent(), qdesigner_internal::paintGround(), Q3TextBrowser::popupDetail(), qt_cleanlooks_draw_gradient(), qt_cleanlooks_draw_mdibutton(), QAccessibleWidget::relationTo(), QDockWidgetPrivate::relayout(), QKeyMapper::sendKeyEvent(), QAbstractItemView::setCurrentIndex(), qdesigner_internal::SetEndPointCommand::SetEndPointCommand(), Window::setupShapes(), and QStyleSheetStyle::subControlRect().
| void QRect::moveLeft | ( | int | x | ) | [inline] |
Moves the rectangle horizontally, leaving the rectangle's left edge at the given x coordinate. The rectangle's size is unchanged.
Definition at line 329 of file qrect.h.
Referenced by QMenuBarPrivate::calcActionRects(), moveBottomLeft(), moveTopLeft(), QWidget::restoreGeometry(), QComboBox::showPopup(), QPlastiqueStyle::subControlRect(), and QCleanlooksStyle::subControlRect().
| void QRect::moveTop | ( | int | y | ) | [inline] |
Moves the rectangle vertically, leaving the rectangle's top edge at the given y coordinate. The rectangle's size is unchanged.
Definition at line 332 of file qrect.h.
Referenced by QTreeViewPrivate::beginAnimatedOperation(), QMenuBarPrivate::calcActionRects(), QListView::moveCursor(), moveTopLeft(), moveTopRight(), QTreeViewPrivate::prepareAnimatedOperation(), QWidget::restoreGeometry(), QComboBox::showPopup(), QPlastiqueStyle::subControlRect(), ArthurStyle::subControlRect(), and QCleanlooksStyle::subControlRect().
| void QRect::moveRight | ( | int | x | ) | [inline] |
Moves the rectangle horizontally, leaving the rectangle's right edge at the given x coordinate. The rectangle's size is unchanged.
Definition at line 335 of file qrect.h.
Referenced by moveBottomRight(), moveTopRight(), QWidget::restoreGeometry(), and QSplitterPrivate::setGeo().
| void QRect::moveBottom | ( | int | y | ) | [inline] |
Moves the rectangle vertically, leaving the rectangle's bottom edge at the given y coordinate. The rectangle's size is unchanged.
Definition at line 341 of file qrect.h.
Referenced by moveBottomLeft(), moveBottomRight(), QListView::moveCursor(), QWidget::restoreGeometry(), QMainWindowLayout::setGeometry(), and QComboBox::showPopup().
| void QRect::moveTopLeft | ( | const QPoint & | position | ) | [inline] |
Moves the rectangle, leaving the top-left corner at the given position. The rectangle's size is unchanged.
Definition at line 347 of file qrect.h.
References moveLeft(), moveTop(), and p.
Referenced by QView3DWidget::addWidget(), qdesigner_internal::FormWindow::checkPreviewGeometry(), qdesigner_internal::FormWindow::dropWidgets(), Q3TextParagraph::format(), Q3IconView::handleItemChange(), QWidgetPrivate::hide_sys(), qdesigner_internal::FormWindow::insertWidget(), QSizeGrip::mouseMoveEvent(), QMainWindowLayout::plug(), QAccessibleToolButton::rect(), qdesigner_internal::FormWindow::resizeWidget(), QDesktopWidget::screenNumber(), QSplitterPrivate::setGeo(), QComboBox::showPopup(), QCommonStyle::subElementRect(), QETWidget::translateConfigEvent(), QDockWidgetPrivate::unplug(), and qdesigner_internal::ConnectionEdit::widgetRect().
Here is the call graph for this function:

| void QRect::moveBottomRight | ( | const QPoint & | position | ) | [inline] |
Moves the rectangle, leaving the bottom-right corner at the given position. The rectangle's size is unchanged.
Definition at line 353 of file qrect.h.
References moveBottom(), moveRight(), and p.
Referenced by qdesigner_internal::FormWindow::checkPreviewGeometry(), and QSizeGrip::mouseMoveEvent().
00354 { 00355 moveRight(p.x()); 00356 moveBottom(p.y()); 00357 }
Here is the call graph for this function:

| void QRect::moveTopRight | ( | const QPoint & | position | ) | [inline] |
Moves the rectangle, leaving the top-right corner at the given position. The rectangle's size is unchanged.
Definition at line 359 of file qrect.h.
References moveRight(), moveTop(), and p.
Referenced by QSizeGrip::mouseMoveEvent().
Here is the call graph for this function:

| void QRect::moveBottomLeft | ( | const QPoint & | position | ) | [inline] |
Moves the rectangle, leaving the bottom-left corner at the given position. The rectangle's size is unchanged.
Definition at line 365 of file qrect.h.
References moveBottom(), moveLeft(), and p.
Referenced by CannonField::cannonRect(), QSizeGrip::mouseMoveEvent(), and QComboBox::showPopup().
00366 { 00367 moveLeft(p.x()); 00368 moveBottom(p.y()); 00369 }
Here is the call graph for this function:

| void QRect::moveCenter | ( | const QPoint & | position | ) |
Moves the rectangle, leaving the center point at the given position. The rectangle's size is unchanged.
Definition at line 690 of file qrect.cpp.
References h, p, w, x1, x2, y1, and y2.
Referenced by QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsXPStyle::drawControl(), QCleanlooksStyle::drawPrimitive(), ItemEffect::ItemEffect(), Oubliette::paintEvent(), CannonField::shotRect(), QPlastiqueStyle::subControlRect(), QCleanlooksStyle::subControlRect(), and CannonField::targetRect().
00691 { 00692 int w = x2 - x1; 00693 int h = y2 - y1; 00694 x1 = p.x() - w/2; 00695 y1 = p.y() - h/2; 00696 x2 = x1 + w; 00697 y2 = y1 + h; 00698 }
| void QRect::translate | ( | int | dx, | |
| int | dy | |||
| ) | [inline] |
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 291 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by QTextEditPrivate::_q_repaintContents(), QMenuBarPrivate::actionRect(), QMenuPrivate::actionRect(), QWidgetBackingStore::bltRect(), QMenuPrivate::calcActionRects(), QTextEdit::cursorRect(), QListViewPrivate::draggedItemsRect(), QTableViewPrivate::drawAndClipSpans(), QCleanlooksStyle::drawControl(), QWindowsStyle::drawControl(), QStyleSheetStyle::drawControl(), QCommonStyle::drawControl(), QPainter::drawEllipse(), QX11PaintEngine::drawEllipse(), QWidgetPrivate::drawWidget(), QPSPrintEnginePrivate::emitHeader(), QX11WindowSurface::flush(), grabWidget_helper(), QWidgetPrivate::isOverlapped(), QListView::moveCursor(), OffsetRegion(), QTextEditPrivate::paint(), QDockWidgetTitleButton::paintEvent(), QHeaderView::paintEvent(), QWhatsThat::paintEvent(), QTableView::paintEvent(), QMenu::paintEvent(), QWellArray::paintEvent(), QAccessibleTextEdit::rect(), QTextControlPrivate::selectionRect(), QColorPicker::setCol(), QPlastiqueStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QCommonStyle::subElementRect(), QTabBar::tabRect(), translateBySips(), and QStyle::visualRect().
| void QRect::translate | ( | const QPoint & | offset | ) | [inline] |
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}.{QPoint::x()}{x()} along the x axis and {offset}.{QPoint::y()}{y()} along the y axis, relative to the current position.
Definition at line 299 of file qrect.h.
References p, x1, x2, y1, and y2.
| QRect QRect::translated | ( | int | dx, | |
| int | dy | |||
| ) | const [inline] |
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 307 of file qrect.h.
References QRect(), x1, x2, y1, and y2.
Referenced by QWidgetBackingStore::bltRect(), QWidgetBackingStore::copyToScreen(), QWindowsXPStylePrivate::drawBackgroundDirectly(), ArthurStyle::drawComplexControl(), QRasterPaintEngine::drawRects(), QRasterWindowSurface::flush(), QGraphicsTextItem::inputMethodQuery(), QTextEdit::inputMethodQuery(), QWidgetPrivate::moveRect(), QLabel::paintEvent(), QListView::paintEvent(), QAccessibleItemRow::rect(), QAccessibleTextEdit::rect(), QWidgetPrivate::scrollRect(), QListView::setSelection(), and PieView::setSelection().
Here is the call graph for this function:

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}.{QPoint::x()}{x()} along the x axis and {offset}.{QPoint::y()}{y()} along the y axis, relative to the current position.
Definition at line 310 of file qrect.h.
References p, QRect(), x1, x2, y1, and y2.
Here is the call graph for this function:

| void QRect::moveTo | ( | int | x, | |
| int | y | |||
| ) | [inline] |
Moves the rectangle, leaving the top-left corner at the given position (x, y). The rectangle's size is unchanged.
Definition at line 313 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QCalendarPopup::mousePressEvent(), QWorkspacePrivate::place(), and qdesigner_internal::QtColorLinePrivate::rects().
| void QRect::moveTo | ( | const QPoint & | position | ) | [inline] |
| void QRect::setRect | ( | int | x, | |
| int | y, | |||
| int | width, | |||
| int | height | |||
| ) | [inline] |
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 379 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by Q3GridView::cellGeometry(), QWellArray::cellGeometry(), Q3IconViewItem::checkRect(), QWidgetPrivate::create_sys(), QItemDelegate::doLayout(), QCommonStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QSplashScreen::drawContents(), Q3ListView::drawContentsOffset(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QCommonStyle::drawControl(), QTreeView::drawRow(), Q3TextParagraph::drawString(), QTreeView::drawTree(), QPSPrintEnginePrivate::emitHeader(), Q3IconView::eventFilter(), Q3IconView::handleItemChange(), qdesigner_internal::ChangeLayoutItemGeometry::init(), QDesktopWidgetPrivate::init(), Q3IconViewItem::move(), operator>>(), Q3TextParagraph::paint(), Q3CheckTableItem::paint(), Q3ListViewItem::paintBranches(), Q3ListBox::paintCell(), Q3CheckListItem::paintCell(), QHeaderView::paintEvent(), Q3MainWindow::paintEvent(), QTabBar::paintEvent(), QHideDock::paintEvent(), QMenu::paintEvent(), Q3Header::paintEvent(), Q3Header::paintSection(), Q3Header::paintSectionLabel(), Skin::parseRect(), Skin::parseSkinFileHeader(), QWorkspacePrivate::place(), Q3ComboBox::popup(), QHeaderView::resizeSection(), QSplitterPrivate::setGeo(), QPlastiqueStyle::subControlRect(), QCommonStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QStyleSheetStyle::subElementRect(), QMotifStyle::subElementRect(), and QCommonStyle::subElementRect().
| void QRect::getRect | ( | int * | x, | |
| int * | y, | |||
| int * | width, | |||
| int * | height | |||
| ) | const [inline] |
Extracts the position of the rectangle's top-left corner to *x and *y, and its dimensions to *width and *height.
Definition at line 371 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), NorwegianWoodStyle::drawPrimitive(), QStyle::itemPixmapRect(), and QStyle::itemTextRect().
| void QRect::setCoords | ( | int | x1, | |
| int | y1, | |||
| int | x2, | |||
| int | y2 | |||
| ) | [inline] |
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 395 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by QX11EmbedContainerPrivate::acceptClient(), QCommonStyle::drawControl(), miIntersectO(), miSetExtents(), miSubtractNonO1(), miSubtractO(), miUnionNonO(), Q3ListBox::mouseMoveEvent(), operator>>(), PtsToRegion(), QWidgetPrivate::setParent_sys(), QMotifStyle::subElementRect(), QCommonStyle::subElementRect(), QETWidget::translatePropertyEvent(), UnionRegion(), and QWidgetPrivate::updateFrameStrut().
| void QRect::getCoords | ( | int * | x1, | |
| int * | y1, | |||
| int * | x2, | |||
| int * | y2 | |||
| ) | const [inline] |
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.
Definition at line 387 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by NorwegianWoodStyle::roundRectPath().
| void QRect::adjust | ( | int | dx1, | |
| int | dy1, | |||
| int | dx2, | |||
| int | dy2 | |||
| ) | [inline] |
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
Definition at line 413 of file qrect.h.
References x1, x2, y1, and y2.
Referenced by QRenderRule::boxRect(), Q3Frame::contentsRect(), QLabelPrivate::documentRect(), QItemDelegate::doLayout(), Q3TextTable::draw(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), QCommonStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QFrame::frameRect(), QAbstractScrollAreaPrivate::layoutChildren(), QListViewPrivate::mapToViewport(), QSlider::mouseMoveEvent(), QScrollBar::mouseMoveEvent(), BookDelegate::paint(), ColorDock::paintEvent(), QDockWidgetTitleButton::paintEvent(), QToolBoxButton::paintEvent(), QWhatsThat::paintEvent(), QLabel::paintEvent(), qdesigner_internal::QtGradientStopsWidget::paintEvent(), QAbstractItemViewPrivate::position(), QListViewPrivate::prepareItemsLayout(), QDockWidgetPrivate::relayout(), render_string(), QFrame::setFrameRect(), QComboBox::showPopup(), QWindowsXPStyle::subControlRect(), QPlastiqueStyle::subControlRect(), ArthurStyle::subControlRect(), QMotifStyle::subControlRect(), QCommonStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QMotifStyle::subElementRect(), QCleanlooksStyle::subElementRect(), QCommonStyle::subElementRect(), QWindowsXPStyle::subElementRect(), QDockAreaLayoutInfo::tabContentRect(), Oubliette::timerEvent(), and QWidgetPrivate::updateFrameStrut().
| QRect QRect::adjusted | ( | int | dx1, | |
| int | dy1, | |||
| int | dx2, | |||
| int | dy2 | |||
| ) | const [inline] |
Returns a new rectangle with dx1, dy1, dx2 and dy2 added respectively to the existing coordinates of this rectangle.
Definition at line 410 of file qrect.h.
References QRect(), x1, x2, y1, and y2.
Referenced by QRenderRule::borderRect(), QRenderRule::contentsRect(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), ArthurStyle::drawComplexControl(), QMotifStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), QCDEStyle::drawControl(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), QStyleSheetStyle::drawControl(), QItemDelegate::drawDisplay(), QStyle::drawItemText(), QCommonStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), XFormView::drawVectorType(), QGraphicsView::fitInView(), QWorkspaceTitleBar::mouseMoveEvent(), QRenderRule::paddingRect(), BookDelegate::paint(), QWellArray::paintCell(), ArthurFrame::paintDescription(), qdesigner_internal::QtBrushButton::paintEvent(), qdesigner_internal::QtColorButton::paintEvent(), PuzzleWidget::paintEvent(), MandelbrotWidget::paintEvent(), qdesigner_internal::QtGradientStopsWidget::paintEvent(), QGraphicsView::paintEvent(), qt_cleanlooks_draw_mdibutton(), qt_plastique_draw_mdibutton(), qt_plastique_drawShadedPanel(), QWidget::setWindowState(), QCommonStyle::styleHint(), QPlastiqueStyle::subControlRect(), QCommonStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QPlastiqueStyle::subElementRect(), ArthurStyle::subElementRect(), QCommonStyle::subElementRect(), QWindowsXPStyle::subElementRect(), DisplayWidget::timerEvent(), qdesigner_internal::ColorDelegate::updateEditorGeometry(), and qdesigner_internal::QPropertyEditorDelegate::updateEditorGeometry().
Here is the call graph for this function:

| QSize QRect::size | ( | ) | const [inline] |
Returns the size of the rectangle.
Definition at line 288 of file qrect.h.
References height(), and width().
Referenced by QMoviePrivate::_q_loadNextFrame(), QWidget::adjustSize(), QStyle::alignedRect(), QWidgetBackingStore::bltRect(), QRenderRule::boxSize(), QWidgetBackingStore::cleanRegion(), QRenderRule::contentsSize(), QDockAreaLayoutInfo::convertToWidget(), QListViewPrivate::doDynamicLayout(), QItemDelegate::doLayout(), QSplitterPrivate::doResize(), QPlastiqueStyle::drawComplexControl(), Q3Table::drawContents(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QStyleSheetStyle::drawControl(), QCommonStyle::drawControl(), QRenderRule::drawImage(), QPlastiqueStyle::drawPrimitive(), QItemDelegate::editorEvent(), qdesigner_internal::ButtonTaskMenu::editText(), qdesigner_internal::LineEditTaskMenu::editText(), qdesigner_internal::GroupBoxTaskMenu::editTitle(), QDockAreaLayoutInfo::fitItems(), QDockWidgetLayout::gapRect(), PathDeformRenderer::generateLensPixmap(), QDockWidgetLayout::getGrid(), QSplitterPrivate::getRange(), QPixmap::grabWidget(), Q3ListView::handleSizeChange(), QDockAreaLayoutInfo::insertGap(), QDockAreaLayoutInfo::itemRect(), Q3DockAreaLayout::layoutItems(), QTabBar::minimumSizeHint(), QAbstractSpinBox::minimumSizeHint(), qdesigner_internal::QtColorLinePrivate::mouseMoveEvent(), qdesigner_internal::QtColorLinePrivate::mousePressEvent(), Q3DockArea::moveDockWindow(), QListViewPrivate::moveItem(), QPixmapIconEngine::paint(), QGraphicsSvgItem::paint(), QFontFamilyDelegate::paint(), QIcon::paint(), QSvgIconEngine::paint(), qdesigner_internal::QtBrushButton::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), QLabel::paintEvent(), QGraphicsView::paintEvent(), ScribbleArea::print(), ImageViewer::print(), qt_plastique_draw_gradient(), QDesignerActions::readInForm(), QGraphicsView::render(), QGraphicsScene::render(), QAbstractItemViewPrivate::renderToPixmap(), QTreeViewPrivate::renderTreeToPixmap(), Q3Table::repaintSelections(), QWorkspaceChild::resizeEvent(), QWidget::restoreGeometry(), QDockWidgetLayout::saveState(), Skin::screenSize(), Skin::secondaryScreenSize(), qdesigner_internal::FormWindow::selectWidgets(), QDockAreaLayoutInfo::separatorRect(), Q3Table::setCellWidget(), QRasterWindowSurface::setGeometry(), QWidgetItem::setGeometry(), QX11WindowSurface::setGeometry(), QWidgetPrivate::setGeometry_sys(), qdesigner_internal::QtColorLinePrivate::setIndicatorSize(), qdesigner_internal::QtColorLinePrivate::setIndicatorSpace(), PrintPreview::setup(), QWidgetPrivate::show_helper(), QDockAreaLayoutInfo::size(), QFontMetrics::size(), QCheckBox::sizeHint(), QMainWindowLayoutItem::sizeHint(), QRadioButton::sizeHint(), QTabBar::sizeHint(), QAbstractSpinBox::sizeHint(), QDateTimeEdit::sizeHint(), QComboMenuDelegate::sizeHint(), Q3ListViewItem::startRename(), QETWidget::translateConfigEvent(), qdesigner_internal::SetFormPropertyCommand::updateFormWindowGeometry(), QComboBoxPrivate::updateLineEditGeometry(), QMessageBoxPrivate::updateSize(), and Q3ListView::viewportResizeEvent().
Here is the call graph for this function:

| int QRect::width | ( | ) | const [inline] |
Returns the width of the rectangle.
Definition at line 282 of file qrect.h.
Referenced by QTextEditPrivate::_q_ensureVisible(), QLabelPrivate::_q_movieUpdated(), QPushButtonPrivate::_q_popupPressed(), Q3CanvasClusterizer::add(), PrintOut::addBox(), Launcher::addVersionAndCopyright(), QView3DWidget::addWidget(), Q3Painter::adjustedRectangle(), QLayoutSupport::adjustIndicator(), QDialog::adjustPosition(), QWidget::adjustSize(), QLayout::alignmentRect(), QDockAreaLayoutInfo::apply(), QWorkspace::arrangeIcons(), QBalloonTip::balloon(), QPainter::begin(), QPicturePaintEngine::begin(), PrintOut::breakPage(), QMenuBarPrivate::calcActionRects(), calcArrow(), calcLines(), Q3IconViewItem::calcRect(), Q3IconViewItem::calcTmpText(), Q3IconViewItem::cancelRenameItem(), Q3Table::cellGeometry(), Q3IconViewItem::checkRect(), Q3CanvasItem::chunks(), clipLine(), Q3IconView::contentsDropEvent(), qdesigner_internal::FormWindow::continueRectDraw(), QImage::copy(), QWidgetPrivate::create_sys(), QAbstractFormBuilder::createProperty(), Q3TitleBar::cutText(), VariantDelegate::displayText(), QGridLayoutPrivate::distribute(), dockPos(), Q3TextParagraph::documentVisibleWidth(), Q3TextParagraph::documentWidth(), QListViewPrivate::doDynamicLayout(), QItemDelegate::doLayout(), QPolygonalProcessor::doSpans(), QListViewPrivate::doStaticLayout(), QAbstractItemView::dragMoveEvent(), Q3IconView::dragObject(), Q3TextTableCell::draw(), Q3TextTable::draw(), Q3TextDocument::draw(), Q3Canvas::drawBackground(), QRenderRule::drawBackgroundImage(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), ArthurStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), Q3IconView::drawContents(), QSplashScreen::drawContents(), Q3ListView::drawContentsOffset(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), RenderArea::drawCoordinates(), QItemDelegate::drawDisplay(), QX11PaintEngine::drawEllipse(), QPainter::drawEllipse(), Q3SVGPaintEngine::drawEllipse(), drawEllipse_midpoint_i(), drawEllipsePoints(), QFrame::drawFrame(), ArthurStyle::drawHoverRect(), drawLine_midpoint_dashed_i(), drawLine_midpoint_i(), QCommonStyle::drawPrimitive(), QWindowsXPStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QPaintEngine::drawRects(), QRasterPaintEngine::drawRects(), QPainter::drawRects(), Q3ListBox::drawRubber(), QPainter::drawText(), Q3Canvas::drawViewArea(), QItemDelegate::editorEvent(), elliditide(), QPSPrintEnginePrivate::emitHeader(), QPicturePaintEngine::end(), Q3GridView::ensureCellVisible(), QDesignerTabWidget::eventFilter(), qdesigner_internal::expand(), expandedSize(), QX11PaintEnginePrivate::fillPolygon_dev(), OublietteLevel::fillRect(), fillRect(), QDockWidgetLayout::fitLayout(), QWindowsXPStylePrivate::fixAlphaChannel(), qdesigner_internal::fixRect(), fixRect(), QListViewPrivate::flipX(), QX11WindowSurface::flush(), QRasterWindowSurface::flush(), Q3TextParagraph::format(), QDockWidgetLayout::gapIndex(), PathDeformRenderer::generateLensPixmap(), get_combo_parameters(), QVFbView::getBuffer(), QDockWidgetLayout::getGrid(), QRenderRule::getRadii(), QTabBarPrivate::getStyleOption(), QPixmap::grabWidget(), grabWidget_helper(), Q3ListView::handleSizeChange(), QWindowsXPStylePrivate::hasAlphaChannel(), QWindowsXPStylePrivate::hasAnyData(), qdesigner_internal::TabOrderEditor::indicatorRect(), Q3FileDialog::init(), QWorkspacePrivate::insertIcon(), Q3IconView::insertInGrid(), QListView::internalDrop(), QMenuBarPrivate::isVisible(), Q3AccessibleTextEdit::itemRect(), QStyle::itemTextRect(), Q3MainWindowLayout::layoutItems(), Q3DockAreaLayout::layoutItems(), QLabelPrivate::layoutRect(), QTabBarPrivate::layoutTabs(), BackTabTextEdit::loadResource(), QMatrix::mapRect(), QMatrix::mapToPolygon(), Q3SvgDevice::metric(), QPdfBaseEngine::metric(), QPicture::metric(), QCalendarWidget::minimumSizeHint(), qdesigner_internal::WidgetHandle::mouseMoveEvent(), QScrollBar::mousePressEvent(), Q3IconViewItem::move(), QListView::moveCursor(), Q3DockArea::moveDockWindow(), QListViewPrivate::moveItem(), QAccessibleWidget::navigate(), normalized(), Q3MainWindow::operator<<(), operator<<(), Q3TextEdit::optimDrawContents(), QPdfBaseEnginePrivate::pageRect(), qdesigner_internal::SheetDelegate::paint(), Q3DateTimeEditorPrivate::paint(), Q3TableItem::paint(), Q3CheckTableItem::paint(), Q3TextParagraph::paint(), Q3ComboTableItem::paint(), qdesigner_internal::ColorDelegate::paint(), PixelDelegate::paint(), Q3Table::paintCell(), ArthurFrame::paintDescription(), QLineEdit::paintEvent(), qdesigner_internal::QtBrushButton::paintEvent(), QToolBoxButton::paintEvent(), QWorkspaceTitleBar::paintEvent(), QWhatsThat::paintEvent(), qdesigner_internal::QtColorButton::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), qdesigner_internal::StyledButton::paintEvent(), qdesigner_internal::QtBrushWidget::paintEvent(), QLabel::paintEvent(), QWellArray::paintEvent(), QColorLuminancePicker::paintEvent(), QPixelTool::paintEvent(), Q3DataTable::paintField(), Q3CheckListItem::paintFocus(), Q3Table::paintFocus(), Q3IconViewItem::paintItem(), Oubliette::paintOubliette(), PreviewDialog::paintPreview(), Q3Header::paintSection(), QHeaderView::paintSection(), Q3Header::paintSectionLabel(), QPdfBaseEnginePrivate::paperRect(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), Q3IconViewItem::pixmapRect(), place_line(), Q3SVGPaintEngine::play(), Q3ComboBox::popup(), QMenuBarPrivate::popupAction(), MainWindow::printImage(), MainWindow::printPage(), Q3IconViewItemLineEdit::Q3IconViewItemLineEdit(), qDrawPlainRect(), qDrawShadePanel(), qDrawShadeRect(), qDrawWinButton(), qDrawWinPanel(), QPolygon::QPolygon(), QPolygonalProcessor::QPolygonalProcessor(), QRegionPrivate::QRegionPrivate(), QSvgImage::QSvgImage(), qt_plastique_draw_gradient(), qt_plastique_draw_handle(), qt_testCollision(), QWhatsThat::QWhatsThat(), QRasterPaintEnginePrivate::rasterize(), QSvgIOHandler::read(), Q3AccessibleHeader::rect(), QAccessibleSpinBox::rect(), QAccessibleTabBar::rect(), QAccessibleMenu::rect(), QAccessibleMenuBar::rect(), QAccessibleSlider::rect(), QAccessibleComboBox::rect(), Q3AccessibleTitleBar::rect(), QAccessibleScrollBar::rect(), qdesigner_internal::QtColorLinePrivate::rects(), Q3IconViewItem::rename(), Q3IconViewItem::renameItem(), QGraphicsView::render(), Q3DataTable::repaintCell(), Q3Table::repaintCell(), Q3ScrollView::repaintContents(), QProgressBarPrivate::repaintRequired(), QWorkspaceChild::resizeEvent(), NorwegianWoodStyle::roundRectPath(), QWhatsThisPrivate::say(), GraphWidget::scaleView(), QRasterWindowSurface::scroll(), QWidget::scroll(), QX11WindowSurface::scroll(), QListView::scrollTo(), Q3Header::sectionSizeHint(), QDockWidgetLayout::separatorRect(), QPolygonClipper< QRasterFloatPoint, QRasterFloatPoint, qreal >::setBoundingRect(), Q3Canvas::setChanged(), QPainter::setClipRegion(), QSplitterPrivate::setGeo(), QBoxLayout::setGeometry(), QWidgetItem::setGeometry(), BorderLayout::setGeometry(), QMainWindowLayout::setGeometry(), Q3TextTableCell::setGeometry(), QWidget::setGeometry(), QWidgetPrivate::setMinimumSize_helper(), Q3IconViewItem::setPicture(), Q3IconViewItem::setPixmap(), QSplitter::setRubberBand(), QListView::setSelection(), Q3IconViewItem::setText(), Q3Canvas::setUnchanged(), QPrintDialogPrivate::setupPrinter(), qdesigner_internal::RectProperty::setValue(), QPainter::setViewport(), QPainter::setWindow(), QWidget::setWindowState(), QWidgetPrivate::show_sys(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), QToolTip::showText(), Q3IconViewItem::size(), size(), QLabelPrivate::sizeForWidth(), Q3TitleBar::sizeHint(), Q3TableItem::sizeHint(), Q3TimeEdit::sizeHint(), Q3DateEdit::sizeHint(), QWorkspaceTitleBar::sizeHint(), Skin::Skin(), space_left(), TetrixBoard::squareWidth(), Q3ListViewItem::startRename(), QPlastiqueStyle::subControlRect(), QMotifStyle::subControlRect(), QCommonStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QStyleSheetStyle::subElementRect(), QMotifStyle::subElementRect(), QCommonStyle::subElementRect(), QWindowsXPStylePrivate::swapAlphaChannel(), Q3DockWindow::swapRect(), Q3IconView::takeItem(), Q3IconViewItem::textRect(), QItemDelegate::textRectangle(), XPThemeData::toRECT(), qdesigner_internal::AdjustWidgetSizeCommand::undo(), QXIMInputContext::update(), Q3Table::updateCell(), Q3ScrollView::updateContents(), Q3CanvasView::updateContentsSize(), QWidgetPrivate::updateFrameStrut(), QTableView::updateGeometries(), QMenuBarPrivate::updateGeometries(), QCalendarWidgetPrivate::updateHeader(), qdesigner_internal::Connection::updateKneeList(), Q3ComboBoxData::updateLinedGeometry(), QComboBoxPrivate::updateLineEditGeometry(), QSettingsPrivate::variantToString(), Q3ScrollView::viewportPaintEvent(), Q3ListBox::viewportPaintEvent(), Q3ListView::viewportResizeEvent(), QStyle::visualRect(), PieView::visualRect(), Q3IconViewItem::width(), and QPdfEnginePrivate::width().
| int QRect::height | ( | ) | const [inline] |
Returns the height of the rectangle.
Definition at line 285 of file qrect.h.
Referenced by QTextEditPrivate::_q_ensureVisible(), QLabelPrivate::_q_movieUpdated(), QPushButtonPrivate::_q_popupPressed(), QDockWidgetPrivate::_q_toggleTopLevel(), Q3CanvasClusterizer::add(), PrintOut::addBox(), Launcher::addVersionAndCopyright(), QView3DWidget::addWidget(), Q3Painter::adjustedRectangle(), QLayoutSupport::adjustIndicator(), QDialog::adjustPosition(), QWidget::adjustSize(), QLayout::alignmentRect(), QDockAreaLayoutInfo::apply(), QWorkspace::arrangeIcons(), QBalloonTip::balloon(), QPainter::begin(), QPicturePaintEngine::begin(), QMenuPrivate::calcActionRects(), calcArrow(), calcLines(), Q3IconViewItem::calcRect(), Q3IconViewItem::cancelRenameItem(), Q3Table::cellGeometry(), Q3IconViewItem::checkRect(), Q3CanvasItem::chunks(), clipLine(), Q3ListBox::contentsContextMenuEvent(), Q3ListView::contentsContextMenuEvent(), Q3IconView::contentsDropEvent(), qdesigner_internal::FormWindow::continueRectDraw(), QImage::copy(), QWidgetPrivate::create_sys(), QAbstractFormBuilder::createProperty(), QLineEditPrivate::cursorRect(), VariantDelegate::displayText(), QGridLayoutPrivate::distribute(), dockPos(), QListViewPrivate::doDynamicLayout(), QItemDelegate::doLayout(), QListViewPrivate::doStaticLayout(), Q3IconView::dragObject(), Q3TextTableCell::draw(), Q3TextTable::draw(), Q3TextDocument::draw(), Q3Canvas::drawBackground(), QRenderRule::drawBackgroundImage(), QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(), qdesigner_internal::TreeWidget::drawBranches(), QTreeView::drawBranches(), qdesigner_internal::QPropertyEditor::drawBranches(), QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), Q3IconView::drawContents(), QSplashScreen::drawContents(), Q3ListView::drawContentsOffset(), QPlastiqueStyle::drawControl(), QCleanlooksStyle::drawControl(), QMotifStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsXPStyle::drawControl(), QCommonStyle::drawControl(), RenderArea::drawCoordinates(), QItemDelegate::drawDisplay(), QPainter::drawEllipse(), QX11PaintEngine::drawEllipse(), Q3SVGPaintEngine::drawEllipse(), drawEllipse_midpoint_i(), drawEllipsePoints(), QFrame::drawFrame(), ArthurStyle::drawHoverRect(), drawLine_midpoint_dashed_i(), drawLine_midpoint_i(), QCommonStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QPaintEngine::drawRects(), QRasterPaintEngine::drawRects(), QPainter::drawRects(), QTreeView::drawRow(), Q3ListBox::drawRubber(), QPainter::drawText(), Q3Canvas::drawViewArea(), QItemDelegate::editorEvent(), QPSPrintEnginePrivate::emitHeader(), QPicturePaintEngine::end(), Q3GridView::ensureCellVisible(), QDesignerTabWidget::eventFilter(), qdesigner_internal::expand(), expandedSize(), QX11PaintEnginePrivate::fillPolygon_dev(), OublietteLevel::fillRect(), fillRect(), QDockWidgetLayout::fitLayout(), QWindowsXPStylePrivate::fixAlphaChannel(), qdesigner_internal::fixRect(), fixRect(), QListViewPrivate::flipX(), QX11WindowSurface::flush(), QRasterWindowSurface::flush(), PrintOut::flushLine(), Q3TextFormatterBreakInWords::format(), Q3TextParagraph::format(), Q3TextFormatterBreakWords::format(), Q3TextFormatter::formatVertically(), QDockWidgetLayout::gapIndex(), PathDeformRenderer::generateLensPixmap(), get_combo_parameters(), QVFbView::getBuffer(), QDockWidgetLayout::getGrid(), QRenderRule::getRadii(), QTabBarPrivate::getStyleOption(), QPixmap::grabWidget(), grabWidget_helper(), QWindowsXPStylePrivate::hasAlphaChannel(), QWindowsXPStylePrivate::hasAnyData(), Q3IconViewItem::height(), Q3TextDocument::height(), QPdfEnginePrivate::height(), qdesigner_internal::TabOrderEditor::indicatorRect(), Q3FileDialog::init(), Q3TextCursor::insert(), QWorkspacePrivate::insertIcon(), Q3IconView::insertInGrid(), Q3AccessibleTextEdit::itemRect(), QStyle::itemTextRect(), Q3TextParagraph::join(), Q3MainWindowLayout::layoutItems(), Q3DockAreaLayout::layoutItems(), QLabelPrivate::layoutRect(), QTabBarPrivate::layoutTabs(), Q3IconView::makeRowLayout(), QMatrix::mapRect(), QMatrix::mapToPolygon(), Q3SvgDevice::metric(), QPdfBaseEngine::metric(), QPicture::metric(), qdesigner_internal::WidgetHandle::mouseMoveEvent(), QScrollBar::mousePressEvent(), Q3ComboBox::mousePressEvent(), Q3IconViewItem::move(), QListView::moveCursor(), Q3DockArea::moveDockWindow(), QListViewPrivate::moveItem(), QAccessibleWidget::navigate(), normalized(), Q3MainWindow::operator<<(), operator<<(), Q3TextEdit::optimDrawContents(), Q3TextTable::pageBreak(), QPdfBaseEnginePrivate::pageRect(), Q3DateTimeEditorPrivate::paint(), qdesigner_internal::SheetDelegate::paint(), Q3CheckTableItem::paint(), Q3TableItem::paint(), BookDelegate::paint(), Q3ComboTableItem::paint(), qdesigner_internal::ColorDelegate::paint(), PixelDelegate::paint(), Q3Table::paintCell(), ArthurFrame::paintDescription(), QLineEdit::paintEvent(), QToolBoxButton::paintEvent(), qdesigner_internal::QtBrushButton::paintEvent(), QWhatsThat::paintEvent(), qdesigner_internal::QtColorButton::paintEvent(), qdesigner_internal::QtColorLinePrivate::paintEvent(), qdesigner_internal::StyledButton::paintEvent(), qdesigner_internal::QtBrushWidget::paintEvent(), QLabel::paintEvent(), QColorLuminancePicker::paintEvent(), QWellArray::paintEvent(), QPixelTool::paintEvent(), Q3ComboBox::paintEvent(), Q3DataTable::paintField(), Q3CheckListItem::paintFocus(), Q3Table::paintFocus(), qdesigner_internal::paintGround(), Q3IconViewItem::paintItem(), Oubliette::paintOubliette(), PreviewDialog::paintPreview(), Q3Header::paintSection(), Q3Header::paintSectionLabel(), QScrollBarPrivate::pixelPosToRangeValue(), QSliderPrivate::pixelPosToRangeValue(), Q3IconViewItem::pixmapRect(), Q3TextCursor::place(), place_line(), Q3SVGPaintEngine::play(), QMenu::popup(), Q3ComboBox::popup(), QToolButtonPrivate::popupTimerDone(), MainWindow::printImage(), MainWindow::printPage(), qDrawPlainRect(), qDrawShadePanel(), qDrawShadeRect(), qDrawWinButton(), qDrawWinPanel(), QPolygon::QPolygon(), QPolygonalProcessor::QPolygonalProcessor(), QRegionPrivate::QRegionPrivate(), QSvgImage::QSvgImage(), qt_plastique_draw_gradient(), qt_plastique_draw_handle(), qt_testCollision(), QWhatsThat::QWhatsThat(), QRasterPaintEnginePrivate::rasterize(), QSvgIOHandler::read(), QAccessibleSpinBox::rect(), Q3AccessibleHeader::rect(), QAccessibleTabBar::rect(), QAccessibleMenu::rect(), QAccessibleSlider::rect(), QAccessibleMenuBar::rect(), QAccessibleComboBox::rect(), Q3AccessibleTitleBar::rect(), QAccessibleScrollBar::rect(), qdesigner_internal::QtColorLinePrivate::rects(), QDockWidgetPrivate::relayout(), Q3TextCursor::remove(), Q3TextCursor::removePreviousChar(), Q3IconViewItem::renameItem(), QGraphicsView::render(), Q3DataTable::repaintCell(), Q3Table::repaintCell(), Q3ScrollView::repaintContents(), Q3TextTable::resize(), QWorkspaceChild::resizeEvent(), QWidget::restoreGeometry(), NorwegianWoodStyle::roundRectPath(), QWhatsThisPrivate::say(), QRasterWindowSurface::scroll(), QWidget::scroll(), QX11WindowSurface::scroll(), QMenuPrivate::scrollMenu(), QListView::scrollTo(), QTreeView::scrollTo(), Q3Header::sectionSizeHint(), QDockWidgetLayout::separatorRect(), QPolygonClipper< QRasterFloatPoint, QRasterFloatPoint, qreal >::setBoundingRect(), Q3Canvas::setChanged(), QPainter::setClipRegion(), QMenuPrivate::setFirstActionActive(), QSplitterPrivate::setGeo(), QBoxLayout::setGeometry(), QWidgetItem::setGeometry(), BorderLayout::setGeometry(), QWidget::setGeometry(), QWidgetPrivate::setMinimumSize_helper(), Q3IconViewItem::setPicture(), Q3IconViewItem::setPixmap(), QSplitter::setRubberBand(), QListView::setSelection(), Q3IconViewItem::setText(), Q3Canvas::setUnchanged(), QPrintDialogPrivate::setupPrinter(), qdesigner_internal::RectProperty::setValue(), QPainter::setViewport(), QPainter::setWindow(), QWidget::setWindowState(), QWidgetPrivate::show_sys(), QCompleterPrivate::showPopup(), QComboBox::showPopup(), QToolTip::showText(), Q3IconViewItem::size(), size(), QLabelPrivate::sizeForWidth(), Q3TableItem::sizeHint(), Skin::Skin(), space_left(), TetrixBoard::squareHeight(), QFileListBox::startRename(), Q3FileDialogQFileListView::startRename(), QPlastiqueStyle::subControlRect(), QMotifStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QStyleSheetStyle::subElementRect(), QCommonStyle::subElementRect(), QWindowsXPStylePrivate::swapAlphaChannel(), Q3DockWindow::swapRect(), QWindowsXPStylePrivate::tabBody(), Q3IconView::takeItem(), Q3IconViewItem::textRect(), XPThemeData::toRECT(), qdesigner_internal::AdjustWidgetSizeCommand::undo(), QXIMInputContext::update(), Q3Table::updateCell(), Q3ScrollView::updateContents(), Q3CanvasView::updateContentsSize(), QWidgetPrivate::updateFrameStrut(), QTableView::updateGeometries(), QMenuBarPrivate::updateGeometries(), qdesigner_internal::Connection::updateKneeList(), QSettingsPrivate::variantToString(), Q3TextTableCell::verticalAlignmentOffset(), Q3ScrollView::viewportPaintEvent(), Q3ListBox::viewportPaintEvent(), and PieView::visualRect().
| void QRect::setWidth | ( | int | width | ) | [inline] |
Sets the width of the rectangle to the given width. The right edge is changed, but not the left one.
Definition at line 421 of file qrect.h.
Referenced by QMenuPrivate::calcActionRects(), Q3IconViewItem::calcRect(), Q3Table::cellGeometry(), Q3IconView::contentsMousePressEventEx(), Q3IconDragPrivate::decode(), Q3TextDocument::draw(), QWindowsXPStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QCommonStyle::drawControl(), QStyleSheetStyle::drawControl(), QCleanlooksStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), Q3TextTable::format(), Q3TextParagraph::format(), QPixmap::grabWidget(), Q3ListView::handleSizeChange(), QTreeView::indexRowSizeHint(), QMenuBarPrivate::isVisible(), QStyle::itemTextRect(), TextEdit::keyPressEvent(), QListViewPrivate::mapToViewport(), qdesigner_internal::WidgetHandle::mouseMoveEvent(), Q3TextCursor::place(), PolygonRegion(), QSvgImage::QSvgImage(), qt_polygon_trapezoidation(), qt_tesselate_polygon(), Q3Header::sectionSizeHint(), QDockWidgetLayout::setGrid(), QComboBox::showPopup(), Q3TableItem::sizeHint(), Q3ListViewItem::startRename(), QPlastiqueStyle::subControlRect(), ArthurStyle::subControlRect(), QCleanlooksStyle::subControlRect(), QCommonStyle::subElementRect(), QItemDelegatePrivate::textLayoutBounds(), QMenuBarPrivate::updateGeometries(), QComboBoxPrivate::updateLineEditGeometry(), and Q3ListView::viewportResizeEvent().
| void QRect::setHeight | ( | int | height | ) | [inline] |
Sets the height of the rectangle to the given height. The bottom edge is changed, but not the top one.
Definition at line 424 of file qrect.h.
Referenced by QTreeViewPrivate::beginAnimatedOperation(), QMenuBarPrivate::calcActionRects(), Q3IconViewItem::calcRect(), Q3Table::cellGeometry(), Q3IconView::contentsMousePressEventEx(), Q3IconDragPrivate::decode(), QItemDelegate::doLayout(), QWindowsXPStyle::drawComplexControl(), QCommonStyle::drawControl(), QCleanlooksStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), ArthurStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), qdesigner_internal::GroupBoxTaskMenu::editTitle(), Q3TextParagraph::format(), QPixmap::grabWidget(), QStyle::itemTextRect(), Q3TextParagraph::join(), Q3DockAreaLayout::layoutItems(), QListViewPrivate::mapToViewport(), qdesigner_internal::WidgetHandle::mouseMoveEvent(), Q3ComboBox::mousePressEvent(), PolygonRegion(), QTreeViewPrivate::prepareAnimatedOperation(), QSvgImage::QSvgImage(), qt_polygon_trapezoidation(), qt_tesselate_polygon(), QWidget::restoreGeometry(), QMenuPrivate::scrollMenu(), Q3Header::sectionSizeHint(), QDockWidgetLayout::setGrid(), QComboBox::showPopup(), QToolButton::sizeHint(), QPlastiqueStyle::subControlRect(), ArthurStyle::subControlRect(), QCommonStyle::subControlRect(), QCleanlooksStyle::subControlRect(), and QCommonStyle::subElementRect().
| void QRect::setSize | ( | const QSize & | size | ) | [inline] |
Sets the size of the rectangle to the given size. The top-left corner is not moved.
Definition at line 427 of file qrect.h.
References s, x1, x2, y1, and y2.
Referenced by PrintOut::addBox(), Q3Painter::adjustedRectangle(), QWidgetPrivate::create_sys(), QCleanlooksStyle::drawPrimitive(), QAbstractSpinBox::minimumSizeHint(), QListView::moveCursor(), QWhatsThat::QWhatsThat(), QAbstractSpinBox::sizeHint(), QDateTimeEdit::sizeHint(), QCleanlooksStyle::subControlRect(), QCommonStyle::subElementRect(), Q3DockWindow::swapRect(), QETWidget::translateConfigEvent(), and qdesigner_internal::SetFormPropertyCommand::updateFormWindowGeometry().
Returns the bounding rectangle of this rectangle and the given rectangle.
Definition at line 969 of file qrect.cpp.
References isNull(), normalized(), qMax(), qMin(), x1, x2, y1, and y2.
00970 { 00971 if (isNull()) 00972 return r; 00973 if (r.isNull()) 00974 return *this; 00975 QRect r1 = normalized(); 00976 QRect r2 = r.normalized(); 00977 QRect tmp; 00978 tmp.x1 = qMin(r1.x1, r2.x1); 00979 tmp.x2 = qMax(r1.x2, r2.x2); 00980 tmp.y1 = qMin(r1.y1, r2.y1); 00981 tmp.y2 = qMax(r1.y2, r2.y2); 00982 return tmp; 00983 }
Here is the call graph for this function:

Returns the intersection of this rectangle and the given rectangle. Returns an empty rectangle if there is no intersection.
Definition at line 1013 of file qrect.cpp.
References isEmpty(), isNull(), normalized(), qMax(), qMin(), QRect(), x1, x2, y1, and y2.
01014 { 01015 if (isNull() || r.isNull()) 01016 return QRect(); 01017 QRect r1 = normalized(); 01018 QRect r2 = r.normalized(); 01019 QRect tmp; 01020 tmp.x1 = qMax(r1.x1, r2.x1); 01021 tmp.x2 = qMin(r1.x2, r2.x2); 01022 tmp.y1 = qMax(r1.y1, r2.y1); 01023 tmp.y2 = qMin(r1.y2, r2.y2); 01024 return tmp.isEmpty() ? QRect() : tmp; 01025 }
Here is the call graph for this function:

Unites this rectangle with the given rectangle.
Definition at line 443 of file qrect.h.
Intersects this rectangle with the given rectangle.
Definition at line 449 of file qrect.h.
| bool QRect::contains | ( | const QPoint & | point, | |
| bool | proper = false | |||
| ) | const |
Returns true if the 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).
Definition at line 891 of file qrect.cpp.
References normalized(), p, x1, x2, y1, and y2.
Referenced by Q3FileDialogQFileListView::acceptDrop(), QFileListBox::acceptDrop(), Q3CheckListItem::activate(), CannonField::barrelHit(), qdesigner_internal::Connection::checkWidgets(), qdesigner_internal::childAt_SkipDropLine(), QApplicationPrivate::closePopup(), Q3IconViewItem::contains(), contains(), Q3IconView::contentsDragMoveEvent(), Q3IconView::contentsMousePressEventEx(), QDialog::contextMenuEvent(), QListViewPrivate::doDynamicLayout(), Q3Canvas::drawViewArea(), QAbstractItemViewPrivate::dropOn(), qdesigner_internal::FormWindow::dropWidgets(), QItemDelegate::editorEvent(), qdesigner_internal::ConnectionEdit::endPointAt(), QWidgetResizeHandler::eventFilter(), QTipLabel::eventFilter(), Q3ComboBox::eventFilter(), QComboBoxPrivateContainer::eventFilter(), Q3ScrollView::eventFilter(), Q3IconView::findItem(), QDockWidgetLayout::findSeparator(), QDockWidgetLayout::gapIndex(), Q3IconView::handleItemChange(), QDesignerMenu::handleMouseDoubleClickEvent(), CursorWindow::handleMouseEvent(), QDesignerMenu::handleMouseMoveEvent(), QDesignerMenu::handleMousePressEvent(), QAbstractButton::hitButton(), QCheckBox::hitButton(), QRadioButton::hitButton(), QPlastiqueStyle::hitTestComplexControl(), QCommonStyle::hitTestComplexControl(), QListView::indexAt(), QMenuBarPrivate::isVisible(), QTreeViewPrivate::itemDecorationAt(), QDockWidgetPrivate::mouseDoubleClickEvent(), Q3SpinWidget::mouseMoveEvent(), QSlider::mouseMoveEvent(), QWidgetResizeHandler::mouseMoveEvent(), QMenu::mouseMoveEvent(), QWorkspaceTitleBar::mouseMoveEvent(), QScrollBar::mouseMoveEvent(), QDockWidgetPrivate::mousePressEvent(), QWhatsThat::mousePressEvent(), QCalendarPopup::mousePressEvent(), Q3SpinWidget::mousePressEvent(), Q3ComboBox::mousePressEvent(), QWhatsThat::mouseReleaseEvent(), QDragManager::move(), Q3DockArea::moveDockWindow(), QSliderPrivate::newHoverControl(), QDockAreaLayoutInfo::paintSeparators(), QDockWidgetLayout::paintSeparators(), PointInRegion(), QAbstractItemViewPrivate::position(), QDesignerSettings::setGeometryHelper(), Q3DockWindow::showEvent(), qdesigner_internal::Connection::trimLine(), QMenuBarPrivate::updateGeometries(), qdesigner_internal::Connection::updateKneeList(), Q3DockWindow::updatePosition(), QGraphicsView::updateScene(), and QAbstractSlider::wheelEvent().
00892 { 00893 QRect r = normalized(); 00894 if (proper) 00895 return p.x() > r.x1 && p.x() < r.x2 && 00896 p.y() > r.y1 && p.y() < r.y2; 00897 else 00898 return p.x() >= r.x1 && p.x() <= r.x2 && 00899 p.y() >= r.y1 && p.y() <= r.y2; 00900 }
Here is the call graph for this function:

| bool QRect::contains | ( | int | x, | |
| int | y | |||
| ) | const [inline] |
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 438 of file qrect.h.
References contains().
Here is the call graph for this function:

| bool QRect::contains | ( | int | x, | |
| int | y, | |||
| bool | proper | |||
| ) | const [inline] |
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 433 of file qrect.h.
References contains().
Here is the call graph for this function:

| bool QRect::contains | ( | const QRect & | rectangle, | |
| bool | proper = false | |||
| ) | const |
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 931 of file qrect.cpp.
References isNull(), normalized(), x1, x2, y1, and y2.
00932 { 00933 if (isNull() || r.isNull()) 00934 return false; 00935 QRect r1 = normalized(); 00936 QRect r2 = r.normalized(); 00937 if (proper) 00938 return r2.x1 > r1.x1 && r2.x2 < r1.x2 && r2.y1 > r1.y1 && r2.y2 < r1.y2; 00939 else 00940 return r2.x1 >= r1.x1 && r2.x2 <= r1.x2 && r2.y1 >= r1.y1 && r2.y2 <= r1.y2; 00941 }
Here is the call graph for this function:

Use united(rectangle) instead.
Definition at line 465 of file qrect.h.
Referenced by PuzzleWidget::dragMoveEvent(), united(), and QWorkspacePrivate::updateWorkspace().
Definition at line 470 of file qrect.h.
References unite().
Referenced by Q3TextFlow::boundingRect(), Q3Table::clearSelection(), Q3IconView::contentsDropEvent(), Q3IconView::contentsMousePressEventEx(), Q3IconView::doAutoScroll(), Q3FileDialog::doMimeTypeLookup(), Q3ListBox::doRubberSelection(), QStyleSheetStyle::drawComplexControl(), QCommonStyle::drawComplexControl(), QCleanlooksStyle::drawComplexControl(), QWindowsXPStyle::drawComplexControl(), Q3IconView::handleItemChange(), QTabBar::minimumSizeHint(), Q3SpinWidget::mousePressEvent(), Q3Table::rangeGeometry(), Q3Table::repaintSelections(), Q3IconView::selectAll(), QColorPicker::setCol(), Q3IconViewItem::setPicture(), Q3IconViewItem::setPixmap(), Q3IconViewItem::setText(), QTabBar::sizeHint(), and Q3ListView::updateDirtyItems().
00471 { 00472 return unite(r); 00473 }
Here is the call graph for this function:

Use intersected(rectangle) instead.
Definition at line 455 of file qrect.h.
Referenced by intersected(), and QAccessibleTextEdit::rect().
{r.intersected(s)} is equivalent to {r & s}.
Definition at line 460 of file qrect.h.
References intersect().
Referenced by Q3Canvas::changeBounds(), Q3ScrollView::changeFrameRect(), QRenderRule::drawBackgroundImage(), Q3Canvas::drawCanvasArea(), Q3IconView::drawContents(), Q3ListView::drawContentsOffset(), QCommonStyle::drawControl(), QX11PaintEngine::drawEllipse(), QRenderRule::drawImage(), QStyle::drawItemPixmap(), handle_xdnd_position(), Q3IconView::handleItemChange(), QWidgetPrivate::moveRect(), QPolygonalProcessor::QPolygonalProcessor(), qt_testCollision(), QAbstractItemViewPrivate::renderToPixmap(), and QCommonStyle::subElementRect().
00461 { 00462 return intersect(other); 00463 }
Here is the call graph for this function:

| bool QRect::intersects | ( | const QRect & | rectangle | ) | const |
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 1059 of file qrect.cpp.
References isNull(), normalized(), qMax(), qMin(), x1, x2, y1, and y2.
Referenced by QListViewPrivate::addLeaf(), collision_double_dispatch(), Q3ListBox::doRubberSelection(), Q3TextDocument::draw(), QTableViewPrivate::drawAndClipSpans(), Q3IconView::drawContents(), QAbstractItemViewPrivate::fetchMore(), QPixmap::grabWidget(), Q3IconView::handleItemChange(), Q3ListBox::itemRect(), QWidgetResizeHandler::mouseMoveEvent(), QAccessibleWidget::navigate(), QMenuBar::paintEvent(), QMenu::paintEvent(), Q3CheckListItem::paintFocus(), QAccessibleWidget::relationTo(), Q3IconView::repaintSelectedItems(), QWidget::restoreGeometry(), and QGraphicsView::updateScene().
01060 { 01061 if (isNull() || r.isNull()) 01062 return false; 01063 QRect r1 = normalized(); 01064 QRect r2 = r.normalized(); 01065 return (qMax(r1.x1, r2.x1) <= qMin(r1.x2, r2.x2) && 01066 qMax(r1.y1, r2.y1) <= qMin(r1.y2, r2.y2)); 01067 }
Here is the call graph for this function:

Returns true if the rectangles r1 and r2 are equal, otherwise returns false.
Returns true if the rectangles r1 and r2 are different, otherwise returns false.
| QDataStream & operator<< | ( | QDataStream & | stream, | |
| const QRect & | rectangle | |||
| ) | [related] |
Writes the given rectangle to the given stream, and returns a reference to the stream.
Definition at line 1102 of file qrect.cpp.
01103 { 01104 if (s.version() == 1) 01105 s << (qint16)r.left() << (qint16)r.top() 01106 << (qint16)r.right() << (qint16)r.bottom(); 01107 else 01108 s << (qint32)r.left() << (qint32)r.top() 01109 << (qint32)r.right() << (qint32)r.bottom(); 01110 return s; 01111 }
| QDataStream & operator>> | ( | QDataStream & | stream, | |
| QRect & | rectangle | |||
| ) | [related] |
Reads a rectangle from the given stream into the given rectangle, and returns a reference to the stream.
Definition at line 1123 of file qrect.cpp.
01124 { 01125 if (s.version() == 1) { 01126 qint16 x1, y1, x2, y2; 01127 s >> x1; s >> y1; s >> x2; s >> y2; 01128 r.setCoords(x1, y1, x2, y2); 01129 } 01130 else { 01131 qint32 x1, y1, x2, y2; 01132 s >> x1; s >> y1; s >> x2; s >> y2; 01133 r.setCoords(x1, y1, x2, y2); 01134 } 01135 return s; 01136 }
int QRect::x1 [private] |
Definition at line 161 of file qrect.h.
Referenced by adjust(), adjusted(), bottomLeft(), center(), contains(), getCoords(), getRect(), intersects(), isEmpty(), isNull(), isValid(), left(), moveCenter(), moveLeft(), moveRight(), moveTo(), normalized(), operator &(), operator!=(), operator==(), operator|(), QRect(), setBottomLeft(), setCoords(), setLeft(), setRect(), setSize(), setTopLeft(), setWidth(), setX(), topLeft(), translate(), translated(), width(), and x().
int QRect::y1 [private] |
Definition at line 162 of file qrect.h.
Referenced by adjust(), adjusted(), center(), contains(), getCoords(), getRect(), height(), intersects(), isEmpty(), isNull(), isValid(), moveBottom(), moveCenter(), moveTo(), moveTop(), normalized(), operator &(), operator!=(), operator==(), operator|(), QRect(), setCoords(), setHeight(), setRect(), setSize(), setTop(), setTopLeft(), setTopRight(), setY(), top(), topLeft(), topRight(), translate(), translated(), and y().
int QRect::x2 [private] |
Definition at line 163 of file qrect.h.
Referenced by adjust(), adjusted(), bottomRight(), center(), contains(), getCoords(), getRect(), intersects(), isEmpty(), isNull(), isValid(), moveCenter(), moveLeft(), moveRight(), moveTo(), normalized(), operator &(), operator!=(), operator==(), operator|(), QRect(), right(), setBottomRight(), setCoords(), setRect(), setRight(), setSize(), setTopRight(), setWidth(), topRight(), translate(),