diff --git a/src/controls/ComboBox.qml b/src/controls/ComboBox.qml index 7b13bc8eb4a45239e03fcfd6ba511b62a3d54e2c..e5efb63cb6eac2766753978581f315840c936304 100644 --- a/src/controls/ComboBox.qml +++ b/src/controls/ComboBox.qml @@ -80,13 +80,19 @@ import QtQuick.Controls.Private 1.0 Control { id: comboBox - /*! The model to populate the ComboBox from. */ + /*! \qmlproperty model ComboBox::model + The model to populate the ComboBox from. */ property alias model: popupItems.model + + /*! The model role used for populating the ComboBox. */ property string textRole: "" - /*! The index of the currently selected item in the ComboBox. */ + /*! \qmlproperty int ComboBox::currentIndex + The index of the currently selected item in the ComboBox. */ property alias currentIndex: popup.__selectedIndex - /*! The text of the currently selected item in the ComboBox. */ + + /*! \qmlproperty string ComboBox::currentText + The text of the currently selected item in the ComboBox. */ readonly property alias currentText: popup.selectedText /*! This property specifies whether the combobox should gain active focus when pressed. diff --git a/src/controls/ProgressBar.qml b/src/controls/ProgressBar.qml index 33e215142913eafe47e08b90bafae4e0a1bfb259..6d9f8be13363c0a759ab6cfab44c47414e8745fb 100644 --- a/src/controls/ProgressBar.qml +++ b/src/controls/ProgressBar.qml @@ -123,7 +123,7 @@ Control { implicitWidth:(__panel ? __panel.implicitWidth : 0) implicitHeight: (__panel ? __panel.implicitHeight: 0) - /* \internal */ + /*! \internal */ function setValue(v) { var newval = parseFloat(v) if (!isNaN(newval)) { diff --git a/src/controls/Slider.qml b/src/controls/Slider.qml index 711c449bfeb8c5a3452f1d0fd179dcc0a10d6e67..b31d4f78d4aa1959a606fb56f245663b4c3ec70d 100644 --- a/src/controls/Slider.qml +++ b/src/controls/Slider.qml @@ -174,19 +174,6 @@ Control { Accessible.role: Accessible.Slider Accessible.name: value - /*! - \qmlmethod Slider::formatValue - - This method returns the current slider value in a way that is more suitable - for user display, such as the \l value rounded to only two decimal places. - - By default this function returns the nearest \c int value. - */ - - function formatValue(v) { - return Math.round(v); - } - style: Qt.createComponent(Settings.style + "/SliderStyle.qml", slider) Keys.onRightPressed: value += (maximumValue - minimumValue)/10.0 diff --git a/src/controls/SpinBox.qml b/src/controls/SpinBox.qml index 92f25fbc7e1155cf0070815252d3955901b4c17c..68f97e0a4ceb831e631a79b560b65f9aa3146e9e 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}. diff --git a/src/controls/SplitView.qml b/src/controls/SplitView.qml index 0adb42828ad26c55ceece3d77a59d8511e0d0b6a..aba7809f8acaf6842a5879fd2dc65f7d7a56e6f0 100644 --- a/src/controls/SplitView.qml +++ b/src/controls/SplitView.qml @@ -53,13 +53,14 @@ import QtQuick.Controls.Private 1.0 as Private SplitView is a control that lays out items horizontally or vertically with a draggable splitter between each item. - There will always be one (and only one) item in the SplitView that has \l {Layout}{Layout.fillWidth} - set to \c true (or Layout.fillHeight, if orientation is Qt.Vertical). This means that the + There will always be one (and only one) item in the SplitView that has \l{Layout::fillWidth}{Layout.fillWidth} + set to \c true (or \l{Layout::fillHeight}{Layout.fillHeight}, if orientation is Qt.Vertical). This means that the item will get all leftover space when other items have been laid out. By default, the last visible child of the SplitView will have this set, but it can be changed by explicitly setting fillWidth to \c true on another item. As the fillWidth item will automatically be resized to fit the extra space, explicit assignments - to width and height will be ignored (but Layout.minimumWidth and Layout.maximumWidth will still be respected). + to width and height will be ignored (but \l{Layout::minimumWidth}{Layout.minimumWidth} and + \l{Layout::maximumWidth}{Layout.maximumWidth} will still be respected). A handle can belong to the item either on the left or top side, or on the right or bottom side: \list @@ -69,9 +70,19 @@ import QtQuick.Controls.Private 1.0 as Private This will again control which item gets resized when the user drags a handle, and which handle gets hidden when an item is told to hide. - SplitView supports setting attached \l Layout properties on child items, which means that you - can control minimumWidth, minimumHeight, maximumWidth and maximumHeight (in addition - to fillWidth/fillHeight) for each child. + + SplitView supports setting attached Layout properties on child items, which + means that you can set the following attached properties for each child: + \list + \li \l{Layout::minimumWidth}{Layout.minimumWidth} + \li \l{Layout::minimumHeight}{Layout.minimumHeight} + \li \l{Layout::preferredWidth}{Layout.preferredWidth} + \li \l{Layout::preferredHeight}{Layout.preferredHeight} + \li \l{Layout::maximumWidth}{Layout.maximumWidth} + \li \l{Layout::maximumHeight}{Layout.maximumHeight} + \li \l{Layout::fillWidth}{Layout.fillWidth} (\c true for only one child) + \li \l{Layout::fillHeight}{Layout.fillHeight} (\c true for only one child) + \endlist Example: diff --git a/src/controls/TextArea.qml b/src/controls/TextArea.qml index 6dab90fd32d7cbbd5fc1e2f38c16c36261e55580..43cc347ce41c11a5f81a0583bfcca1b9a7e35c9a 100644 --- a/src/controls/TextArea.qml +++ b/src/controls/TextArea.qml @@ -621,7 +621,7 @@ ScrollView { Accessible.role: Accessible.EditableText /*! - \qmlproperty textDocument TextArea::textDocument + \qmlproperty TextDocument TextArea::textDocument This property exposes the \l QTextDocument of this TextArea. \sa TextEdit::textDocument