aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Better document with examples how relative paths are resolved.Andrew den Exter2012-02-141-0/+14
| | | | | Change-Id: Ia52956889216d11d7bb10307f09b582b55d0b4cd Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QML Text: make sure that the bounding rect has a y position of 0.Yann Bodson2012-02-131-0/+1
| | | | | | | This line was lost in a previous merge. Change-Id: If3683fa17630452abab115638c1c0ebf0824e2a1 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Use QInputMethod instead of deprecated QInputPanelPekka Vuorela2012-02-101-2/+2
| | | | | | | | | | Similarly deprecate Qt.application.inputPanel and introduce replacement Qt.inputMethod. Change-Id: Ie4fd467f93f75023c86b0a2d038d858fe5001146 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Sami Kananoja <sami.kananoja@nokia.com>
* Add linkColor property to Text.Andrew den Exter2012-02-091-5/+32
| | | | | | | | | | | | | | | 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>
* Resolve StyledText img tags relative to baseUrl.Andrew den Exter2012-02-071-2/+8
| | | | | Change-Id: I954195d52330c65e851b7c0fcdb6c8dabf29335d Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Add contentWidth and contentHeight properties to Text elements.Andrew den Exter2012-02-071-13/+13
| | | | | | | | | | | 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-307/+35
| | | | | | Task-number: QTBUG-24033 Change-Id: Ifa24482b98536300c2f4c643a86517a019de8a84 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix updating text color in Text elementEskil Abrahamsen Blomfeldt2012-02-061-1/+3
| | | | | | | | | | The setColor() function in QQuickText calls markDirty() which did not specify that the whole paint node should be updated, so color updates would have no effect until something else changed. Change-Id: I93741b6c697f2dd6ad5a315250502a7a6e3ce1d7 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add support for resizing fonts to fit Text dimensions.Andrew den Exter2012-02-061-153/+362
| | | | | | | | | | | 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>
* Cleanup: remove some debugging and use QQuickTextNode::addImageYann Bodson2012-02-061-17/+2
| | | | | Change-Id: I20f38f590b158d5d615923c30e85e2a7cfd99763 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Support inline images with <img> tag in StyledTextYann Bodson2012-02-021-13/+138
| | | | | | Task-number: QTBUG-21793 Change-Id: Ie7b9f293c6c9a949c1899152c38b61251b0069d3 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Clear Text formatting when setting plain text content.Andrew den Exter2012-02-021-0/+1
| | | | | | Task-number: QTBUG-21919 Change-Id: I55605d2bd053968868a885e63cc4bc042ada0839 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Document the limitations of AutoText's rich text detection.Andrew den Exter2012-02-011-1/+5
| | | | | | | | | | Repeat the explanation given in Qt::mightBeRichText's documentation for how rich text is identified and under what circumstances it may fail to recognize it. Task-number: QTBUG-21917 Change-Id: Ie012ddd2fd5f874da0ea819c354a1ed5b7573670 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>
* Fix updating of QML Text elementEskil Abrahamsen Blomfeldt2012-01-261-1/+1
| | | | | | | | | The negation in the test was left over from an earlier API and would break the test and most likely cause the Text element to always bypass its update. Change-Id: Idc5c94a76a0477a9433305f5aba43c4bb8d67806 Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
* Add support for shared glyph cacheEskil Abrahamsen Blomfeldt2012-01-241-3/+24
| | | | | | | | 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-3/+52
| | | | | | | | | 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-24/+96
| | | | | | | | | | | 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>
* Adapt to QInputPanel::inputDirection() APIPekka Vuorela2012-01-121-1/+2
| | | | | | | Information moved from QGuiApplication into QInputPanel. Change-Id: Idd80609f4b67bffae7222a1fa27918724ebf60f6 Reviewed-by: Joona Petrell <joona.t.petrell@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>
* Support <pre> in StyleText textFormatMartin Jones2012-01-051-0/+2
| | | | | | | Task-number: QTBUG-23159 Change-Id: I842d066efb3a78defba61cc31060840f771f9b11 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add accessibility to qmlFrederik Gladhorn2012-01-021-0/+3
| | | | | | | | | | | | | | | This consists of two parts: An attached property for QML items and a plugin for the accessibility framework. The attached property simply takes care of some properties (name, role) that are needed in order to expose semantics of the application to assistive tools. The plugin exposes the hierarchy of QML items to the accessibility framework. Change-Id: I32f5603d0d9549b01b3645b205b710b9801762f7 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Small Text creation performance improvements.Martin Jones2011-12-201-27/+51
| | | | | | Change-Id: Ie92129887730d3738e14116cf22e1c30b836a415 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't enable multiline eliding unless wrap is enabled.Martin Jones2011-12-201-4/+4
| | | | | | | | | | Setting the height of the Text element to less than the height of the font caused the multiline eliding to activated. Also ensure multiline eliding only elides a truncated first line if it does not fit in the width allowed. Change-Id: If7e88d6ad82cb12cdb53d92616e62c3895611115 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Avoid Text layout being triggered unnecessarilyMartin Jones2011-12-071-17/+60
| | | | | | | | | | | Text was quite often layed out twice during construction due to geometry changes, and often at run time due to other geometry changes. This change checks for cases which do not require relayouting and drops out early. These are easier to detect than trying to have a single giant if statement covering all the positive combinations. Change-Id: I2deb2ab52d35b3d02bced698d05fef91c9e2f745 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add support for pixmap cache images to TextEdit.Andrew den Exter2011-12-071-40/+22
| | | | | | | | 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/+1950
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>