summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Fixed linking of QtSvg with MSVC.Rohan McGovern2009-07-132-18/+17
|
* build fix on windowsThierry Bastian2009-07-111-0/+1
|
* Merge commit 'qt/master' into graphicssceneindexBjørn Erik Nilsen2009-07-1012-617/+91
|\ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem_p.h tests/auto/qgraphicsproxywidget/tst_qgraphicsproxywidget.cpp tests/auto/qgraphicsview/tst_qgraphicsview.cpp
| * Improved the support for input methods in Graphics View.jasplin2009-07-039-10/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Refactored gesture apiDenis Dzyubenko2009-07-0210-611/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * doc: Corrected several qdoc warnings.Martin Smith2009-07-021-1/+4
| |
| * doc: Corrected several qdoc warnings.Martin Smith2009-07-021-17/+18
| |
* | QGraphicsItem not updated properly when moving parent.Bjørn Erik Nilsen2009-07-102-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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-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.
* | Painting artifacts when closing an embedded popup in Graphics View.Bjørn Erik Nilsen2009-07-101-4/+3
| | | | | | | | | | | | | | | | | | 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.
* | Painting artifacts when moving an item with partial updates.Bjørn Erik Nilsen2009-07-102-24/+26
| | | | | | | | | | | | | | | | | | | | 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/+10
| | | | | | | | | | | | | | | | | | | | 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.
* | Optimize QGraphicsViewPrivate::updateRect/updateRegion.Bjørn Erik Nilsen2009-07-082-7/+23
| | | | | | | | | | | | | | | | | | 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.
* | Reduce QTransform operations in QGraphicsSceneIndex.Bjørn Erik Nilsen2009-07-082-28/+76
| | | | | | | | | | | | | | Update the scene transform and use it directly in the same fashion as we do in processDirtyItemsRecursive/drawSubtreeRecursive. All auto-tests pass
* | Reduce QTransform operations in Graphics View.Bjørn Erik Nilsen2009-07-084-61/+188
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Simplify QGraphicsScenePrivate::processDirtyItemsRecursive.Bjørn Erik Nilsen2009-07-032-62/+81
| | | | | | | | | | | | This version is easier to read and is slightly faster than the old one. All auto-tests pass.
* | More re-factoring of QGraphicsSceneIndex.Bjørn Erik Nilsen2009-07-0210-96/+98
| | | | | | | | | | | | | | | | | | | | 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-027-52/+65
| | | | | | | | | | | | | | | | | | 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
* | Kill dead BSP tree code in graphics view.Bjørn Erik Nilsen2009-07-022-44/+0
| |
* | 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.
* | Fixes broken BSP lookup in QGraphicsSceneBspTreeIndex.Bjørn Erik Nilsen2009-07-012-6/+14
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix a regression with extended style option items.Alexis Menard2009-07-011-4/+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
* | Compiler warning.Bjørn Erik Nilsen2009-07-011-1/+1
| |
* | Merge commit 'qt/master' into graphicssceneindexBjørn Erik Nilsen2009-07-014-2/+33
|\ \ | |/
| * Compiler warnings.Bjørn Erik Nilsen2009-07-013-2/+3
| |
| * Added QGraphicsScene::sendEvent().J-P Nurmi2009-07-012-0/+30
| | | | | | | | | | Merge-request: 787 Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* | Merge commit 'qt/master' into graphicssceneindexBjørn Erik Nilsen2009-07-0114-41/+1050
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicsscene_p.h src/gui/graphicsview/qgraphicsview.cpp src/gui/graphicsview/qgraphicsview_p.h
| * doc: Fixed several qdoc error reports.Martin Smith2009-06-301-6/+10
| |
| * Cleanup includes in public headers.Bradley T. Hughes2009-06-263-2/+3
| | | | | | | | We don't want to pull in too much if we can avoid it.
| * CompileBradley T. Hughes2009-06-261-10/+10
| |
| * Don't always send spontaneous events to QGraphicsSceneBradley T. Hughes2009-06-261-5/+17
| | | | | | | | | | Only do that if the original event delivered to the QGraphicsView was also spontaneous.
| * Fix bad mergesBradley T. Hughes2009-06-261-7/+0
| |
| * Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-243-6/+14
| |\ | | | | | | | | | | | | Conflicts: src/gui/kernel/qapplication_x11.cpp
| | * Fixed count(), itemAt() and removeAt() in QGraphicsLinearLayout.Jan-Arve Sæther2009-06-242-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to this, the behaviour of count(), itemAt() and removeAt() was different between QGraphicsLinearLayout and QGraphicsGridLayout. QGraphicsGridLayout does it right. This adds some behaviour changes: 1. QGraphicsLinearLayout::count() is no longer affected by inserted stretches (through insertStretch) This means that code like this will break: QGraphicsLinearLayout *linearLayout = new QGraphicsLinearLayout; linearLayout->addItem(new QGraphicsWidget); linearLayout->addStretch(); int count = linearLayout->count(); linearLayout->removeAt(count - 1); // before this patch it would do nothing (and it wouldn't // actually remove the stretch), with the new patch it would // remove the QGraphicsWidget. 2. count(), itemAt() and removeAt() now prints a warning for an invalid index. The documentation actually says that "The reimplementation can assume that index is valid (i.e., it respects the value of count()", but I decided that its too risky to not assume that it is valid, since it would break the following common pattern: while(layout->itemAt(0)) { layout->removeAt(0); } Cleaned up autotests (and a small codeblock) that assumed itemAt/removeAt with an invalid index to work, since we should try to follow our own advice. :-) This change is also an alignment with what QGraphicsGridLayout does (it checks the index argument and prints a warning too.)
| * | Add QTouchEvent::DeviceType and deviceType()Bradley T. Hughes2009-06-242-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This enum indicates what kind of device generated the touch event (TouchScreen or TouchPad). We use this information to control how touch events are sent, specifically we restrict touch events to a single widget/QGraphicsItem on touch-pads, since there is no direct relationship between the physical touch location on the pad and the on- using the touch-pad).
| * | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-224-173/+185
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/qnamespace.qdoc src/corelib/global/qnamespace.h src/gui/graphicsview/qgraphicsscene.cpp
| * \ \ Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-185-73/+135
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem_p.h
| * \ \ \ Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-1735-73/+74
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsscene_p.h
| * \ \ \ \ Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-161-18/+26
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/qnamespace.qdoc doc/src/snippets/code/src_gui_qproxystyle.cpp src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebKit/qt/ChangeLog src/gui/graphicsview/qgraphicsscene.cpp src/gui/kernel/qapplication.cpp src/gui/kernel/qapplication_x11.cpp src/gui/kernel/qt_x11_p.h src/gui/kernel/qwidget.cpp src/gui/styles/qproxystyle.cpp src/gui/styles/qstyle.cpp src/scripttools/debugging/qscriptdebugger.cpp src/scripttools/debugging/qscriptenginedebugger.cpp src/sql/drivers/odbc/qsql_odbc.cpp src/sql/kernel/qsqldatabase.cpp src/sql/kernel/qsqldriver.cpp
| * | | | | | Merge of masterBradley T. Hughes2009-06-155-67/+146
| | | | | | |
| * | | | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-1211-219/+406
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem_p.h
| * | | | | | | 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-113-7/+26
| | | | | | | |
| * | | | | | | remove duplicated code and API (merge QTouchEvent and QGraphicsSceneTouchEvent)Bradley T. Hughes2009-06-117-557/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-112-21/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rects instead these are more useful, as already shown in the fingerpaint example
| * | | | | | | Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-1011-1353/+1400
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene_p.h
| * \ \ \ \ \ \ \ Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtBradley T. Hughes2009-06-081-0/+2
| |\ \ \ \ \ \ \ \
| * | | | | | | | | Compile on Windows againBradley T. Hughes2009-06-082-2/+6
| | | | | | | | | |
| * | | | | | | | | Some API changes after an API review roundBradley T. Hughes2009-06-056-91/+362
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Don't have QGraphicsSceneTouchEvent::TouchPoint inherit from QTouchEvent::TouchPoint. The only reason to do this is to support an implementation trick, which can be done another way (see below). This means we have to essentially duplicate the API in the GraphicsScene variant. 2. Don't use a list of pointers to touch points in QTouchEvent and QGraphicsSceneTouchEvent. This means we have to make the TouchPoint classes implicitly shared (and the effect of the previous trick of static_casting the widget touch point to a graphics-scene touch point can be emulated by sharing the d-pointers between the classes). 3. QEvent::RawTouch isn't really an event type, it's a backdoor. Remove it and export the bool qt_translateRawTouchEvent(QList<QTouchEvent::TouchPoint>, QWidget *) function instead. 4. Rename QTouchEvent::TouchPoint::area() to size() (which is more clear as to what the function returns). QGraphicsSceneTouchEvent::TouchPoint gains size(), sceneSize(), and screenSize() functions (the actual translation from screen to scene to item still needs to be implemented).
| * | | | | | | | | Accept TouchBegin events by default if they are enabledBradley T. Hughes2009-06-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After an API review round, we agreed that it makes sense for the TouchBegin event to default to accepted if the widget has subscribed to receive touch events.