summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
Commit message (Collapse)AuthorAgeFilesLines
* Removed usage of CompositionMode_Source in QGraphicsView for X11.Trond Kjernåsen2009-11-031-1/+7
| | | | | | | | | | Due to the rendering model in XRender ((src IN mask) OP dest) we can't support the PorterDuff composition modes natively under X11. They just behave differently than what we've defined them to do in QPainter, and there is no apparent workaround. Task-number: QTBUG-4829 Reviewed-by: Gunnar
* Added some optimizations to the blur and drop shadow GL filters.Samuel Rødal2009-10-291-1/+2
| | | | | | | | | | | | | | | | | | | | * Use ExpandToTransparentBorderPadMode since we can use GL_CLAMP_TO_EDGE to clamp to the texture. * Shrink the bounding rects reported by the blur and drop shadow filters (expanding by 2 * radius isn't needed). * Use a single-pass blur for radii <= 3 to avoid the overhead of rendering to an FBO. * Made the fast blur setting generate filters for only a predefined set of radii, and then use the actual blur radius to spread the sample points outwards. * Optimized the generated program to rely less on temporary variables, as those seemed to not be handled very well by certain GLSL compilers. Reviewed-by: Gunnar Sletta
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-284-8/+9
|\
| * qdoc: Update QGraphicsTransform docs after changes to QGraphicsRotationRhys Weatherley2009-10-281-0/+3
| | | | | | | | Reviewed-by: Michael Brasser
| * Doc: Fixed qdoc warning.David Boddie2009-10-271-1/+1
| | | | | | | | Reviewed-by: Trust Me
| * Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6axis2009-10-274-56/+93
| |\
| * \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6axis2009-10-236-10/+326
| |\ \
| * \ \ Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Shane Kearns2009-10-227-80/+104
| |\ \ \
| * | | | QtGui release/debug binary compatibilityShane Kearns2009-10-222-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtGui had some debug functions only exported in the debug build. Now these are exported in release mode as well, but as stubs (i.e. no debug output is generated). Reviewed-by: Thiago Macieira
* | | | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-271-2/+21
|\ \ \ \ \ | | |_|_|/ | |/| | |
| * | | | Doc: Fixed qdoc warnings.David Boddie2009-10-261-2/+21
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me
* | | | | Options on how to get a pixmap from an effect sourceGunnar Sletta2009-10-272-8/+32
|/ / / / | | | | | | | | | | | | | | | | | | | | Usable for future optimizations. Reviewed-by: Samuel
* | | | Optimize QGraphicsRotation's use of QMatrix4x4Rhys Weatherley2009-10-261-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous code was creating a full 3D rotation matrix and then projecting back to 2D. This change combines the two steps into one to avoid calculating matrix components that will be dropped. Reviewed-by: Sarah Smith
* | | | Add an extra overload for QMatrix4x4::toTransform()Rhys Weatherley2009-10-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 100afe8d fixed a bug in QGraphicsRotation related to when the "distance to plane" projection needed to be performed. As a side effect it made the toTransform() API not do the expected thing when the function is called with no argument. This change makes the default no-argument version of toTransform() do the simple "drop row 3 and column 3" orthographic transformation that normal users of the class expect, and adds a new overload for the "distance to plane" projection case for the special case. Reviewed-by: trustme
* | | | Doc: Reviewed and revised QGraphicsAnchorLayout documentation.David Boddie2009-10-231-51/+71
| | | | | | | | | | | | | | | | Reviewed-by: Trust Me
* | | | doc: Relationship of QGraphicsObject::parent && QObject::parentKai Koehne2009-10-231-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGraphicsObject::parent is actually about the QGraphicsItem hierarchy, not the QObject hierarchy. This is similar to QGraphicsWidget, where 'QObject::parent() should always return 0'. Maybe the explanation in QGraphicsWidget class documentation on this topic should be merged into QGraphicsObject, too? Reviewed-by: Andreas Aardal Hanssen
* | | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Gunnar Sletta2009-10-2312-84/+399
|\ \ \
| * | | Implemented gesture event delivery and propagation inside QGraphicsView.Denis Dzyubenko2009-10-222-18/+236
| | | | | | | | | | | | | | | | Reviewed-by: Thomas Zander
| * | | Added debug operator for QGraphicsObjectDenis Dzyubenko2009-10-222-0/+18
| | | | | | | | | | | | | | | | Reviewed-by: Alexis Menard
| * | | Improved gesture event filtering inside QGraphicsView for QGraphicObjectsDenis Dzyubenko2009-10-224-2/+55
| | |/ | |/| | | | | | | Reviewed-by: trustme
| * | Merge branch 'origin/4.6' into widgets-team/4.6Olivier Goffart2009-10-222-2/+4
| |\ \ | | |/
| | * Fix a bug in QGraphicsRotation related to 2D projectionsRhys Weatherley2009-10-222-2/+4
| | | | | | | | | | | | | | | | | | | | | The projection to 2D needs to be done when the rotation is applied, not after all transformations have been applied. Reviewed-by: trustme
| * | Merge branch 'qgal-api' into 4.6Jan-Arve Sæther2009-10-212-7/+18
| |\ \
| | * | Group the spacing functions together, and add a sizePolicy property.Jan-Arve Sæther2009-10-212-7/+18
| | | | | | | | | | | | | | | | Improve the documentation for size policy.
| * | | Optimization in qt_closestItemFirst private functionLeonardo Sobral Cunha2009-10-201-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to traverse the tree again to access the topLevelItem in case there is no common ancestor. Reviewed-by: bnilsen
| * | | Moved private function to test which graphic items is in front of the otherLeonardo Sobral Cunha2009-10-204-70/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is moved to graphicsitem private because it is needed by multi-touch event handling and is not specific to bsptreeindex. Reviewed-by: bnilsen
| * | | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6Jan-Arve Sæther2009-10-202-4/+13
| |\ \ \
| | * | | Fix bug in embedded dialog demo with tab focus.Alexis Menard2009-10-201-3/+12
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On embedded dialog pressing tab stop changing the focus when the focus was given to QFontComboBox. It's because QFontComboBox embed a QLineEdit in order to allow editing. But this QLineEdit is a focus proxy so we need to special case that. The logic is the same in QApplication. Be careful when changing one of them. Task-number:QTBUG-4818 Reviewed-by:jan-arve Reviewed-by:ogoffart
| * | | Add some docs that explicitly mentions how we handle cycles in the treeJan-Arve Sæther2009-10-202-0/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | This was reported for QGraphicsAnchorLayout, but affects all QGraphicsLayout subclasses. However, since it is not even handled properly in QGraphicsItem::setParentItem() it should be fine that we don't try to deal with this issue. Thus, the layouts are "consistent" with graphics items when it comes to detection of cycles in the tree.
* | | Added caching of graphics effect source pixmaps to speed up effects.Samuel Rødal2009-10-223-8/+35
| |/ |/| | | | | | | | | | | If an effect is applied repeatedly on the same source, just with varying parameters, we can save a lot by caching the source pixmaps. Reviewed-by: Bjørn Erik Nilsen
* | Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6Alexis Menard2009-10-206-407/+525
|\ \ | |/
| * Do not loop forever if we are adding the layout itself to the layout.Jan-Arve Sæther2009-10-192-0/+8
| | | | | | | | Reviewed-by: alexis
| * Whitespace cleanup.Jan-Arve Sæther2009-10-191-13/+13
| |
| * API addition: Make it possible to set the size policy of an anchor.Jan-Arve Sæther2009-10-164-54/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After this commit, when you modify the spacing of an anchor you are effectively modifying the preferred size of the anchor, since all anchors (except internal ones) have their minimumSizeHint to 0 and maximumSizeHint to QWIDGETSIZE_MAX. I also changed the sizeHintsFromItem to be more generic so that I could use it for anchors. (Thus, it was renamed to "internalSizeHints"). It now only takes care of setting the min/pref/exp/maxSize of AnchorData based on the anchor/item size hint and their size policies. As a consequence of all of this, setFixedSize changed behaviour and became setPreferredSize (since setSpacing is basically setPreferredSize). The implementation of that now only sets the prefSize. The patch also has an unrelated fix for IgnoreFlag, where it will (again) return the minimumSize for sizeHint(Qt::PreferredSize) instead of the maximumSize. This was to be more consistent with qgridlayoutengine.cpp. The docs are not very clear on this behaviour unfortunately. This API change has been discussed. Reviewed-by: alexis
| * Merge branch 'fixes' of ↵Jan-Arve Sæther2009-10-161-159/+165
| |\ | | | | | | | | | | | | | | | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into 4.6 Conflicts: src/gui/graphicsview/qgraphicsanchorlayout_p.cpp src/gui/graphicsview/qgraphicsanchorlayout_p.h tests/auto/qgraphicsanchorlayout/tst_qgraphicsanchorlayout.cpp
| | * QGAL: refactor and document the simplification algorithmCaio Marcelo de Oliveira Filho2009-10-151-159/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the simplifyGraphIteration() function. The aim was to make it more clear without changing too much the way it does stuff. Before it collected a list of candidates and then filtered that into sublists of same order, and after that removed the center edges from the borders. It also reversed the list if the direction wasn't forward, to pass it in forward order to simplifySequentialChunk() helper function. The refactored version - take in account the order when building the candidates, this avoids index manipulation; - try to calculate 'beforeSequence' and 'afterSequence' as it builds the candidates list; - make simplifySequentialChunk() aware of directions, now it deals internally with reversed direction sequences. This commits also adds explanations to trickier parts of the code. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
| | * QGAL: refactor calculateGraphs() methodCaio Marcelo de Oliveira Filho2009-10-152-75/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create calculateTrunk() and calculateNonTrunk() methods, that calculate sizes for anchors in different parts of the simplified graph (using simplex when needed). Also fixes a minor leak when the nontrunk part is non-feasible. The old code left the loop leaving the contents of 'sizeHintConstraints' not allocated. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * QGAL: update the sizes of all anchors instead of doing it separatedlyCaio Marcelo de Oliveira Filho2009-10-152-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After calculations, update the size of all anchors in the simplified graph. Those updates were happening locally after each calculation (trunk and semifloats), however some anchors that were not involved in simplex calculation were missing. One concrete consequence of the previous behaviour is that semifloat parts that were simplified into just one anchor, didn't have the chance to set their sizeAt* values. One consequence of the new behaviour is one more test passing. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * QGAL: avoid having to re-calculate lists of variablesCaio Marcelo de Oliveira Filho2009-10-152-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the functions solvePreferred() and solveExpanding() to take a list of variables, so they don't need to calculate them based on the list of constraints. That way, the trunk variables are calculated only once. This commit also reduce the scope of 'sizeHintConstraints' variable instead of clearing and reusing it. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * QGAL: add a way to test whether simplex was used in a calculationCaio Marcelo de Oliveira Filho2009-10-152-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is one good way to track whether simplification is doing all its job or not. However it can only track cases where the graph simplify to only one anchor. For more complex cases the graph dumps are the way to go. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * QGAL: improve dump graph and add helper codeCaio Marcelo de Oliveira Filho2009-10-152-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The graph dumper function take a name, and added debug code (that need to be enabled manually) to generate dumps from the graph before and after calculation. This is useful to debug simplification. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * QGraphicsAnchorLayout: Fix sequential anchor distribution w/ expanding sizesEduardo M. Fleury2009-10-151-86/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the addition of expanding SizePolicy, the distribution of sequential anchors became wrong. We must now account for three intervals of distribution instead of only two. This commit also unifies the logic used by the sequential group anchor and the edge interpolator. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| | * QGraphicsAnchorLayout: Ensure spacing is not negativeEduardo M. Fleury2009-10-152-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we do not support negative-sized anchors in the graph, instead we invert such anchors and make their value positive. We consider changing this sometime in the future but until then, spacing must be non-negative at all times. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * | Make sure that the anchor layout autotests pass in release configurationJan-Arve Sæther2009-10-162-2/+2
| | | | | | | | | | | | | | | | | | | | | The problem was that lastCalculationUsedSimplex was only compiled in debug mode. The autotests run in release, so it did not compile. Reviewed-by: alexis
| * | Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt-widget-team into 4.6Jan-Arve Sæther2009-10-151-2/+8
| |\ \ | | |/
| * | Merge branch 'fixes' of ↵Jan-Arve Sæther2009-10-153-181/+251
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into openbossa-fleury-fixes Conflicts: src/gui/graphicsview/qgraphicsanchorlayout_p.cpp
| | * | QGAL: refactor calculateGraphs() methodCaio Marcelo de Oliveira Filho2009-10-092-75/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create calculateTrunk() and calculateNonTrunk() methods, that calculate sizes for anchors in different parts of the simplified graph (using simplex when needed). Also fixes a minor leak when the nontrunk part is non-feasible. The old code left the loop leaving the contents of 'sizeHintConstraints' not allocated. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * | QGAL: update the sizes of all anchors instead of doing it separatedlyCaio Marcelo de Oliveira Filho2009-10-092-9/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After calculations, update the size of all anchors in the simplified graph. Those updates were happening locally after each calculation (trunk and semifloats), however some anchors that were not involved in simplex calculation were missing. One concrete consequence of the previous behaviour is that semifloat parts that were simplified into just one anchor, didn't have the chance to set their sizeAt* values. One consequence of the new behaviour is one more test passing. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * | QGAL: avoid having to re-calculate lists of variablesCaio Marcelo de Oliveira Filho2009-10-092-31/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the functions solvePreferred() and solveExpanding() to take a list of variables, so they don't need to calculate them based on the list of constraints. That way, the trunk variables are calculated only once. This commit also reduce the scope of 'sizeHintConstraints' variable instead of clearing and reusing it. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| | * | QGAL: add a way to test whether simplex was used in a calculationCaio Marcelo de Oliveira Filho2009-10-092-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is one good way to track whether simplification is doing all its job or not. However it can only track cases where the graph simplify to only one anchor. For more complex cases the graph dumps are the way to go. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>