summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsitem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QGraphicsItem::childrenBoundingRect behavior breaks ↵Bjørn Erik Nilsen2010-09-161-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsEffect::sourceBoundingRect(). Context: QGraphicsEffect::sourceBoundingRect() returns: item->boundingRect() | item->childrenBoundingRect(); Problem was that item->childrenBoundingRect() adjusted the children's bounding rect with the children's ancestor effects (child -> root item), which means the source bounding rect was bigger than needed. We should only account for effects downwards in the hierarchy. root (has effect) | item (has effect) | child | grandChild Auto test included. Task-number: QT-3633, QT-3828 Reviewed-by: samuel
* Wrong bounding rect returned by QGraphicsEffect::boundingRect().Bjørn Erik Nilsen2010-09-161-10/+8
| | | | | | | | | | | | | | Regression after: f5c5e20a Problem was that the cached bounding rect was never invalidated. We can also remove the cached bounding rect in QGraphicsEffectSource because QGraphicsItem::childrenBoundingRect now clips by default. This basically means partially reverting above commit and invalidate whenever ItemClipsChildrenToShape flag changes. Auto test included. Task-number: Discovered while investigating QT-3633 Reviewed-by: samuel
* Fix bug in 34b805d66c09fb324d1b6a7bcf259e8743ef3894Thomas Hartmann2010-09-151-2/+3
| | | | | | | This time the implementation of clear is correct Reviewed-by: Marco Bubke
* Completing the interface for children/data/resourcesThomas Hartmann2010-09-141-1/+8
| | | | | | | | This patch makes the handling of properties like children and data easier in Bauhaus. Especially in the case of property alias Reviewed-by: Aaron Kennedy
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7David Boddie2010-09-021-3/+0
|\
| * Minor performance improvement to QGraphicsItem::update.Bjørn Erik Nilsen2010-09-021-3/+0
| | | | | | | | | | | | | | | | Reported by other teams in Nokia. Avoid calling discardUpdateRequest() twice, first in update() and then in markDirty(). No-brainer. Task-number: QTBUG-10817 Reviewed-by: Trustme
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7David Boddie2010-09-011-24/+9
|\ \ | |/
| * Doc: Whitespace fixes.David Boddie2010-08-271-3/+3
| |
| * doc: Fixed numerous qdoc warnings.Martin Smith2010-08-271-27/+12
| |
* | Doc: Reworded a brief description for clarity.David Boddie2010-08-171-2/+2
|/ | | | Reviewed-by: Trust Me
* Merge remote branch 'origin/4.7' into oslo-staging-2/4.7Olivier Goffart2010-08-091-0/+15
|\ | | | | | | | | | | | | | | | | | | Conflicts: doc/src/index.qdoc src/dbus/qdbusconnection.cpp src/gui/s60framework/qs60mainapplication.cpp src/gui/s60framework/qs60mainappui.cpp src/network/access/qnetworkrequest.cpp src/network/bearer/qnetworkconfiguration.h
| * doc: Fixed some qdoc errors.Martin Smith2010-08-061-0/+15
| |
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7David Boddie2010-08-061-0/+5
|\ \ | |/ | | | | | | Conflicts: src/declarative/util/qdeclarativeanimation.cpp
| * Make sure onFocusChanged is correctly emitted for items in a FocusScope.Michael Brasser2010-08-051-0/+5
| | | | | | | | | | Task-number: QTBUG-12649 Reviewed-by: Martin Jones
* | Doc: Fixed qdoc warnings.David Boddie2010-08-051-0/+18
|/ | | | Reviewed-by: Trust Me
* Fixed spelling mistakes in documented functions, classes, etc. Part of ↵Jerome Pasion2010-07-291-3/+3
| | | | QTBUG-11938 and QTBUG-10801
* Check the gesturemanager pointer before accessing it.Denis Dzyubenko2010-07-271-3/+4
| | | | | | | | This fixes a crash when a static QWidget is destroyed after the QApplication object. Task-number: QTBUG-12025 Reviewed-by: Zeno Albisser
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-231-0/+1
|\ | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: qdoc: Cleaned up the TOC for QML element pages. qdoc: Cleaned up the Inherits and Inherited by lines for QML elements. doc: Added missing \since 4.7 to effect propertyu.
| * doc: Added missing \since 4.7 to effect propertyu.Martin Smith2010-07-231-0/+1
| | | | | | | | Task-number: QTBUG-12132
* | QML focus API updates.Michael Brasser2010-07-211-0/+12
|/ | | | | | | | | The wantsFocus property has been renamed to activeFocus, to better reflect its value. Reading and writing the focus property is also now consistent -- this property represents focus within a scope. Other small changes were made to keep things consistent with the new naming. Reviewed-by: Aaron Kennedy
* Merge remote branch 'origin/4.7' into 4.7-from-4.6Rohan McGovern2010-07-171-1/+2
|\ | | | | | | | | Conflicts: tests/auto/qtexttable/tst_qtexttable.cpp
| * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-141-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (83 commits) Crash while runnig tst_QMdiSubWindow::emittingOfSignals test on Cocoa fix qconfig.h aliased header creation fix warning directive on gnuc qdoc: Removed navigation arrow that was causing display problems. Silence warning when building with MSVC 2005 Fix an Assert in QTextTable Revert "Fix an Assert in QTextTable" Attempt to fix build failure with msvc200{5,8} on Windows XP. fix macx not having UNICODE in DEFINES any more doc: Fixed several qdoc warnings. Fix an Assert in QTextTable doc: Fixed several qdoc warnings. QSslSocket: Improve error handling qdoc: Fixed several <div> elements that had the "/>" ending. QSslSocket: fix documentation for QSslSocket::setPeerVerifyMode() qdoc: Fixed breadcrumbs for QML examples. remove redundand translations project files make projects lupdate-friendly Timing fix for slow devices. QNAM: Add future enum attribute for Zerocopy QNAM ...
| | * Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-07-101-1/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (59 commits) Doc: Cleaning style and adding support for Creator Add NTLMv2 authentication support to QAuthenticator. QIODPLB: Sync behavior of ungetBlock() and ungetChar() QFileIconProvider: Load icons on demand. Doc: fixing offline style Fix handling of SSL certificates with wildcard domain names Doc: fixing examples link doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. SSL library loading: load system libs only once Revert "SSL backend: load libraries for certificates only once" doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. doc: Fixed several qdoc warnings. Doc: Adding support for Qt Creator style doc: Fixed last of the declarative/QML qdoc warnings. qdoc: Marked some missing declarative properties and functions as \internal. qhelpgenerator: Fix namespace syntax checking. ...
| | | * doc: Fixed several qdoc warnings.Martin Smith2010-07-091-1/+2
| | | |
* | | | Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-07-151-3/+24
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt src/3rdparty/webkit/VERSION src/3rdparty/webkit/WebCore/ChangeLog src/3rdparty/webkit/WebCore/bridge/qt/qt_instance.cpp src/3rdparty/webkit/WebCore/bridge/qt/qt_runtime.h src/3rdparty/webkit/WebCore/page/FrameView.cpp src/3rdparty/webkit/WebCore/page/FrameView.h src/3rdparty/webkit/WebCore/platform/ScrollView.cpp src/3rdparty/webkit/WebCore/platform/ScrollView.h src/corelib/plugin/quuid.cpp src/gui/dialogs/qfontdialog.cpp src/multimedia/audio/qaudiodevicefactory.cpp src/opengl/qgl.cpp src/openvg/qpaintengine_vg.cpp tests/auto/qxmlquery/tst_qxmlquery.cpp
| * | | Fixed missing clip when computing the graphics item effect source rect.Samuel Rødal2010-07-021-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If item clips children to shape we should take that into account when computing the source rect, to avoid creating unnecessary large source pixmaps which might have a significant performance impact. Task-number: QT-3551 Reviewed-by: Gunnar Reviewed-by: Trond
* | | | Fixes QGraphicsItem::focusItem() returning incorrect value.Yoann Lopes2010-07-131-2/+4
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When setting focus on an item, subfocus chain was previously updated only for items with a common ancestor. We now make sure that this chain is updated also for the previously focused item (possibly not sharing any common ancestor with the newly focused item). Autotest included. Task-number: QTBUG-12112 Reviewed-by: Alexis Ménard <alexis.menard@nokia.com>
* | | Fix subfocus when reparenting panels.Andreas Aardal Hanssen2010-07-081-0/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When reparenting an item into another, QGraphicsItem will fix the subfocus chain by first removing subfocus from the previous ancestors, and then optionally restoring the subfocus chain to the new ancestors of the reparented item. This allows item trees to be created and assigned a specific focus item before even added to a scene. The QGraphicsItemPrivate::setSubFocus function did not take into account that the root item might be in a different panel than the reparented item, which is the case when reparenting one panel into another. If so, setSubFocus must not mess up the new ancestor panel's sub focus chain. Otherwise (former behavior), the new ancestor panel's focusItem will point to the reparented panel's focus item. This in turn breaks an invariant; one panel's focusItem can never point to an item in another panel. The bundled test case shows this point: Create two panels that each have one child that sets focus. The first panel is added to the scene just to prepare, and verify that it's activated as expected, and its focus child immediately gains input focus. Then we create a second panel, which also has a focus child (but it doesn't have focus as its panel is not active). When we reparent the new panel onto the old one, we expect the new panel to be activated, and the child focus item to gain input focus. However, we also expect the parent panel's focus item to remain intact, so that when we hide the child panel, and the parent panel is reactivated, its original focus item regains focus. Former behavior was that the parent's focus item still pointed to the child panel focus item. This change only has effect when reparenting to or from a panel. Merge-request: 735 Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-07-011-0/+8
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (51 commits) Symbian on Linux: $QTDIR/bin is not necessarily in the path. Updated Symbian def files with new EGL exports. Added another missing EGL stub. Fixed compilation on Symbian. Added missing EGL stub function. Got rid of unused variable compiler warning. QGLWindowSurface support for partial updates via EGL_NOK_swap_region2 Adding func prototypes for EGL_NOK_swap_region2 extension. Check for EGLSurface leak only when paint device is a QGLWidget. Fixed bug in drawTiledPixmap when width of pixmap matches target rect. Update def files for symbian Improved performance of 16 bit memrotates using NEON instructions. Use built-in iconv on Solaris if available Export various symbols needed to make a custom GL graphicssystem. Moc: fix compilation when templated types with multiple arguments are used. Fixes the documentation of QGraphicsEffect::update(). support BGRA textures on SGX Avoid calling time.elapsed() twice in abstract animation Adds slowdownFactor to UnifiedTimer in abstract animation Add the conversion in-place for QPixmap::fromImageReader() on raster. ...
| * | Add a new (internal) flag QGraphicsItem::ItemStopsClickFocusPropagation.Bjørn Erik Nilsen2010-06-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This flag allows you to create a non-focusable item that can be clicked on without changing the focus. This is also possible to achieve by using focus scopes / panels, however the implementation is then way more complex. Thew new flag is tailored for simple uses cases where you simply want to stop the propagation and nothing more. Auto test included. Task-number: QT-3499 Reviewed-by: yoann
* | | Ensure micro focus is updated in TextEdit and TextInputMartin Jones2010-06-291-4/+7
|/ / | | | | | | Task-number: QTBUG-11552
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7David Boddie2010-06-181-1/+2
|\ \
| * | clearFocus() shouldn't mess with focus if it doesn't have focusMartin Jones2010-06-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | removing an item from the view caused the focus to change even if the removed item didn't have focus. Task-number: QTBUG-11341 Reviewed-by: Yoann Lopes
* | | Doc: Fixed documentation errors.David Boddie2010-06-181-1/+1
|/ / | | | | | | Reviewed-by: Trust Me
* | Add a new qconfig feature GESTURESTasuku Suzuki2010-06-021-0/+5
| | | | | | | | | | Merge-request: 535 Reviewed-by: Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>
* | Don't remove the pixmap from cache when not modifying it.Andreas Aardal Hanssen2010-06-011-2/+4
| | | | | | | | | | | | | | | | Fixes one minor regression in the last commit to QGraphicsIten::scroll: if the expose region doesn't intersect with the cache pixmap, then there's no point in removing it. Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
* | Fix bug in QGraphicsItem::scroll() when called with no QRectF argument.Andreas Aardal Hanssen2010-06-011-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With a null rect argument, QGraphicsItem::scroll() is supposed to scroll the whole item. When using ItemCoordinateCache, currently the only supported mode for scroll optimization, we simple scrolled the whole cache pixmap. Problem: The cache pixmap has a border of 2 pixels. So we scroll the contents _and_ the border. This leaves white/transparent horizontal and vertical line artifacts when scrolling. This change unifies the two cases - partial and full scrolling - into one (shorter) approach that works without scrolling the margin as well. Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
* | Avoid unnecessary detach / deep copy in QGraphicsItem::scroll().Andreas Aardal Hanssen2010-06-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | QGraphicsItem::scroll() scrolls the cache pixmap when cacheMode is enabled (for ItemCoordinateCache only). Because the pixmap exists both in the cache and in a temp QPixmap copy, the ref count is 2, so the scroll operation has to do a deep copy. To avoid this, we remove the pixmap from the cache before and reinsert it again after calling QPixmap::scroll(). Reviewed-by: Alexis Menard <alexis.menard@nokia.com>
* | Wrong QGraphicsItem::childrenBoundingRect() when applying effects.Bjørn Erik Nilsen2010-05-271-3/+3
| | | | | | | | | | | | | | | | | | Problem was that we used the children's raw bounding rect instead of using their effective bounding rect when calculating the bounds. Auto test included. Task-number: QTBUG-10756
* | Fixes QGraphicsItem::scroll issuesBjørn Erik Nilsen2010-05-211-140/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The biggest and most important issue was that QGraphicsItem::scroll always accelerated the scroll without taking overlapping items or opacity into account, which caused drawing artifacts. We can only do accelerated scrolling if the item is opaque and not overlapped by other items. There's no (sane) way to detect whether an item is opaque or not (similar to Qt::WA_OpaquePaintEvent), which means we cannot support accelerated scrolling unless the item is cached into a pixmap (QGraphicsItem::setCacheMode). The second issue was that QStyleOptionGraphicsItem::exposedRect always contained the whole boundinRect() after an accelerated scroll (even with the QGraphicsItem::ItemUsesExtendedStyleOption flag enabled). Auto test included. Task-number: QTBUG-8378, QTBUG-7703 Reviewed-by: yoann
* | Merge remote branch 'origin/4.7' into HEADOlivier Goffart2010-05-191-0/+2
|\ \ | | | | | | | | | | | | Conflicts: src/corelib/tools/qlocale_symbian.cpp
| * \ Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Olivier Goffart2010-05-171-0/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: demos/demos.pro mkspecs/features/resources.prf mkspecs/features/uic.prf src/corelib/io/qurl.cpp src/corelib/tools/qlocale_symbian.cpp src/gui/graphicsview/qgraphicsscene.cpp src/gui/graphicsview/qgraphicswidget_p.cpp src/gui/graphicsview/qgraphicswidget_p.h src/gui/util/qsystemtrayicon_win.cpp src/multimedia/audio/qaudioinput.cpp tests/auto/qhostinfo/qhostinfo.pro
| | * QGraphicsWidget was not working properly when ItemSendsPositionChanges is falseAlexis Menard2010-05-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The geometry was not properly set because QGraphicsWidget rely on itemChange to update its own geometry. Now when calling setPos we also ensure that for a widget the geometry will be up to date. Setting the flag ItemSendsPositionChanges to false for a given widget will give a small performance boost. Reviewed-by:janarve Reviewed-by:bnilsen
| | * Revert "Add a children private property needed for QML to support ↵Alexis Menard2010-03-311-103/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsObject" This reverts commit 4be83fa7337c5a4eb7b0ce085aa5854af5d33252. Conflicts: src/gui/graphicsview/qgraphicswidget.cpp This drops the support of QML on top of 4.6
* | | doc: Fixed many broken links.Martin Smith2010-05-191-16/+16
| | |
* | | Gestures in GraphicsView do not require a viewport to subscribe to gestures.Denis Dzyubenko2010-05-181-8/+6
|/ / | | | | | | | | | | | | | | | | When a graphicsitem subscribes to a gesture the viewport is implicitly subscribed to it as well. Task-number: QTBUG-9849 Reviewed-by: Olivier Goffart Reviewed-by: Mikko Harju
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-05-141-5/+28
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (35 commits) Avoid running animation when loopCount == 0 Set the pictures for the examples of multitouch Compile fix on Windows. Remove an unnecessary assert. Documentation for the Pad Navigator Example. New Pad Nagivator example implementation. Skip definition of wintab functions in case of QT_NO_TABLETEVENT. Made curve tesselation be dynamically adjusted based on transform. Modified QPainter and QPixmap benchmarks to use raster pixmaps. Stabilize tst_QWidgetAction::visibilityUpdate Fix compiler warning in QT_REQUIRE_VERSION Stabilize tst_QColumnView::parentCurrentIndex Really fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux Fix typos in Elastic Nodes example documentation. Made paint engine texture drawing work in GL ES 2 and updated docs. Opt out of visual-config size checks with extension Fix off-by-one in text layouts and widget size hints on Mac Stabilize tst_QDockWidget::taskQTBUG_9758_undockedGeometry Mark QFileDialog::Options as a Q_FLAGS fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux ...
| * \ Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-05-111-5/+28
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.7-integration * '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (24 commits) Stabilize tst_QColumnView::parentCurrentIndex Really fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux Fix typos in Elastic Nodes example documentation. Made paint engine texture drawing work in GL ES 2 and updated docs. Opt out of visual-config size checks with extension Fix off-by-one in text layouts and widget size hints on Mac Stabilize tst_QDockWidget::taskQTBUG_9758_undockedGeometry Mark QFileDialog::Options as a Q_FLAGS fix tst_QDockWidget::taskQTBUG_9758_undockedGeometry on Linux Fixed scrolling bugs in widget graphics effect backend. Fixed source pixmap bug in widget graphics effect backend. Fix crash with stylesheet if widget change style in the changeEvent Fix textdrawing under GL on N900. Fixed bug in QIODevice::read after first reading 0 bytes. Fix auto-test failure on Mac/Linux/QWS. Some EGL implementations does not return a EGLNativeDisplayType Fixed the sizing of the dock area with fixed size dock widgets QSortFilterProxyModel: Warning or assert failure Performance issue with QGraphicsItem::ItemClipsChildrenToShape. Fixes crash in QGraphicsItem::mouseMove for untransformable items. ...
| | * | Performance issue with QGraphicsItem::ItemClipsChildrenToShape.Bjørn Erik Nilsen2010-05-051-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the child rect is bigger than the parent rect and parent has the ItemClipsChildrenToShape flag set, then by updating the child, the whole child rect is marked as dirty, resulting in a much larger update area than required. This has a major impact on performance in Orbit/HB, where e.g. item-views typically consist of a container item that clips its children/items to shape. See attached video in QTBUG-9024. Auto test included. Task-number: QTBUG-9024
| | * | Fixes crash in QGraphicsItem::mouseMove for untransformable items.Bjørn Erik Nilsen2010-05-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Caused by: 253b87180e0a6c5db0feaaed7e321139c4ff1643 Reviewed-by: Yoann