aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextinput_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QQuickTextEdit/Input: revise implicit resizing - take twoJ-P Nurmi2015-10-041-6/+2
| | | | | | | | Referencing unexported symbols (ExtraData) from an inlined method does not work with MinGW. Change-Id: I19935c84c4e2014f73bcd1801d182d193166bd44 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* QQuickTextEdit/Input: revise implicit resizingJ-P Nurmi2015-10-031-1/+8
| | | | | | | | | | Rename explicitImplicitSize to better descriptive implicitResize, and add a method to disable the default behavior. QQuickTextField was unable to access the flag directly, because ExtraData is not exported (and we prefer to keep it that way). Change-Id: Ia8b8281267adfc376e03a14882708e9cf80f0451 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* TextInput & TextEdit: allow controls to override the implicit sizeJ-P Nurmi2015-09-061-0/+1
| | | | | | Change-Id: I4b5eae46a9fef574249eee9061858bdf874c54be Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Export QQuickTextInputPrivate and QQuickTextEditPrivateJ-P Nurmi2015-06-231-1/+1
| | | | | | | ...so that QtQuick.Controls 2 TextField and TextArea can inherit them. Change-Id: I9383927c51a70848753a9f41f374d4161000fbb1 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* QQuickTextInput: move paddings into extraDataLiang Qi2015-06-151-19/+17
| | | | | | Task-number: QTBUG-46529 Change-Id: Ifa072dccdf2dc8c52c6865d13ccf1930c92ec51d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devGabriel de Dietrich2015-03-061-4/+4
|\
| * Fix invocations of static methods of QGuiApplication/QCoreApplication.Friedemann Kleint2015-03-051-4/+4
| | | | | | | | | | Change-Id: I7bcc209b0c6e77cf6d974af85a19487345a48975 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
* | TextInput: add support for paddingJ-P Nurmi2015-03-051-0/+24
|/ | | | | | | | | | | | | | This makes it possible for TextField to inherit TextInput, reserve space for the decoration, and set the desired property defaults without having to create dozens of property aliases. [ChangeLog][QtQuick][TextInput] Added padding, leftPadding, topPadding, rightPadding and bottomPadding properties. Task-number: QTBUG-41559 Change-Id: Iaa7697a10a6f66685c7cae454edf4c1984d411bc Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devOswald Buddenhagen2014-09-111-21/+11
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickpainteditem.h src/quick/items/qquickshadereffectsource.cpp src/quick/items/qquickshadereffectsource_p.h Change-Id: If98096443afe85fc4370cef971eace050006a61b
| * Fix cursor blinking for TextInput and TextEditSimon Hausmann2014-08-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before commit fb339b21b8a24b835cea7a057c47b7c5ad80dd72 relied on the simple transparent rectangle node to remain invisible. After that commit we used the regular rectangle node, which doesn't seem to like toggling the color between transparent and solid black and therefore the cursor was always visible. As advised by Gunnar this patch implements a much simpler logic: When the cursor is supposed to be invisible, we just don't create a scene graph node for it anymore. Change-Id: I7b0e173f6d37997559ee0911f37903efdb14847f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add Q_DECL_OVERRIDEAlbert Astals Cid2014-08-141-2/+2
|/ | | | | Change-Id: I2e64950aef710f943c3bc50bc9bf8a1f7fb58d28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Introduce TextInput::ensureVisible(int position)J-P Nurmi2014-05-211-0/+1
| | | | | | | | | | | | | | | This is required for TextField to be able to implement text selection handles. TextField needs to be able to ensure that the appropriate character position becomes visible when the handles are moved around. [ChangeLog][QtQuick][TextInput] Added TextInput::ensureVisible(int pos) method to be able to control the scrolling position of a TextInput that has automatic scrolling enabled. Task-number: QTBUG-38934 Change-Id: Id77eafcda6324d10868e0798519e5b712a0d33ed Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Makes PasswordMaskDelay configurable through TextInputRisto Avila2014-03-121-0/+2
| | | | | | | | | | | Adds a new property to TextInput which can be used to override QPlatformTheme::PasswordMaskDelay. The new property is TextInput.passwordMaskDelay and takes in delay (ms) which time character is shown before masking it. This is only when echoMode is set to TextInput.Password [ChangeLog][QtQuick][TextInput] Added passwordMaskDelay property Change-Id: I52812b883db11fdd21b25154887c51df8a44f69c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Update QQuickTextInput's baselineOffset when only height changesJan Arve Saether2014-02-221-0/+1
| | | | | | | Task-number: QTBUG-36529 Change-Id: I2cd577013c4965e76c9350abaebb9b7a6e4e0270 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-2/+2
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use the platform theme's password mask character for text input fields.Mitch Curtis2013-04-231-1/+1
| | | | | | | | Task-number: QTBUG-29871 Change-Id: I3b15dfab5ca6455df465c502c93aac7b85a64531 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* TextInput: Handle focus event directlyCaroline Chao2013-03-071-1/+1
| | | | | | | | | Use focusInEvent and focusOutEvent instead of changeItem to handle focus event. (One benefit is the focus events have the focus reason and changeItem doesn't). Change-Id: I164820f375f0ffddc529d59565a3e448b84c6042 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.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>
* Compile with QT_NO_VALIDATOR.Volker Krause2012-11-301-3/+3
| | | | | | | | Theses enums were apparently renamed for the case QValidator is present, so follow this here as well. Change-Id: Ic2a3fd5296a6dd9da356c2e5efd88f56d0843664 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* Enable module build with QT_NO_IMTasuku Suzuki2012-11-261-1/+19
| | | | | | Change-Id: I90f8ec7e6357db7b4038bb1646fe9d3835821556 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Alan Alpert (RIM) <aalpert@rim.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>
* Fix restoration of cursor position and selection after undo/redo.Andrew den Exter2012-07-241-0/+5
| | | | | | | | | If a text selection was deleted, the selection should be restored by an undo, but not if the selection was part of an atomic operation like the DeleteStartOfWord key sequence. Change-Id: Ia37f29c78f6367c60377c539c4e394e014485a49 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Add option to use native rasterizer for SceneGraph textEskil Abrahamsen Blomfeldt2012-07-101-0/+2
| | | | | | | | | | 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>
* Defer construction of TextEdit/TextInput delegates.Andrew den Exter2012-05-141-1/+8
| | | | | | | | | | | | | | | Don't create instances of the delegate components until the item gains focus, or the cursorVisible property is set to true. Cursor delegates are typically small and relatively fast to create and so won't have a significant cost during a one off focus in event, but that cost can still add up when creating a number of TextInputs or TextEdits at once. If a delegate that is instantiated immeditately is required it is possible to instead create a child item and bind to the cursorRectangle and cursorVisible properties. Change-Id: I5ec2b5b6a30e534aee3dd5a58c6a5ac0686f5ce2 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* QQuickTextInput aligment to follow input method on neutral contentPekka Vuorela2012-04-271-8/+2
| | | | | | | | | | | | Earlier input method was followed only on empty editor. This made inputting one space character with arabic to be visualized left to right. As related change arabic numbers are aligned right even though the flow goes left to right. Change-Id: I36448949569f6290faad69de14df424575d8b97e Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix bounding rects of text items.Andrew den Exter2012-04-271-1/+1
| | | | | | | | | | Ensure the rectangles are correctly positioned with right and center aligned text, not just sized correctly. Also add padding to the clip rects so the cursor and styled text aren't clipped at the item boundaries. Change-Id: I03ef140589154ebd49b600b0a4c4fbeff845c10f Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Set cursorVisible to false when im cursor length is 0.Andrew den Exter2012-04-021-2/+3
| | | | | | | | | | | | If the length of the QInputMethodEvent::Cursor attribute is 0 the cursor is supposed to be hidden. To ensure this and any other IM state is reverted when the input method is reset send a empty event to the editor when preedit is cancelled or removed and count formatting or cursor changes when determining if the input method is composing (i.e has state that needs to be reset). Change-Id: Ifca69aa0c18776b1aef355ed6ae9aecc40b9d475 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* TextInput to use password mask delay if platform style defines onePekka Vuorela2012-03-271-4/+0
| | | | | | | Change-Id: I05b98db2d7855f29b11749524a74e04a71178347 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove tentative commit from editorsPekka Vuorela2012-03-261-1/+0
| | | | | | | | | Feature to be reimplemented simplified. Now using new FocusAboutToChange event for using input method to commit stuff when window is losing focus. Change-Id: I81c96c36d9f0a1b38adb4324f3b892c33547cb50 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix text wrapping and eliding with implicitWidth.Andrew den Exter2012-03-221-1/+6
| | | | | | | | | | | | Update the implicitWidth of the item before continuing with the layout rather than after it's completed this gives any bindings dependent on the implicitWidth the opportunity to update the width before the layout continues. Task-number: QTBUG-22680 Task-number: QTBUG-24251 Change-Id: I61cd96ad9891b22d8b83937ad2c06719f88976b6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove unused init function.Andrew den Exter2012-03-131-1/+0
| | | | | Change-Id: Id66e177a544fd8e019bae86fff6bd04bd0497d7c Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-6/+7
|\ | | | | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
| * Use floating point types for position offsets and cursorRectangle.Andrew den Exter2012-02-241-6/+7
| | | | | | | | | | | | | | | | | | Rounding to align painting to pixel boundaries is no longer necessary are largely removed. Correct the few instances remaining in TextEdit and TextInput. Change-Id: Ic6ec57092d74ec43b23d85cd8868e0190acc3e09 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* | Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-4/+4
|/ | | | | | | | | | | | | 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 QQuickTextInputPrivate.Andrew den Exter2012-02-221-63/+49
| | | | | | | | Remove some redundant or obsolete member and reorder members to minimise padding for alignment. Change-Id: I2660007baa07bea076e9ad307061af87c07e37cf 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>
* Have input method hints on only classes using themPekka Vuorela2012-02-171-0/+2
| | | | | | | | | | | Removed inputMethodHints setter and getter from QQuickItem. No need to consume memory for input method hints on every item when only QQuickTextInput and QQuickTextEdit actually use them. Additionally introduced change signals on the editor hint properties. Change-Id: Ice380d4f4dd47fdde73d2468f4a44a7d1540ad45 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Use QInputMethod instead of deprecated QInputPanelPekka Vuorela2012-02-101-1/+1
| | | | | | | | | | 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 a persistentSelection property to TextInput.Andrew den Exter2012-02-021-0/+2
| | | | | | | | Improves feature parity with TextEdit. Task-number: QTBUG-16355 Change-Id: I3919c71454a4f4574a1ee35ad38969459beb8363 Reviewed-by: Martin Jones <martin.jones@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/+8
| | | | | | | | 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>
* Update TextInput.acceptableInput on component complete.Andrew den Exter2012-01-201-1/+16
| | | | | | | | | | | | QValidator doesn't notify when it's validation criteria changes so is susceptible to order of evaluation issues. Deferring the initial validation will ensure validators with static criteria are correctly applied. Notification from QValidator on changes would solve this for all cases: QTBUG-23694. Task-number: QTBUG-21103 Change-Id: I920f36645fd18ce809db56b5daf73545f1d603dc Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Made QQuickTextInput follow input direction changesPekka Vuorela2012-01-171-1/+1
| | | | | | | | | | | | | Cursor of empty field should align based on input method direction. Now input method allowed to change direction on run time. Also earlier cursor wasn't properly drawn on correct alignment at all. Change-Id: I4601f10e6b5dde09591bd484b05f001add6c1573 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Adapt to QInputPanel::inputDirection() APIPekka Vuorela2012-01-121-1/+1
| | | | | | | Information moved from QGuiApplication into QInputPanel. Change-Id: Idd80609f4b67bffae7222a1fa27918724ebf60f6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix validators not allowing backspace or delete.Andrew den Exter2012-01-121-2/+0
| | | | | | | | | | TextInput will allow non-valid changes to already invalid text, when a validator is changed update the current validity so changes can be made to bring the text back to a valid state. Task-number: QTBUG-22080 Change-Id: I501961b473f58c317bce474b1df8d91fd1f967d4 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add undo and redo functions to TextInput and TextEdit.Andrew den Exter2012-01-121-2/+5
| | | | | | | | | The functionality already existed and was usable through keyboard short cuts but was not accessible through API. Task-number: QTBUG-16191 Change-Id: I080fa2ddb76668a7a632aa7477004f99037ea68b Reviewed-by: Martin Jones <martin.jones@nokia.com>