| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
might lead to incorrect results as obsolete (and explain why).
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
in new overloads.
Reviewed-By: bnilsen
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The problem was that we didn't regenerate the bsp when adding
items after calling QGraphicsScene::clear.
Reviewed-by: alexis
|
| | | | |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
iteration before the views are updated.
A full scene update (scene.update()) already supported it because the
scene called update() on the views directly. However, partially scene
updates (scene.update(rect)) required two event-loop iterations
before the views were updated.
Auto-test included.
|
| | | | | |
|
| |/ / /
| | | |
| | | |
| | | | |
This obsoletes QGraphicsView::handlesChildEvents.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
QGraphicsScene::sceneRect() returns the growingItemsBoundingRect if not
a particular scene rect is set; otherwise the sceneRect is returned.
This cut-off aims to do less processing when the exposed region covers
the entire scene, but it won't get hit in case of a sceneRect because we
always check against the growingItemsBoundingRect.
Task-number: 257192
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
src/gui/graphicsview/qgraphicsitem_p.h
tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp
tests/auto/qgraphicsview/tst_qgraphicsview.cpp
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This patch improves the graphics view support for input
methods in several ways:
* A new ItemAcceptsInputMethod flag is introduced to serve
the same purpose for graphics items as WA_InputMethodEnabled
does for widgets: Input method support can be controlled
individually for each item.
* The input method sensitivity of a view (i.e. the value of
the WA_InputMethodEnabled flag) is updated dynamically
whenever the input method support of the current focus
item may change.
* Input contexts are reset whenever an item that supports
input methods loses focus.
Reviewed-by: janarve
Task-number: 254492
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Rewritten the api almost from scratch, making it simplier and more
flexible at the same time.
The current implementation will not have complex gseturemanager class
inside Qt, but the QGesture base class, which represents both a
gesture recognizer and a gesture itself with a set of properties. A
set of common gestures that can use used in third-party applications
(and in Qt itself internally) is supposed to be found in
qstandardgestures.h, and a base class for user-defined gestures is in
qgesture.h
Gesture implementation for Pan on Windows7 has also been added as a
reference implementation for platform gestures.
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Found during manual testing (demos/embeddeddialogs).
The problem was that a full update (right before hiding/deleting an
item) caused the update request made from the destructor to be
discarded.
Auto-test included.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We can do QRect::intersects/contains/operator| faster than QRect
because we can assume the rects are normalized. Another
important factor is our knowledge about the viewport rect, which is
always QRect(0, 0, viewport->width(), viewport->height()).
Auto-tests included.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Update the scene transform and use it directly in the same fashion as we
do in processDirtyItemsRecursive/drawSubtreeRecursive.
All auto-tests pass
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Use the item's cached scene transform directly instead of always making a copy
of it. Moreover, we don't have to use the transform at all if the scene
transform is a "translate only" transform :-). QTransform already use
the same cut-offs, but it must update the type() before it can find out.
We don't have to check the type() because that is already stored (and we
usually don't call type() when we store the value either).
All auto-tests pass.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This version is easier to read and is slightly faster than the old one.
All auto-tests pass.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The chip demo was unbelievable slow, so I investigated and found out
the bsp always returned almost all items in the tree (40 000 in this
particular case). It did so because the tree was initialized with
an empty sceneRect. The sceneRect was empty due to a lacking signal-slot
connection, resulting in QGraphicsSceneBspTreeIndex::updateSceneRect
never being invoked.
Auto-test included.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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-request: 787
Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
|
| |\ \ \ \
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
src/gui/graphicsview/qgraphicsscene.cpp
src/gui/graphicsview/qgraphicsscene_p.h
src/gui/graphicsview/qgraphicsview.cpp
src/gui/graphicsview/qgraphicsview_p.h
|
| | | |/
| | |/| |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We have to ensure that the item's top-level is marked as discovered.
This broke the dragandroprobot example after we started using the BSP
from QGraphicsSceneIndex::items()*
(see 6ee3fb750377eeedf161d96fef02c5fa336810e9)
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Mostly re-factoring of QGraphicsSceneIndexPrivate::recursive_items_helper
so it can re-use code from the scene (topLevelItemsInStackingOrder). That also
means we'll use the bsp tree in case of NoIndex instead of always looping
through the top-levels. This function is now almost identical to
QGraphicsScenePrivate::drawSubtreeRecursive, so it might be worth
looking into how we can abstract it even more and have one common
recursive function.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Ensure the BSP resets the QGraphicsItemPrivate::itemDiscovered bit
before returning the list of discovered items.
|
| | | |
| | | |
| | | |
| | | | |
Done with Andreas.
|
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Andreas
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This patch adds better support for untransformable items and removes
some redundant code.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The change in processPendingUpdates was completely wrong and broke
several auto-tests.
|