summaryrefslogtreecommitdiff
path: root/src/controls/SpinBox.qml
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* Doc: correct for compliancy with Writing GuidelinesNico Vertriest2013-05-071-0/+1
| | | | | | | | Task-number: QTBUG-30318 Change-Id: If3916f3250f202a5da4b1f8034ecfba984367af3 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Add basic mouse wheel support to SpinBoxJens Bache-Wiig2013-05-031-0/+6
| | | | | | Change-Id: I9305a96d981f19ae85104facf2da01b2b215f316 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* SpinBox: implement the validator in C++J-P Nurmi2013-04-221-86/+45
| | | | | Change-Id: I8e952cfc909485ded8f1f3f3a8842cfdd8e1207d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Remove hard dependency on widgetsJens Bache-Wiig2013-04-151-2/+1
| | | | | Change-Id: I1fabb4efcc931f12f0a65ac5c66e6e085108269b Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* SpinBox: enable focus on the internal TextInputJ-P Nurmi2013-04-111-0/+1
| | | | | | | This way keyboard input works after tabbing into a SpinBox. Change-Id: I68a482936bfed7e823002ac5e56fec4757db0ef5 Reviewed-by: Liang Qi <liang.qi@digia.com>
* Cleanup the superfluous \internal tags that are no longer neededJ-P Nurmi2013-04-081-6/+0
| | | | | Change-Id: I2eaaf7e82351e70a742eeadc32b8e1f8655a02c1 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Doc: minor language editsNico Vertriest2013-04-051-9/+9
| | | | | | | | | | | | | Concerning vocab., punctuation, syntax and/or Writing Guidelines. Corrected whitespace issues. Replaced "if" with "whether" in Slider.qml Task-number: QTBUG-30318 Change-Id: I0e0e8d2b807f0a6534deb2caa6dbee7eb206f43b Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Support QQuickItem.activeFocusOnTab in QtQuick.ControlsLiang Qi2013-03-191-0/+2
| | | | | Change-Id: Ie23b504f590e6c4e7f2a1a9090c2dd8671389937 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Change imports from QtQuick 2.0 to QtQuick 2.1Caroline Chao2013-03-141-1/+1
| | | | | | Change-Id: If9df032c76e36f385aacd30cc31d6f02574c6f11 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* Fix initialization value of SpinBoxJens Bache-Wiig2013-03-071-2/+8
| | | | | | | | | | The maximumValue 99 was enforced on value _before_ we had a chance to update it. This made it sometimes impossible to get a maximumValue higher than 99. Change-Id: Ia07a9271d563fd3496b583757df757c1e7b4ceb5 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>