summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Fix crash.Michael Brasser2009-12-081-0/+1
|
* Fix crash.Michael Brasser2009-12-081-1/+1
|
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeuiMichael Brasser2009-12-073-25/+7
|\ | | | | | | | | Conflicts: src/tools/moc/generator.cpp
| * Merge commit 'c0b81480b2909b18ac15bdd124a562ae005c2f41' into origin-4.6Olivier Goffart2009-12-041-2/+2
| |\
| | * Some doc fixesJan-Arve Sæther2009-12-031-2/+2
| | | | | | | | | | | | | | | | | | - Remove a lie. - When referring to the size of an anchor, refer to it consistently as 'spacing' instead of magnitude.
| * | Fix for virtual keyboard poping up when it should not.Robert Griebl2009-12-031-1/+1
| |/ | | | | | | | | | | | | | | Pressing and releasing the finger/stylus on an editable text widget should only trigger the input method if the release position is still within the widget's boundaries. Reviewed-by: axis
| * Only call updateFont if the font have changed.Alexis Menard2009-11-301-1/+2
| | | | | | | | | | | | | | | | | | When receiving the polish event, we call updateFont only if the font has changed (from the QApplication::font()). This avoid to clear sizeHints cache. Task-number:QTBUG-6272 Reviewed-by:janarve
| * Merge commit 'upstream/4.6' into oslo-staging-2/4.6Olivier Goffart2009-11-271-3/+3
| |\
| * \ Merge branch 'fixes' of ↵Jan-Arve Sæther2009-11-271-21/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into fleury-fixes Conflicts: tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
| | * | QGAL: default spacing can be unset using a negative valueEduardo M. Fleury2009-11-251-21/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a default spacing is set through QGAL::setSpacing() family of methods, the user must be able to unset it. To avoid adding another public method, we enabled this feature by allowing a negative value to be passed to those methods. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>
| | * | QGAL: sizeHint constraints needed by anchors parallel with the layoutEduardo M. Fleury2009-11-251-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method "constraintsFromSizeHints" does not create constraints for anchors between the layout vertices _only if_ these anchors have infinite maximum sizes. However, this test was not being done for half-anchors, ie. those created when the layout center anchorage point is used. That was OK when there was no chance that the center anchors had been simplified by a parallel anchor. Nowadays there's a chance that happens, so the test was extended. Commit also adds a test to avoid regressions. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| | * | QGAL: deal correctly with anchors in parallel with the layoutCaio Marcelo de Oliveira Filho2009-11-252-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the preferred size calculation, we should not add 'layout anchors' (either one or the two halves) into the objective function, since the layout doesn't impose or prefer any size at all. This already worked for cases when the layout anchor is one, but not when we have two halves. The mechanism was a 'skipInPreferred' flag that were not being set. The flag is pretty much redundant right now, since we can get this information from the 'isLayoutAnchor' flag. So, the flag was removed and a test was added for both a parallel case with the entire layout and other with half of the layout (which wasn't passing before). Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* | | | Merge branch '4.6' of git://scm.dev.nokia.troll.no/qt/qt into ↵Warwick Allison2009-11-305-226/+32
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | kinetic-declarativeui Conflicts: src/corelib/animation/qabstractanimation.cpp
| * | | Merge commit oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-275-226/+32
| |\ \ \ | | |/ /
| | * | Fix a crash in KDE/Plasma with QGraphicsView. TopLevel list of itemsAlexis Menard2009-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was corrupted. This nasty bug was triggered when the index sort the top level list of items. We forgot to set the flag topLevelSequentialOrdering to false so when an item was removed from the top level list it was using the sibling index which can be not valid anymore since the list is not sorted by sequential order. So it let some dangling pointers in the list which make processDirtyItemRecursive crash the next paint event. Reviewed-by:bnilsen Reviewed-by:andreas
| | * | QGraphicsTextItem::setDefaultTextColor check change before calling update()Olivier Goffart2009-11-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some applications call setDefaultTextColor in the paint event. Task-number: QTBUG-6242 Reviewed-by: Gabriel
| | * | Remove unused variables in QGraphicsItem and QGraphicsScene.Bjørn Erik Nilsen2009-11-254-34/+20
| | | | | | | | | | | | | | | | | | | | maybeDirtyClipPath and ingoreClipping is not relevant anymore now that the cached clip path is removed.
| | * | Remove caching of QGraphicsItem::clipPath().Bjørn Erik Nilsen2009-11-253-191/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cache was added in 4.5 and was useful at that time. With 4.6 it is not relevant anymore since the only use case for it is item-lookup releated to mouse events and collision detection, so the overhead of maintaining the cache is more pain than gain. All existing auto tests pass.
* | | | Merge branch '4.6' of git://scm.dev.nokia.troll.no/qt/qt into ↵Warwick Allison2009-11-277-26/+41
|\ \ \ \ | |/ / / | | | | | | | | kinetic-declarativeui
| * | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6David Boddie2009-11-253-12/+25
| |\ \ \ | | |/ /
| | * | Mac: Fixes painting artifacts in Graphics ViewBjørn Erik Nilsen2009-11-241-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that pending updates were not dispatched properly on the Mac, which is strongly required in order to get correct behavior wrt QGraphicsItem::update(). Task-number: QTBUG-4160 Reviewed-by: bnilsen
| | * | Merge branch 'fixes' of ↵Jan-Arve Sæther2009-11-232-12/+18
| | |\ \ | | | |/ | | |/| | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into fleury-fixes2
| | | * QGAL: sizeHint constraints needed by anchors parallel with the layoutEduardo M. Fleury2009-11-201-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The method "constraintsFromSizeHints" does not create constraints for anchors between the layout vertices _only if_ these anchors have infinite maximum sizes. However, this test was not being done for half-anchors, ie. those created when the layout center anchorage point is used. That was OK when there was no chance that the center anchors had been simplified by a parallel anchor. Nowadays there's a chance that happens, so the test was extended. Commit also adds a test to avoid regressions. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| | | * QGAL: deal correctly with anchors in parallel with the layoutCaio Marcelo de Oliveira Filho2009-11-202-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the preferred size calculation, we should not add 'layout anchors' (either one or the two halves) into the objective function, since the layout doesn't impose or prefer any size at all. This already worked for cases when the layout anchor is one, but not when we have two halves. The mechanism was a 'skipInPreferred' flag that were not being set. The flag is pretty much redundant right now, since we can get this information from the 'isLayoutAnchor' flag. So, the flag was removed and a test was added for both a parallel case with the entire layout and other with half of the layout (which wasn't passing before). Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| * | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6David Boddie2009-11-242-1/+2
| |\ \ \ | | |/ /
| | * | Fixes painting issues when scaling a QGraphicsView.Yoann Lopes2009-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the 'exposed rectangle' passed to the Item's paint() function was rounded to Int values, whereas the one passed to drawBackground and drawForeground was not. Autotest included. Task-number: QTBUG-5859 Reviewed-by: bnilsen
| | * | Mark QGraphicsItemAnimation as deprecatedThierry Bastian2009-11-191-0/+1
| | |/ | | | | | | | | | Task-number: QTBUG-5968
| * | Doc: Fixes to markup.David Boddie2009-11-241-3/+3
| |/ | | | | | | Reviewed-by: Trust Me
| * Ran the script utils/normalizeOlivier Goffart2009-11-181-2/+2
| | | | | | | | Over src/ tools/ examples/ and demos/
| * Crash when rendering a scene using DeviceCoordinateCacheGabriel de Dietrich2009-11-181-3/+6
| | | | | | | | | | | | | | | | | | | | The execution flow would allow the widget the scene would be rendered on to be null. However this very widget was being used when using DeviceCoordinateCache to get the desktop size. We now skip this optimisation when no widget is given. Auto-test included. Reviewed-by: bnilsen Task-number: QTBUG-5904
| * Merge upstream/4.6 into oslo-staging-2Olivier Goffart2009-11-171-2/+3
| |\
| * \ Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6Yoann Lopes2009-11-171-0/+2
| |\ \
| * | | Fixes polish events for explicitly hidden GraphicsWidgetItems.Yoann Lopes2009-11-171-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that hidden items never get added to "unpolishedItems" list and thus never get the polish event. Autotest included. Task-number: QTBUG-3939 Reviewed-by: bnilsen
* | | | Merge branch '4.6' of git://scm.dev.nokia.troll.no/qt/qt into ↵Warwick Allison2009-11-197-371/+197
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | | | | | kinetic-declarativeui Conflicts: src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
| * | | Merge oslo-staging-2/4.6 into upstream/4.6Olivier Goffart2009-11-171-0/+2
| |\ \ \ | | | |/ | | |/|
| | * | Fix tst_QGraphicsView::inputMethodSensitivity autotestOlivier Goffart2009-11-171-0/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | The problem was that the scene was not notified it lost the focus when it was disconnected from the view (with setScene) So when it got back the focus, nothing was updated because the scene thought it still had the focus. Reviewed-by: jasplin
| * | Merge remote branch 'staging/4.6' into 4.6Simon Hausmann2009-11-171-2/+3
| |\ \ | | |/ | |/|
| | * Fix S60 input method not showing up in editable QGraphicsTextItemsSimon Hausmann2009-11-131-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | Correctly set the ItemAcceptsInputMethod flag in setTextInteractionFlags. Reviewed-by: Andreas Reviewed-by: axis Reviewed-by: Janne Koskinen
| * | Remove warning. (Forgot to commit this together with my previous commits)Jan-Arve Sæther2009-11-131-1/+1
| | |
| * | Merge branch 'fixes' of ↵Jan-Arve Sæther2009-11-134-368/+182
| |\ \ | | | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into fleury-fixes
| | * | QGAL: clean up size hint refresh codeCaio Marcelo de Oliveira Filho2009-11-122-65/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code for refreshing size hints of items / user-created anchors now happens with a graph in full (not simplified). So we don't need to now how to refresh size hints for complex anchors. The code for refreshing complex anchors was used also to initialize the complex anchors (the '_helper' functions). Those were changed to calculateSizeHints() and refreshSizeHints() doesn't need to be virtual anymore. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| | * | QGAL: clean up interpolation codeCaio Marcelo de Oliveira Filho2009-11-122-95/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now the interpolation doesn't need to know how to traverse complex anchors, since when it runs, the graph is not simplified anymore. This commit removes unnecessary code for dealing with that. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| | * | QGAL: remove the caching of simplified graphCaio Marcelo de Oliveira Filho2009-11-123-72/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After discussion with Jan-Arve, we decided to remove for good the caching of simplified graph. This avoided recalculating the simplification (but not the simplex) in some situations. Since vertex simplification, this was temporarily disabled already. To know whether if we could the cached version or not, we needed to track individual anchors to see whether they reached size 0 or they were 0 and changed the size. This is because the vertex simplification depend on that fact. Now the simplified version of the graph exists only during the execution of calculateGraphs() function. This and next commits clear up the code to take advantage of that fact. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| | * | QGAL: fix update size hints logic in parallel anchorsCaio Marcelo de Oliveira Filho2009-11-121-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When filling sizeAt* values for parallel anchors, we have to identify the case when the second anchor in the parallel doesn't have the same direction as the parallel itself. However, relying on the parallel group vertices to identify this case is not safe, because after a parallel group a new vertex simplification can happen. So, the comparing the 'from' with the first edge is the correct way to verify whether the second is backwards. Code was fixed to follow that. Note that, without negative spacing the case "out-of-order" for parallels is only the trivial case (size == 0). Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| | * | QGAL: Update code documentationEduardo M. Fleury2009-11-121-13/+26
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| | * | QGAL: Move size information from AnchorData to QGraphicsAnchorPrivateEduardo M. Fleury2009-11-123-108/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To solve the spacing persistency bug, this commit saves the preferredSize (spacing) information inside QGraphicsAnchorPrivate. The problem started when we could not rely on "AnchorData->prefSize" to keep the spacing information for user-defined anchors. This happens because that member can be overriden if the spacing is negative (anchor is inverted) or its sizePolicy is of type "Ignored" (it is overriden by minSize). Then, to decide where to store it, we aimed to make something similar to what happens with item-internal anchors. Those can rely on their items to get fresh information regarding their size, so we decided that user-anchors (that don't have items, but do have QGraphicsAnchors) could read such information from there. This refactory also reduced the deep indirection that existed in the "QGraphicsAnchor->setSpacing" call. Previously it would call internal layout methods to do some black magic, that's now gone. As the spacing information is now stored in the anchor itself, it can do pretty much all the work and, after that, just invalidate the layout. Also, moved information like "AnchorData->hasSize" to QGAnchor as its pretty much related to the preferredSize information itself. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| | * | QGAL: Update header documentation in QGALPrivateEduardo M. Fleury2009-11-121-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the refactoring of the setSpacing logic, we are encoraging the analogy between the references to QGraphicsLayoutItem and to QGraphicsAnchor, from the AnchorData point of view. It happens that leaf anchors (ie, those that were not created by the simplification) either represent an item or an user-created anchor. This means that they should fetch their size information either from a QGraphicsLayoutItem (member AnchorData->item) or from a QGraphicsAnchor (member AnchorData->graphicsAnchor). Thus, I'm organizing the header to make it more consistent to the new concept. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * | | Fixes QGraphicsWidget: paint() being called before polish().Bjørn Erik Nilsen2009-11-131-0/+8
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that we request an update() before we schedules a polish event in QGraphicsScene::addItems, which means paint() is being called before polishEvent(). We could try to swap the order in addItems, but that doesn't give us any guarantee that polish is delivered before update (since we have no control over what's happening from outside graphics view). A better solution is to always make sure we don't have unpolished items before we draw. Auto-test included. Task-number: QTBUG-4979 Reviewed-by: Andreas
| * | Merge commit 'widget/4.6' into oslo-staging-2/4.6Olivier Goffart2009-11-113-4/+2
| |\ \ | | |/ | |/| | | | | | | Conflicts: src/gui/painting/qbrush.cpp
| | * Revert "Always set a clip on the painter in QGraphicsView."Andreas Aardal Hanssen2009-11-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4bf7f90a27377f439e86d6175e5e3cdebd131be0. The change is already reverted in kinetic-declarativeui. Reviewed-by: Warwick Allison Reviewed-by: bnilsen