summaryrefslogtreecommitdiff
path: root/src/controls/SpinBox.qml
Commit message (Collapse)AuthorAgeFilesLines
* SpinBox: set "editable" accessible propertyJ-P Nurmi2017-05-221-0/+1
| | | | | | | | | Because we want to make QQuickItemPrivate::canAcceptTabFocus() respect non-editable SpinBoxes (available in QQC2). Change-Id: If2bc2707c448203a2105ddc4de10ac1566818e00 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Revert "Fix Controls 1 types linking to Controls 2"Topi Reinio2016-06-221-1/+0
| | | | | | | | | | | This reverts commit b5a8306bf6d4949066872ac2afc8d0a01f716bd7. The incorrect \inherits commands caused property documentation from base types go missing. Task-number: QTBUG-54150 Change-Id: I0bbe604a6fe904d8e6a4596777262255a794ec62 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix Controls 1 types linking to Controls 2v5.7.0-rc1v5.7.05.7.0Mitch Curtis2016-05-261-0/+1
| | | | | | Task-number: QTBUG-53529 Change-Id: I4933a03c49dee4e3edc56dd406f67073da341ac1 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-beta1Liang Qi2016-04-081-3/+1
|\ | | | | | | Change-Id: Ic78345c599719f3dd80b1d6a6004d46a085da4af
| * Doc: Remove text mentioning validatorVenugopal Shivashankar2016-03-091-3/+1
| | | | | | | | | | | | | | | | | | At least it is not documented anywhere how to set the validator for the SpinBox control. Change-Id: I6d31608306298d601a0f91f6b14d71f6775a5792 Task-number: QTBUG-51723 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Unify license header usageAntti Kokko2016-02-041-12/+15
|/ | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: I3c851bc24da89f6300b94199387d1adf16ca4f48 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Add cursorPosition property to SpinBoxKati Kankaanpaa2015-10-021-0/+9
| | | | | | | | Expose the cursor position of the underlying text editor as a cursorPosition property in SpinBox. Change-Id: Ibe084d9f7e3e489db12040aed187e76752f76e90 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge Extras' styling system into Controls'.Mitch Curtis2015-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removes the duplicated style settings functionality in Extras and simplifies the installed styles directory structure. - Extras' Base style is now part of Controls' Base style, eliminating the need for a separate QtQuick.Extras.Styles import. The cost of doing this should be negligible: a few QML files and two images. If we didn't merge Extras' Baste style into Controls', we'd need extras-specific code in qquickcontrolssettings, as the default style search path is: qml/QtQuick/Controls/Styles/ Whereas the Extras Base style would be in: qml/QtQuick/Extras/Styles/ The Extras Base style can't go into Controls' Base style directory, either, because otherwise we'd have two qmldir files there. The Flat style doesn't have this problem because it is all contained in one plugin and gets installed into its own Flat/ folder. - Documentation now lists the Extras controls as \since QtQuick.Extras 1.4. - Adds the customcontrolsstyle auto test to ensure that custom styling is tested. Change-Id: I19ca7a8b7e1c1daa85b272f4ccf9a2f05c76e0d9 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devJ-P Nurmi2015-02-121-3/+3
|\ | | | | | | | | | | | | | | Conflicts: src/controls/TableView.qml tests/auto/controls/data/tst_gridlayout.qml Change-Id: I030bc50dc8fcf7b6b00e183dc3a67c3cd012f3fb
| * Disable hover on touchJ-P Nurmi2015-02-041-3/+3
| | | | | | | | | | | | Task-number: QTBUG-44267 Change-Id: I467f08ae6c5264b7e858022af9ff293117434018 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* | Controls: update license headersJ-P Nurmi2015-02-111-28/+24
|/ | | | | | | Change-Id: I77e7a218a958d76ac7ef7780f4be52a81f76fa6b Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Make the cursor and selection handle delegates private for nowJ-P Nurmi2014-10-301-2/+2
| | | | | | | | | | | | | | | | | | The API is not ideal, we don't want to lock this thing down like as it is now. All styles implemented so far created CursorHandleStyle.qml and SelectionHandleStyle.qml so perhaps that's the better way to go. Furthermore, there's never going to be multiple occurrences of the handle pairs, so it should be one shared instance. Thus, the relevant style delegates probably shouldn't be sprinkled around various control styles... So, for now, the most pragmatic solution is to make the handles and cursors internal since we don't have time to revamp it before 5.4.0. Change-Id: Ib9fcc4a431bb510c8c55a760159f4d6a631554b3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Revert "SpinBox: hide VKB when appropriate"Samuel Nevala2014-10-241-2/+0
| | | | | | | | This reverts commit e64180b65cd9dfc2ff008dc5725ff0e58a833cd7. TextInput does commit & hide no need to do it here Change-Id: I29c9e9421afd957457c648dc07270ee5dd7ca8e5 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* SpinBox: hide VKB when appropriateJ-P Nurmi2014-10-201-0/+2
| | | | | Change-Id: I18eff3eb2b932b814d0808079c7ddf3b3bfaaf53 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* EditMenu: let menu property be a component to lazy load itRichard Moe Gustavsen2014-09-241-3/+2
| | | | | | | | | Since all input fields have a menu assigned to it by default (which in most cases never will be shown), it should be an optimization to await creating it until needed. Change-Id: I5777bbdae42103981e9b2f5ddfdfd763acea07ae Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Add EditMenu to input controlsRichard Moe Gustavsen2014-09-231-0/+10
| | | | | | | | Add EditMenu to TextArea, TextField, ComboBox and SpinBox. Change-Id: Ic2fed55c467dde65334006d252f4052430f3f40c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* SpinBox: add support for selection handlesJ-P Nurmi2014-07-181-11/+17
| | | | | | Task-number: QTBUG-38934 Change-Id: I8f23d20a24977f1787dcd451b48b22326959e3bc Reviewed-by: Liang Qi <liang.qi@digia.com>
* Add SpinBox::inputMethodComposingJ-P Nurmi2014-07-181-0/+12
| | | | | Change-Id: I5c2b10cf293b36547486a12f6a50e8083d36c6a3 Reviewed-by: Liang Qi <liang.qi@digia.com>
* SpinBox: revert back to querying font via style panelJ-P Nurmi2014-07-171-1/+1
| | | | | | | This is a partial revert of 8c3afd8 for the same reason than 790769d. Change-Id: Ia082f375caa441a5db562b04369699092cf0007e Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-07-171-2/+2
|\ | | | | | | | | | | | | Conflicts: src/controls/Styles/Base/MenuStyle.qml Change-Id: I95c8b4f348260b958f158ae28c0984d54af973a8
| * SpinBox: don't force active focus when tapping the buttons on touchJ-P Nurmi2014-07-141-2/+2
| | | | | | | | | | | | | | | | | | | | This improves the usability of SpinBox on touch devices. The input panel is no longer immediately shown when tapping the buttons, but only when tapping the editor area. Change-Id: I09a2218419490cb33da3b0733c9a42f871edc965 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into devJ-P Nurmi2014-07-091-1/+12
|\ \ | |/ | | | | | | | | | | Conflicts: src/controls/ToolBar.qml Change-Id: I5510496219a4ebe8bfced4192307219238ca9bb6
| * Fix SpinBox mouse cursorJ-P Nurmi2014-07-081-1/+10
| | | | | | | | | | Change-Id: I0b0fe9c7b7ddd9ba01035fd2ca70c7b11433ec90 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
| * Doc: Added images and missing snippetsVenu2014-06-271-0/+2
| | | | | | | | | | | | Task-number: QTBUG-33799 Change-Id: I582518a73276d47cf63cf31411b5176a90acab6f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Add SpinBoxStyle::fontJ-P Nurmi2014-07-081-1/+1
| | | | | | | | | | | | | | | | Replace the hidden panel.font-property with a proper font-property that is used in other textual controls' styles too. Change-Id: I93d712ba48e249d28dde0bc27406a13fb6aff1b0 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | SpinBox: let style panel specify a fontJ-P Nurmi2014-06-131-0/+1
|/ | | | | | | The same way than for TextField. Required for Android. Change-Id: Ie055670307793aad1bd3f86c0c9594dda5c47be6 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Docs: fix \since tagsJ-P Nurmi2014-04-081-2/+2
| | | | | | | | Use Qt version only for \qmltype, and module import version for \qmlproperty, \qmlmethod and \qmlsignal. Change-Id: Ia5851b7b86a420f07ca335e0cf2ddf3df1f8c25a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Bump QtQuick.Controls import version to 1.2J-P Nurmi2014-04-071-1/+1
| | | | | Change-Id: Idc0b93cbfc2fe23e8be3bcaece672d06555a81f6 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Set numerical input hint on SpinBoxJens Bache-Wiig2014-03-201-0/+1
| | | | | | | | | | | | Since we don't allow you to override the text validator, we guarantee that the only thing you are allowed to type in a SpinBox are numbers. [ChangeLog][QtQuickControls][SpinBox] SpinBox now only shows the numerical keys in onscreen keyboards where possible. Task-number: QTBUG-37619 Change-Id: If6412d1dc49bf0e602330e90963e8cd990f5d43c Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Doc: Append handler names to \qmlsignal documentationSze Howe Koh2014-03-181-0/+2
| | | | | Change-Id: I5e06bdf03ba1ba8e5fe7669f690420dc9a039129 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Set baselineOffset on Styles/Base correctlyJan Arve Saether2014-02-261-0/+3
| | | | | | | | Fixes the baselineOffset for TextField and SpinBox Task-number: QTBUG-36529 Change-Id: I697d4c8bc2ee61929eabb54a6ec6520311a4e3e2 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Controls: Fixed support for Keys attached property on controls allowing text ↵Liang Qi2014-01-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | input By forwarding key events from the internal control. It includes TextField, TextArea, ComboBox, SpinBox. The key events from internal are Keys.forwardTo controls, then user could customize their own behavior for those controls. Autotest are included. [ChangeLog][QtQuickControls] Fixed support for Keys attached property on controls allowing text input, by forwarding key events from the internal control. Task-number: QTBUG-33493 Task-number: QTBUG-34101 Task-number: QTBUG-35763 Change-Id: I00ea131160e55048b34fe0713e1ee02ff9472f05 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* SpinBox: fix selection behaviorJ-P Nurmi2013-12-121-3/+5
| | | | | | | | | | | | | | | Automatic value selection and focus must go hand in hand. A selection without focus is pointless, because one can't then type or even copy the value. This patch ensures that the automatic selection is only done when the control has active focus. Furthermore, manual selection is only enabled when either activeFocusOnPress is true or when the control has gained active focus by other means (activeFocusOnTab or programmatically). Change-Id: Id0c6a55a6f4a55eb419d06d5dcb3f25a36fe2ec5 Reviewed-by: Martin Klapetek <mklapetek@kde.org> Reviewed-by: Liang Qi <liang.qi@digia.com>
* SpinBox: add editingFinished signalLiang Qi2013-11-221-1/+14
| | | | | | | | Autotest is included. Task-number: QTBUG-34780 Change-Id: I2da9d57b409c24cbf1d90ce42da9b4071dd6dac8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* SpinBox: get active focus when up or down was pressedLiang Qi2013-11-151-0/+5
| | | | | | | | This behavior also needs activeFocusOnPress was true. Task-number: QTBUG-34773 Change-Id: I681c1cb20c1803e3bf7f60af5cdf45ae3fe34dae Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Expose renderType to SpinBox and TextFieldJens Bache-Wiig2013-10-211-1/+1
| | | | | | | | | | | This is useful in case you want to create your own scaling styled controls. Task-number: QTBUG-33917 Change-Id: I0d641319a3106b8e0971d0aae69799bc1aff7f78 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
* Doc: Changed the \since argument to the Qt version.Jerome Pasion2013-09-261-1/+1
| | | | | | | | | | | | | | -1.0 types were introduced in Qt 5.1 -1.1 types were introduced in Qt 5.2 -The module versions are now taken from the \qmlmodule This change was only applied to \qmltype. For methods, signals, and properties, we keep the \since QtQuick.Controls <version> Task-number: QTBUG-32172 Change-Id: Iefa73d4a489aa285bae873f68ae9a228030f0115 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Add text alignment property to SpinBox and SpinBoxStyleJens Bache-Wiig2013-09-261-2/+19
| | | | | | | | | | - Added a public alignment property - Made it possible to set the default alignment in SpinBoxStyle - Made it possible to override the default spinbox size. - Change default text alignment to AlignRight for base and mac style. Change-Id: I3d02ecb880eb2d1e9ad77725207cd88bf4fc2a89 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Merge branch 'stable' into devGabriel de Dietrich2013-09-181-2/+3
|\ | | | | | | | | | | | | Conflicts: src/controls/qquickaction.cpp Change-Id: I85255ba5c27c0d8ea023d0867e5963d43f8f1ddb
| * Fix incorrect spinbox validation at startupJens Bache-Wiig2013-09-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | The problem was that the validator was applied during the object creation which means the incorrect decimal values were applied and the initial value was incorrectly changed. Task-number: QTBUG-33309 Change-Id: Ic1ace174b9059b9c6ce24fd88b81c5edd7318e80 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Update imports to 1.1 and remove version from qmlmodule definitionJens Bache-Wiig2013-09-101-2/+2
| | | | | | | | | | Change-Id: Icb4c6d78225c072da787e4646a55d8cf71a5db7a Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Be bit more clever with when we clip.Gunnar Sletta2013-08-031-1/+1
|/ | | | | | | | Clipping breaks every optimization the scene graph can do, so we should avoid it when possible. Change-Id: I774bfedb19e0fa9f48c35a8db84a81f5528a4ef8 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Expose hovered to our controls and document it consistentlyJens Bache-Wiig2013-06-061-3/+8
| | | | | | | | | The current solution is messy and we only expose it partially to some of our styles. I think we should simply expose this to all. Change-Id: Ia546d5657ea416df99c9d9d92cc714b7f1c928fe Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
* Docs: fix missing/leftover docs, types, tags...J-P Nurmi2013-05-301-4/+13
| | | | | | Task-number: QTBUG-31262 Change-Id: I6bf48604b9392a2a9c63c344363188a4693a8547 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Consistent use of "hovered" and style API conventionsJens Bache-Wiig2013-05-291-1/+1
| | | | | | | | | | | We were still using "containsMouse" in a few places, and we should consistently add "hovered" to all button types for consistency. Also fixed the SplitView to follow the new style conventions. Change-Id: Iebc333c0cecc5bcde27e626b1a611c2f2edcf7dc Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Rename controlState to styleDataJ-P Nurmi2013-05-271-1/+1
| | | | | Change-Id: I06c9f4b0d9b6eef7d2ca608827eee982d8d97027 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Improve size hints for SpinBox and TextFieldJens Bache-Wiig2013-05-271-1/+1
| | | | | | | | | These were both too small on most platforms. Since we have rather broken logic in widgets for this, I will simply assume they share the same height. Change-Id: I98da5a925087fec300de3c1c91b58110103e1a38 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Enable padding as a grouped propertyJens Bache-Wiig2013-05-241-4/+4
| | | | | | | | | We want padding to be a grouped property as the existing Margins property looks rather odd and insconsistent. Change-Id: I9e614f9161aaf01af200b19a1fb46a51beec6fb4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Make QQuickSettings::style a property with a notifier signalJ-P Nurmi2013-05-241-1/+1
| | | | | Change-Id: I9f1690524e29cd7fe0ab35be216aca9a6edd35ca Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Refactor and clean up public style APIJens Bache-Wiig2013-05-081-23/+19
| | | | | Change-Id: I10271c860abd9b45a262e3548628e6a3026e1a4f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>