summaryrefslogtreecommitdiffstats
path: root/examples/declarative/keyinteraction/focus
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-07-23 08:51:25 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-07-23 08:51:25 (GMT)
commitbe7edc40324bb135548888853df28bf94eb2aa79 (patch)
tree0ed8e4a9085a2100311530d494acba7385c3eb3a /examples/declarative/keyinteraction/focus
parent3124d14be27766ddf3c86528c913165e09317111 (diff)
parent9df05c922fc0408489cb93ae67e187b717599254 (diff)
downloadQt-be7edc40324bb135548888853df28bf94eb2aa79.zip
Qt-be7edc40324bb135548888853df28bf94eb2aa79.tar.gz
Qt-be7edc40324bb135548888853df28bf94eb2aa79.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (42 commits) Update QtDeclarative def files Fix crash in MouseArea Compile Fixes undeleted timers (and endless warning from the event loop about Remove unneeded member variable. Fix test. Generalize qml "registration" Fix compiler warning Fix TextInput echoMode autotest on Linux Reuse QML lexer to simplify .pragma script logic Fix TextEdit text attribute and text stored in the internal QTextDocument having different contents Remove QDeclarativeItem::childrenChanged() signal overload Update QtGui and QtDeclarative def files Make rootContext and engine pointers in QDeclarativeView API const Add additional QVariant benchmarks. Allow MouseArea dragging to filter mouse events from descendants Expand QDeclarativeExtensionPlugin docs Add missing snippet files Expand QtObject doc Indicate default values ...
Diffstat (limited to 'examples/declarative/keyinteraction/focus')
-rw-r--r--examples/declarative/keyinteraction/focus/Core/GridMenu.qml6
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml4
-rw-r--r--examples/declarative/keyinteraction/focus/Core/ListViews.qml8
-rw-r--r--examples/declarative/keyinteraction/focus/focus.qml4
4 files changed, 11 insertions, 11 deletions
diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
index 9a8d3f3..19f7235 100644
--- a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
+++ b/examples/declarative/keyinteraction/focus/Core/GridMenu.qml
@@ -43,7 +43,7 @@ import Qt 4.7
FocusScope {
property alias interactive: gridView.interactive
- onWantsFocusChanged: if (wantsFocus) mainView.state = ""
+ onActiveFocusChanged: if (activeFocus) mainView.state = ""
Rectangle {
anchors.fill: parent
@@ -84,12 +84,12 @@ FocusScope {
onClicked: {
GridView.view.currentIndex = index
- container.forceFocus()
+ container.forceActiveFocus()
}
}
states: State {
- name: "active"; when: container.focus == true
+ name: "active"; when: container.activeFocus
PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
}
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
index cc13637..602b52b 100644
--- a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml
@@ -69,12 +69,12 @@ Item {
onClicked: {
ListView.view.currentIndex = index
- container.forceFocus()
+ container.forceActiveFocus()
}
}
states: State {
- name: "active"; when: container.focus == true
+ name: "active"; when: container.activeFocus
PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 }
PropertyChanges { target: label; font.pixelSize: 16 }
}
diff --git a/examples/declarative/keyinteraction/focus/Core/ListViews.qml b/examples/declarative/keyinteraction/focus/Core/ListViews.qml
index 6f9ceb4..3d6ceab 100644
--- a/examples/declarative/keyinteraction/focus/Core/ListViews.qml
+++ b/examples/declarative/keyinteraction/focus/Core/ListViews.qml
@@ -43,11 +43,11 @@ import Qt 4.7
FocusScope {
clip: true
- onWantsFocusChanged: if (wantsFocus) mainView.state = "showListViews"
+ onActiveFocusChanged: if (activeFocus) mainView.state = "showListViews"
ListView {
id: list1
- y: wantsFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
+ y: activeFocus ? 10 : 40; width: parent.width / 3; height: parent.height - 20
focus: true
KeyNavigation.up: gridMenu; KeyNavigation.left: contextMenu; KeyNavigation.right: list2
model: 10; cacheBuffer: 200
@@ -60,7 +60,7 @@ FocusScope {
ListView {
id: list2
- y: wantsFocus ? 10 : 40; x: parseInt(parent.width / 3); width: parent.width / 3; height: parent.height - 20
+ y: activeFocus ? 10 : 40; x: parseInt(parent.width / 3); width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list1; KeyNavigation.right: list3
model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
@@ -72,7 +72,7 @@ FocusScope {
ListView {
id: list3
- y: wantsFocus ? 10 : 40; x: parseInt(2 * parent.width / 3); width: parent.width / 3; height: parent.height - 20
+ y: activeFocus ? 10 : 40; x: parseInt(2 * parent.width / 3); width: parent.width / 3; height: parent.height - 20
KeyNavigation.up: gridMenu; KeyNavigation.left: list2
model: 10; cacheBuffer: 200
delegate: ListViewDelegate {}
diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/declarative/keyinteraction/focus/focus.qml
index 8b2af70..56fdffc 100644
--- a/examples/declarative/keyinteraction/focus/focus.qml
+++ b/examples/declarative/keyinteraction/focus/focus.qml
@@ -58,7 +58,7 @@ Rectangle {
width: parent.width; height: 320
focus: true
- interactive: parent.wantsFocus
+ interactive: parent.activeFocus
}
ListViews {
@@ -98,7 +98,7 @@ Rectangle {
states: State {
name: "contextMenuOpen"
- when: !mainView.wantsFocus
+ when: !mainView.activeFocus
PropertyChanges { target: contextMenu; x: 0; open: true }
PropertyChanges { target: mainView; x: 130 }
PropertyChanges { target: shade; opacity: 0.25 }