summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* QGAL (QSimplex): Make deep copy of constraints inside QSimplexEduardo M. Fleury2009-10-263-12/+13
| | | | | | | | | The idea is to allow QSimplex solver to modify the constraints without breaking other parts of the code that rely on the original ones. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGAL: Add QSimplexConstraint::toString() method for debuggingEduardo M. Fleury2009-10-261-0/+23
| | | | | Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGAL: Use constraints of type "equal" for fixed itemsEduardo M. Fleury2009-10-261-12/+22
| | | | | | | | | | | | | | | | We usually create two restrictions for each item, one to tell its size should be more than its minimum size and other enforcing it to be at most its maximum size. Now, for items that have fixed size, ie. minSize == maxSize, we create a single constraint telling its size should be equal its min/maxSize. The immediate advantage is to have one less constraint for each of these items. The indirect advantage is that the simplex solver can take advantage of such information. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGAL: clarify the usage of isLayoutAnchor bitCaio Marcelo de Oliveira Filho2009-10-262-11/+4
| | | | | | | | | | | The 'isLayoutAnchor' is necessary only as a way to flag Layout internal anchors, i.e. anchors with the Layout as 'item' in the AnchorData structure. We don't need to propagate this bit when composing anchors. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QGAL: add orientation bit to the anchorCaio Marcelo de Oliveira Filho2009-10-262-9/+11
| | | | | | | | | Use a free bit in the anchor struct to save the orientation information. That way we do not depend on looking for this information in the vertices (by looking the orientation of its edge). Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QGAL: simplification doesn't depend on vertex anchor point informationCaio Marcelo de Oliveira Filho2009-10-261-4/+4
| | | | | | | | | Look for information inside the anchor instead of on the vertices. This will give us flexibility of simplifying vertices before the anchor simplification phase. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QGAL: store item and center-ness information in the anchorCaio Marcelo de Oliveira Filho2009-10-262-14/+19
| | | | | | | | | We used to look for this information in the anchor's from and to vertices, but to enable simplification of vertices, we have to store this information in the anchor. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QGAL: identify unfeasible setups even when graph is simplifiedCaio Marcelo de Oliveira Filho2009-10-262-34/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The calculate graphs now can return early due to unfeasible anchor setups found out during simplification. This allows finding out problems in parallel anchors, when one anchor has maximum size smaller than the minimum size of the other anchor. The order for simplification and refreshing size hints also has been swaped: - First, refresh size hints for all anchors in the graph. If the graph is simplified, the refreshSizeHints() call will reach the children anchors. - Then, if the simplificated graph is invalid, rebuild it. During this rebuild, refreshSizeHints_helper() will be called for all levels. So in both situations we can identify an unfeasible setup. Note that this test alone is not enough to classify the graph as feasible, depending on the graph, it will still need to go through the Simplex. A test case was added and the function that traverse the graph refreshing now is called refreshAllSizeHints(). The old name was not so clear since the function will not fill only the anchors that have items associated. Last but not least, the lastCalculationUsedSimplex variable is cleared when starting calculateGraphs(), since we now can leave the function earlier, without reaching calculateTrunk(), which is the function that sets it. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QGAL: separate parallel anchor creation from sequence creationCaio Marcelo de Oliveira Filho2009-10-261-29/+61
| | | | | | | | | Extract the creation of parallel anchors from the creation of sequential anchor. This will be useful to keep track whether a parallel anchor is feasible or not. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QGAL: complex anchors can indicate errors when refreshing sizehintCaio Marcelo de Oliveira Filho2009-10-262-22/+31
| | | | | | | | | Now the refreshSizeHints() returns a boolean, and the parallel anchor will return false in unfeasible cases, e.g. one anchor has maximum size smaller than other minimum size. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* Fix ifdef around QMatrix4x4::rotate(QQuaternion)Rhys Weatherley2009-10-261-1/+1
| | | | Reviewed-by: trustme
* Optimize QGraphicsRotation's use of QMatrix4x4Rhys Weatherley2009-10-263-5/+111
| | | | | | | | 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
* Make compile on X11 systems where qreal == floatRhys Weatherley2009-10-261-1/+1
| | | | Reviewed-by: Sarah Smith
* Fix a crash in shutdown of QGraphicsEffectRhys Weatherley2009-10-251-1/+1
| | | | Reviewed-by: trustme
* Add an extra overload for QMatrix4x4::toTransform()Rhys Weatherley2009-10-254-5/+24
| | | | | | | | | | | | | | 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
* Merge branch '4.5' into 4.6Thiago Macieira2009-10-233-29/+6
|\
| * QWidget painting regression on Windows.Bjørn Erik Nilsen2009-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem occurred on Windows due to a call to repaint() on a top-level window from setDisabledStyle() in qwidget.cpp. This function is called whenever a window is blocking. In this particular case the children of the repainted window are opaque, and should therefore not be repainted, which also means that the top-level have to subtract the region of the opaque children when filling the background. This region is cached, and the problem was that the cached region was wrong. It was wrong because it was not invalidated properly. Task: QTBUG-4245 Reviewed-by: Paul
| * QWindowsMobileStyle::drawPrimitive(PE_Frame) background color fixedJoerg Bornemann2009-10-221-4/+2
| | | | | | | | | | | | | | | | The background color of PE_Frame was palette().light() and has been changed to use palette().background() now. This fixes the autotest tst_QStyleSheetStyle::task188195_baseBackground for Windows mobile. Reviewed-by: thartman
| * move default QAbstractButton font setup on Win mobile to QApplicationJoerg Bornemann2009-10-222-24/+3
| | | | | | | | | | | | | | | | The original approach of modifying the font for QAbstractButtons in QWindowsMobileStyle::polish broke the autotest tst_qstylesheetstyle::fontPropagation. Reviewed-by: thartman
| * make missing Key_Back and Key_Forward menu glyphs return 0 on mac(cocoa)Dean Dettman2009-10-201-2/+2
| | | | | | | | | | | | | | | | | | This is an addition to commit 5651d2547261ccecbf50f8141c634f59c0adc00d to make it obvious that in cocoa nothing is returned. Task-number: QTBUG-4873 Reviewed-by: MortenS
| * Merge branch '4.5' of scm.dev.nokia.troll.no:qt/qt into 4.5Dean Dettman2009-10-201-2/+2
| |\
| * | Adds Key_Back and Key_Forward menu glyphs on mac(carbon)Dean Dettman2009-10-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change improves the behavior of QMenu when Key_Back and Key_Forward are used as shortcuts. A dotted arrow appears on carbon, and on Cocoa the image is blank, instead of undefined as it was before. Task-number: QTBUG-4873 Reviewed-by: msorvig
* | | Compile on QWSAnders Bakken2009-10-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | After 04d18b38c38c5ff623b30366ea08d56128b9b7d0 Qt didn't compile for QWS. Will email original committer to verify that original intent is maintained. Reviewed-by: Donald Carr <donald.carr@nokia.com>
* | | QT_NO_CURSOR build fix on windows. Random corrections for it on mac.Jocelyn Turcotte2009-10-234-0/+10
| | | | | | | | | | | | Reviewed-by: Denis Dzyubenko
* | | Line spacing fixesJoerg Bornemann2009-10-2327-65/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QTextEdit (via QTextLayout) and QPlainTextEdit in Qt used to ignore any font leading but added one extra pixel in QFontMetrics. With many freetype fonts, this resulted in a "spacy" text layout. The necessary fixes on X11 and Windows were to take (positive) leading into account, to make the font database convert point sizes to pixel sizes without rounding to plain integer values, and to subtract the extra pixel from QFontMetrics from the font engines' descent value. The change also fixes several places in styles and widgets, where QFontMetrics::lineSpacing() was wrongly used instead of QFontMetrics::height(). Ideally we should also handle negative leading, which would require additional and bigger code changes in QTextLayout and QPlainTextEdit. In addition, all other editors we have tested seem to ignore leading on X11. If we choose to believe the values provided by freetype, our text layout would be one pixel smaller than everybody else's. On the Mac, this change does nothing. There our layout is still too spacy, and for smaller fonts quite ugly compared to native Mac applications. Done with mae. Reviewed-by: mae
* | | Doc: Changed the text slightly.David Boddie2009-10-231-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Doc: Reviewed and revised QGraphicsAnchorLayout documentation.David Boddie2009-10-231-51/+71
| | | | | | | | | | | | Reviewed-by: Trust Me
* | | Mac: remove obvious commentRichard Moe Gustavsen2009-10-231-1/+0
| | | | | | | | | | | | Amending the previous merge request
* | | Fix weird behavior when opening a QFileDialog for non-current directory.Andreas Kling2009-10-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | shouldShowFileName() can be called with an empty filename, but must not create and use a QFileInfo("") since that has known undefined behavior. So just return NO right away for empty filenames. Merge-request: 1765 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
* | | 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-2338-466/+1045
|\ \ \
| * | | Compile fix for gestures on Windows.Denis Dzyubenko2009-10-221-4/+4
| | | | | | | | | | | | | | | | Reviewed-by: trustme
| * | | Compile fix.Denis Dzyubenko2009-10-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QPanGesture was changed to use QPointF instead of QSizeF, also need to change all usages of the pan gesture. Reviewed-by: trustme
| * | | QTextEdit: Fix the wrong order for call of Qt::WA_InputMethodEnabled in ↵Liang QI2009-10-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setReadOnly. Should set Qt::WA_InputMethodEnabled after set the flags, just because shouldEnableInputMethod() will read the flags. Task-number: QTBUG-4917 Reviewed-by: Shane Kearns
| * | | Make warning more helpful.Thomas Zander2009-10-221-1/+1
| | | | | | | | | | | | | | | | Also fix grammer and avoid using combined words.
| * | | Change API; the pan gesture now has points for distance, not size.Thomas Zander2009-10-224-24/+24
| | | |
| * | | Make the already-public calls be documented and publicThomas Zander2009-10-222-3/+2
| | | |
| * | | 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
| * | | Add QGestureEvent::mapToScene for better graphicsView integrationThomas Zander2009-10-223-0/+24
| | | |
| * | | Fix for the gestures autotest.Denis Dzyubenko2009-10-221-1/+2
| | | | | | | | | | | | | | | | Reviewed-by: trustme
| * | | Improvements for gesture event deliveryDenis Dzyubenko2009-10-226-40/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When delivering GestureOverride events by default both the event and individual gestures will be ignored. We also store the acceptance state of individual gesture in the event and not in the gesture object, along with its target. Reviewed-by: Thomas Zander
| * | | Improving gesture event delivery for widgets.Denis Dzyubenko2009-10-224-81/+148
| | | | | | | | | | | | | | | | Reviewed-by: trustme
| * | | Fixed gesture event delivery when several gestures are triggered.Denis Dzyubenko2009-10-222-23/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When there are two different gestures are being triggered and they are supposed to be sent to different widgets, don't stop event "propagation" when the first event is successfully delivered. Reviewed-by: trustme
| * | | Improved gesture event filtering inside QGraphicsView for QGraphicObjectsDenis Dzyubenko2009-10-2211-129/+208
| | | | | | | | | | | | | | | | Reviewed-by: trustme
| * | | Merge branch 'origin/4.6' into widgets-team/4.6Olivier Goffart2009-10-2213-103/+100
| |\ \ \
| | * | | qfontengine_win.cpp: special Windows CE code removedJoerg Bornemann2009-10-221-75/+16
| | | | | | | | | | | | | | | | | | | | Reviewed-by: thartman
| | * | | 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
| * | | | Fixed crash in tst_qabstractitemview.Gabriel de Dietrich2009-10-211-3/+11
| | | | | | | | | | | | | | | | | | | | Reviewed-by: trust-me
| * | | | The QMenuPrivate::activationRecursionGuard has to be a boolean.Marius Bugge Monsen2009-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | Reviewed-by: Trust Me