aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QQuickTextDocumentWithImageResources: use QTextDocument::baseUrlJ-P Nurmi2013-12-041-6/+3
| | | | | | | | | QTextDocument::baseUrl was introduced in qtbase commit 1f22c1d. The ultimate goal is to get rid of QQuickTextDocumentWithImageResources and eventually make QQuickTextEdit's document interchangeable. Change-Id: Ibafeecc395b52f7200d8164f809bf76538e5620c Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-1/+1
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add QQuickText::hoveredLinkJ-P Nurmi2013-06-181-0/+4
| | | | | | Task-number: QTBUG-30804 Change-Id: I6c6993b152285f4bdf34d6e1aa04f25fa7ca41e0 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove unneeded mac specific code in QQuickTextYann Bodson2012-07-161-6/+0
| | | | | | | | We don't need to relayout in painting thread. Task-number: QTBUG-26361 Change-Id: Idfad1b90e2772e72411df821d02ea596a094f508 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add option to use native rasterizer for SceneGraph textEskil Abrahamsen Blomfeldt2012-07-101-0/+1
| | | | | | | | | | For old-style (desktop components) apps using QML 2 on regular density displays, distance field text will look out of place. We introduce an option to use the native rasterizer instead if you would rather have native look and feel than scalable text items. Change-Id: Idb38e3c89f2deab9ae1963357c6c5fb235ddeab8 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Reduce the number of unnecessary layouts on geometry changes.Andrew den Exter2012-07-091-3/+9
| | | | | | | | | | | | | | | | | Improve checks for geometry changes that don't affect layout, i.e width increasing when the previous layout didn't wrap or elide. Set implicit sizes just once during layout rather than setting the implicit width during and the implicit height after to limit the when an implicit size change can change geometry. And if there are multiple layouts of the same text/font combination re-use cached layout data as much as possible by guarding against unnecessary property changes on the layout, and not creating a new layout for calculating the implicit size of truncated text. Change-Id: Ia05e52e9170e1f5d3364896ab119e00d8a318299 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix clicking on links in aligned or elided Text.Andrew den Exter2012-06-251-1/+2
| | | | | | | | | Adjust the mouse position to compensate for any alignment offsets and test the elided text layout for anchors if none is found in the normal layout. Change-Id: Idfda3f7e372d0f2d6c1b7bb5f22d7015d52e8239 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove uninitialized variable.Andrew den Exter2012-04-201-1/+0
| | | | | | | | Relic from a prospective change to defer layout of text in more circumstances. Change-Id: I75d14e8cb01b86ab36ddbf58da99ba1cde14d801 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix Text baselineOffset caclulations.Andrew den Exter2012-04-171-1/+2
| | | | | | | | | | Update the baselineOffset when short cutting layout due to an empty text property. And allow alterations to the baseline due to images, font scaling and custom layouts when doing a layout. Task-number: QTBUG-24303 Change-Id: I5a31a6108cded490fef8b0674e15558ea4e22d6b Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-17/+29
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Allow styled text to be elided.Andrew den Exter2012-03-011-0/+2
| | | | | | | | | | | | Task-number: QTBUG-24521 Change-Id: Idd451d0a8a238a60691386726e34054c0368b658 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
| * Reduce size of QQuickTextPrivateYann Bodson2012-03-011-14/+23
| | | | | | | | | | | | | | Move less used members to an extra struct lazily allocated Change-Id: I87e464af4b9d29303705dd7e766f734309ed7763 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
| * Don't round Text dimensions.Andrew den Exter2012-02-291-3/+3
| | | | | | | | | | | | | | | | | | Painting issues in QtQuick1 meant drawing had to be aligned to pixel boundaries, since this is no longer a problem we should use qreal everywhere. Change-Id: I58e88e10270fa603170f1cedf471bfb53bd89b73 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
| * Fix font size calculation in headings in StyledText.Yann Bodson2012-02-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | Calculate the font size correctly even when the size is specified in pixels and update this size when the font changes. Also make sure that the text layout's font is set before parsing. Task-number: QTBUG-24458 Change-Id: Ida7723f6e4f4b9fd3a6878076f4beaf5bda8f7f7 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* | Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-8/+8
|/ | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Reduce the size of QTextPrivate.Andrew den Exter2012-02-211-40/+42
| | | | | | | | Remove some unnecessary members, store colors as QRgb values instead of QColor, and reorder members to minimise alignment padding. Change-Id: Id3958429008c97a5714734a529250fe881e2161b Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove commit headersAaron Kennedy2012-02-201-1/+0
| | | | | | | | These were used when we were porting from QtQuick 1 to QtQuick 2 but are no longer necessary. Change-Id: I0eeb7e13b4affdd6ab6c6dddea760afcdf38ee4f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Avoid an unnecessary layout when eliding text.Andrew den Exter2012-02-171-0/+1
| | | | | | | | Query the elided text from the initial layout rather than doing a second layout of the line to be elided. Change-Id: I399f99a11046013c0c51add2e2f2dd14b959831a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix multi-length string substitution.Andrew den Exter2012-02-161-0/+1
| | | | | | | | | | Multi-length string eliding was provided by QFontMetrics::elidedText() which is no longer used for layouts. So we instead have to do the string substitution ourselves if the text doesn't fit before finally eliding. Change-Id: Iab2e54b332390290d656299a5be148f39f78df9d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add linkColor property to Text.Andrew den Exter2012-02-091-0/+1
| | | | | | | | | | | | | | | Allows the color of links in text to be changed from the default blue. This currently only works with StyledText and the distance field rendererer. It could be made to work with RichText overwriting the specified foreground color in all instances or by not setting a default color in the html parser. The former would prevent the color being set with CSS or some future means for altering text formats. The latter would break rendering with QPainter. Task-number: QTBUG-23048 Change-Id: I98df215cabe8a089f648fd4a6206622b4318fb8f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add contentWidth and contentHeight properties to Text elements.Andrew den Exter2012-02-071-1/+1
| | | | | | | | | | | For Text and TextEdit this is a rename of paintedWidth and paintedHeight both of which remain as synonyms of the content properties for compatability. For TextInput this is a new property. Task-number: QTBUG-23691 Task-number: QTBUG-15160 Change-Id: Idbdc72fad34922be21b649ca45fc39b5e533ed1a Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove pixmap text caching in QML text elementYann Bodson2012-02-071-25/+0
| | | | | | Task-number: QTBUG-24033 Change-Id: Ifa24482b98536300c2f4c643a86517a019de8a84 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add support for resizing fonts to fit Text dimensions.Andrew den Exter2012-02-061-3/+7
| | | | | | | | | | | This adds a mode where if the content of a Text item doesn't fit within its bounds the font size is reduced during layout until it does or a minimum font size is reached. Task-number: QTBUG-22832 Change-Id: I6198ef03899e2f21b32e313548966ef4b0e3bff1 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Support inline images with <img> tag in StyledTextYann Bodson2012-02-021-0/+7
| | | | | | Task-number: QTBUG-21793 Change-Id: Ie7b9f293c6c9a949c1899152c38b61251b0069d3 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add support for shared glyph cacheEskil Abrahamsen Blomfeldt2012-01-241-0/+7
| | | | | | | | Use a shared graphics cache to back the distance fields if it is available. Change-Id: Id5e6e7a28e38e349d787e66016b2d0faebc791d7 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add a baseUrl property to Text and TextEdit.Andrew den Exter2012-01-191-0/+4
| | | | | | | | | Specifies the base URL which embedded links in rich text are resolved against. By default this is the URL of the item. Task-number: QTBUG-23655 Change-Id: Ib51b8503a18d9ac4e1801c77b77b3595d8f4912a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't load embedded images from the current working directory.Andrew den Exter2012-01-191-2/+14
| | | | | | | | | | | Override QTextImageHandler's image loading as it will attempt to resolve relative paths and load the image itself if the document returns an invalid image from loadResource, which we don't want as it bypasses the pixmap cache and resolves against the application and current working directory instead of the Text items context. Change-Id: Ia1d3633036f96d902e1ac03dae5d5b203fba7ff1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Small Text creation performance improvements.Martin Jones2011-12-201-3/+5
| | | | | | Change-Id: Ie92129887730d3738e14116cf22e1c30b836a415 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add support for pixmap cache images to TextEdit.Andrew den Exter2011-12-071-1/+29
| | | | | | | | Re-use the QQuickTextDocumentWithImageResources class from Text to allow image resources to be loaded from the pixmap cache. Change-Id: I13170eefe664447b77f2980fb2fe7b4e2f8eb81c Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-021-0/+169
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>