From e0c8035c3db5c3c68602a90a5addbb2d48c0733f Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Mon, 27 May 2013 18:34:37 +0200 Subject: Rename controlState to styleData Change-Id: I06c9f4b0d9b6eef7d2ca608827eee982d8d97027 Reviewed-by: Jens Bache-Wiig --- src/controls/SpinBox.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/controls/SpinBox.qml') diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index ec563afc..4db67c8d 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -148,7 +148,7 @@ Control { /*! \internal */ property alias __text: input.text - __controlState: QtObject { + __styleData: QtObject { readonly property bool upEnabled: value != maximumValue; readonly property alias upHovered: mouseUp.containsMouse readonly property alias upPressed: mouseUp.pressed -- cgit v1.2.1 From 10851004e327f4ab798753c645ab987f10160100 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Tue, 28 May 2013 17:27:09 +0200 Subject: Consistent use of "hovered" and style API conventions 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 Reviewed-by: Caroline Chao --- src/controls/SpinBox.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/controls/SpinBox.qml') diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 4db67c8d..92f25fbc 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -157,7 +157,7 @@ Control { readonly property alias downPressed: mouseDown.pressed readonly property alias downHovered: mouseDown.containsMouse - readonly property alias containsMouse: mouseArea.containsMouse + readonly property alias hovered: mouseArea.containsMouse readonly property int contentHeight: Math.max(input.implicitHeight, 16) readonly property int contentWidth: Math.max(maxSizeHint.implicitWidth, minSizeHint.implicitWidth) -- cgit v1.2.1 From 6de2c97d064daa069066bb46880f04bfd5be43b7 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 29 May 2013 15:23:14 +0200 Subject: Docs: fix missing/leftover docs, types, tags... Task-number: QTBUG-31262 Change-Id: I6bf48604b9392a2a9c63c344363188a4693a8547 Reviewed-by: Jens Bache-Wiig --- src/controls/SpinBox.qml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/controls/SpinBox.qml') diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 92f25fbc..68f97e0a 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -75,6 +75,8 @@ Control { id: spinbox /*! + \qmlproperty real SpinBox::value + The value of this SpinBox, clamped to \l minimumValue and \l maximumValue. The default value is \c{0.0}. @@ -82,6 +84,8 @@ Control { property alias value: validator.value /*! + \qmlproperty real SpinBox::minimumValue + The minimum value of the SpinBox range. The \l value is clamped to this value. @@ -90,6 +94,8 @@ Control { property alias minimumValue: validator.minimumValue /*! + \qmlproperty real SpinBox::maximumValue + The maximum value of the SpinBox range. The \l value is clamped to this value. If maximumValue is smaller than \l minimumValue, \l minimumValue will be enforced. @@ -98,7 +104,7 @@ Control { */ property alias maximumValue: validator.maximumValue - /*! + /*! \qmlproperty real SpinBox::stepSize The amount by which the \l value is incremented/decremented when a spin button is pressed. @@ -106,13 +112,16 @@ Control { */ property alias stepSize: validator.stepSize - /*! The suffix for the value. I.e "cm" */ + /*! \qmlproperty string SpinBox::suffix + The suffix for the value. I.e "cm" */ property alias suffix: validator.suffix - /*! The prefix for the value. I.e "$" */ + /*! \qmlproperty string SpinBox::prefix + The prefix for the value. I.e "$" */ property alias prefix: validator.prefix - /*! This property indicates the amount of decimals. + /*! \qmlproperty int SpinBox::decimals + This property indicates the amount of decimals. Note that if you enter more decimals than specified, they will be truncated to the specified amount of decimal places. The default value is \c{0}. -- cgit v1.2.1 From 420bb714a8c8ebc67ad958897939d7d96e11806c Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 5 Jun 2013 09:54:28 +0200 Subject: Expose hovered to our controls and document it consistently 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 Reviewed-by: Nico Vertriest --- src/controls/SpinBox.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/controls/SpinBox.qml') diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 68f97e0a..b1f87cec 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -134,12 +134,19 @@ Control { */ property alias font: input.font - /*! This property indicates if the Spinbox should get active + /*! This property indicates whether the Spinbox should get active focus when pressed. The default value is \c true. */ property bool activeFocusOnPress: true + /*! + \qmlproperty bool SpinBox::hovered + + This property indicates whether the control is being hovered. + */ + readonly property alias hovered: mouseArea.containsMouse + style: Qt.createComponent(Settings.style + "/SpinBoxStyle.qml", spinbox) /*! \internal */ @@ -166,8 +173,6 @@ Control { readonly property alias downPressed: mouseDown.pressed readonly property alias downHovered: mouseDown.containsMouse - readonly property alias hovered: mouseArea.containsMouse - readonly property int contentHeight: Math.max(input.implicitHeight, 16) readonly property int contentWidth: Math.max(maxSizeHint.implicitWidth, minSizeHint.implicitWidth) } -- cgit v1.2.1 From 41e13d3746c8b7b5cd550091c63fd8ab066422cf Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Tue, 11 Jun 2013 09:13:44 +0200 Subject: Add qml/js files in resource files To make deployment of Qt Quick Controls based applications easier. Task-number: QTBUG-31565 Change-Id: I0b8af2864ef0dc9121eed3189ced64712bdb3d20 Reviewed-by: Friedemann Kleint Reviewed-by: Jens Bache-Wiig --- src/controls/SpinBox.qml | 1 + 1 file changed, 1 insertion(+) (limited to 'src/controls/SpinBox.qml') diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index b1f87cec..06ec64ce 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -41,6 +41,7 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 +import QtQuick.Controls.Styles 1.0 /*! \qmltype SpinBox -- cgit v1.2.1 From 03c7e64ef5f3dfd10d61fd2473fb9f09b124c6e6 Mon Sep 17 00:00:00 2001 From: Caroline Chao Date: Fri, 14 Jun 2013 15:01:34 +0200 Subject: Revert "Add qml/js files in resource files" We need to investigate more this solution. Deployment issue for Qt Quick Controls will be a known limitation in 5.1.0. This reverts commit 41e13d3746c8b7b5cd550091c63fd8ab066422cf. Change-Id: I501be7494bdbdfbb799d31c612d0c20e7f87ffc7 Reviewed-by: Friedemann Kleint Reviewed-by: Jens Bache-Wiig Reviewed-by: Liang Qi --- src/controls/SpinBox.qml | 1 - 1 file changed, 1 deletion(-) (limited to 'src/controls/SpinBox.qml') diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 06ec64ce..b1f87cec 100644 --- a/src/controls/SpinBox.qml +++ b/src/controls/SpinBox.qml @@ -41,7 +41,6 @@ import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Private 1.0 -import QtQuick.Controls.Styles 1.0 /*! \qmltype SpinBox -- cgit v1.2.1