summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup after "QGraphicsWidget is painted twice on the first show"Bjørn Erik Nilsen2010-02-041-1/+0
| | | | | | | | Commit: dda8a57c085216db609f822837c50bae38006b4e We don't want to reset 'updateAll' at that point, for the same reason as mentioned in the above commit. More details in the task. Task-number: QTBUG-6956
* QGraphicsWidget is painted twice on the first show.Bjørn Erik Nilsen2010-02-031-1/+6
| | | | | | | | | | | We want to discard all update requests when we there's a full update pending. The problem was that 'updateAll' was reset too early causing update requests to fall through. To prevent this from happening we reset 'updateAll' right before the items are actually painted. Auto-test included. Task-number: QTBUG-6956
* QGraphicsScene: Use QPainter::setClipRect instead of setClipPath if possible.Bjørn Erik Nilsen2010-02-031-3/+15
| | | | | | | | Using QPainter::setClipPath results in complex (and slow) alphamasking so this must be avoided if possible. Task-number: QTBUG-7790 Reviewed-by: samuel
* Fixes missing update when setting opacity on an item that had opacity 0.0Leonardo Sobral Cunha2010-01-291-0/+3
| | | | | | | | | | | We need to set the paintedViewBoundingRectsNeedRepaint flag when an item becomes visible again because when the item has opacity 0.0 the paintedViewBoundingRects struct can get set as outside of viewport, so the next time the item is set to visible again we need to diregard this cached data (otherwise the item will not be updated). Task-number: QTBUG-7714 Reviewed-by: bnilsen
* Avoids missing opacity updates by not propagating the ignoreOpacity flagLeonardo Sobral Cunha2010-01-291-1/+1
| | | | | | | | | | | | | | When doing a full update of a parent item, by setting one of these flags, QGraphicsItem::ItemIgnoresTransformations | ItemClipsChildrenToShape | ItemIsSelectable, the child items that were transparent would not be shown when setting their respective opacity to 1.0 We just need to set the ignoreOpacity flag when setting opacity to 0.0. This avoids propagating this flag to the child items when it's not needed. Task-number: QT-2653 Reviewed-by: bnilsen
* Adds convenience functions QGraphicsItemPrivate::isOpacityNullLeonardo Sobral Cunha2010-01-293-7/+14
| | | | | | | This should unify the error constant used along the code and enforce qreal to avoid unnecessary double conversions. Reviewed-by: bnilsen
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6Martin Smith2010-01-283-4/+9
|\
| * Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6-os1Prasanth Ullattil2010-01-283-4/+9
| |\ | | | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsscene.cpp
| | * Avoid call markParentDirty twice in prepareGeometryChangeLeonardo Sobral Cunha2010-01-273-4/+9
| | | | | | | | | | | | Reviewed-by: bnilsen
| | * Fixes visibility update missing when doing setParentItem on graphicsitemLeonardo Sobral Cunha2010-01-263-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling setParentItem is causing the previous opacity/visible updates to be discarded because the dirty flags were not propagated to the new parent. Also removed some unnecessary 'markDirty' and 'update' calls. Task-number: QTBUG-6738 Reviewed-by: bnilsen
| | * Added optimization flag to QGraphicsItemPrivate.Samuel Rødal2010-01-252-0/+25
| | | | | | | | | | | | | | | | | | | | | Avoid traversing the whole child hierarchy when opacity changes unless there are children with graphics effects. Reviewed-by: Bjørn Erik Nilsen
| | * Fixed child items with graphics effects not inheriting opacity.Samuel Rødal2010-01-252-4/+25
| | | | | | | | | | | | | | | | | | | | | We need to invalidate the graphics source pixmap cache for both child items and parent items when changing the opacity of a graphics item. Reviewed-by: Bjørn Erik Nilsen
| | * Potential crash when adding items from QGraphicsWidget::polishEvent().Bjørn Erik Nilsen2010-01-222-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were processed immediately, so there was a fair chance that we could end up doing a virtual function call on items that were not fully constructed. This patch is also an optimization, since we never remove anything from the vector. Auto-test included. Reviewed-by: Jan-Arve
| | * QGraphicsWidget is painted twice on the inital show.Bjørn Erik Nilsen2010-01-223-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem occured when doing something in the polishEvent() which eventually ended up as an update(). The problem was that in QGraphicsScene::addItem we scheduled a polish event after scheduling an update, resulting in update requests being processed before polish requests. Auto-test included. Task-number: QTBUG-6956 Reviewed-by: alexis
| | * Only send QGraphicsItem::ParentChange(d) notifications from setParentItem.Bjørn Erik Nilsen2010-01-213-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QmlGraphicsItem doesn't need any parent change notifactions so we can call the helper class (QGraphicsItemPrivate::setParentItemHelper) direclty from QmlGraphicsItem::setParentItem. This avoids a lot of unnecessary instructions related to QVariant constructions as well as virtual function calls. I've made the variant pointers explicit in the declaration of setParentItemHelper so that we don't accidentally call setParentItemHelper from places where we need parent change notifications. Task-number: QTBUG-6877 Reviewed-by: alexis
| | * Pass value as const void *const to QGraphicsSceneIndex::itemChange.Bjørn Erik Nilsen2010-01-215-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We need this change in order to bypass some of the QVariant itemChange notifications from QGraphicsItem::setParentItem. All this is internal stuff and we know what we do, so I don't consider the change too ugly. Task-number: QTBUG-6877 Reviewed-by: alexis
| | * Optimize QGraphicsItem::setFlags.Bjørn Erik Nilsen2010-01-211-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | We don't have to do a full blown QGraphicsItem::setFlag call from QGraphicsItem::setFlags, only to change the ItemStacksBehindParent bits. We can do it directly (with care). Task-number: QTBUG-6877 Reviewed-by: alexis
| | * Optimize QGraphicsScenePrivate::itemAcceptsHoverEvents_helperBjørn Erik Nilsen2010-01-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Make sure we do cheap tests before the more expensive ones. This function is called from QGraphicsScene::addItem. Task-number: QTBUG-6877 Reviewed-by: alexis
| | * Improve performance of QGraphicsItem::setParentItem.Bjørn Erik Nilsen2010-01-213-35/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | The biggest optimization here is "updateAncestorFlags()". It's much faster to update all the flags rather than trying to enable/disable certain flags according to the current state. Task-number: QTBUG-6877 Reviewed-by: alexis
* | | doc: Fixed the last qdoc errors.Martin Smith2010-01-281-8/+9
|/ /
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6Martin Smith2010-01-288-135/+254
|\ \
| * | Fixes visibility update missing when doing setParentItem on graphicsitemLeonardo Sobral Cunha2010-01-273-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling setParentItem is causing the previous opacity/visible updates to be discarded because the dirty flags were not propagated to the new parent. Also removed some unnecessary 'markDirty' and 'update' calls. Task-number: QTBUG-6738 Reviewed-by: bnilsen
| * | Added optimization flag to QGraphicsItemPrivate.Samuel Rødal2010-01-272-0/+25
| | | | | | | | | | | | | | | | | | | | | Avoid traversing the whole child hierarchy when opacity changes unless there are children with graphics effects. Reviewed-by: Bjørn Erik Nilsen
| * | Fixed child items with graphics effects not inheriting opacity.Samuel Rødal2010-01-272-4/+25
| | | | | | | | | | | | | | | | | | | | | We need to invalidate the graphics source pixmap cache for both child items and parent items when changing the opacity of a graphics item. Reviewed-by: Bjørn Erik Nilsen
| * | Potential crash when adding items from QGraphicsWidget::polishEvent().Bjørn Erik Nilsen2010-01-272-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were processed immediately, so there was a fair chance that we could end up doing a virtual function call on items that were not fully constructed. This patch is also an optimization, since we never remove anything from the vector. Auto-test included. Reviewed-by: Jan-Arve
| * | QGraphicsWidget is painted twice on the inital show.Bjørn Erik Nilsen2010-01-273-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem occured when doing something in the polishEvent() which eventually ended up as an update(). The problem was that in QGraphicsScene::addItem we scheduled a polish event after scheduling an update, resulting in update requests being processed before polish requests. Auto-test included. Task-number: QTBUG-6956 Reviewed-by: alexis
| * | Only send QGraphicsItem::ParentChange(d) notifications from setParentItem.Bjørn Erik Nilsen2010-01-273-20/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QmlGraphicsItem doesn't need any parent change notifactions so we can call the helper class (QGraphicsItemPrivate::setParentItemHelper) direclty from QmlGraphicsItem::setParentItem. This avoids a lot of unnecessary instructions related to QVariant constructions as well as virtual function calls. I've made the variant pointers explicit in the declaration of setParentItemHelper so that we don't accidentally call setParentItemHelper from places where we need parent change notifications. Task-number: QTBUG-6877 Reviewed-by: alexis
| * | Pass value as const void *const to QGraphicsSceneIndex::itemChange.Bjørn Erik Nilsen2010-01-275-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | We need this change in order to bypass some of the QVariant itemChange notifications from QGraphicsItem::setParentItem. All this is internal stuff and we know what we do, so I don't consider the change too ugly. Task-number: QTBUG-6877 Reviewed-by: alexis
| * | Optimize QGraphicsItem::setFlags.Bjørn Erik Nilsen2010-01-271-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | We don't have to do a full blown QGraphicsItem::setFlag call from QGraphicsItem::setFlags, only to change the ItemStacksBehindParent bits. We can do it directly (with care). Task-number: QTBUG-6877 Reviewed-by: alexis
| * | Optimize QGraphicsScenePrivate::itemAcceptsHoverEvents_helperBjørn Erik Nilsen2010-01-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Make sure we do cheap tests before the more expensive ones. This function is called from QGraphicsScene::addItem. Task-number: QTBUG-6877 Reviewed-by: alexis
| * | Improve performance of QGraphicsItem::setParentItem.Bjørn Erik Nilsen2010-01-273-35/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | The biggest optimization here is "updateAncestorFlags()". It's much faster to update all the flags rather than trying to enable/disable certain flags according to the current state. Task-number: QTBUG-6877 Reviewed-by: alexis
* | | doc: Document the "Type" enum value as a const in variable.Martin Smith2010-01-281-0/+11
|/ / | | | | | | Task-number: QTBUG-7605
* | doc: Included a note showing the actual value of UserType.Martin Smith2010-01-271-0/+2
|/ | | | Task-number: QTBUG-7606
* QGraphicsItem::hasFocus() performance regression.Bjørn Erik Nilsen2010-01-201-1/+8
| | | | | | | | Problem was that we always climbed the parent chain to look for a panel item (QGraphicsItem::isActive()) before checking the scene's focus item. Task-number: QTBUG-6749 Reviewed-by: alexis
* Improved performance of translating device coordinate graphics effects.Samuel Rødal2010-01-133-18/+52
| | | | | | | | Don't invalidate the cache if we're only translating and the effect rect is fully contained within the device rect of the painter. Task-number: QTBUG-6901 Reviewed-by: Bjørn Erik Nilsen
* Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into 4.6Simon Hausmann2010-01-082-6/+12
|\ | | | | | | | | Conflicts: src/multimedia/audio/qaudioformat.cpp
| * Fix performance regression in _q_polishItems.Alexis Menard2010-01-072-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QSet is a hash internally, using Iterator::begin while erasing elements inside the set might create holes and then the complexity increase. We now use the return value of erase (the next element) so the complexity is linear. For those who create/delete item in the polish event (BAD), _q_polishItem might be slower than the normal call. Task-number:QTBUG-6958 Reviewed-by:olivier
* | Fixes a crash when destroying and creating QApplication.Denis Dzyubenko2010-01-071-4/+6
| | | | | | | | | | | | | | | | Moved the gestureManager pointer to a QApplicationPrivate to make sure if QApplication object is destroyed, QGestureManager pointer is set to zero. Task-number: QTBUG-7029 Reviewed-by: Thiago
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2010-01-0751-51/+51
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QIODevice: Fix readAll() Temporary hackiesh solution to prevent BOM in the xml data. Fixed qxmlstream autotest when using shadow builds. Attempt at readding the capital P headers for Phonon Remove special Phonon processing from syncqt. Use the lowercase/shortname.h headers for Phonon includes Fixes a crash when setting focus on a widget with a focus proxy. Update copyright year to 2010 doc: Clarified activeSubControls and subControls. Remove warning "statement with no effect" doc: Clarified that .lnk files are System files on Windows.
| * Update copyright year to 2010Jason McDonald2010-01-0651-51/+51
| | | | | | | | Reviewed-by: Trust Me
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2010-01-063-4/+15
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: (42 commits) QBoxLayout::setGeometry would not respect the widget min/max width Revert "QStyleSheetStyle: Fixed some text croped when having padding with native border." Use QFile:rename when moving items in QFileystemModel. Revert "Add GLfloat[2][2] & GLfloat[3][3] uniform setters to QGLShaderProgram" Fix default filter selection when using HideNameFilterDetails option. Don't write out fo:word-spacing if its the default value. Improved initial startup time for a QGLWidget ontop of EGL/X11. Document the QGraphicsView::IndirectPainting flag Display broken symlinks in the filesystem model. Fix typo in autotest testcase name. Fixed a bug with distribution of spans. Make unit test more robust Compile with QT_NO_DOCKWIDGET Removed temporary QGLWidget created during QGLWidget/X11 initialization. Fix test: The bug is now fixed Fix auto-test failure on Windows QScript: Lookup the native setter from the prototype Implement QScript::QObjectDelegate::getOwnPropertyDescriptor fix compilation in GL2 paint engine for Windows Move QGLTextureGlyphCache into it's own file ...
| * Document the QGraphicsView::IndirectPainting flagOlivier Goffart2010-01-062-1/+11
| | | | | | | | | | | | And that the QGraphics{View,Scene}::drawItems function are now obsolete. Reviewed-by: Alexis
| * Merge branch 'QT-2261' into 4.6Jan-Arve Sæther2010-01-051-2/+2
| |\
| | * Fixed a bug with distribution of spans.Jan-Arve Sæther2010-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a span required more size than the rows/columns it spanned, the size of the span was not distributed to the rows it spanned. The result was that the size hints of the layout was not correct, causing the layout to be potentially smaller than the spanning item. Task: QT-2261 Reviewed-by: Alexis
| * | Fixes painting artifacts when using CacheBackground in a QGraphicsView.Yoann Lopes2009-12-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that when the background cache was invalidated, it was entirely recreated but only the exposed area of the view was repainted in it, causing the cache to be partly empty in some cases. Now the background cache is always fully repainted when it is invalidated. Task-number: QTBUG-6935 Reviewed-by: ogoffart
* | | doc: Clarified that the scene owns its items and destroys them.Martin Smith2010-01-061-11/+17
|/ / | | | | | | Task-number: QTBUG-6637
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into ↵Qt Continuous Integration System2009-12-181-3/+16
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fixed QPixmap::load() to not modify referenced copies. Fixes bug when using AnchorUnderMouse for GraphicsView transformation. Make the layout{,AboutToBe}Changed signals in the QSortFilterProxyModel match its source. Make sure mappings are created for columns when indexes newly become parents. NEON configure detection and initial blend function implementations. Optimize QThreadStorage with QVector Add Q_OBJECT to QBalloonTip so it can be intreospected by styles.
| * | Fixes bug when using AnchorUnderMouse for GraphicsView transformation.Yoann Lopes2009-12-181-3/+16
| |/ | | | | | | | | | | | | | | | | | | | | We now automatically enable mouse tracking on the viewport of the GraphicsView when setting AnchorUnderMouse as transformationAnchor or resizeAnchor. Autotest included. Task-number: QTBUG-6835 Reviewed-by: bnilsen
* | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-team into ↵Qt Continuous Integration System2009-12-181-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | 4.6-integration * '4.6' of scm.dev.nokia.troll.no:qt/qt-multimedia-team: Check if the scene exists before attempting to set its focus item. The "audioinput" multimedia example locks up the audio input/output no audiodevices found using QAudioDeviceInfo::availableDevices on Ubuntu
| * Check if the scene exists before attempting to set its focus item.Michael Brasser2009-12-181-1/+1
| | | | | | | | | | | | | | Prevents crashing when an item involved in the scope chain is set to be visible but it isn't part of a scene. Reviewed-by: Alexis Menard