summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgraphicsitem
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into master-s60axis2009-08-211-0/+156
|\ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/kernel/qwidget.cpp src/gui/kernel/qwidget_p.h
| * Use pixmap filter for the drop shadow effect.Bjørn Erik Nilsen2009-08-211-1/+1
| |
| * Add auto-tests for QGraphicsItem/QWidget::setGraphicsEffect.Bjørn Erik Nilsen2009-08-211-0/+32
| |
| * Rename QGraphicsShadowEffect to QGraphicsDropShadowEffect.Bjørn Erik Nilsen2009-08-201-1/+1
| | | | | | | | Discussed with Andreas.
| * Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-191-0/+26
| |\ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem_p.h
| * \ Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-171-1/+43
| |\ \
| * \ \ Merge commit 'qt/master' into kinetic-graphicseffectBjørn Erik Nilsen2009-08-071-121/+173
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/graphicsview.pri src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem.h src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene.cpp tests/auto/auto.pro
| * | | | Wrong caching of QGraphicsItem::childrenBoundingRect.Bjørn Erik Nilsen2009-08-061-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot cache the bounding rect on the fly for children, because the bounding rect is mapped to the callee's local coordinate system. Auto-test included.
| * | | | Artifacts when moving a child when the parent has a graphics effect.Bjørn Erik Nilsen2009-08-041-0/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge commit 'qt/master'Jason Barron2009-08-181-0/+68
|\ \ \ \ \ | | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/examples.qdoc doc/src/plugins-howto.qdoc doc/src/topics.qdoc examples/phonon/musicplayer/mainwindow.cpp src/3rdparty/freetype/src/base/ftobjs.c src/corelib/global/qglobal.h src/corelib/tools/qalgorithms.h src/corelib/tools/qshareddata.cpp src/corelib/tools/qsharedpointer.cpp src/corelib/tools/tools.pri src/corelib/xml/qxmlstream.h src/gui/painting/painting.pri src/gui/widgets/qdatetimeedit.cpp tests/auto/qdesktopservices/qdesktopservices.pro tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tests/auto/qtextcodec/test/test.pro
| * | | | Merge QGV delta from kinetic-declarativeui into master.Andreas Aardal Hanssen2009-08-171-0/+26
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New flag: QGraphicsItem::ItemNegativeZStacksBehindParent, which makes it easy to toggle stack-behind based on the value of Z alone. Add interface initializations to QGV classes. Add a simple internal focus policy to QGraphicsItem to allow derived items to be focusable without allowing clickfocus. Reviewed-by: Alexis
| * | | Fix focus proxy deletion bugs/crashes in QGraphicsItem.Andreas Aardal Hanssen2009-08-131-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change would have been much simpler if either QGraphicsItem inherited QObject, or if we had some similar QPointer-like class that supported QGraphicsItem. The issue is this: Each item can delegate another item to be its focus proxy. That item can be a parent or child, or something completely unrelated. Either of the two items can be deleted independently. The former solution was to store backpointers in a map in the scene. Problem is, the items may not be in a scene when this happens, they may be removed from the scene, and the items may be moved between two scenes. The bad part about this fix is that it adds another pointer to QGraphicsItemPrivate. Reviewed-by: Shane Kearns <shane.kearns@sosco.com>
* | | | Merge commit 'qt/master'Jason Barron2009-08-131-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/opengl/samplebuffers/glwidget.cpp src/corelib/io/qfsfileengine_unix.cpp src/corelib/kernel/qobject.cpp src/corelib/tools/qsharedpointer.cpp src/gui/gui.pro tests/auto/qhttp/tst_qhttp.cpp tests/auto/qkeyevent/tst_qkeyevent.cpp
| * | | Update contact URL in license headers.Jason McDonald2009-08-121-1/+1
| | |/ | |/| | | | | | | Reviewed-by: Trust Me
* | | Workaround for Nokia X86 compiler, to compile get more GUI test compile.Janne Anttila2009-08-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Apparently Nokia X86 compiler is not able to use templated qCompare when given arguments have different different type but same base class. This error should be isolated and reported to Nokia X86 team. See task: 259508
* | | Fix autotest failure in qgraphicsitem.Shane Kearns2009-08-111-0/+24
| | | | | | | | | | | | | | | | | | When autofocused child is deleted, remove from ancestors to avoid double deletion crash. Check for null receiver when auto SIP is enabled in mouseReleaseEvent
* | | Merge commit 'qt/master-stable'Jason Barron2009-08-061-0/+29
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure.exe doc/src/classes/qnamespace.qdoc examples/examples.pro src/corelib/kernel/qcoreevent.cpp src/corelib/kernel/qobject.cpp src/gui/kernel/qapplication.cpp src/gui/kernel/qstandardgestures.h src/gui/kernel/qwidget.cpp
| * | Merge branch '4.5'Bill King2009-08-051-0/+16
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp
| | * | Fix ancestor flags that are not correctly update when reparenting.Alexis Menard2009-08-041-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | updateAncestorFlags was not reseting the flags if you change the parent that have for instance itemsClipChildrenToShape to a new one that doesn't have that flag. Task-number:258956 Reviewed-by:bnilsen
| * | | Added input hints to QGraphicsItem.jasplin2009-08-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch allows for input hints to be set on a QGraphicsItem. Input methods use such hints to define its appearance/behavior (e.g. to allow for numerical input only). Reviewed-by: ahanssen Task-number: 254493
* | | | Merge commit 'origin/master'Jason Barron2009-08-061-2/+2
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qfilesystemmodel/qfilesystemmodel.pro tests/auto/qfontdialog/tst_qfontdialog.cpp tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tests/auto/qgraphicslayout/tst_qgraphicslayout.cpp tests/auto/qsqldriver/qsqldriver.pro tests/auto/qsqlquery/qsqlquery.pro tests/auto/qsqlrelationaltablemodel/qsqlrelationaltablemodel.pro tests/auto/qsqltablemodel/qsqltablemodel.pro tests/auto/qsqlthread/qsqlthread.pro tests/auto/qstatemachine/tst_qstatemachine.cpp tests/auto/qtcpsocket/tst_qtcpsocket.cpp
| * | | Trailing whitespace and tab/space fixes for auto testsJanne Anttila2009-08-041-4/+4
| | | |
* | | | Implement new transformation handling for graphics items.Lars Knoll2009-07-291-121/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of having separate rotationX/Y/Z, shearX/Y, etc. methods in QGraphicsItem turned out to be not giving us the flexibility we need and wanted. The new code now implements a different scheme, where we keep simple rotate (around z-axis), scale and transformOriginPoint methods, but remove the other ones. Instead we now have an additional list of QGraphicsTransform object. QGraphicsTransform is an abstract class that inherits QObject. Several specializations are provided and can be used to transform (and through property bindings animate) the item. Reviewed-By: Andreas
* | | | Add QGraphicsItem::ItemAutoDetectsFocusProxy and improve subfocus support.Andreas Aardal Hanssen2009-07-271-0/+107
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you set this flag on an item, and descendant item that gains input focus will become this item's focus proxy. This simplifies how focus proxy items are assigned from QML; instead of binding the possible focusProxy property to a named child widget, this assignment happens automatically as you set the focus property of a descendant to true. As part of this change, QGraphicsWidget::focusWidget behavior has been improved and moved into QGraphicsItem. For example, if you set focus on an item that it's part of a scene, it can gain focus once the parent has been assigned (which is how object trees are built in QML). Autotests are included. Reviewed-by: Michael Brasser
* | | Add QGraphicsItem::focusProxy(), focus proxy support.Andreas Aardal Hanssen2009-07-231-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | Following QWidget's behavior, you can not assign any item in the same scene as a focus proxy for another item. Also supports nested focus proxies. You can only assign items in the same scene as focus proxies. Autotests are included. Reviewed-By: mbm
* | | Make Graphics View auto-tests less dependant on WS.Bjørn Erik Nilsen2009-07-151-8/+19
| | | | | | | | | | | | | | | | | | | | | Several auto-tests failed on the Mac because the view get two paint events on the first show. This is a bug in QWidget, but shouldn't make graphics view auto-tests fail. Also, there's no difference between update() and repaint() on the Mac.
* | | Add auto-tests for QGraphicsItem::filtersChildEvents.Marius Bugge Monsen2009-07-141-0/+123
| | |
* | | Fix broken tst_QGraphicsItem::sorting.Bjoern Erik Nilsen2009-07-131-1/+2
| | | | | | | | | | | | | | | A top-level window on Windows cannot have a smaller width than 120. Increase the width by 20 and expect another row of items to be painted.
* | | QGraphicsItem not updated properly when moving parent.Bjørn Erik Nilsen2009-07-101-3/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found during manual testing (manualtests/graphicsview/movableitems). Moving a child item (via its parent) outside the viewport, and then back again didn't trigger an update on the child. Reason was that we had a cut-off checking the wrong bit (geometryChanged). This bit means exactly the same as the paintedViewBoundingRectsNeedRepaint bit, except that it doesn't propagate to the children (and that's the bug). We use paintedViewBoundingRectsNeedRepaint instead. Auto-test included.
* | | Fixes broken item-lookup for untransformable items.Bjørn Erik Nilsen2009-07-101-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Painting artifacts when moving an item with partial updates.Bjørn Erik Nilsen2009-07-101-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found during manual testing (dndrobotinproxy). The problem was that the paintedViewBoundingRect was set to an empty rect because the partial update area didn't intersect with the viewport. The item itself was partially inside the viewport. Then, when the item was moved, its old area was not repainted due to this empty paintedViewBoundingRect. Auto-test included.
* | | Rendering artifacts when hiding a QGraphicsItem.Bjørn Erik Nilsen2009-07-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that update() followed by hide() didn't work as expected because the update() caused all sub-sequent update requests to be discareded. This is correct, however, we have to make sure the ignoreVisible/ignoreOpacity bit is set properly; we won't process a hidden item otherwise. Auto-test included.
* | | Fix a regression with extended style option items.Alexis Menard2009-07-011-0/+4
|/ / | | | | | | | | | | | | | | | | We basically passed an unitialized transform to construct the styleoptions for items that use the useExtendedStyleOption flag. We had an auto-test to cover that but for some reason view.show() was removed by me so the auto-test did nothing. oops. Reviewed-by:bnilsen
* | Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qtSimon Hausmann2009-06-231-0/+11
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebKit/qt/ChangeLog tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
| * Add new auto-test QGraphicsItem::childrenBoundingRect2().Bjørn Erik Nilsen2009-06-231-0/+11
| | | | | | | | Reviewed-by: Andreas
* | Compile fix on HP-UXAndreas Aardal Hanssen2009-06-171-1/+1
| | | | | | | | Explicit casts make aCC happy.
* | Fix QGraphicsItem::ItemHasNoContents rendering of children.Andreas Aardal Hanssen2009-06-171-0/+27
| | | | | | | | | | | | | | The ItemHasNoContents flag was preventing items that clip their children from rendering their children at all. Fixed now. Reviewed-by: bnilsen
* | Merge license header changes from 4.5Volker Hilsheimer2009-06-161-2/+2
|\ \ | |/
| * Update license headers as requested by the marketing department.Jason McDonald2009-06-161-2/+2
| | | | | | | | Reviewed-by: Trust Me
* | Merge commit 'origin/4.5'Bjørn Erik Nilsen2009-06-121-0/+49
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: demos/boxes/glshaders.cpp src/gui/graphicsview/qgraphicsitem.cpp tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp tools/linguist/shared/cpp.cpp translations/linguist_ja.qm translations/qt_ru.qm
| * QGraphicsItem::setOpacity(0.0) does not trigger an update of child itemsLeonardo Sobral Cunha2009-06-121-1/+50
| | | | | | | | | | | | | | | | Forwarding the ignoreOpacity flag to children in QGraphicsItemPrivate::fullUpdateHelper. This is a complementary fix to task 252913, partly fixed in commit 2e3a5ea44... Reviewed-by: bnilsen BT: yes
* | Fix sorting bug when using BSP tree index + add autotest.Andreas Aardal Hanssen2009-06-091-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | 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.
* | Revert 7aee2a7054d1ca280f6dfc9c46b3fe2ce403ccb3, fix render bugs.Andreas Aardal Hanssen2009-06-091-10/+62
| | | | | | | | | | | | | | | | | | | | 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.
* | Add ItemSendsGeometryChanges, replacing itemChangeEnabled().Andreas Aardal Hanssen2009-06-091-3/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-0/+78
| | | | | | | | See also: 1c9032f29d4500b33622d7510b6361c99d9af296
* | Add another auto-test ensuring updates outside the brect are discared.Bjørn Erik Nilsen2009-06-091-0/+8
| |
* | Fix two regressions in Plasma. The painter state proctection was notAlexis Menard2009-06-091-0/+53
| | | | | | | | | | | | | | | | | | | | 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-091-0/+199
| | | | | | | | | | | | | | | | | | | | | | | | 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-091-1/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.