summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene_p.h
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-17 12:27:46 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-17 12:27:46 (GMT)
commit5d682567d1acb79b2fa55ae8f005c5dcdc9aacb7 (patch)
tree10b239dc69cf29410471b48e977de382e60fedd3 /src/gui/graphicsview/qgraphicsscene_p.h
parent8a0e002ccc762ef3edbc3c9ad91b4d6017cb91bb (diff)
downloadQt-5d682567d1acb79b2fa55ae8f005c5dcdc9aacb7.zip
Qt-5d682567d1acb79b2fa55ae8f005c5dcdc9aacb7.tar.gz
Qt-5d682567d1acb79b2fa55ae8f005c5dcdc9aacb7.tar.bz2
API / code review for QGraphicsSceneIndex (internal API).
A few minor modifications only, marked some things as ### obsolete, removed the public get/set for the index (it's internal anyway).
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene_p.h')
-rw-r--r--src/gui/graphicsview/qgraphicsscene_p.h40
1 files changed, 0 insertions, 40 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene_p.h b/src/gui/graphicsview/qgraphicsscene_p.h
index 563e016..8e05c00 100644
--- a/src/gui/graphicsview/qgraphicsscene_p.h
+++ b/src/gui/graphicsview/qgraphicsscene_p.h
@@ -229,46 +229,6 @@ public:
QStyleOptionGraphicsItem styleOptionTmp;
};
-static inline bool QRectF_intersects(const QRectF &s, const QRectF &r)
-{
- qreal xp = s.left();
- qreal yp = s.top();
- qreal w = s.width();
- qreal h = s.height();
- qreal l1 = xp;
- qreal r1 = xp;
- if (w < 0)
- l1 += w;
- else
- r1 += w;
-
- qreal l2 = r.left();
- qreal r2 = r.left();
- if (w < 0)
- l2 += r.width();
- else
- r2 += r.width();
-
- if (l1 >= r2 || l2 >= r1)
- return false;
-
- qreal t1 = yp;
- qreal b1 = yp;
- if (h < 0)
- t1 += h;
- else
- b1 += h;
-
- qreal t2 = r.top();
- qreal b2 = r.top();
- if (r.height() < 0)
- t2 += r.height();
- else
- b2 += r.height();
-
- return !(t1 >= b2 || t2 >= b1);
-}
-
// QRectF::intersects() returns false always if either the source or target
// rectangle's width or height are 0. This works around that problem.
static inline void _q_adjustRect(QRectF *rect)