diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-09-07 03:13:25 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-09-07 03:13:25 (GMT) |
commit | 9008c7002ffe6617ffcd602a7a9923e83e8b8f80 (patch) | |
tree | 784c075dccc463b8c40311455747a325f4ff3295 /demos/declarative | |
parent | 16cdd82a88a63ea050ab2cf70368e023fe50c5bd (diff) | |
download | Qt-9008c7002ffe6617ffcd602a7a9923e83e8b8f80.zip Qt-9008c7002ffe6617ffcd602a7a9923e83e8b8f80.tar.gz Qt-9008c7002ffe6617ffcd602a7a9923e83e8b8f80.tar.bz2 |
Remove KeyProxy in favour of the Keys.forwardTo attached property.
Diffstat (limited to 'demos/declarative')
-rw-r--r-- | demos/declarative/contacts/contacts.qml | 6 | ||||
-rw-r--r-- | demos/declarative/flickr/common/MediaLineEdit.qml | 9 | ||||
-rw-r--r-- | demos/declarative/flickr/mobile/TitleBar.qml | 8 | ||||
-rw-r--r-- | demos/declarative/twitter/content/AuthView.qml | 6 | ||||
-rw-r--r-- | demos/declarative/twitter/content/HomeTitleBar.qml | 8 |
5 files changed, 9 insertions, 28 deletions
diff --git a/demos/declarative/contacts/contacts.qml b/demos/declarative/contacts/contacts.qml index f009631..278eeb3 100644 --- a/demos/declarative/contacts/contacts.qml +++ b/demos/declarative/contacts/contacts.qml @@ -290,10 +290,8 @@ Rectangle { } ] } - KeyProxy { - focus: contacts.mode != 'new' - targets: { contacts.mode == "list" ? [searchBarWrapper, contactListView] : [contactListView]} - } + focus: contacts.mode != 'new' + forwardTo: { contacts.mode == "list" ? [searchBarWrapper, contactListView] : [contactListView]} states: [ State { name: "editNewState" diff --git a/demos/declarative/flickr/common/MediaLineEdit.qml b/demos/declarative/flickr/common/MediaLineEdit.qml index eab0b95..094571f 100644 --- a/demos/declarative/flickr/common/MediaLineEdit.qml +++ b/demos/declarative/flickr/common/MediaLineEdit.qml @@ -26,7 +26,7 @@ Item { width: 100 } PropertyChanges { - target: Proxy + target: Container focus: true } StateChangeScript { @@ -96,12 +96,7 @@ Item { anchors.left: Label.right anchors.verticalCenter: Container.verticalCenter } - KeyProxy { - id: Proxy - anchors.left: Container.left - anchors.fill: Container - targets: [(ReturnKey), (Editor)] - } + Keys.forwardTo: [(ReturnKey), (Editor)] Item { id: ReturnKey Keys.onReturnPressed: "Container.state = ''" diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index 79c1326..b95452a 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -53,11 +53,7 @@ Item { color: "#151515"; highlightColor: "Green" } - KeyProxy { - id: Proxy - anchors.fill: parent - targets: [(ReturnKey), (Editor)] - } + Keys.forwardTo: [ (ReturnKey), (Editor)] Item { id: ReturnKey @@ -71,7 +67,7 @@ Item { name: "Tags" PropertyChanges { target: Container; x: -TagButton.x + 5 } PropertyChanges { target: TagButton; text: "OK" } - PropertyChanges { target: Proxy; focus: true } + PropertyChanges { target: LineEdit; focus: true } } transitions: Transition { diff --git a/demos/declarative/twitter/content/AuthView.qml b/demos/declarative/twitter/content/AuthView.qml index 9ca4d88..7d0d865 100644 --- a/demos/declarative/twitter/content/AuthView.qml +++ b/demos/declarative/twitter/content/AuthView.qml @@ -29,11 +29,7 @@ Item { maximumLength:21 font.bold: true color: "#151515"; highlightColor: "green" - KeyProxy { - id: Proxy - targets: [(tabber), (nameIn)] - focus: true - } + Keys.forwardTo: [(tabber), (nameIn)] Item { id: tabber //Note: it's not working yet diff --git a/demos/declarative/twitter/content/HomeTitleBar.qml b/demos/declarative/twitter/content/HomeTitleBar.qml index 5cb8bea..9bca2c8 100644 --- a/demos/declarative/twitter/content/HomeTitleBar.qml +++ b/demos/declarative/twitter/content/HomeTitleBar.qml @@ -94,11 +94,7 @@ Item { wrap:true color: "#151515"; highlightColor: "green" } - KeyProxy { - id: Proxy - anchors.fill: parent - targets: [(ReturnKey), (Editor)] - } + Keys.forwardTo: [(ReturnKey), (Editor)] Item { id: ReturnKey Keys.onReturnPressed: accept() @@ -114,7 +110,7 @@ Item { PropertyChanges { target: TagButton; text: "OK" } PropertyChanges { target: TagButton; width: 28 } PropertyChanges { target: TagButton; height: 24 } - PropertyChanges { target: Proxy; focus: true } + PropertyChanges { target: txtEdit; focus: true } } ] transitions: [ |