summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtmae2009-04-0940-2195/+546
|\
| * QTextEdit character are lost after special characters like ^ ´ `Prasanth Ullattil2009-04-085-5/+50
| | | | | | | | | | | | | | | | | | | | This happens only on keyboard layouts like French. The is mainly due to the key event processing done by the Input manager. In carbon, the key down event has to be replayed after the input manager finishes his processing. In Cocoa, while unmarking we have to accept the current text. Task-number: 123740 Reviewed-by: nrc
| * Refactor the palette and opacity change into a separate function.Norwegian Rock Cat2009-04-082-14/+24
| | | | | | | | | | | | | | | | We can save on some creation and only show the container when we really need to. It does mean that we need to ensure that everything is correct on construction as well. It's now factored into another file. Reviewed-by: Jens Bache-Wiig
| * Rename qIsFuzzyNull to qFuzzyIsNullBjoern Erik Nilsen2009-04-0817-92/+92
| | | | | | | | | | | | | | | | | | | | The function was added in fde7f3d03782c801901f511131458d6fcb1021a5 and we believe qFuzzyIsNull is a better naming and more in line with qFuzzyCompare. Reviewed-by: Lars Knoll Reviewed-by: nrc Reviewed-by: Samuel
| * Use qIsFuzzyNull rather than the more expensive qFuzzyCompareBjoern Erik Nilsen2009-04-0813-74/+74
| | | | | | | | | | | | | | See also fde7f3d03782c801901f511131458d6fcb1021a5 Reviewed-by: Olivier Reviewed-by: Samuel
| * Merge branch 'no-math3d-fixed'Rhys Weatherley2009-04-0817-2084/+380
| |\
| | * Remove fixed-point support from math3dRhys Weatherley2009-04-0817-2084/+380
| | | | | | | | | | | | | | | | | | | | | | | | | | | The main use case for fixed-point support is to build large arrays of vertices. This can be handled using qvertextype or something similar at higher levels. So it isn't worth risking numerical instability in the core classes. Reviewed-by: trustme
* | | Default text width before QPlainTextEdit was shown for the first timemae2009-04-091-1/+6
|/ / | | | | | | | | QTextEdit fakes an infinite width, while QPlainTextEdit defaulted to 0. This was discovered in creator's auto tests.
* | Disable mouse tracking in QGraphicsView if possible.Bjoern Erik Nilsen2009-04-075-2/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need mouse tracking unless there are items in the scene that either accept hover events or have a cursor set. This cut-off is extremely efficient in the common case since all items ignore hover events and use the standard cursor by default. We no longer dig for items and do lots of intersection and calculating just for fun :-) We even get rid of the overhead of 2 x QCoreApplication::sendEvent! The next step is to optimize the items(*) functions to simply check for hasCursor()/acceptsHoverEvents() before we do complex checks like intersects/collidesWithPath() etc. Auto test included. Reviewed-by: Andreas
* | Use qIsFuzzyNull rather than qFuzzyCompareBjoern Erik Nilsen2009-04-073-7/+7
| | | | | | | | | | qIsFuzzyNull is much cheaper than qFuzzyCompare, and in this case qIsFuzzyNull will do the trick.
* | Optimise QMatrix and QTransformLars Knoll2009-04-074-89/+220
| | | | | | | | | | | | Add some private inline constructors and do inlining other places. All test still pass.
* | Optimize QGraphicsItem::map(To|From)Parent(const QPainterPath)Bjoern Erik Nilsen2009-04-071-4/+6
| | | | | | | | | | | | | | | | Now that we have QPainterPath::translate, we can use that instead of itemTransform()/map(To|From)Scene, which lowers the number of QTransform operations involved. Reviewd-by: Andreas
* | Added copyright headers for the new QWS keymap handling filesRobert Griebl2009-04-076-584/+108
| | | | | | | | | | | | | | Also removed the old obsolete qkbpc101_qws files. Somehow this removal got lost in the rebase before the keyboard handler refactoring commit. Reviewed-by: TrustMe
* | compile fix with namespaceshjk2009-04-071-3/+3
| |
* | Wrong merge after 6e13559503040963c28dd8f5b6881e3a2b9d5596.Bjoern Erik Nilsen2009-04-071-8/+8
| | | | | | | | | | | | | | | | | | Do not update the cache's exposed list if the entire cache is already exposed. Makes tst_QGraphicsItem::cacheMode pass again. Reviewed-by: Andreas
* | Merge commit 'origin/4.5'Bjoern Erik Nilsen2009-04-0724-497/+1038
|\ \ | |/ |/| | | | | | | | | | | Conflicts: src/gui/graphicsview/qgraphicsitem.cpp src/gui/graphicsview/qgraphicsitem_p.h src/gui/graphicsview/qgraphicsscene.cpp src/gui/painting/qtransform.cpp
| * BT: Compile without QT3SUPPORTJens Bache-Wiig2009-04-071-1/+1
| | | | | | | | Reviewed-by: ogoffart
| * Compile.Norwegian Rock Cat2009-04-071-1/+1
| | | | | | | | | | | | Looks like a typo. Reviewed-by: Bradley T. Hughes
| * BT: Fix regression when tooltips dissappear suddenly in Unified toolbarNorwegian Rock Cat2009-04-073-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWidget::childAt() makes some assumptions about its children (they are all contained in its geometry). This does not hold up when using the unified toolbar because the toolbar ends up in the "non-client" area. So, when dispatching an enter/leave event in tooltip show, we end up dispatching to the wrong widgets and that results in the tooltip cleverly thinking that it needs to hide itself because we've left the widget that needs the tooltip. I've special cased this by just having a "native" mapFromParent() that is only called for on the mac, though there is nothing that is limiting this from being called on other platfroms. Also QWidget::mapFromParent() probably needs to be looked at at some point. Task-number: 248048 Reviewed-by: Richard Moe Gustavsen
| * Adds a few \warnings to the docs on do-not-use-for-performance-reasonsGunnar Sletta2009-04-074-5/+43
| | | | | | | | Reviewed-by: Trond
| * Fixes: Calling repaint() during a top-level resizeGunnar Sletta2009-04-071-10/+14
| | | | | | | | | | | | | | | | | | RevBy: bnilsen Task: 249394 Details: When going through the backingstore a repaint in a toplevel resize should just discard the repaint() as it will repaint shortly after anyway. This is in line with the implementation of update().
| * Fixes: Make drawPixmap as fast as drawImage on rasterRGunnar Sletta2009-04-072-34/+68
| | | | | | | | | | | | RevBy: Samuel Details: The IMAGE_FROM_PIXMAP has to be doing a local copy or something, because it is sure not fast...
| * Fixes: Make drawPixmap slightly more optimal for QPaintEngineExGunnar Sletta2009-04-071-3/+6
| | | | | | | | RevBy: Samuel
| * BT: Fixed treeview painting regression on VistaJens Bache-Wiig2009-04-061-6/+14
| | | | | | | | | | | | | | | | | | | | | | The old code did not split up the frame from the central parts of the itemview selection box correctly. We now draw the edges as border images instead. Previously this would lead to somewhat ugly scaling artifacts for small header sections. Task: 248839 Reviewed-by: ogoffart
| * BT: Fix combobox background color regressionJens Bache-Wiig2009-04-062-9/+5
| | | | | | | | | | | | | | | | | | There was a regression in the background color for QComboBox popups. This should resolve it. It essentially tells the system to stay off the system palette while QGtkStyle is used. We will introduce a cleaner style hint for this in 4.6. Reviewed-by: nrc
| * Fixup update rect regression by adjusting expose rectangles.Andreas Aardal Hanssen2009-04-061-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change shows a limitation in Graphics View caused by QPen's default width being 0 (cosmetic), while Graphics View actually does not support cosmetic pens at all. Because items are at risk of drawing lines that poke 1 pixel outside their bounding rect, QGraphicsView must look for items that are up to one pixel larger than their bounding rect mapped to viewport coordinates. Furthermore, mapToScene(QRect) forces us to adjust the input rectangle by (0, 0, 1, 1), because it uses QRect::bottomRight() (etc) when mapping the rectangle to a polygon (which is _wrong_). Since this behavior has been there since 4.2, we don't want to fix it in a 4.5 patch release... The only _proper_ fix to this problem is for the view to know the item's "adjust" in device coordinates, allowing items to use cosmetic pens freely. Fex, we could introduce QGraphicsItem::viewportMargins() or so. Added an autotest to ensure this doesn't break again. Reviewed-by: bnilsen
| * Fixes: Wrong adjustment of rect added in ↵Bjoern Erik Nilsen2009-04-061-3/+2
| | | | | | | | | | | | | | | | | | | | 0aa2ef27249dc8e782c2942340776bb19de80a0d RevBy: TrustMe AutoTest: tst_QGraphicsItem::boundingRegion() pass again Details: The original code adjusted the QRect version of a mapped bounding rect, wheras my patch adjusted a mapped bounding rect (QRectF) and then converted it to a QRect.
| * Fixes: We have to adjust the item's bounding rect.Bjoern Erik Nilsen2009-04-061-2/+16
| | | | | | | | | | | | | | | | RevBy: Andreas AutoTest: Still pass Details: QRectF::intersects does not work with flat rectangles, so we cannot intersect the bounding rect without adjusting it first.
| * Fixes: Optimize the way we adjust rectangles.Bjoern Erik Nilsen2009-04-062-47/+68
| | | | | | | | | | RevBy: Olivier AutoTest: Still pass
| * Fixes: Partially revert 9b0af2395c84a6895a5ce6368f151d4ec00c8755Bjoern Erik Nilsen2009-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | RevBy: Andreas AutoTest: tst_QGraphicsView::itemAt2 pass again Details: A QPoint in the view has to be mapped to a pixel in the scene, otherwise it won't be possible to e.g. click on items that are smaller than a pixel. So...we have to optimize the hit-testing code in another way
| * Fixes: Minimize QVariant overhead related to QGraphicsItem::itemChange.Bjoern Erik Nilsen2009-04-062-43/+51
| | | | | | | | | | RevBy: Andreas AutoTest: included
| * Optimise QPainterPath::contains(QPointF)Lars Knoll2009-04-061-1/+1
| | | | | | | | | | | | We can shortcut quite some calculations for the common case by first checking whether the point is contained in the control point rect.
| * Optimise QGraphicsScene/View::items(const QPointF &pos)Lars Knoll2009-04-063-14/+88
| | | | | | | | | | Implement specialized (and more efficient versions) of item_helper() and child_helper() that test for QPointF in the scene.
| * Fixes: Simplify the cut-offs and be more agressive :-)Bjoern Erik Nilsen2009-04-063-42/+68
| | | | | | | | | | AutoTest: Still pass. Details: It's easier to read and understand the code now.
| * Fixes: Discard update requests if possible.Bjoern Erik Nilsen2009-04-062-10/+35
| | | | | | | | | | | | | | | | AutoTest: Still pass. Details: Update requests can be discarded if the item itself is clipped away and the item clips all its children to shape. This cut-off is extremely effective (and aggressive:))
| * Fixes: Don't bother updating hidden items.Bjoern Erik Nilsen2009-04-062-1/+4
| | | | | | | | AutoTest: Still pass
| * Fixes: Do not update children if not required.Bjoern Erik Nilsen2009-04-061-1/+2
| | | | | | | | AutoTest: Still pass
| * Fixes: Don't check the force boolean.Bjoern Erik Nilsen2009-04-061-1/+1
| | | | | | | | Details: It's clipped away regardless.
| * Fixes: Minimize QVariant constr/destr in setPosHelper.Bjoern Erik Nilsen2009-04-061-2/+3
| | | | | | | | RevBy: TrustMe
| * Fixes: Optimize QGraphicsViewPrivate::itemUpdated.Bjoern Erik Nilsen2009-04-061-21/+19
| | | | | | | | | | | | | | AutoTest: Still pass Details: Get rid of QTransform::inverted()/operator*= and do nothing if the item clips all its children and the update rect is outside the bounding rect.
| * Fixes: Discard update requests if possible.Bjoern Erik Nilsen2009-04-063-21/+44
| | | | | | | | | | | | | | | | AutoTest: Still pass. Details: Update requests can be discarded if the item itself is clipped away and the item clips all its children to shape. This cut-off is extremely effective (and aggressive:))
| * Fixes: Don't bother processing items that are clipped away.Bjoern Erik Nilsen2009-04-062-52/+67
| | | | | | | | RevBy: Andreas
| * Fixes: Optimization: Clip path is empty if the bounding rect is empty.Bjoern Erik Nilsen2009-04-061-1/+10
| | | | | | | | RevBy: TrustMe
| * Fixes: Clever invalidating of the cached clip path.Bjoern Erik Nilsen2009-04-062-13/+129
| | | | | | | | | | | | | | | | RevBy: Andreas AutoTest: still pass Details: Adds emptyClipPath bit, a cut-off to test if the item has an empty clip path (i.e., is clipped away). Also adds code for invalidating the cache from inside setPos().
| * Fixes: Compile on funky scratchbox ARM compiler.Bjoern Erik Nilsen2009-04-061-1/+1
| |
| * Fixes: Get rid of lots of calls to qFuzzyCompare.Bjoern Erik Nilsen2009-04-062-3/+9
| | | | | | | | | | | | | | RevBy: Olivier AutoTest: Still pass. Details: Items usually don't have effective opacity, i.e. it is 1.0, so don't bother doing fuzzy compare if that's the case.
| * Fixes: Only use the parent's cached clip path if it is clipped.Bjoern Erik Nilsen2009-04-061-2/+3
| | | | | | | | | | RevBy: TrustMe Details: ...otherwise it'll be empty and too much will be clipped away.
| * Add a cut-off for simple rectangle lookups.Andreas Aardal Hanssen2009-04-061-0/+5
| | | | | | | | | | | | | | | | Make sure we use the rect-variation of QGraphicsScene's item lookup functions if the view has a simple transform and a simple expose region. Reviewed-by: Bjoern Erik Nilsen <bjorn.nilsen@nokia.com>
| * Fixes: Cleanup/Optimize QGraphicsView::findItems.Bjoern Erik Nilsen2009-04-063-115/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | RevBy: Alexis AutoTest: Still pass Details: findItems() does almost exactly the same as QGraphicsView::items, the only difference is that it checks whether we are about to redraw all items. Next step is to optimize the items_helper functions. The patch does also include a fix for ::items/childItems_helper(const QPainterPath ...); it didn't take Qt::Intersects/ContainsItemBoundingRect into account (in the same fashion as we do in the other helper functions).
| * Fixes: Optimization: Cache QGraphicsItem::clipPath().Bjoern Erik Nilsen2009-04-062-7/+53
| | | | | | | | | | | | RevBy: Alexis AutoTest: Still pass Details: No-brainer.