summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscenebsptreeindex.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Artifacts when moving a child when the parent has a graphics effect.Bjørn Erik Nilsen2009-08-041-2/+2
| | | | | | | | | | | We have to use the effectiveBoundingRect() when finding out which items to repaint within a specific area. However, we don't want items to be clickable on the shadow, so we shouldn't use effectiveBoundingRect for normal item-lookup. Solution to this is to only use effectiveBoundingRect() in the BSP (used by estimateTopLevels) and in drawSubtreeRecursive. Auto-test included.
* Compile fix with namepaceshjk2009-07-201-0/+2
| | | | | | Some QT_{BEGIN,END}_HEADER macros had been missing or misplaced. Reviewed-by: thiago
* Update the license header in a few more placesThiago Macieira2009-07-161-1/+1
|
* QGraphicsItems not painted after QGraphicsScene::clear().Bjoern Erik Nilsen2009-07-151-0/+1
| | | | | | | The problem was that we didn't regenerate the bsp when adding items after calling QGraphicsScene::clear. Reviewed-by: alexis
* Fixes broken item-lookup for untransformable items.Bjørn Erik Nilsen2009-07-101-1/+6
| | | | | | | | | | Found during manual testing (manualtests/graphicsview/untransformable). At some point it was not possible to click on an untransformable item. The problem was that none of the untransformable items were top-levels, and none of the transformable top-level items were in the same area, resulting in an empty list of estimated top-level items. Auto-test included.
* More re-factoring of QGraphicsSceneIndex.Bjørn Erik Nilsen2009-07-021-27/+45
| | | | | | | | | | New method: QGraphicsSceneIndex::estimateTopLevelItems. QGraphicsSceneIndex::estimateItems returns *all* items within the rect, but we are only interested in the top-levels (those that are within the rect themselves or have descendants within the rect) when doing recursive drawing/item-lookup. All auto-tests pass. Demos/examples/manualtests run fine.
* Speedup item-lookup in Graphics View.Bjørn Erik Nilsen2009-07-021-6/+6
| | | | | | | | | We don't have to do a stable sort anymore because the lessThan operator now accounts for the insertion order. This also means we don't have to sort all top-level items to preserve the insertion order in QGraphicsScenePrivate::topLevelItemsInStackingOrder. Reviewed-by: Andreas
* Dont include untransformable graphics items twice.Bjørn Erik Nilsen2009-07-021-1/+0
| | | | | | | | | | This revertes d39a62720ba67a0fa6e4e37519d22f14c7b7404e (we had to do it with the old implementation, but the new one have untransformable items included in the indexed list. The only difference is that untransformable items are also in the untransformable list; otherwise in the bsp tree). Auto-test included.
* More BSP tree index cleanup.Bjørn Erik Nilsen2009-06-301-0/+12
| | | | | | | | Ensure the index of indexed items are reset to -1. Makes tst_QGraphicsScene::itemIndexMethod happy. (this test passed before we actually started using the BSP from the items() functions, see 6ee3fb750377eeedf161d96fef02c5fa336810e9)
* Add lacking parenthesis around bitwise AND operator.Bjørn Erik Nilsen2009-06-291-2/+2
| | | | | | This caused a crash in the diagramscene example because "!bits & something" does not have the same meaning as "!(bits & something)", hence item was never removed from the BSP resulting in a stale item pointer.
* Graphics View: BSP tree cleanup.Bjørn Erik Nilsen2009-06-291-13/+8
| | | | | Ensure the BSP resets the QGraphicsItemPrivate::itemDiscovered bit before returning the list of discovered items.
* Proper handling of scene rect in QGraphicsScene(Index).Bjørn Erik Nilsen2009-06-261-2/+2
| | | | Reviewed-by: Andreas
* Re-factor parts of the QGraphicsSceneBspTreeIndex.Bjørn Erik Nilsen2009-06-251-156/+126
| | | | | This patch adds better support for untransformable items and removes some redundant code.
* Fix tst_QGraphicsItem::collidesWith_item autotest.Andreas Aardal Hanssen2009-06-231-1/+2
| | | | | | Avoid unwanted recursion by keeping the sceneRect variable locally. The recursion happens if the call to sceneRect() lazily emits the sceneRectChanged() signal.
* Ensure that the BSP index returns all untransformable items.Andreas Aardal Hanssen2009-06-231-0/+2
|
* More work on getting autotests to pass.Andreas Aardal Hanssen2009-06-231-29/+7
|
* Fix crash with untransformable items.Alexis Menard2009-06-181-13/+30
| | | | | | | Be sure that item goes in the correct list if it set its flags to untransformable. Reviewed-by: andreas
* Move QGraphicsSceneBspTreeIndex into private headers (=> _p.h).Andreas Aardal Hanssen2009-06-181-7/+3
| | | | | | We'll keep this as private API for now. Reviewed-by: Alexis
* Move QGraphicsSceneIndex into private headers (=> _p.h).Andreas Aardal Hanssen2009-06-181-2/+2
| | | | | | We'd like to keep this API private for now. Reviewed-by: Alexis
* Changes after first round of code reviewing.Andreas Aardal Hanssen2009-06-181-36/+60
| | | | | | | This change removes all code that handles ItemIgnoresTransformations from QGraphicsView, and changes the APIs of the scene index intersectors. Reviewed-by: Alexis
* API / code review for QGraphicsSceneIndex (internal API).Andreas Aardal Hanssen2009-06-171-1/+5
| | | | | A few minor modifications only, marked some things as ### obsolete, removed the public get/set for the index (it's internal anyway).
* Make eveything internal for now but ready to see the light.Alexis Menard2009-06-171-0/+761