summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* make sure touch events are enabled on the view's viewport when items are ↵Bradley T. Hughes2009-06-111-0/+9
| | | | | | interested in touch events this is a continuation of 0218d8f8dc569db9a1290f595a814c3690c1b14b
* enable touch events on all views if an item has touch enabledBradley T. Hughes2009-06-114-8/+26
|
* remove duplicated code and API (merge QTouchEvent and QGraphicsSceneTouchEvent)Bradley T. Hughes2009-06-1117-732/+340
| | | | | | | | | the API for these 2 classes is identical, the implementation is almost identical, they share the same data structures, so bite the bullet and merge them. this means we go back to using screenPos() instead of globalPos() again
* another API review round: change Q*TouchEvent size() functions to return ↵Bradley T. Hughes2009-06-117-44/+44
| | | | | | rects instead these are more useful, as already shown in the fingerpaint example
* rename Qt::WA_AcceptedTouchBeginEvent to Qt::WA_WState_AcceptedTouchBeginEventBradley T. Hughes2009-06-113-4/+7
| | | | | this is an internal widget state variable, so the name should reflect that (and we shouldn't include it in the docs either)
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-1034-1511/+2191
|\ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene_p.h
| * Fixed memory leak in raster paint engine.Samuel Rødal2009-06-101-1/+3
| | | | | | | | | | | | | | Unlike the span array, the clip line array is only free'd in the destructor, so if it's already allocated we shouldn't allocate it again. Reviewed-by: Denis Dzyubenko
| * Make QVectorPath::controlPointRect() return a QRectF.Samuel Rødal2009-06-104-16/+13
| | | | | | | | | | | | This makes debugging etc much easier, plus most of the places controlPointRect() was called the caller had to convert the rect to a QRectF manually.
| * QPainter::worldTransform() does not return identity matrix.Bjørn Erik Nilsen2009-06-104-31/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPainter::worldTransform() does not return identity matrix when created on a redirected widget. It should always be identity by default, and should only change as a result of QPainter::setWorldTransform. The reason it didn't return identity for redirected widgets, was that we translated the shared painter's world matrix directly. Since we cannot modify the world matrix directly, we have to store the shared painter's current world transform in a separate matrix (redirectedMatrix), reset the world transform to identity, and later combine the redirectedMatrix with world transforms set on the painter. Note that redirection_offset was in negative coordinates before, and that redirectionMatrix now is in positive coordinates, hence opposite signs around. Auto-test included. Reviewed-by: lars Reviewed-by: Samuel
| * Merge commit 'qt-mainline/master' into master-recursivepaintAndreas Aardal Hanssen2009-06-1018-169/+316
| |\
| | * Internal documentation for QAbstractItemModelPrivate::canConvertToDoubleOlivier Goffart2009-06-101-1/+15
| | | | | | | | | | | | | | | | | | Also add QMetaType types as list or recognized numerical types Reviewed-by: thierry
| | * Made QListWidgetItem::operator<() check if the data is numerical when comparing.J-P Nurmi2009-06-102-13/+31
| | | | | | | | | | | | | | | Merge-request: 631 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
| | * Added QAbstractItemModelPrivate::canConvertToDouble().J-P Nurmi2009-06-106-45/+20
| | | | | | | | | | | | | | | | | | | | | | | | And changed QTreeWidgetItem::operator<() and QTableWidgetItem::operator<() to use it Merge-request: 631 Reviewed-by: Olivier Goffart <ogoffart@trolltech.com>
| | * Compile with debug enabledOlivier Goffart2009-06-101-1/+1
| | |
| * | Revert "greatly speed up QTransform::mapRect() for projective transforms"Andreas Aardal Hanssen2009-06-101-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 72e083c98c3adb07bb1578fb7f28f121fc3f34ac. This test broke the tst_QTransform::projectivePathMapping autotest. Lars is looking into it; for now we take the patch out. Reviewed-by: Lars
| * | Merge commit 'qt-mainline/master' into master-recursivepaintAndreas Aardal Hanssen2009-06-1080-525/+1130
| |\ \
| * | | Revert "implement equality operator in a more sane way"Andreas Aardal Hanssen2009-06-101-9/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 07dca7a30d4bd1efd8032915700420cca3fd60fa. Move the equality operator code back in (qFuzzyCompare) to avoid breaking many autotests. The change should go back in later on, possibly supplemented by a qFuzzyCompare(QTransform) function. But until we can figure out how to not break everything this patch has to wait. Reviewed-by: Lars
| * | | Fix tst_QGraphicsProxyWidget::scrollUpdate test, wrong test.Andreas Aardal Hanssen2009-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It should not be necessary to adjust the expose rectangle by 1 in all directions; the expose has already been adjusted by the scene and view. Reviewed-by: bnilsen
| * | | Fix sorting bug when using BSP tree index + add autotest.Andreas Aardal Hanssen2009-06-093-18/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use stable sorting to keep insertion order. This works fine as long as we sort a complete list of siblings in one go, and this list already has items in insertion order. But if we shuffle such a list, the only way to get proper sort order again (with insertion order intact), is if each item has a sibling index. We used to have this, but we don't have it anymore (as it's not needed for NoIndex mode). So until we separate the BSP index into a separate class and add this index there, we add this workaround which uses the toplevelitems list to ensure the items have the correct order. Reviewed-by: bnilsen
| * | | Remove duplicated code for removing an item from the scene.Bjørn Erik Nilsen2009-06-095-140/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we had almost two identical functions for removing an item from the scene. There was only minor differences depending on whether the item was removed from QGraphicsScene::removeItem or from the item's destructor. Now we have one function that handles both cases just fine. Reviewed-by: Andreas
| * | | Remove one unnecessary argument from the recursive draw function.Andreas Aardal Hanssen2009-06-093-11/+7
| | | | | | | | | | | | | | | | | | | | We don't have to pass optimization flags; we already have a member variable we can test for painter state protection.
| * | | Ensure we use the correct static paintedItems list.Andreas Aardal Hanssen2009-06-091-6/+6
| | | | | | | | | | | | | | | | | | | | Fixes the zValue autotest, which regressed when the member list was added.
| * | | Fix moving regression for ItemIgnoresTransformations items.Andreas Aardal Hanssen2009-06-091-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Removes a piece of code in 775ec8e96c9219981ff220ca5f3d24f0501d17b5 that was submitted by accident. The code in mouseMoveEvent is now identical to that in master.
| * | | Fix QGraphicsView::render() regression, ensure the right device is passed.Andreas Aardal Hanssen2009-06-092-2/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we pass the viewport widget as the widget pointer when rendering to an arbitrary painter (e.g., onto a pixmap), we confuse the rendering functions to thinking that it's the viewport's region we should render into. So instead, when drawItems() is passed a painter that's different from the view, we pass 0 for the widget.
| * | | Revert 7aee2a7054d1ca280f6dfc9c46b3fe2ce403ccb3, fix render bugs.Andreas Aardal Hanssen2009-06-093-18/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduced an unexpected interdependency for scenes with items that enable ItemStacksBehindParent, and that contain children that are transformed. There's a manual test for this, called clippingAndTransformations, which shows this problem. The bug has been fixed and this change also includes an autotest that covers exactly this problem.
| * | | Update change log with behavior changes in Graphics View.Andreas Aardal Hanssen2009-06-091-10/+23
| | | |
| * | | Add ItemSendsGeometryChanges, replacing itemChangeEnabled().Andreas Aardal Hanssen2009-06-097-75/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag toggles whether we should send notifications for setPos, setMatrix, and setTransform. It's off by default. Docs have been updated. All autotests pass. This change also cleans up a bit so that we both have readable code, and keeping the optimized path for when we need to send the notifications. By enabling this flag by default we are going to trigger regressions in end-user code. Reviewed-by: bnilsen
| * | | Auto-test to ensure moved items don't leave traces.Bjørn Erik Nilsen2009-06-092-1/+80
| | | | | | | | | | | | | | | | See also: 1c9032f29d4500b33622d7510b6361c99d9af296
| * | | Add another auto-test ensuring updates outside the brect are discared.Bjørn Erik Nilsen2009-06-091-0/+8
| | | |
| * | | Revert "Add QGraphicsItem::itemChangeEnabled()."Andreas Aardal Hanssen2009-06-094-198/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0fc58ca3220083b9e10f88aab2e39824c2764db3. Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem_p.h
| * | | Fix two regressions in Plasma. The painter state proctection was notAlexis Menard2009-06-094-5/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | properly pass to drawItemHelper. The second is a double conversion to deviceTransform in createStyleOption of QGraphicsItem. Since the recursive drawing already give a transform in device mode we don't need to convert it two times. Reviewed-by:andreas
| * | | Add (back) properties to QGraphicsItem to change the transformations componentOlivier Goffart2009-06-097-109/+716
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reapply commit 8ad5020940f10d4ecc5c5e8b3b9656531cb84ef3 and its dependent change that has been reverted while rebasing the recursivepaint branch. With the new properties it is possible to easily animate transformations Reviewed-by: Andreas Documentation still need to be reviewed.
| * | | A partial QGraphicsItem update causes a full update to be discarded.Bjørn Erik Nilsen2009-06-092-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. item->update(QRectF(0, 0, 5, 5)); item->update(); The problem was that we discarded all update requests whenever the item was already marked as dirty. The dirty bit only means it has pending updates (which might be a full update). However, we have a separate bit for full updates (fullUpdatePending) so we have to check against that bit instead. Makes tst_QGraphicsProxyWidget::paintEvent happy. Another auto-test included.
| * | | QGraphicsItem discard updates when it shouldn't.Bjørn Erik Nilsen2009-06-093-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once a _q_processDirtyItems call is queued, it means we at least have one item that is marked as dirty and we must reset it when the _q_processDirtyItems slot is called. The problem however, was that we didn't reset the item's dirty state if a full scene update occurred in between, i.e. item->update(); scene.update(); We don't have to calculate the item's dirty rect if a full scene update occurs in between, but we still have to reset its state. Auto-test included.
| * | | Child items leave traces when moving an ancestor item.Bjørn Erik Nilsen2009-06-091-1/+6
| | | | | | | | | | | | | | | | | | | | The problem was that we only marked the painted view bounding rect of the moved item as dirty. We also have to mark its children.
| * | | Fix warning.Alexis Menard2009-06-091-2/+2
| | | |
| * | | Fix interaction with QGraphicsWidgets that are a window.Andreas Aardal Hanssen2009-06-091-1/+1
| | | | | | | | | | | | | | | | Use itemCollidesWithPath, the helper function.
| * | | Fix tst_QGraphicsScene::items_QRectF_2(), an intersection bug.Andreas Aardal Hanssen2009-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | The recursive items function didn't contain the special case check for when the source and target rectangle are identical.
| * | | Fix tst_QGraphicsScene::itemIndexMethod(), typo in estimateItemsInRect()Andreas Aardal Hanssen2009-06-091-1/+1
| | | | | | | | | | | | | | | | Don't skip all indexed items that aren't transparent ;-).
| * | | Fix tst_QGraphicsView::cursor2() - sorting bug when using BSP tree.Andreas Aardal Hanssen2009-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Make sure we don't claim that we have sorted all toplevel items when we are using the BSP tree, as when painting we have only actually sorted a subset of the elements.
| * | | Fix tst_QGraphicsView::acceptMousePressEvent (by entering event loop).Andreas Aardal Hanssen2009-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | This is necessary after we made the sceneRect grow lazily when it's not assigned.
| * | | Removes odd artifact in the chip demo.Bjørn Erik Nilsen2009-06-092-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling repaint() instead of update() is bad when having multiple views (which GV perfectly supports). The result is that e.g. when moving a chip in the chip demo, there's a visible lag between each view. It can also be a performance killer on QWS, where the surface is locked for each repaint(). Instead of calling repaint() we call update() as before, but we also make sure the updates are processed immediately.
| * | | Make sure the dirty state of an item is reset when removed from the scene.Bjørn Erik Nilsen2009-06-091-0/+2
| | | | | | | | | | | | | | | | Makes tst_QGraphicsItem::paint happy.
| * | | Discard updates outside the bounding rect.Bjørn Erik Nilsen2009-06-092-1/+4
| | | | | | | | | | | | | | | | Makes tst_QGraphicsItem::cacheMode happy.
| * | | Compatibility fix for QGraphicsScene::changed signal.Bjørn Erik Nilsen2009-06-092-3/+22
| | | | | | | | | | | | | | | | | | | | Makes tst_QGraphicsScene::changedSignal and tst_QGraphicsItem::setMatrix happy.
| * | | Make sure we reset the updateAll variable correctly.Bjørn Erik Nilsen2009-06-092-0/+2
| | | | | | | | | | | | | | | | Makes tst_QGraphicsScene::update happy.
| * | | Compatibility fix for QGraphicsScene::sceneRectChanged()/sceneRect().Bjørn Erik Nilsen2009-06-095-11/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have to keep the growingItemsBoundingRect up-to-date if there's no scene rect. The only difference now is that sceneRectChanged will not be emitted before entering the event-loop, but the documentation only states it'll be emitted when the scene rect changes, so we consider it harmless. Makes tst_QGraphicsView::sceneRect_growing and tst_QGrahicsScene::sceneRect happy. Reviewed-by: Andreas
| * | | Avoid falling in the else case when there are no views.Bjørn Erik Nilsen2009-06-091-1/+1
| | | | | | | | | | | | | | | | Partially fixes tst_QGraphicsScene::update failure.
| * | | Ensure we pass the intersect mode when checking item collisions.Andreas Aardal Hanssen2009-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | This fixes one of two failures in tst_QGraphicsScene::items_QRectF_2. The other seems unrelated.
| * | | Ensure this test goes via QGraphicsScene::drawItems().Andreas Aardal Hanssen2009-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | Enable QGraphicsView::IndirectPainting to make sure it detects which items are drawn.