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 | |
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')
28 files changed, 202 insertions, 320 deletions
diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml index 9a672d9..b9d56b2 100644 --- a/examples/declarative/listview/highlight.qml +++ b/examples/declarative/listview/highlight.qml @@ -23,9 +23,7 @@ Rect { State { name: "Current" when: Wrapper.ListView.isCurrentItem - SetProperty { - target: Wrapper; property: "x"; value: 10 - } + SetProperties { target: Wrapper; x: 10 } } ] transitions: [ diff --git a/examples/declarative/listview/recipes.qml b/examples/declarative/listview/recipes.qml index ae9756c..829f074 100644 --- a/examples/declarative/listview/recipes.qml +++ b/examples/declarative/listview/recipes.qml @@ -14,7 +14,7 @@ Rect { width: List.width // Create a property to contain the visibility of the details. // We can bind multiple element's opacity to this one property, - // rather than having a "SetProperty" line for each element we + // rather than having a "SetProperties" line for each element we // want to fade. property real detailsOpacity : 0 @@ -94,20 +94,17 @@ Rect { states: [ State { name: "Details" - SetProperty { target: background; property: "color"; value: "white" } + SetProperties { target: background; color: "white" } // Make the picture bigger SetProperties { target: recipePic; width: 128; height: 128 } // Make details visible SetProperties { target: wrapper; detailsOpacity: 1; x: 0 } // Make the detailed view fill the entire list area - SetProperty { target: wrapper; property: "height"; value: List.height } + SetProperties { target: wrapper; height: List.height } // Move the list so that this item is at the top. - SetProperty { - target: wrapper.ListView.view - property: "yPosition"; value: wrapper.y - } + SetProperties { target: wrapper.ListView.view; explicit: true; yPosition: wrapper.y } // Disallow flicking while we're in detailed view - SetProperty { target: wrapper.ListView.view; property: "locked"; value: 1 } + SetProperties { target: wrapper.ListView.view; locked: 1 } } ] transitions: [ diff --git a/examples/declarative/minehunt/minehunt.qml b/examples/declarative/minehunt/minehunt.qml index db826a3..df8660f 100644 --- a/examples/declarative/minehunt/minehunt.qml +++ b/examples/declarative/minehunt/minehunt.qml @@ -64,11 +64,7 @@ Item { State { name: "back" when: modelData.flipped == true - SetProperty { - target: flipable - property: "rotation" - value: 180 - } + SetProperties { target: flipable; rotation: 180 } } ] transitions: [ diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml index 42e8f25..bf40d2d 100644 --- a/examples/declarative/scrollbar/display.qml +++ b/examples/declarative/scrollbar/display.qml @@ -16,16 +16,8 @@ Rect { State { name: "ShowBars" when: View.moving - SetProperty { - target: SBV - property: "opacity" - value: 1 - } - SetProperty { - target: SBH - property: "opacity" - value: 1 - } + SetProperties { target: SBV; opacity: 1 } + SetProperties { target: SBH; opacity: 1 } } ] transitions: [ diff --git a/examples/declarative/slideswitch/Switch.qml b/examples/declarative/slideswitch/Switch.qml index 8bc88e4..cd93ec9 100644 --- a/examples/declarative/slideswitch/Switch.qml +++ b/examples/declarative/slideswitch/Switch.qml @@ -39,13 +39,13 @@ Item { states: [ State { name: "On" - SetProperty { target: Knob; property: "x"; value: 78 } - SetProperty { target: Switch; property: "on"; value: true } + SetProperties { target: Knob; x: 78 } + SetProperties { target: Switch; on: true } }, State { name: "Off" - SetProperty { target: Knob; property: "x"; value: 1 } - SetProperty { target: Switch; property: "on"; value: false } + SetProperties { target: Knob; x: 1 } + SetProperties { target: Switch; on: false } } ] transitions: [ diff --git a/examples/declarative/states/states.qml b/examples/declarative/states/states.qml index bcde20c..6bd9813 100644 --- a/examples/declarative/states/states.qml +++ b/examples/declarative/states/states.qml @@ -26,15 +26,15 @@ Rect { // In state 'Position1', change the 'myrect' item x, y to 150, 50. State { name: "Position1" - SetProperty { target: myrect; property: "x"; value: 150 } - SetProperty { target: myrect; property: "y"; value: 50 } + SetProperties { target: myrect; x: 150 } + SetProperties { target: myrect; y: 50 } }, // In state 'Position2', change y to 100. We do not specify 'x' here - // it will therefore be restored to its default value of 0, if it // had been changed. State { name: "Position2" - SetProperty { target: myrect; property: "y"; value: 200 } + SetProperties { target: myrect; y: 200 } } ] } diff --git a/examples/declarative/states/transitions.qml b/examples/declarative/states/transitions.qml index 4c1dceb..d01fea8 100644 --- a/examples/declarative/states/transitions.qml +++ b/examples/declarative/states/transitions.qml @@ -26,15 +26,15 @@ Rect { // In state 'Position1', change the 'myrect' item x, y to 150, 50. State { name: "Position1" - SetProperty { target: myrect; property: "x"; value: 150 } - SetProperty { target: myrect; property: "y"; value: 50 } + SetProperties { target: myrect; x: 150; } + SetProperties { target: myrect; y: 50; } }, // In state 'Position2', change y to 100. We do not specify 'x' here - // it will therefore be restored to its default value of 0, if it // had been changed. State { name: "Position2" - SetProperty { target: myrect; property: "y"; value: 200 } + SetProperties { target: myrect; y: 200 } } ] 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: [ diff --git a/examples/declarative/xmldata/yahoonews.qml b/examples/declarative/xmldata/yahoonews.qml index b465ef1..a5bb2f1 100644 --- a/examples/declarative/xmldata/yahoonews.qml +++ b/examples/declarative/xmldata/yahoonews.qml @@ -64,16 +64,8 @@ Rect { states: [ State { name: "Details" - SetProperty { - target: Wrapper - property: "height" - binding: "contents.height + 10" - } - SetProperty { - target: Description - property: "opacity" - value: 1 - } + SetProperties { target: Wrapper; height: contents.height + 10 } + SetProperties { target: Description; opacity: 1 } } ] transitions: [ |