summaryrefslogtreecommitdiffstats
path: root/examples/declarative
diff options
context:
space:
mode:
authorThomas Zander <t.zander@nokia.com>2010-03-31 08:12:41 (GMT)
committerThomas Zander <t.zander@nokia.com>2010-03-31 08:12:41 (GMT)
commita833d593da01d7ecf48eda4e62514ed56fb2be97 (patch)
tree963df96ca269f56b3c0b4912d5b73de3bfe4c07d /examples/declarative
parent456fdf4e5fe05e94955df0fc7d76c384a0bcfbc5 (diff)
parentedd41ee5488716cf8336a7d8ea0cb3d48d0e7b14 (diff)
downloadQt-a833d593da01d7ecf48eda4e62514ed56fb2be97.zip
Qt-a833d593da01d7ecf48eda4e62514ed56fb2be97.tar.gz
Qt-a833d593da01d7ecf48eda4e62514ed56fb2be97.tar.bz2
Merge commit 'origin/4.7' into symbian47
Conflicts: src/3rdparty/webkit/WebCore/WebCore.pro src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'examples/declarative')
-rw-r--r--examples/declarative/declarative.pro1
-rw-r--r--examples/declarative/focusscope/test.qml76
-rw-r--r--examples/declarative/focusscope/test2.qml40
-rw-r--r--examples/declarative/focusscope/test3.qml52
-rw-r--r--examples/declarative/focusscope/test4.qml75
-rw-r--r--examples/declarative/focusscope/test5.qml83
6 files changed, 0 insertions, 327 deletions
diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro
index 1c53e28..9e8b7be 100644
--- a/examples/declarative/declarative.pro
+++ b/examples/declarative/declarative.pro
@@ -24,7 +24,6 @@ sources.files = \
effects \
fillmode \
focus \
- focusscope \
fonts \
gridview \
layouts \
diff --git a/examples/declarative/focusscope/test.qml b/examples/declarative/focusscope/test.qml
deleted file mode 100644
index e4332e7..0000000
--- a/examples/declarative/focusscope/test.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- Keys.onDigit9Pressed: console.log("Error - Root")
-
- FocusScope {
- id: myScope
- focus: true
-
- Keys.onDigit9Pressed: console.log("Error - FocusScope")
-
- Rectangle {
- height: 120
- width: 420
-
- color: "transparent"
- border.width: 5
- border.color: myScope.wantsFocus?"blue":"black"
-
- Rectangle {
- id: item1
- x: 10; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: wantsFocus?"blue":"black"
- Keys.onDigit9Pressed: console.log("Top Left");
- KeyNavigation.right: item2
- focus: true
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
- }
- }
-
- Rectangle {
- id: item2
- x: 310; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: wantsFocus?"blue":"black"
- KeyNavigation.left: item1
- Keys.onDigit9Pressed: console.log("Top Right");
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
- }
- }
- }
- 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
- x: 10; y: 300
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: wantsFocus?"blue":"black"
-
- Keys.onDigit9Pressed: console.log("Bottom Left");
- KeyNavigation.up: myScope
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
- }
- }
-
-}
diff --git a/examples/declarative/focusscope/test2.qml b/examples/declarative/focusscope/test2.qml
deleted file mode 100644
index 5b6971a..0000000
--- a/examples/declarative/focusscope/test2.qml
+++ /dev/null
@@ -1,40 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- Text { text: "All five rectangles should be red" }
-
- FocusScope {
- y: 100
- focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
-
- FocusScope {
- y: 100
- focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
-
- FocusScope {
- y: 100
- focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
-
- FocusScope {
- y: 100
- focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
-
- FocusScope {
- y: 100
- focus: true
- Rectangle { width: 50; height: 50; color: parent.wantsFocus?"red":"blue" }
- }
- }
- }
- }
- }
-
-}
diff --git a/examples/declarative/focusscope/test3.qml b/examples/declarative/focusscope/test3.qml
deleted file mode 100644
index 9344d07..0000000
--- a/examples/declarative/focusscope/test3.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- ListModel {
- id: model
- ListElement { name: "1" }
- ListElement { name: "2" }
- ListElement { name: "3" }
- ListElement { name: "4" }
- ListElement { name: "5" }
- ListElement { name: "6" }
- ListElement { name: "6" }
- ListElement { name: "8" }
- ListElement { name: "9" }
- }
-
- Component {
- id: verticalDelegate
- FocusScope {
- id: root
- width: 50; height: 50;
- Keys.onDigit9Pressed: console.log("Error - " + name)
- Rectangle {
- focus: true
- Keys.onDigit9Pressed: console.log(name)
- width: 50; height: 50;
- color: root.ListView.isCurrentItem?"red":"green"
- Text { text: name; anchors.centerIn: parent }
- }
- }
- }
-
- ListView {
- width: 800; height: 50; orientation: "Horizontal"
- focus: true
- model: model
- delegate: verticalDelegate
- preferredHighlightBegin: 100
- preferredHighlightEnd: 100
- highlightRangeMode: "StrictlyEnforceRange"
- }
-
-
- Text {
- y: 100; x: 50
- text: "Currently selected element should be red\nPressing \"9\" should print the number of the currently selected item\nBe sure to scroll all the way to the right, pause, and then all the way to the left."
- }
-}
diff --git a/examples/declarative/focusscope/test4.qml b/examples/declarative/focusscope/test4.qml
deleted file mode 100644
index cc96df9..0000000
--- a/examples/declarative/focusscope/test4.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- Keys.onDigit9Pressed: console.log("Error - Root")
-
- FocusScope {
- id: myScope
-
- Keys.onDigit9Pressed: console.log("Error - FocusScope")
-
- Rectangle {
- height: 120
- width: 420
-
- color: "transparent"
- border.width: 5
- border.color: myScope.wantsFocus?"blue":"black"
-
- Rectangle {
- id: item1
- x: 10; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: wantsFocus?"blue":"black"
- Keys.onDigit9Pressed: console.log("Error - Top Left");
- KeyNavigation.right: item2
- focus: true
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
- }
- }
-
- Rectangle {
- id: item2
- x: 310; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: wantsFocus?"blue":"black"
- KeyNavigation.left: item1
- Keys.onDigit9Pressed: console.log("Error - Top Right");
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
- }
- }
- }
- 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
- x: 10; y: 300
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: wantsFocus?"blue":"black"
-
- Keys.onDigit9Pressed: console.log("Error - Bottom Left");
- KeyNavigation.up: myScope
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
- }
- }
-
-}
diff --git a/examples/declarative/focusscope/test5.qml b/examples/declarative/focusscope/test5.qml
deleted file mode 100644
index da98350..0000000
--- a/examples/declarative/focusscope/test5.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-import Qt 4.6
-
-Rectangle {
- color: "white"
- width: 800
- height: 600
-
- Keys.onReturnPressed: console.log("Error - Root")
-
- FocusScope {
- id: myScope
- focus: true
-
- Keys.onReturnPressed: console.log("Error - FocusScope")
-
- Rectangle {
- height: 120
- width: 420
-
- color: "transparent"
- border.width: 5
- border.color: myScope.wantsFocus?"blue":"black"
-
- Rectangle {
- x: 10; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: item1.wantsFocus?"blue":"black"
- }
-
- TextEdit {
- id: item1
- x: 20; y: 20
- width: 90; height: 90
- color: "white"
- font.pixelSize: 20
- Keys.onReturnPressed: console.log("Top Left");
- KeyNavigation.right: item2
- focus: true
- wrap: true
- text: "Box 1"
- }
-
- Rectangle {
- id: item2
- x: 310; y: 10
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: wantsFocus?"blue":"black"
- KeyNavigation.left: item1
- Keys.onReturnPressed: console.log("Top Right");
-
- Rectangle {
- width: 50; height: 50; anchors.centerIn: parent
- color: parent.focus?"red":"transparent"
- }
- }
- }
- KeyNavigation.down: item3
- }
-
- Text { x:100; y:170; text: "Blue border indicates scoped focus\nBlack border indicates NOT scoped focus\nRed box or flashing cursor indicates active focus\nUse arrow keys to navigate\nPress Ctrl-Return to print currently focused item" }
-
- Rectangle {
- x: 10; y: 300
- width: 100; height: 100; color: "green"
- border.width: 5
- border.color: item3.wantsFocus?"blue":"black"
- }
-
- TextEdit {
- id: item3
- x: 20; y: 310
- width: 90; height: 90
- color: "white"
- font.pixelSize: 20
- text: "Box 3"
-
- Keys.onReturnPressed: console.log("Bottom Left");
- KeyNavigation.up: myScope
- wrap: true
- }
-}