summaryrefslogtreecommitdiffstats
path: root/examples/declarative/focusscope
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-10-06 04:05:40 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-10-06 04:05:40 (GMT)
commit43199af242918b3c77bb47bdcc3ec60f8236b0d3 (patch)
tree94293b06614afbd3a2a89004204a23e7228a3d51 /examples/declarative/focusscope
parentb9663faad39ae02b7dbee9f2cea7dce7d25894f8 (diff)
downloadQt-43199af242918b3c77bb47bdcc3ec60f8236b0d3.zip
Qt-43199af242918b3c77bb47bdcc3ec60f8236b0d3.tar.gz
Qt-43199af242918b3c77bb47bdcc3ec60f8236b0d3.tar.bz2
lowercase ids
Diffstat (limited to 'examples/declarative/focusscope')
-rw-r--r--examples/declarative/focusscope/test.qml24
-rw-r--r--examples/declarative/focusscope/test3.qml18
-rw-r--r--examples/declarative/focusscope/test4.qml24
3 files changed, 33 insertions, 33 deletions
diff --git a/examples/declarative/focusscope/test.qml b/examples/declarative/focusscope/test.qml
index 77ffb84..ab5a143 100644
--- a/examples/declarative/focusscope/test.qml
+++ b/examples/declarative/focusscope/test.qml
@@ -8,28 +8,28 @@ Rectangle {
Keys.onDigit9Pressed: print("Error - Root")
FocusScope {
- id: MyScope
+ id: myScope
focus: true
Keys.onDigit9Pressed: print("Error - FocusScope")
-
+
Rectangle {
height: 120
width: 420
color: "transparent"
border.width: 5
- border.color: MyScope.wantsFocus?"blue":"black"
+ border.color: myScope.wantsFocus?"blue":"black"
Rectangle {
- id: Item1
- x: 10; y: 10
+ id: item1
+ x: 10; y: 10
width: 100; height: 100; color: "green"
border.width: 5
border.color: wantsFocus?"blue":"black"
Keys.onDigit9Pressed: print("Top Left");
- KeyNavigation.right: Item2
- focus: true
+ KeyNavigation.right: item2
+ focus: true
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
@@ -38,12 +38,12 @@ Rectangle {
}
Rectangle {
- id: Item2
+ id: item2
x: 310; y: 10
width: 100; height: 100; color: "green"
border.width: 5
border.color: wantsFocus?"blue":"black"
- KeyNavigation.left: Item1
+ KeyNavigation.left: item1
Keys.onDigit9Pressed: print("Top Right");
Rectangle {
@@ -52,20 +52,20 @@ Rectangle {
}
}
}
- KeyNavigation.down: Item3
+ KeyNavigation.down: item3
}
Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box indicates active focus\nUse arrow keys to navigate\nPress \"9\" to print currently focused item" }
Rectangle {
- id: Item3
+ id: item3
x: 10; y: 300
width: 100; height: 100; color: "green"
border.width: 5
border.color: wantsFocus?"blue":"black"
Keys.onDigit9Pressed: print("Bottom Left");
- KeyNavigation.up: MyScope
+ KeyNavigation.up: myScope
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
diff --git a/examples/declarative/focusscope/test3.qml b/examples/declarative/focusscope/test3.qml
index 8a53c3a..e5aa7b6 100644
--- a/examples/declarative/focusscope/test3.qml
+++ b/examples/declarative/focusscope/test3.qml
@@ -6,7 +6,7 @@ Rectangle {
height: 600
ListModel {
- id: Model
+ id: model
ListElement { name: "1" }
ListElement { name: "2" }
ListElement { name: "3" }
@@ -19,16 +19,16 @@ Rectangle {
}
Component {
- id: VerticalDelegate
+ id: verticalDelegate
FocusScope {
- id: Root
- width: 50; height: 50;
+ id: root
+ width: 50; height: 50;
Keys.onDigit9Pressed: print("Error - " + name)
- Rectangle {
+ Rectangle {
focus: true
Keys.onDigit9Pressed: print(name)
- width: 50; height: 50;
- color: Root.ListView.isCurrentItem?"red":"green"
+ width: 50; height: 50;
+ color: root.ListView.isCurrentItem?"red":"green"
Text { text: name; anchors.centerIn: parent }
}
}
@@ -37,8 +37,8 @@ Rectangle {
ListView {
width: 800; height: 50; orientation: "Horizontal"
focus: true
- model: Model
- delegate: VerticalDelegate
+ model: model
+ delegate: verticalDelegate
preferredHighlightBegin: 100
preferredHighlightEnd: 101
strictlyEnforceHighlightRange: true
diff --git a/examples/declarative/focusscope/test4.qml b/examples/declarative/focusscope/test4.qml
index f366543..5d4fe35 100644
--- a/examples/declarative/focusscope/test4.qml
+++ b/examples/declarative/focusscope/test4.qml
@@ -8,27 +8,27 @@ Rectangle {
Keys.onDigit9Pressed: print("Error - Root")
FocusScope {
- id: MyScope
+ id: myScope
Keys.onDigit9Pressed: print("Error - FocusScope")
-
+
Rectangle {
height: 120
width: 420
color: "transparent"
border.width: 5
- border.color: MyScope.wantsFocus?"blue":"black"
+ border.color: myScope.wantsFocus?"blue":"black"
Rectangle {
- id: Item1
- x: 10; y: 10
+ id: item1
+ x: 10; y: 10
width: 100; height: 100; color: "green"
border.width: 5
border.color: wantsFocus?"blue":"black"
Keys.onDigit9Pressed: print("Error - Top Left");
- KeyNavigation.right: Item2
- focus: true
+ KeyNavigation.right: item2
+ focus: true
Rectangle {
width: 50; height: 50; anchors.centerIn: parent
@@ -37,12 +37,12 @@ Rectangle {
}
Rectangle {
- id: Item2
+ id: item2
x: 310; y: 10
width: 100; height: 100; color: "green"
border.width: 5
border.color: wantsFocus?"blue":"black"
- KeyNavigation.left: Item1
+ KeyNavigation.left: item1
Keys.onDigit9Pressed: print("Error - Top Right");
Rectangle {
@@ -51,20 +51,20 @@ Rectangle {
}
}
}
- KeyNavigation.down: Item3
+ KeyNavigation.down: item3
}
Text { x:100; y:170; text: "There should be no blue borders, or red squares.\nPressing \"9\" should do nothing.\nArrow keys should have no effect." }
Rectangle {
- id: Item3
+ id: item3
x: 10; y: 300
width: 100; height: 100; color: "green"
border.width: 5
border.color: wantsFocus?"blue":"black"
Keys.onDigit9Pressed: print("Error - Bottom Left");
- KeyNavigation.up: MyScope
+ KeyNavigation.up: myScope
Rectangle {
width: 50; height: 50; anchors.centerIn: parent