summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Autotest QEXPECTED_FAIL removedJedrzej Nowacki2009-08-211-3/+1
| | | | Reviewed-by: Kent Hansen
* JSC::Debugger fix. Events exceptionThrow and functionExit modificationJedrzej Nowacki2009-08-211-10/+26
| | | | | | | | | | JSC::Debugger::exceptionThrow event was moved _before_ stacks unwinding so there is possibility to check stack state before it's deletion. Missing functionExit event was added in Interpreter::unwind() Reviewed-by: Kent Hansen
* Another typo.Alexis Menard2009-08-211-1/+1
| | | | Reviewed-by:TrustMe
* Fix typo in anchor layout documentation.Alexis Menard2009-08-211-1/+1
| | | | Reviewed-by:TrustMe
* Handle Touch* events in the same way as other input events in ↵Bradley T. Hughes2009-08-211-0/+7
| | | | | | | | | | | | QAbstractScrollArea We send the Touch* events filtered from the viewport to the scroll area's default handler so that we can take advantage of the default handling in QWidget. But we also need to ignore Touch* events in QAbstractScrollArea::event() so that we don't get the events twice (once from the filter, and again if propagated). Reviewed-by: Richard Moe Gustavsen
* Convert the screen cursor image to native premultiplied formatPaul Olav Tvete2009-08-211-1/+21
| | | | | | | | | | The default cursor on QWS is loaded as an 8bit QImage. Blitting that one is really slow so we better convert the image into a fast format before using it. Based on a patch by Lars. Reviewed-by: Tom
* Allow linuxfb device names like /dev/fb/0Takumi ASAKI2009-08-211-9/+7
| | | | | | Previously, length of linuxfb device's path must be 8 and start with "/dev/fb". Reviewed-by: Paul
* Avoid painting window decorations flicker showPaul Olav Tvete2009-08-211-6/+9
| | | | | | | | Request focus before requesting a geometry. This makes it much more likely that the initial paint will be done after the window is active. Task-number: 255828 Reviewed-by: Tom
* Fix blend function crash on AVR32Paul Olav Tvete2009-08-211-2/+2
| | | | | | | AVR32 doesn't support non-aligned access. (Contributed patch) Task-number: 255495 Reviewed-by: Paul
* make the new anchor layout code compile with namespaceshjk2009-08-216-5/+29
|
* Merge branch 'anchorlayout' of ↵Jan-Arve Sæther2009-08-2116-3/+4906
|\ | | | | | | | | | | | | git@gitorious.org:+openbossa-developers/qt/openbossa-clone Conflicts: src/gui/graphicsview/graphicsview.pri
| * Remove the anchorlayoyt example that can load layouts.Jan-Arve Sæther2009-08-2014-1759/+0
| | | | | | | | | | We decided to remove it because it does not serve its purpose as an example.(Too much code, does not show how to use the API in a nice way)
| * Add the autotest to auto.proJan-Arve Sæther2009-08-201-1/+2
| |
| * Implement the functions we added in the API review:Jan-Arve Sæther2009-08-194-26/+95
| | | | | | | | | | | | | | | | | | Those are: * setAnchorSpacing() * anchorSpacing() * unsetAnchorSpacing() Autotests for the two last ones are missing though..
| * update API to what was agreed on the API review meeting yesterday:Jan-Arve Sæther2009-08-199-496/+584
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes are: * Move enums in QGraphicsAnchorLayout::Edge to Qt::AnchorPoint. Prefix them with Anchor since they are not edges in general. * Rename anchor() to addAnchor() * Rename anchorCorner() -> addCornerAnchors() * Rename anchorWidth() -> addLeftAndRightAnchors() * Rename anchorHeight() -> addTopAndBottomAnchors() * Rename anchorGeometry() -> addAllAnchors() * remove the overloads that take a spacing argument, and add setAnchorSpacing() to accommodate for that. * Added anchorSpacing() (implementation missing) * Added unsetAnchorSpacing(). (implementation missing) * made sizeHint() protected. Updated all examples and autotest to reflect this API change.
| * Fix one "failure" on the mac.Jan-Arve Sæther2009-08-191-0/+3
| | | | | | | | This failed on Alexis' Mac Mini (Leopard)
| * Only compile in toString() functions if we are compiling in debug mode.Jan-Arve Sæther2009-08-183-15/+32
| | | | | | | | | | Also, only include the "name" member to AnchorData if we are compiling in debug mode.
| * Improved internal docs for simplification.Jan-Arve Sæther2009-08-181-29/+44
| |
| * Remove some warningsJan-Arve Sæther2009-08-182-2/+2
| |
| * Remove some warningsJan-Arve Sæther2009-08-181-2/+0
| |
| * Just a small improvement to SequentialAnchorData::updateChildrenSizes()Jan-Arve Sæther2009-08-181-33/+20
| | | | | | | | Functionality-wise it should be the same, its just a bit less code.
| * Fix a potential crash in AnchorVertex::toString().Jan-Arve Sæther2009-08-181-5/+6
| | | | | | | | Don't assume that m_item is always a QGraphicsWidget
| * QGraphicsAnchorLayout: fix calculation of sizeAt* values for SequentialCaio Marcelo de Oliveira Filho2009-08-182-11/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements what's described in the previous commit QGraphicsAnchorLayout: fix expected values for parallel test When filling the sizeAt* values (the three points used for interpolation when setting geometry), now sequential anchors distribute the sizes to the children in a fair way, i.e. proportionally in relation to the existing min/pref/max hints. Each value is defined in relation of the pref (either as a shrinkage in pref or a grow in pref). In both cases the shrinking/growing factor is the same for all children. When we implement support for QSizePolicies, this distribution might be changed by setting size policies for a certain item or anchor. This makes two tests work -- so no more expected fail. Also fixed a typo in one test's expected results.
| * QGraphicsAnchorLayout: missing restoreSimplifiedGraph callCaio Marcelo de Oliveira Filho2009-08-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | When creating an anchor we might have to create the edges for an item if the item is new. In this case both dimensions are affected. The call is clearly missing since createItemEdges() declared this dependency via Q_ASSERT. Patch from Jan-Arve. Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGraphicsAnchorLayout: add QT_ANCHORLAYOUT_NO_SIMPLIFICATION backCaio Marcelo de Oliveira Filho2009-08-171-0/+4
| | | | | | | | | | | | For debugging purposes, if QT_ANCHORLAYOUT_NO_SIMPLIFICATION environment variable is set, the layout won't use simplification. Useful for some debuggings.
| * QGraphicsAnchorLayout: hide some debug messagesCaio Marcelo de Oliveira Filho2009-08-171-0/+8
| |
| * QGraphicsAnchorLayout: add names to items in examplesCaio Marcelo de Oliveira Filho2009-08-171-33/+33
| | | | | | | | | | Having the items named helps when using debugging functions to identify the anchors. Cause no harm to add them to the tests.
| * QGraphicsAnchorLayout: calculate vertex positions with simplified graphCaio Marcelo de Oliveira Filho2009-08-174-33/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When traversing the graph looking for calculating the distances, also enter inside the complex edges to find (and calculate) the distances for the vertices that were simplified. This require a little tweak in the traversal, now we can't always skip an edge when both vertices are already visited, because complex anchors can hide vertices inside (a sequential anchor in practice remove vertices from the full graph). As a bonus we now pass on the 'example' test (as expected) and the example now works fine. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * Fill in some missing pieces in the documentation.Jan-Arve Sæther2009-08-171-1/+121
| | | | | | | | Need to work more on the overview.
| * Clean up exampleJan-Arve Sæther2009-08-172-151/+6
| |
| * More tests for setSpacingJan-Arve Sæther2009-08-171-0/+15
| |
| * Add missing call to invalidate() in all functions that modify theJan-Arve Sæther2009-08-171-0/+3
| | | | | | | | spacing.
| * Clean up public API: move dumpGraph() to private API.Jan-Arve Sæther2009-08-175-24/+23
| | | | | | | | Hopefully we won't need it more...
| * Small change in the "spacing API".Jan-Arve Sæther2009-08-173-9/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be consistent with QGraphicsGridLayout(QGGL), we remove the void setSpacing(Qt::Orientations ); qreal spacing(Qt::Orientations ); in favor to void setHorizontalSpacing(qreal spacing); void setVerticalSpacing(qreal spacing); void setSpacing(qreal spacing); qreal horizontalSpacing() const; qreal verticalSpacing() const; The API for setting and retrieving spacings should now be the same as in QGGL.
| * Change the member QGALPrivate::spacing to QGALPrivate::spacings.Jan-Arve Sæther2009-08-173-5/+5
| | | | | | | | | | This was done to avoid any potential shadowing problems (we already use the variable name 'spacing' several places)
| * Add autotest for setSpacing()Jan-Arve Sæther2009-08-171-0/+42
| |
| * QGraphicsAnchorLayout: use a recursive approach for size hintsCaio Marcelo de Oliveira Filho2009-08-142-204/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring back the refreshSizeHints() now that we have locally the necessary information to get the size hints given an arbitrary anchor data. We also created a bit to set whether the AnchorData is an anchor of a layout (i.e. connects the layout with something else) or not. This costs one pointer more in the AnchorData, but simplifies a good deal of code and avoid traversing the graph to get this information back, so I think it's worthwhile. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| * QGraphicsAnchorLayout: add both vertex information in anchor dataCaio Marcelo de Oliveira Filho2009-08-143-41/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | Make AnchorData aware of both vertices instead only one (the origin). This information is useful for many functions when working in simplified mode. Changed the name "origin" to "from", and add an "to" field. Also change setAnchorSizeHintsFromItems() and its helpers to make use of this information. In a later commit we will rollback to using recursion for initializing the size hint information. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| * Added QEXPECT_FAIL, for tests that we must fix, but we know they fail.Jan-Arve Sæther2009-08-141-0/+3
| |
| * QGraphicsAnchorLayout: size hint updated in a simplified graphCaio Marcelo de Oliveira Filho2009-08-142-123/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes setAnchorSizeHintsFromItems() support a simplified graph. Instead of going recursively, since AnchorData doesn't have all needed information, we make a list with all anchors/vertexpairs with dependencies first. That way we are sure to fill all information, and the group anchors can peek at its children anchors (dependencies) and they'll have updated information. This solutions doesn't require refreshSizeHints(). Alternative solutions that we might consider are: complementing the AnchorData information or making refreshSizeHints() take two AnchorVertex as parameters and use the recursive approach. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| * QGraphicsAnchorLayout: prepare ground for doing less simplificationsCaio Marcelo de Oliveira Filho2009-08-133-15/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add variables to track whether the graph is simplified or not, as well as make the functions that need it simplified/restored call the corresponding functions. The functions look at the state variables, so it's safe to just call them. Also added Q_ASSERT() through the code paths that SHOULD have the full graph (not simplified), for making easy to track bugs in future refactorings. Ironically this commit cause more calls to simplify/restore right now, but the state will be better when we fix some functions to be simplification compatible ;-) Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| * QGraphicsAnchorLayout: fix expected values for parallel testCaio Marcelo de Oliveira Filho2009-08-131-40/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We changed the parallel example because the expected values for preferred size are wrong. Before we had a parallel anchor ("d|e") that should have the maximum preferred of the both children, so this end up being 170. This parallel is in a sequence with another item ("b") with a preferred of 150 ending up with 320. This group is in parallel with "c" that has a maximum of 300. So in the preferred size of the layout, the group was constraint to 300, which would be proportionally distributed between "b" and "d|e", and 50%/50% as the test expected. The proportional distribution is a feature and we changed the test to illustrate that more. We gave a bump in "c" maximum to 350 and "b" maximum to 300, so the preferred is 100% for both "b" and "d|e", and the proportional feature shows up in the maximum allocation, which is not 100% for the group (b and d|e). In the group, the maximum possible is 500 but the layout only allows 350, so the sizes need to be proportionally, but in relation not to zero, but to the preferred which is 320 (this is the same logic used for setGeometry()). So the growth is 30 / (500 - 320) = 30 / 180 = 1/6. This 1/6 should be the factor given to the children (b and d|e), taking their preferred sizes as starting points. Note that the test still fails, but serve as a milestone to see when the feature is correct implemented. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| * QGraphicsAnchorLayout: test for proportional distributionCaio Marcelo de Oliveira Filho2009-08-131-0/+62
| | | | | | | | | | | | | | | | | | | | This test (which fails right now) check whether a sequential anchor is distributing proportionally the size between its parts. This should pass when we make calculateVertexPositions() work together with the simplified graph. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| * QGraphicsAnchorLayout: implement "deep" simplificationCaio Marcelo de Oliveira Filho2009-08-132-6/+35
| | | | | | | | | | | | | | | | | | | | | | | | Re-start the simplification procedure every time there's a change it the adjacent count of a vertex -- which happens when a new parallel anchor is created. The original algorithm stopped some simplifications too early, demanding the simplex unnecessarily. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| * QGraphicsAnchorLayout: enable simplificationCaio Marcelo de Oliveira Filho2009-08-131-1/+6
| | | | | | | | | | | | | | | | Enable simplification by default. Allow disable during runtime by using the environment variable QT_ANCHORLAYOUT_NO_SIMPLIFICATION=1 when running the code. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGraphicsAnchorLayout: add a few more testsCaio Marcelo de Oliveira Filho2009-08-131-0/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding tests that were helpful during debugging simplification - example: a replica of the anchorlayout example, which has a few interesting cases. - parallel2: a small pararell test case, subset of example. - snakeOppositeDirections: snake but with connections in the opposite directions (this will end up with anchors with opposite directions). - fairDistributionOppositeDirections: same as before, but in the end, this should be taken care by our API which makes internally the same as fairDistribution. Some work on adding QCOMPARE() statements may still be needed for this examples. Note that is interesting to notice (maybe we can make this available for the test checking automatically) whether the simplex is being used or not when simplification is active. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGraphicsAnchorLayout: adding small debug messagesCaio Marcelo de Oliveira Filho2009-08-132-1/+8
| | | | | | | | | | | | Useful for verifying whether Simplex is being triggered or not. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGraphicsAnchorLayout: remove unused functionCaio Marcelo de Oliveira Filho2009-08-132-31/+0
| | | | | | | | | | | | | | | | The function setAnchorSizeHintsFromDefaults() is not necessary, since a more updated version (ready or almost-ready for simplification) was added: setAnchorSizeHintsFromItems(). Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
| * QGraphicsAnchorLayout: simplify updating of anchor sizesCaio Marcelo de Oliveira Filho2009-08-131-45/+13
| | | | | | | | | | | | | | | | | | Instead of going through all anchors after the calculation of the graphs, do it as early as possible for each part (trunk and nonTrunks) and recursively updates the children in case of a simplified graph. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
| * QGraphicsAnchorLayout: use pickEdge()Caio Marcelo de Oliveira Filho2009-08-131-7/+1
| | | | | | | | Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>