summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* Simplify the QTransform calculations.Andreas Aardal Hanssen2009-06-091-35/+11
|
* Ooops. Compile :)Bjørn Erik Nilsen2009-06-091-1/+1
|
* Only call qgetenv("QGRAPHICSVIEW_DIRECT") once.Bjørn Erik Nilsen2009-06-091-3/+2
|
* More re-factoring of Graphics View's update mechanism.Bjørn Erik Nilsen2009-06-094-83/+185
| | | | | | | | | This time with a recursive approach of processing dirty items. I've kept the previous approach using a dirty list, but the recursive one is now the default. Use QT_GV_USE_DIRTY_LIST=1 to swap. I've also cached the item's device transform in both cases so that we can re-use it later when drawing the item.
* Introduce QGraphicsItem::ItemHasNoContents.Andreas Aardal Hanssen2009-06-091-2/+2
| | | | | | | | | | | This flag helps optimize the case where an item is used only as a transformation node in a scene graph, and where the item itself doesn't paint anything. This is the default for FxItem (the subclasses that do paint enable the HasContents flag). This lets Graphics View know whether there's any point in setting up the world transform, opacity and other things. Reviewed-by: Lars
* fix a small logic bug in childrenCombineOpacityLars Knoll2009-06-091-1/+3
| | | | Regression introduced during refactoring earlier today.
* remove now unused flagLars Knoll2009-06-091-2/+2
|
* smaller optimisation in setTransformLars Knoll2009-06-091-8/+2
|
* simplify opacity handling in QGraphicsItemLars Knoll2009-06-091-4/+2
| | | | | | | | | Greatly simplify how we handle opacity and store it as a member in QGraphicsItemPrivate. Remove the caching of effectiveOpacity. It's faster to calculate it on the fly, and the recursive painting algorithm will make even that need go away. Reviewed-by: Andreas
* get rid of the hasTransform flag in QGraphicsItemLars Knoll2009-06-092-235/+9
| | | | | | | | Since the transform is now a pointer in QGraphicsItemPrivate, we can use this pointer directly and there's no need for a separate bitflag anymore. Reviewed-by: Andreas
* Remove scene transform cache from QGraphicsItem.Andreas Aardal Hanssen2009-06-091-0/+232
| | | | | | | | | Now that we have a recursive painting algorithm these types of optimizations are no longer necessary. In fact they only cause more problems and clutter up the code unnecessarily. Removing this also removes extra overhead from moving and transforming items. Reviewed-by: Lars
* Introduce QGraphicsItem::ItemHasNoContents.Andreas Aardal Hanssen2009-06-094-13/+32
| | | | | | | | | | | This flag helps optimize the case where an item is used only as a transformation node in a scene graph, and where the item itself doesn't paint anything. This is the default for FxItem (the subclasses that do paint enable the HasContents flag). This lets Graphics View know whether there's any point in setting up the world transform, opacity and other things. Reviewed-by: Lars
* fix a small logic bug in childrenCombineOpacityLars Knoll2009-06-091-1/+3
| | | | Regression introduced during refactoring earlier today.
* greatly speed up QTransform::mapRect() for projective transformsLars Knoll2009-06-091-10/+2
| | | | | | | | | The code so far was converting the rect to a painterpath, mapping that one and then taking the bounding rect. It is actually sufficient to simply map the four corners of the rectangle and take the bounding rect of these four points even in the projective case. Reviewed-by: Andreas
* remove now unused flagLars Knoll2009-06-091-9/+1
|
* smaller optimisation in setTransformLars Knoll2009-06-091-22/+18
|
* simplify opacity handling in QGraphicsItemLars Knoll2009-06-092-111/+31
| | | | | | | | | Greatly simplify how we handle opacity and store it as a member in QGraphicsItemPrivate. Remove the caching of effectiveOpacity. It's faster to calculate it on the fly, and the recursive painting algorithm will make even that need go away. Reviewed-by: Andreas
* get rid of the hasTransform flag in QGraphicsItemLars Knoll2009-06-094-54/+48
| | | | | | | | Since the transform is now a pointer in QGraphicsItemPrivate, we can use this pointer directly and there's no need for a separate bitflag anymore. Reviewed-by: Andreas
* Remove scene transform cache from QGraphicsItem.Andreas Aardal Hanssen2009-06-094-78/+10
| | | | | | | | | Now that we have a recursive painting algorithm these types of optimizations are no longer necessary. In fact they only cause more problems and clutter up the code unnecessarily. Removing this also removes extra overhead from moving and transforming items. Reviewed-by: Lars
* simplify and cleanup handling of transformations in QGraphicsItemLars Knoll2009-06-094-464/+23
| | | | | | | | | | | Removed some experimental code to handle scaling and rotating around different axis. It cuased setTransform and transform not to behave symmetrically and caused some performance regressions. Additionally moved the QTransform out of the (relatively slow) extra list and made it a pointer in QGraphicsItemPrivate. Reviewed-by: Andreas
* Massive re-factoring of Graphics View's update mechanism.Bjørn Erik Nilsen2009-06-098-378/+250
| | | | | | | | | | | This is work-in-progress, so don't expect everything to work perfectly. Most of the auto-test pass and examples and demos seem to run fine. Unfortunately I'm too tired to write about the actual update mehanism now, but it's faster than the old approach (if that helps:)). There's more to optimize, but I'll come back to that later. I need some sleep now :) To be continued.
* Cache QGraphicsItem::childrenBoundingRect.Bjørn Erik Nilsen2009-06-092-1/+19
| | | | We'll need this later when making a smarter update mechanism.
* Further optimizations, from the simple canvas rendering logics.Andreas Aardal Hanssen2009-06-093-57/+63
|
* Minor optimizations.Andreas Aardal Hanssen2009-06-091-8/+7
|
* Fix optimization flags and opacity.Andreas Aardal Hanssen2009-06-093-15/+35
|
* Add recursive drawing method to QGraphicsScene. For now it's opt-in, butAndreas Aardal Hanssen2009-06-094-15/+107
| | | | | | the important thing is by effectively implementing Simple Canvas' approach to drawing, we're in theory (and in practise measured on the desktop) as fast as Simple Canvas when rendering.
* Fixed compile with MinGW 3.4.Rohan McGovern2009-06-091-2/+2
| | | | | | | This compiler doesn't seem to follow the same rule as others for implicit conversions to/from wchar_t. Add the necessary casts, keeping in mind that sizeof(wchar_t) == 2 on Windows.
* openUrl("mailto:") fails to open Thunderbird on windows.Prasanth Ullattil2009-06-081-36/+28
| | | | | | | | | | | Thunderbird sets only the user level shell association for mailto. This is now being read before the default mail application registry. The registry crawling could have been avoided by using the ShellExecute() but it supports only around 2KBytes of data as parameter, so we will continue using CreateProcess(). Task-number: 251554 Reviewed-by: Jens Bache-Wiig
* Clip region to screen coordinates before setting its component rectangles dirty.Alex Cucos2009-06-081-0/+1
| | | | | | | | | | | When using Qt/E with VNC screen driver on top of the Linux framebuffer (export QWS_DISPLAY="VNC:LinuxFb") the region to be exposed needs be clipped to the real screen to avoid possible negative coordinates which in turn cause access to invalid memory locations when comparing the content of the VNC buffer with the Linux framebuffer. Merge-request: 603 Reviewed-by: Tom Cooksey <thomas.cooksey@nokia.com>
* Small simplification on codeThierry Bastian2009-06-081-6/+4
|
* Fixed ListView so that it is able to move items in negative space andThierry Bastian2009-06-081-1/+1
| | | | | | | | | still paint them. The autotest is included. Task-number: 254449 Reviewed-by: ogoffart
* small code cleanupThierry Bastian2009-06-081-7/+1
|
* Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qtOswald Buddenhagen2009-06-081-1/+2
|\
| * Fix GDI object leak.Prasanth Ullattil2009-06-081-1/+2
| | | | | | | | | | | | | | In case the SetWindowRgn() fails, the region object has to be deleted. Task-number: 251293 Reviewed-by: Denis Dzyubenko
* | Merge commit 'origin/4.5'Oswald Buddenhagen2009-06-084-18/+24
|\ \ | |/ |/| | | | | | | | | | | Conflicts: src/3rdparty/phonon/qt7/mediaobject.mm src/3rdparty/phonon/qt7/quicktimevideoplayer.mm src/gui/text/qfontengine_win.cpp tools/linguist/shared/cpp.cpp
| * Fixed an issue with graphicssystem raster on 8 and 16 bit X servers.Trond Kjernåsen2009-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | We didn't actually check the depth of the target window before calling the qt_x11_drawImage() fu, that will only work with depths >= 24. Task-number: 255311 Reviewed-by: Samuel BT: yes
| * Revert "BT: Fixed crash on Mac caused by erroneous handling of native focus ↵jasplin2009-06-051-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | events." This reverts commit 7314c07a3e443b1d5349b419a03db8d41ca43f7e. As reported by Eike, this patch caused several problems for Qt Creator. Potentially it may cause problems for other (external) applications as well. An alternative fix (scheduled for 4.5.x) needs to be found for tasks 254456 and 254460. Reviewed-by: Richard Moe Gustavsen
| * Example MDI: keybord focus not working correctly!Richard Moe Gustavsen2009-06-051-1/+7
| | | | | | | | | | | | | | | | | | The reason is that cocoa looses the first responder when we raise the fake window inside the MDA area. So we need to re-set the first responder again Task-number: 255040 Reviewed-by: Trenton Schulz
| * Fixed text drawing on Windows in 16 bit mode.Trond Kjernaasen2009-06-052-13/+16
| | | | | | | | | | | | | | | | | | | | | | There were several problems with antialiased text in 16 bit mode under Windows. No gamma correction was done, yet we prepared the cached glyphs for gamma correction. The mask format we rendered the glyphs into was also set to the desktop depth, which implied that information was lost and the text looked rather odd. Reviewed-by: Samuel BT: yes
* | Revert signal emission order in QTextDocument to 4.5 behaviourmae2009-06-082-3/+11
| | | | | | | | | | | | | | This is covered by the autotest tst_QTextDocument::receiveCursorPositionChangedAfterContentsChange() Reviewed-by: con
* | Made QTreeWidgetItem::operator<() check if the data is numerical when comparing.J-P Nurmi2009-06-082-3/+31
| | | | | | | | | | | | | | More information in task 166873. Merge-request: 514 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* | Fix QT_NO_DATASTREAM macro checks and improve readabilityRitt Konstantin2009-06-0820-20/+41
| | | | | | | | | | | | | | | | Some checks where in the wrong locations, and some endifs where hard to read. Merge-request: 611 Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
* | Revert two of my commits, restoring the original fix for focus handling.Denis Dzyubenko2009-06-051-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix that was introduced adds regressions, and I don't see a way we can fix it without breaking someone elses code. So restoring the original fix that just avoid a crash (autotest by Thierry is included). Revert "Revert Avoid a crash when setting a focus in a widget hierarchy containing" Revert "Setting a focus on a widget hierarchy which contains both visible and invisible widgets could cause a crash." This reverts commit be833a4f25a8ec8c3dd7a8ac4fa4b0507c93e7ee. This partially reverts commit 1a7da7096bbda17197738061902f4489af234bc0 Reviewed-by: Thierry Bastian Reviewed-by: Prasanth Ullattil
* | Compilefix for QT_NO_CURSOR in qgraphicsscene.cppThomas Hartmann2009-06-051-0/+2
| | | | | | | | Reviewed-by: Joerg
* | Fixes anti-aliased text rendering on smartphones (Windows Mobile)Thomas Hartmann2009-06-052-2/+14
| | | | | | | | | | | | | | | | | | | | | | The check for cleartype in qt_win_read_cleartype_settings() was not correct for Windows Mobile For anti-aliased text rendering we also have to use another pixel format for the native image. Task-number: 249642 Reviewed-by: mauricek
* | Add a callback so Qt updates its color stuff when the profile changes.Norwegian Rock Cat2009-06-052-0/+30
| | | | | | | | | | | | | | | | | | We've had a problem with a stale cache for color profiles this should make things work well. We get the callback for each display whether it needs it or not, but honesly I would rather that we update this a few times too many when people change their display profile than not at all. FWIW, this code is inspired from Apple's Tech Note TN2035.
* | Fix wrong sizing of toolbars when they have anough spaceThierry Bastian2009-06-053-69/+104
| | | | | | | | | | | | | | | | | | | | What could happen starting with 4.4 is that you could move a toolbar. If you then added actions, the toolbar would grom and make the other toolbars move to the right although it had enough space already to show the newly created actions. Autotest will follow shortly. Task-number: 226060
* | Fix for Qt issue #218037 - Add support for the WM_MOUSEHWHEEL message on Windowsminiak2009-06-051-2/+12
| | | | | | | | | | Merge-request: 384 Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
* | All of Qt's own code compiles with -pedantic now (but pcre and webkit don't ↵David Faure2009-06-0411-16/+16
| | | | | | | | | | | | | | seem fixable easily) Merge-request: 594 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* | Merge commit 'origin/4.5'Olivier Goffart2009-06-049-31/+70
|\ \ | |/