summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsanchorlayout.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge branch 'mimir' into 4.7David Boddie2011-02-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/qdeclarativemodels.qdoc doc/src/index.qdoc doc/src/template/style/style.css tools/qdoc3/atom.h tools/qdoc3/doc.cpp tools/qdoc3/doc/qdoc-manual.qdoc tools/qdoc3/doc/qdoc-manual.qdocconf
| * qdoc: Fixed some validation errors in the DITA filesMartin Smith2011-01-191-1/+1
| | | | | | | | 11 instances of raw-html remain.
* | Merge branch '4.7' of ../qt into 4.7David Boddie2011-01-131-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/declarative/qdeclarativeintro.qdoc doc/src/declarative/qdeclarativereference.qdoc doc/src/snippets/declarative/focus/focusColumn.qml tools/qdoc3/apigenerator.cpp tools/qdoc3/apigenerator.h tools/qdoc3/archiveextractor.cpp tools/qdoc3/bookgenerator.cpp tools/qdoc3/bookgenerator.h tools/qdoc3/ccodeparser.cpp tools/qdoc3/command.cpp tools/qdoc3/command.h tools/qdoc3/cpptoqsconverter.cpp tools/qdoc3/dcfsection.cpp tools/qdoc3/dcfsection.h tools/qdoc3/jambiapiparser.cpp tools/qdoc3/jambiapiparser.h tools/qdoc3/javacodemarker.cpp tools/qdoc3/javacodemarker.h tools/qdoc3/javadocgenerator.cpp tools/qdoc3/javadocgenerator.h tools/qdoc3/linguistgenerator.cpp tools/qdoc3/linguistgenerator.h tools/qdoc3/loutgenerator.h tools/qdoc3/mangenerator.cpp tools/qdoc3/mangenerator.h tools/qdoc3/polyarchiveextractor.cpp tools/qdoc3/polyarchiveextractor.h tools/qdoc3/polyuncompressor.cpp tools/qdoc3/polyuncompressor.h tools/qdoc3/qsakernelparser.cpp tools/qdoc3/qscodemarker.cpp tools/qdoc3/qscodemarker.h tools/qdoc3/qscodeparser.cpp tools/qdoc3/qscodeparser.h tools/qdoc3/sgmlgenerator.cpp tools/qdoc3/sgmlgenerator.h tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/uncompressor.cpp tools/qdoc3/webxmlgenerator.cpp tools/qdoc3/webxmlgenerator.h
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
* | Doc: Used div elements for floats, updated the style sheet.David Boddie2010-12-141-1/+3
| |
* | Doc: Changed floating images to use the new float qdoc macros.David Boddie2010-12-131-3/+1
|/
* Update copyright year to 2010Jason McDonald2010-01-061-1/+1
| | | | Reviewed-by: Trust Me
* Add a simple check for a common wrong usage to avoid infinite recursionJan-Arve Sæther2009-12-111-10/+13
| | | | Reviewed-by: Alexis
* Some doc fixesJan-Arve Sæther2009-12-031-2/+2
| | | | | | - Remove a lie. - When referring to the size of an anchor, refer to it consistently as 'spacing' instead of magnitude.
* QGAL: default spacing can be unset using a negative valueEduardo M. Fleury2009-11-251-21/+2
| | | | | | | | | | | After a default spacing is set through QGAL::setSpacing() family of methods, the user must be able to unset it. To avoid adding another public method, we enabled this feature by allowing a negative value to be passed to those methods. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>
* QGAL: remove the caching of simplified graphCaio Marcelo de Oliveira Filho2009-11-121-3/+0
| | | | | | | | | | | | | | | | | | | After discussion with Jan-Arve, we decided to remove for good the caching of simplified graph. This avoided recalculating the simplification (but not the simplex) in some situations. Since vertex simplification, this was temporarily disabled already. To know whether if we could the cached version or not, we needed to track individual anchors to see whether they reached size 0 or they were 0 and changed the size. This is because the vertex simplification depend on that fact. Now the simplified version of the graph exists only during the execution of calculateGraphs() function. This and next commits clear up the code to take advantage of that fact. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* docs: Add a section about known issues for the anchor layout.Jan-Arve Sæther2009-11-061-4/+17
|
* Merge commit 'origin/4.6' into featureJørgen Lind2009-11-021-3/+4
|\
| * Merge branch 'fixes' of ↵Jan-Arve Sæther2009-10-281-51/+71
| |\ | | | | | | | | | | | | | | | | | | | | | git://gitorious.org/~fleury/qt/fleury-openbossa-clone into openbossa-fleury-fixes3 Conflicts: src/gui/graphicsview/qgraphicsanchorlayout_p.cpp src/gui/graphicsview/qgraphicsanchorlayout_p.h
| * | Respect the per-item layoutSpacing() if the style uses that feature.Jan-Arve Sæther2009-10-271-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We move the QLayoutStyleInfo class out of the gridlayout engine to a common header file so that anchor layout also can utilize it. Due to that we now can have a per-item spacing we have to change the 'effectiveSpacing' argument of refreshSizeHints to just take a QLayoutStyleInfo pointer that we will later query for the actual spacing used.
* | | Fix SCROLLAREA by fixing missing QT_NO_GRAPHICSVIEW dependenciesJørgen Lind2009-10-291-1/+2
| |/ |/| | | | | Reviewed-by: tom
* | Doc: Reviewed and revised QGraphicsAnchorLayout documentation.David Boddie2009-10-231-51/+71
|/ | | | Reviewed-by: Trust Me
* Merge branch 'qgal-api' into 4.6Jan-Arve Sæther2009-10-211-6/+16
|\
| * Group the spacing functions together, and add a sizePolicy property.Jan-Arve Sæther2009-10-211-6/+16
| | | | | | | | Improve the documentation for size policy.
* | Add some docs that explicitly mentions how we handle cycles in the treeJan-Arve Sæther2009-10-201-0/+3
|/ | | | | | | | 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.
* API addition: Make it possible to set the size policy of an anchor.Jan-Arve Sæther2009-10-161-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* QGraphicsAnchorLayout: Ensure spacing is not negativeEduardo M. Fleury2009-10-091-0/+26
| | | | | | | | | | | 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>
* Doc: silence more qdoc warnings.Volker Hilsheimer2009-10-031-13/+6
| | | | | Mark QGraphicsAnchor::unsetSpacing as reset function of the spacing property.
* After some discussion we decided to remove hasConflicts() from the API.Jan-Arve Sæther2009-09-291-12/+0
| | | | | | | | hasConflicts() does only make sense for a tool/editor of the layout, and how this function would help the tool is only guesswork at the moment. We keep the private API though, in order to let the autotests we inherited from Orbit pass.
* Add missing docs for QGraphicsAnchorJan-Arve Sæther2009-09-291-0/+18
|
* Fix some docs to follow the Qt style. (remove asterisks, proper indenting)Jan-Arve Sæther2009-09-291-44/+44
| | | | Note that this does *not* change the content of the docs.
* QGraphicsAnchorLayout: Initial support for Size PolicyAnselmo Lacerda S. de Melo2009-09-181-1/+0
| | | | | | | | | | | | | In this commit we introduce initial support for Size Policy. The size policies supported now are: * QSizePolicy::Fixed * QSizePolicy::Minimum * QSizePolicy::Maximum * QSizePolicy::Preferred * QSizePolicy::Ignored Signed-off-by: Anselmo Lacerda S. de Melo <anselmo.melo@openbossa.org>
* Implement hasConflicts().Jan-Arve Sæther2009-09-171-0/+12
|
* QGraphicsAnchorLayout: Removing methods names inconsistencies on private classJesus Sanchez-Palencia2009-09-171-3/+3
| | | | | | | | | QGraphicsAnchorLayoutPrivate now has addAnchor() replacing anchor() and addAnchor_helper() replacing addAnchor(). With this changes we are respecting the API behavior, where anchor() is a "getter" instead of a "setter". Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* doc: Fixed some qdoc errors.Martin Smith2009-09-151-42/+3
|
* API change. This will get rid of the ugly setAnchorSpacing() method.Jan-Arve Sæther2009-09-141-86/+99
| | | | | | | | | | | | | | | | | | | | Say hello to QGraphicsAnchor, move the spacing (and removeAnchor) functionality over to that class. This also opens up for a cleaner API when we add support for size policies or min/pref/max sizes for anchors. Also remove - addLeftAndRightAnchors() - addTopAndBottomAnchors() - addAllAnchors() in favor of - addAnchors(itemA, itemB, Qt::Orientations) API change discussed with Caio and Andreas. Reviewed-by: Alexis
* Respect the layoutDirection property of the parent widget.Jan-Arve Sæther2009-09-111-1/+1
| | | | | | | Add a layoutDirection autotest, and sprinkle some of the tests with checkReverseDirection() Reviewed-by: Eduardo M. Fleury
* Update license headers again.Jason McDonald2009-09-091-4/+4
| | | | Reviewed-by: Trust Me
* Update tech preview license header for files that are new in 4.6.Jason McDonald2009-08-311-13/+13
| | | | Reviewed-by: Trust Me
* Doc fixes.Jan-Arve Sæther2009-08-271-9/+30
|
* Fixes typo in doc and missing return in anchor layoutLeonardo Sobral Cunha2009-08-261-2/+4
| | | | Reviewed-by: janarve
* Fix obsolete license headers.Jason McDonald2009-08-211-2/+2
| | | | Reviewed-by: Trust Me
* Doc fixes to anchor layout.Jan-Arve Sæther2009-08-211-6/+6
|
* Doc fixes.Jan-Arve Sæther2009-08-211-1/+2
|
* make the new anchor layout code compile with namespaceshjk2009-08-211-0/+4
|
* Implement the functions we added in the API review:Jan-Arve Sæther2009-08-191-15/+38
| | | | | | | | | 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-191-92/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* QGraphicsAnchorLayout: calculate vertex positions with simplified graphCaio Marcelo de Oliveira Filho2009-08-171-5/+0
| | | | | | | | | | | | | | | | 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.
* Add missing call to invalidate() in all functions that modify theJan-Arve Sæther2009-08-171-0/+3
| | | | spacing.