diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-26 04:52:07 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-06-26 04:52:07 (GMT) |
commit | 3c45c081ce33f05ae200d252ebb5e9e1484bcc6d (patch) | |
tree | 5f8a6752e610ed8ca8bbf0ebd58cf16faad9b5e5 /examples/declarative/tutorials | |
parent | 0362832c16f95c2909e2a68351e15242b7d1b795 (diff) | |
download | Qt-3c45c081ce33f05ae200d252ebb5e9e1484bcc6d.zip Qt-3c45c081ce33f05ae200d252ebb5e9e1484bcc6d.tar.gz Qt-3c45c081ce33f05ae200d252ebb5e9e1484bcc6d.tar.bz2 |
Update SetProperties to handle changing bindings
Also removed all uses of SetProperty
Diffstat (limited to 'examples/declarative/tutorials')
20 files changed, 181 insertions, 274 deletions
diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/4/RemoveButton.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/4/RemoveButton.qml index a359aaf..135a519 100644 --- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/4/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/4/RemoveButton.qml @@ -79,30 +79,25 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: 230 + width: 230 } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/4a/RemoveButton.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/4a/RemoveButton.qml index 4db49ea..5ee56ce 100644 --- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/4a/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/4a/RemoveButton.qml @@ -86,30 +86,25 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: 230 + width: 230 } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/5/RemoveButton.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/5/RemoveButton.qml index 29d464b..00dec9e 100644 --- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/5/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/5/RemoveButton.qml @@ -74,30 +74,25 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: 230 + width: 230 } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/1/RemoveButton.qml index 3142c45..3a9f318 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/1/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/1/RemoveButton.qml @@ -74,30 +74,25 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: 230 + width: 230 } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml index 3142c45..3a9f318 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/1a/RemoveButton.qml @@ -74,30 +74,25 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: 230 + width: 230 } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml index bf6e82d..362591e 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/1b/lib/RemoveButton.qml @@ -76,30 +76,25 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: 230 + width: 230 } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml index 99a521d..5595414 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/2/RemoveButton.qml @@ -81,31 +81,26 @@ Rect { State { name: "opened" //! [use width] - SetProperty { + SetProperties { target: removeButton - property: "width" - value: removeButton.expandedWidth + width: removeButton.expandedWidth } //! [use width] - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/ContactField.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/ContactField.qml index 890d781..8ae4d7d 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/ContactField.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/ContactField.qml @@ -34,15 +34,13 @@ Item { State { name: "editingText" when: fieldText.state == 'editing' - SetProperty { + SetProperties { target: removeButton.anchors - property: "rightMargin" - value: -35 + rightMargin: -35 } - SetProperty { + SetProperties { target: fieldText - property: "width" - value: contactField.width + width: contactField.width } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/FieldText.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/FieldText.qml index 8bf5317..b55aab8 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/FieldText.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/FieldText.qml @@ -94,40 +94,33 @@ Rect { states: [ State { name: "editing" - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: textEdit - property: "readOnly" - value: false + readOnly: false } - SetProperty { + SetProperties { target: textEdit - property: "focus" - value: true + focus: true } - SetProperty { + SetProperties { target: editRegion - property: "opacity" - value: 0 + opacity: 0 } - SetProperty { + SetProperties { target: textEdit.anchors - property: "leftMargin" - value: 39 + leftMargin: 39 } - SetProperty { + SetProperties { target: textEdit.anchors - property: "rightMargin" - value: 39 + rightMargin: 39 } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml index 2f27a69..6b4cd99 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/RemoveButton.qml @@ -77,30 +77,25 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: removeButton.expandedWidth + width: removeButton.expandedWidth } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/4/ContactField.qml b/examples/declarative/tutorials/contacts/2_Reuse/4/ContactField.qml index e9927e9..06a959d 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/4/ContactField.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/4/ContactField.qml @@ -32,15 +32,13 @@ Item { State { name: "editingText" when: fieldText.state == 'editing' - SetProperty { + SetProperties { target: removeButton.anchors - property: "rightMargin" - value: -35 + rightMargin: -35 } - SetProperty { + SetProperties { target: fieldText - property: "width" - value: contactField.width + width: contactField.width } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/4/FieldText.qml b/examples/declarative/tutorials/contacts/2_Reuse/4/FieldText.qml index d4fbc20..1a5b77b 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/4/FieldText.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/4/FieldText.qml @@ -95,40 +95,33 @@ Rect { states: [ State { name: "editing" - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: textEdit - property: "readOnly" - value: false + readOnly: false } - SetProperty { + SetProperties { target: textEdit - property: "focus" - value: true + focus: true } - SetProperty { + SetProperties { target: editRegion - property: "opacity" - value: 0 + opacity: 0 } - SetProperty { + SetProperties { target: textEdit.anchors - property: "leftMargin" - value: 39 + leftMargin: 39 } - SetProperty { + SetProperties { target: textEdit.anchors - property: "rightMargin" - value: 39 + rightMargin: 39 } } ] diff --git a/examples/declarative/tutorials/contacts/2_Reuse/4/RemoveButton.qml b/examples/declarative/tutorials/contacts/2_Reuse/4/RemoveButton.qml index bfe496e..4398ac1 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/4/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/4/RemoveButton.qml @@ -82,30 +82,25 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: removeButton.expandedWidth + width: removeButton.expandedWidth } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/contacts/3_Collections/2/ContactView.qml b/examples/declarative/tutorials/contacts/3_Collections/2/ContactView.qml index 0a293f5..1be4b99 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/2/ContactView.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/2/ContactView.qml @@ -71,30 +71,26 @@ Item { states: [ State { name: "opened" - SetProperty { + SetProperties { target: wrapper - property: "height" - value: contactListView.height + height: contactListView.height } - SetProperty { + SetProperties { target: contactListView - property: "yPosition" - value: wrapper.y + explicit: true + yPosition: wrapper.y } - SetProperty { + SetProperties { target: contactListView - property: "locked" - value: 1 + locked: 1 } - SetProperty { + SetProperties { target: label - property: "opacity" - value: 0 + opacity: 0 } - SetProperty { + SetProperties { target: Details - property: "opacity" - value: 1 + opacity: 1 } } ] diff --git a/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml b/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml index 7a44a3f..a3b3e18 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/3/ContactView.qml @@ -89,30 +89,26 @@ Item { states: [ State { name: "opened" - SetProperty { + SetProperties { target: wrapper - property: "height" - value: contactListView.height + height: contactListView.height } - SetProperty { + SetProperties { target: contactListView - property: "yPosition" - value: wrapper.y + explicit: true + yPosition: wrapper.y } - SetProperty { + SetProperties { target: contactListView - property: "locked" - value: 1 + locked: 1 } - SetProperty { + SetProperties { target: label - property: "opacity" - value: 0 + opacity: 0 } - SetProperty { + SetProperties { target: Details - property: "opacity" - value: 1 + opacity: 1 } } ] diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml index 3b76a13..5623b26 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/Button.qml @@ -24,10 +24,9 @@ Item { State { name: "pressed" when: buttonMouseRegion.pressed == true - SetProperty { + SetProperties { target: buttonRect - property: "color" - value: "green" + color: "green" } } ] diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml index e9927e9..06a959d 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/ContactField.qml @@ -32,15 +32,13 @@ Item { State { name: "editingText" when: fieldText.state == 'editing' - SetProperty { + SetProperties { target: removeButton.anchors - property: "rightMargin" - value: -35 + rightMargin: -35 } - SetProperty { + SetProperties { target: fieldText - property: "width" - value: contactField.width + width: contactField.width } } ] diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml index 111d9c5..b4dc559 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/FieldText.qml @@ -95,40 +95,33 @@ Rect { states: [ State { name: "editing" - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: textEdit - property: "readOnly" - value: false + readOnly: false } - SetProperty { + SetProperties { target: textEdit - property: "focus" - value: true + focus: true } - SetProperty { + SetProperties { target: editRegion - property: "opacity" - value: 0 + opacity: 0 } - SetProperty { + SetProperties { target: textEdit.anchors - property: "leftMargin" - value: 39 + leftMargin: 39 } - SetProperty { + SetProperties { target: textEdit.anchors - property: "rightMargin" - value: 39 + rightMargin: 39 } } ] diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml index c0ea79d..95ca062 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/RemoveButton.qml @@ -80,30 +80,26 @@ Rect { states: [ State { name: "opened" - SetProperty { + SetProperties { target: removeButton - property: "width" - value: removeButton.expandedWidth + explicit: true + width: removeButton.expandedWidth } - SetProperty { + SetProperties { target: text - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: confirmIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: cancelIcon - property: "opacity" - value: 1 + opacity: 1 } - SetProperty { + SetProperties { target: trashIcon - property: "opacity" - value: 0 + opacity: 0 } } ] diff --git a/examples/declarative/tutorials/helloworld/t3/tutorial3.qml b/examples/declarative/tutorials/helloworld/t3/tutorial3.qml index bd89ecf..e0515ec 100644 --- a/examples/declarative/tutorials/helloworld/t3/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/t3/tutorial3.qml @@ -14,16 +14,8 @@ Rect { State { name: "down" when: MouseRegion.pressed == true - SetProperty { - target: HelloText - property: "y" - value: 160 - } - SetProperty { - target: HelloText - property: "color" - value: "red" - } + SetProperties { target: HelloText; y: 160 } + SetProperties { target: HelloText; color: "red" } } ] transitions: [ |