diff options
author | Mitch Curtis <mitch.curtis@digia.com> | 2013-01-24 11:21:22 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-25 23:17:23 +0100 |
commit | 9a7d4333d4060a5aa2ffd59ba9b0b5a7fa56ff6d (patch) | |
tree | 8dabb5767ef0eb2cbaf778a58bb0e23b4f82a10d | |
parent | 35f0616883fe96e23f45e6a34aef5b06cbfe6530 (diff) | |
download | qtquickcontrols-9a7d4333d4060a5aa2ffd59ba9b0b5a7fa56ff6d.tar.gz |
Document CheckBox.
Change-Id: Iaa60ffde5ff4c0d3a6d8a9c1277fa77ccbbb0c24
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
-rw-r--r-- | src/qtdesktop/CheckBox.qml | 54 |
1 files changed, 53 insertions, 1 deletions
diff --git a/src/qtdesktop/CheckBox.qml b/src/qtdesktop/CheckBox.qml index a5f5f4fd..5c84400f 100644 --- a/src/qtdesktop/CheckBox.qml +++ b/src/qtdesktop/CheckBox.qml @@ -46,20 +46,66 @@ import "private" /*! \qmltype CheckBox \inqmlmodule QtDesktop 1.0 - \brief CheckBox is doing bla...bla... + \brief A checkbox with a text label + + A CheckBox is an option button that can be toggled on (checked) or off + (unchecked). Checkboxes are typically used to represent features in an + application that can be enabled or disabled without affecting others. + + The state of the checkbox can be set with the \l checked property. + + The text of the label shown next to the checkbox can be set with the \l text + property. + + Whenever a CheckBox is clicked, it emits the clicked() signal. */ FocusScope { id: checkBox + /*! + Emitted whenever the checkbox is clicked. + */ signal clicked + /*! + \qmlproperty bool pressed + + This property is \c true if the checkbox is pressed. + Set this property to manually invoke a mouse click. + */ property alias pressed: behavior.effectivePressed + + /*! + \qmlproperty bool checked + + This property is \c true if the checkbox is checked. + */ property alias checked: behavior.checked + + /*! + \qmlproperty bool containsMouse + + This property is \c true if the checkbox currently contains the mouse + cursor. + */ property alias containsMouse: behavior.containsMouse + + /*! + This property is \c true if the checkbox takes the focus when it is + pressed; \l{QQuickItem::forceActiveFocus()}{forceActiveFocus()} will be + called on the checkbox. + */ property bool activeFocusOnPress: false + /*! + This property holds the text that the label should display. + */ property string text + + /*! + \internal + */ property var styleHints:[] // implementation @@ -69,6 +115,12 @@ FocusScope { implicitWidth: Math.max(120, loader.item ? loader.item.implicitWidth : 0) implicitHeight: loader.item ? loader.item.implicitHeight : 0 + /*! + The style that should be applied to the checkbox. Custom style + components can be created with: + + \codeline Qt.createComponent("path/to/style.qml", checkBoxId); + */ property Component style: Qt.createComponent(Settings.THEME_PATH + "/CheckBoxStyle.qml", checkBox) Loader { |