aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick
diff options
context:
space:
mode:
authorMorten Johan Sorvig <morten.sorvig@nokia.com>2012-01-10 12:12:51 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-07 20:08:19 +0100
commit70966df1be02dd94ecf9a122ff9e4976245aeb92 (patch)
tree372db90105c34d0c2a72e029f4e087fdc93423b7 /examples/quick
parent3f9b58c0890a4263730e2c06b46e7a69d4bfb62d (diff)
Improve accessibility action support for Qt Quick
Add interface_cast for the action interface. Implement actions for the following roles: Button : Press CheckBox, RadioButton : Press, Check, Uncheck Slider, Spinbox, Dial, ScrollBar : Increment, Decrement Change-Id: Ic8e0d17c709ba51655f3f4b699092baf603b6f18 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'examples/quick')
-rw-r--r--examples/quick/accessibility/accessibility.qml16
-rw-r--r--examples/quick/accessibility/content/Button.qml5
2 files changed, 18 insertions, 3 deletions
diff --git a/examples/quick/accessibility/accessibility.qml b/examples/quick/accessibility/accessibility.qml
index 2804d2abc8..e987561bb1 100644
--- a/examples/quick/accessibility/accessibility.qml
+++ b/examples/quick/accessibility/accessibility.qml
@@ -59,12 +59,13 @@ Rectangle {
id: column
spacing: 6
anchors.fill: parent
+ anchors.margins: 10
width: parent.width
Row {
spacing: 6
width: column.width
- Button { width: 100; height: column.h + 20; text: "Send" }
- Button { width: 100; height: column.h + 20; text: "Discard" }
+ Button { width: 100; height: column.h + 20; text: "Send"; onClicked : { status.text = "Send" } }
+ Button { width: 100; height: column.h + 20; text: "Discard"; onClicked : { status.text = "Discard" } }
}
Row {
@@ -106,5 +107,16 @@ Rectangle {
wrapMode: TextEdit.WordWrap
}
}
+ Text {
+ id : status
+ width: column.width
+ }
+
+ Row {
+ spacing: 6
+ width: column.width
+ Checkbox { checked: false }
+ Slider { value: 10 }
+ }
}
}
diff --git a/examples/quick/accessibility/content/Button.qml b/examples/quick/accessibility/content/Button.qml
index 2c203abe11..3d5086f741 100644
--- a/examples/quick/accessibility/content/Button.qml
+++ b/examples/quick/accessibility/content/Button.qml
@@ -49,6 +49,9 @@ Rectangle {
Accessible.name: text
Accessible.description: "This button does " + text
Accessible.role: Accessible.Button
+ function accessiblePressAction() {
+ button.clicked()
+ }
signal clicked
@@ -74,7 +77,7 @@ Rectangle {
id: mouseArea
anchors.fill: parent
onClicked: {
- checked = !checked;
+ parent.clicked()
}
}
}