Qt 4.8
Classes | Functions
qgraphicsscene_p.h File Reference
#include "qgraphicsscene.h"
#include "qgraphicssceneevent.h"
#include "qgraphicsview.h"
#include "qgraphicsview_p.h"
#include "qgraphicsitem_p.h"
#include <private/qobject_p.h>
#include <QtCore/qbitarray.h>
#include <QtCore/qlist.h>
#include <QtCore/qmap.h>
#include <QtCore/qset.h>
#include <QtGui/qfont.h>
#include <QtGui/qpalette.h>
#include <QtGui/qstyle.h>
#include <QtGui/qstyleoption.h>

Go to the source code of this file.

Classes

class  QGraphicsScenePrivate
 

Functions

static void _q_adjustRect (QRectF *rect)
 
static QRectF adjustedItemBoundingRect (const QGraphicsItem *item)
 
static QRectF adjustedItemEffectiveBoundingRect (const QGraphicsItem *item)
 

Function Documentation

◆ _q_adjustRect()

static void _q_adjustRect ( QRectF rect)
inlinestatic

Definition at line 330 of file qgraphicsscene_p.h.

Referenced by adjustedItemBoundingRect(), and adjustedItemEffectiveBoundingRect().

331 {
332  Q_ASSERT(rect);
333  if (!rect->width())
334  rect->adjust(qreal(-0.00001), 0, qreal(0.00001), 0);
335  if (!rect->height())
336  rect->adjust(0, qreal(-0.00001), 0, qreal(0.00001));
337 }
double qreal
Definition: qglobal.h:1193
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
qreal height() const
Returns the height of the rectangle.
Definition: qrect.h:710
qreal width() const
Returns the width of the rectangle.
Definition: qrect.h:707
void adjust(qreal x1, qreal y1, qreal x2, qreal y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
Definition: qrect.h:778

◆ adjustedItemBoundingRect()

static QRectF adjustedItemBoundingRect ( const QGraphicsItem item)
inlinestatic

Definition at line 339 of file qgraphicsscene_p.h.

Referenced by QGraphicsScenePrivate::draw().

340 {
341  Q_ASSERT(item);
344  return boundingRect;
345 }
static void _q_adjustRect(QRectF *rect)
virtual QRectF boundingRect() const =0
This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be ...
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static const QRectF boundingRect(const QPointF *points, int pointCount)
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511

◆ adjustedItemEffectiveBoundingRect()

static QRectF adjustedItemEffectiveBoundingRect ( const QGraphicsItem item)
inlinestatic

Definition at line 347 of file qgraphicsscene_p.h.

Referenced by QGraphicsScenePrivate::drawSubtreeRecursive(), QGraphicsView::paintEvent(), and QGraphicsScenePrivate::processDirtyItemsRecursive().

348 {
349  Q_ASSERT(item);
350  QRectF boundingRect(QGraphicsItemPrivate::get(item)->effectiveBoundingRect());
352  return boundingRect;
353 }
static void _q_adjustRect(QRectF *rect)
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
static const QRectF boundingRect(const QPointF *points, int pointCount)
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
static const QGraphicsItemPrivate * get(const QGraphicsItem *item)