summaryrefslogtreecommitdiffstats
path: root/src/gui
Commit message (Collapse)AuthorAgeFilesLines
* QGraphicsAnchorLayoutPrivate: Fixing initial geometry values for new layout ↵Jesus Sanchez-Palencia2009-10-061-12/+25
| | | | | | | | | | | items Now every item starts with its geometry on ((0,0), preferredSize()). By doing this we guarantee that every item will have a known initial value, which can be specially useful on float cases for instance. Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGraphicsAnchorLayoutPrivate: Handling floating items as an invalid layout ↵Jesus Sanchez-Palencia2009-10-062-1/+53
| | | | | | | | | | | situation We make use of the anchor visited on findPaths() to keep track of how many items are visited when walking on the graph. We can use this information of how many items are reachable (non-float) in order to check if we have floating items (not reachable from any graph vertex). If so, we have a situation not supported by now. Signed-off-by: Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGraphicsAnchorLayout: Fix creation of internal layout anchorsEduardo M. Fleury2009-10-061-62/+83
| | | | | | | | | | | | Since the AnchorData cleanup commit (c974aca8) all anchor initialization is being done by refreshSizeHints. However that method was not able to properly initialize the internal layout anchors. This commit refactors that method both to add the functionality and improve readability. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGraphicsAnchorLayout: Add support for expanding SizePolicy with simplificationCaio Marcelo de Oliveira Filho2009-10-062-27/+36
| | | | | | | | | | | | | Updating "refreshSizeHints" and "updateChildrenSizes" methods for standard, parallel and sequential anchors, in order to support the expanding SizePolicy flag. This adds the logic required to calculate equivalent expected/nominal expanding size (AnchorData::expSize) as well as the logic to propagate the effective size when in the expanding state (AnchorData::sizeAtExpected). Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QSimplex: Remove overly conservative assertionEduardo M. Fleury2009-10-062-19/+31
| | | | | | | | | | | | | This assertion started failing after the addition of expanding state. After some investigation we felt that the assertion itself was too strong and would fail in some valid cases. The new assertion is formally right as it tests whether the simplex solver was able to satisfy the simplex constraints, _exactly_ what it is expected to do. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGraphicsAnchorLayout: Update solveExpanding to handle simplified graphsEduardo M. Fleury2009-10-061-12/+72
| | | | | | | | | | | | | | | | | | | | | | | The previous implementation of solveExpanding would assume that anchors were either completely expanding (would grow to their sizeAtMaximum) or non-expanding (would try to remain at their sizeAtPreferred). What happens however is that with simplification enabled, we may have anchors that are "partially" expanding. An example is a sequential anchor that groups together two leaf anchors where only one of them is expanding. In this case, the expected size of that group anchor would be the sum of the max size of the expanding child plus the preferred size of the non-expanding child. To handle the above case we added the "expSize" variable. It holds the expected value at Expanding for each anchor. Based on this, and the already calculated values of sizeAtMaximum and sizeAtPreferred, the solver calculates the actual sizeAtExpanding for them. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org>
* QGraphicsAnchorLayout: avoid code duplication when initializing complex anchorsCaio Marcelo de Oliveira Filho2009-10-062-52/+54
| | | | | | | | | | | | | Now we can use refreshSizeHints_helper() to initialize complex anchors (parallel and sequential). This avoids duplication of code in the function simplifySequentialChunk(). This commit also 'disable' ExpandFlag temporarily, stabilizing the tests for the simplification. The next commit should re-enable it implementing the necessary code for simplification as well. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QGraphicsAnchorLayout: cleaning up AnchorDataCaio Marcelo de Oliveira Filho2009-10-062-83/+59
| | | | | | | | | | | | | | | | Use just one constructor for AnchorData and tweak the struct when necessary. Also use the function refreshSizeHints() for Normal anchors to get the item information instead of passing to the constructor. This has the advantage that we don't need to replicate the code for checking and updating the size hint and size policies. Note that the code before only considered the size policies after the first refreshSizeHints() -- which we know will be called after the simplification, so the assumption seems to be correct, but we don't depend on that anymore.. Signed-off-by: Caio Marcelo de Oliveira Filho <caio.oliveira@openbossa.org> Reviewed-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org>
* QGraphicsAnchorLayout: Enabling Simplex support for Expanding size policyEduardo M. Fleury2009-10-062-11/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support the expanding size policy we had to change the way the setup process work. Previously we used to calculate three key-frames using the simplex solver: - sizeAtMinimum: the value an anchor should be in when the layout is at its minimum size. Calculated using simplex solver to minimize the layout size. - sizeAtPreferred: the value an anchor should be in when the layout is at its preferred size. Calculated using simplex solver to minimize the deviation from the items preferred sizes. - sizeAtMaximum: the value an anchor should be in when the layout is at its maximum size. Calculated using simplex solver to maximize the layout size. That worked fine but didn't diferentiate standard items from the "expanding" ones. In other words, all items would grow from their sizeAtPreferred to their sizeAtMaximum at the same rate. To support the idea of "expanding" items, ie. items that should grow faster than the others, we added a fourth state, between preferred and maximum. Now we have the following interpolation order: sizeAtMinimum -> sizeAtPreferred -> sizeAtExpanding -> sizeAtMaximum. The definition of the "expanding" state is that all "expanding" items should have grown all the way to their "sizeAtMaximum" values whereas non expanding items should have kept their preferred sizes. The only exception is that non-expanding items are allowed to grow if that is necessary to allow the "expanding" items to reach their sizeAtMaximum. So, the visual result is that if the layout is resized from its preferred size to its maximum size, the expanding items will grow first and then, in a second phase, the other items will grow. This commit adds QGALPrivate::solveExpanding() and calls it from calculateGraphs(). Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
* QGraphicsAnchorLayout: Add data structures for Expanding size policyEduardo M. Fleury2009-10-062-13/+51
| | | | | | | | | | Adding required members for the upcoming support of the QSizePolicy::Expand flag. In this state, running with simplification will probably not work. Signed-off-by: Eduardo M. Fleury <eduardo.fleury@openbossa.org> Reviewed-by: Artur Duque de Souza <artur.souza@openbossa.org>
* Fix tst_QFontDialog::setFontOlivier Goffart2009-10-061-1/+1
| | | | | | | The font size was not respected because it is taken from the request which could only contains the pixel size. Reviewed-by: Richard
* Don't output redundant setPen command when reusing PS printerEskil Abrahamsen Blomfeldt2009-10-061-0/+1
| | | | | | | | | | If you reused a printer to paint to several different files, the results would sometimes be different, as the subsequent runs would have redundant setPen commands in its output. This was because the simplePen flag was not reset to its initial value when reusing the print engine. Task-number: QTBUG-4479 Reviewed-by: Trond
* Fix the pad navigator demo.Alexis Menard2009-10-061-1/+1
| | | | | | | | | | | | QGraphicsWidget used to called setPosHelper where all the logic was. But since the new flag itemSendsGeometryChanges some part of the code inside setPosHelper move back to setPos. QGraphicsWidget was not updated after this change. It doesn't matter as it is but for QGraphicsProxyWidget which activate the flag itemSendsGeometryChanges it matters. ItemChange was never called so the proxy was never really moved. Task-number:QT-672 Reviewed-by:andreas
* Print images with colortable using their colortable in PDFGunnar Sletta2009-10-061-1/+1
| | | | Reviewed-by: Trond
* Fixing Keypad Navigation on N95 devicesAlessandro Portale2009-10-051-1/+6
| | | | | | | | | HAL::Get(HALData::EPen, TInt& result) may set 'result' to 1 on some 3.1 systems (e.g. N95). But we know that S60 systems below 5.0 did not support touch. Let's use tahth knowledge and work-around that N95 HAL bug. Rev-By: Jani Hautakangas
* Symbain crash fix for QPixmap->QImage conversion.Alessandro Portale2009-10-051-1/+6
| | | | | | | | | | | In some cases the QImage, returned by QS60PixmapData::toImage() image an invalid pointer. That led to reproducable crashes on 3.1 Device and Emulator when starting a drag in the FridgeMagnets demo. Jani Hautakangas created this fix and I tested it on 3.1 Device and Emulator confirming that the crash is gone. Rev-By: Jani Hautakangas Rev-By: Alessandro Portale
* Fix QTextEdit pageUp/Down key handling in read-only modemae2009-10-051-21/+28
| | | | | | | | | QTextControl has two independent interaction flags TextEditable and TextSelectableByKeyboard, i.e. the latter can also apply in read-only mode. This used to be handled incorrectly in QTextEdit. Reviewed-by: con
* Fix QPlainTextEdit pageUp/Down key handling in read-only modemae2009-10-051-22/+29
| | | | | | | | | QTextControl has two independent interaction flags TextEditable and TextSelectableByKeyboard, i.e. the latter can also apply in read-only mode. This used to be handled incorrectly in QPlainTextEdit. Reviewed-by: con
* Fix a compilation warning on Mac OS XBenjamin Poulain2009-10-051-1/+4
| | | | The variable updatesEnabled is not used on Mac OS X.
* Fixed bug in X11 paint engine causing source pixmap depth to change.Samuel Rødal2009-10-051-0/+1
| | | | | | | | Setting a pixmap brush when painting to a 32-bit target might cause the source pixmap to be converted to 32-bit. We should detach the pixmap if we need to convert it. Reviewed-by: Trond
* Fixed a crash in menus on Symbian.axis2009-10-053-16/+19
| | | | | | | | | | | | | | | | | | | | The reason for the crash was the following: When we make menu entries in Qt, we assign each item an arbitrary command ID. This is because Symbian usually puts the items in a resource file and refers to them by ID, but we need to be dynamic. These command IDs are also assigned to cascading menu items (sub menus). When we then get a callback in RestoreMenuL with one of submenu IDs, we used to ask Symbian to construct the menu items for them, but Symbian doesn't know about them. Fixed by avoiding call into S60 code if the ID belongs to Qt. Also put a cap on the number of menu items. It's very unlikely that anyone will reach it, but it's better to have an actual check. Task: QT-646 AutoTest: Manual testing went fine RevBy: mread
* Added some comments.axis2009-10-051-1/+1
|
* Fixed indentation.axis2009-10-051-3/+3
|
* Moved non-public functions out of public header file.axis2009-10-052-8/+5
| | | | RevBy: Trust me
* Fix QKeySequence::DeleteEndOfWord and QKeySequence::DeleteStartOfWordmae2009-10-051-2/+4
| | | | | | | | | QTextControl showed inconsistent behaviour with DeleteEndOfWord and DeleteStartOfWord when the cursor had a selection. With this patch, the commands will simply delete the existing selection, which is consistent behaviour with in other IDEs. Reviewed-by: Simon Hausmann
* QAbstractItemView: Make sure the view is updated when a delegate is set.Olivier Goffart2009-10-051-1/+3
| | | | | | | The test tst_QListView::task254449_draggingItemToNegativeCoordinates was failing in cocoa because of this. (on, cocoa, the call to show was doing the first paintEvent) Reviewed-by: Thierry
* Fixed pixeldust in translucent toplevel proxy widgets on MacGunnar Sletta2009-10-051-2/+3
| | | | Reviewed-by: Bjoern Erik Nilsen
* Fix whatsThis breakage when using custom style sheet fontJens Bache-Wiig2009-09-141-1/+1
| | | | | | | | | | | | When setting a large font using style sheets, the whats this popup size calculation would be incorrect resulting in half visible lables. By calling ensurePolished before showing the label, we ensure that this will be properly handled. We also added a new test case for whatsThis in tst_qtooltip Task-number: QTBUG-2416 Reviewed-by: ogoffart
* Improved performance in raster window surface for 16-bit displays.Samuel Rødal2009-10-051-2/+5
| | | | | | | | Greatly improves performance in flush() for the non-MITSHM case on 16-bit displays. Instead of converting the whole image to a pixmap only convert the sub-rect that's needed. Reviewed-by: Gunnar
* Made X11 pixmap backend's fromImage() check for Qt::NoOpaqueDetection.Samuel Rødal2009-10-051-2/+9
| | | | Reviewed-by: Gunnar
* Made X11 QPixmap backend return proper pixmap in alphaChannel().Samuel Rødal2009-10-051-2/+5
| | | | Reviewed-by: Gunnar
* Fix uninitialized read in QFormLayoutPrivate::setupVerticalLayoutData()Andreas Kling2009-10-051-1/+1
| | | | | Merge-request: 1541 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* fix creation of qws directory when app start preceeds qvfbJeremy Katz2009-10-052-1/+2
| | | | | | | | Change authored by Rhys. Bug introduced by the change to allow user-specific cache and pipe directories. Reviewed-by: Jeremy
* Doc fix.Alexis Menard2009-10-051-0/+30
| | | | Reviewed-by:TrustMe
* Tooltip: reusing tooltips sometimes goes wrongRichard Moe Gustavsen2009-10-051-1/+1
| | | | | | | | | We reuse tooltip whenever we can. But we forget to check if the format of the text changes inbetween (from html to plain). This causes the word wrap to fail sometimes. This change will fix that. Rev-By:MortenS
* Make QEventTransition works with QGraphicsObject.Alexis Menard2009-10-052-7/+11
| | | | | | | | | | | QStateMachine framework installs QObject event filters to catch events in order to triggers the proper transition. But installing a QObject event filter on a QGraphicsObject gives nothing because QGraphicsView events filters works differently. In order to make this works we now post events using QApplication::postEvent in addition to the QGraphicsView events. Reviewed-by:andreas
* Disable etched text on rich text labelsJens Bache-Wiig2009-10-051-2/+4
| | | | | | | | | | | | | When rendering etched text on disabled rich text labels we would previously draw distorted links. This is basically because anything that did not render with the text foreground role would be drawn twice as a shadow. Since there is no way to properly render this text etched we will rather disable it completely when the label uses rich text. Task-number: QTBUG-4543 Reviewed-by: Simon Hausmann
* Make it possible to implement engine-specific drop shadow filtersRhys Weatherley2009-10-051-0/+10
| | | | | | | | | | | | It wasn't possible for the paint engine to override the drop shadow filter because QPixmapDropShadowFilter::draw() was not asking for an engine-specific filter object. Also, change the OpenVG filter to use vgGaussianBlur() instead of vgConvolve(), and draw the original image on top of the shadow. Task-number: QTBUG-4583 Reviewed-by: trustme
* Adding comments.Alessandro Portale2009-10-031-0/+9
|
* Doc: silence qdoc warnings in S60 specific documentation.Volker Hilsheimer2009-10-032-3/+4
| | | | Not sure why the migration classes should be are \obsolete.
* Doc: silence more qdoc warnings.Volker Hilsheimer2009-10-033-15/+8
| | | | | Mark QGraphicsAnchor::unsetSpacing as reset function of the spacing property.
* Doc: add \since 4.6 to new QGraphicsItem::PanelModality enum.Volker Hilsheimer2009-10-031-0/+1
|
* Changed implementation of qDrawBorderPixmap() to use qDrawPixmaps().Kim Motoyoshi Kalland2009-10-024-232/+250
| | | | Reviewed-by: Trond
* Added support for drawing a pixmap multiple times in one call.Kim Motoyoshi Kalland2009-10-024-3/+95
| | | | | | | | | This is internal API. It's possible to specify a horizontal and vertical scale, rotation, opacity and source rectangle for each pixmap item. Useful for particle effects. Reviewed-by: Trond
* Doc: mark API of Gesture framework as preliminary.Volker Hilsheimer2009-10-022-0/+4
| | | | New API will most likely not be in the Beta release.
* Mac: bugfix 45f095b8970dc3c1b6f6e97fa2323654ba848288Richard Moe Gustavsen2009-10-021-9/+16
| | | | | | Seems like I forgot to handle page scrolls. Also did a small optimization (see also 45f095b8970dc3c1b6f6e97fa2323654ba848288)
* Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6Sami Merilä2009-10-0220-233/+384
|\
| * doc: Fixed numerous qdoc errors.Martin Smith2009-10-021-2/+2
| |
| * Mac: update/small fix to 45f095b8970dc3c1b6f6e97fa2323654ba848288Richard Moe Gustavsen2009-10-022-12/+14
| | | | | | | | | | | | | | | | It turns out that we need to let singleStep keep its value in qtextedit so that pushing the up/down buttons on the slider works as they should. Moreover, overriding the behaviour in abstract slider also makes QGraphicsView work out of the box. Also added in the test fix suggested by Olivier.
| * Renamed the values in the Qt::TileRule enum.Trond Kjernåsen2009-10-023-28/+28
| | | | | | | | | | | | | | Stretch, Repeat and Round are too generic. Renamed to StretchTile, RepeatTile and RoundTile. Reviewed-by: Gunnar