summaryrefslogtreecommitdiffstats
path: root/demos/declarative
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative')
-rw-r--r--demos/declarative/contacts/Button.qml5
-rw-r--r--demos/declarative/contacts/ContactField.qml10
-rw-r--r--demos/declarative/contacts/FieldText.qml45
-rw-r--r--demos/declarative/contacts/RemoveButton.qml25
-rw-r--r--demos/declarative/contacts/contacts.qml45
-rw-r--r--demos/declarative/flickr/content/ImageDetails.qml2
-rw-r--r--demos/declarative/flickr/content/MediaLineEdit.qml5
-rw-r--r--demos/declarative/flickr/flickr2.qml10
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml84
9 files changed, 72 insertions, 159 deletions
diff --git a/demos/declarative/contacts/Button.qml b/demos/declarative/contacts/Button.qml
index 3b76a13..5623b26 100644
--- a/demos/declarative/contacts/Button.qml
+++ b/demos/declarative/contacts/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/demos/declarative/contacts/ContactField.qml b/demos/declarative/contacts/ContactField.qml
index 003e723..60a4cc5 100644
--- a/demos/declarative/contacts/ContactField.qml
+++ b/demos/declarative/contacts/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/demos/declarative/contacts/FieldText.qml b/demos/declarative/contacts/FieldText.qml
index 39e45d4..ae84d44 100644
--- a/demos/declarative/contacts/FieldText.qml
+++ b/demos/declarative/contacts/FieldText.qml
@@ -96,50 +96,41 @@ 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: fieldText
- property: "color"
- value: "white"
+ color: "white"
}
- SetProperty {
+ SetProperties {
target: textEdit
- property: "color"
- value: "black"
+ color: "black"
}
- 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: 34
+ leftMargin: 34
}
- SetProperty {
+ SetProperties {
target: textEdit.anchors
- property: "rightMargin"
- value: 34
+ rightMargin: 34
}
}
]
diff --git a/demos/declarative/contacts/RemoveButton.qml b/demos/declarative/contacts/RemoveButton.qml
index 8f46fcb..c1cc816 100644
--- a/demos/declarative/contacts/RemoveButton.qml
+++ b/demos/declarative/contacts/RemoveButton.qml
@@ -85,30 +85,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/demos/declarative/contacts/contacts.qml b/demos/declarative/contacts/contacts.qml
index 0ce9948..fd49041 100644
--- a/demos/declarative/contacts/contacts.qml
+++ b/demos/declarative/contacts/contacts.qml
@@ -50,10 +50,9 @@ Rect {
State {
name: "currentItem"
when: wrapper.ListView.isCurrentItem
- SetProperty {
+ SetProperties {
target: label
- property: "color"
- value: "black"
+ color: "black"
}
}
]
@@ -94,30 +93,25 @@ Rect {
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
+ 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
}
}
]
@@ -277,10 +271,9 @@ Rect {
State {
name: "searchHidden"
when: searchBar.text == '' || contacts.mode != 'list'
- SetProperty {
+ SetProperties {
target: searchBarWrapper.anchors
- property: "bottomMargin"
- value: -30
+ bottomMargin: -30
}
}
]
@@ -303,15 +296,13 @@ Rect {
State {
name: "editNewState"
when: contacts.mode == 'new'
- SetProperty {
+ SetProperties {
target: contactListView
- property: "opacity"
- value: 0
+ opacity: 0
}
- SetProperty {
+ SetProperties {
target: newContactWrapper
- property: "opacity"
- value: 1
+ opacity: 1
}
}
]
diff --git a/demos/declarative/flickr/content/ImageDetails.qml b/demos/declarative/flickr/content/ImageDetails.qml
index ccc91cb..d17e323 100644
--- a/demos/declarative/flickr/content/ImageDetails.qml
+++ b/demos/declarative/flickr/content/ImageDetails.qml
@@ -129,7 +129,7 @@ Flipable {
states: [
State {
name: "Back"
- SetProperty { target: Container; property: "rotation"; value: 180 }
+ SetProperties { target: Container; rotation: 180 }
}
]
diff --git a/demos/declarative/flickr/content/MediaLineEdit.qml b/demos/declarative/flickr/content/MediaLineEdit.qml
index 691bb5b..65c2b38 100644
--- a/demos/declarative/flickr/content/MediaLineEdit.qml
+++ b/demos/declarative/flickr/content/MediaLineEdit.qml
@@ -14,10 +14,9 @@ Item {
target: Label
text: Container.label + ": "
}
- SetProperty {
+ SetProperties {
target: Label
- property: "x"
- binding: 10
+ x: 10
}
SetProperties {
target: Editor
diff --git a/demos/declarative/flickr/flickr2.qml b/demos/declarative/flickr/flickr2.qml
index 79f7a32..2f4c823 100644
--- a/demos/declarative/flickr/flickr2.qml
+++ b/demos/declarative/flickr/flickr2.qml
@@ -48,7 +48,6 @@ Item {
Script {
function photoClicked() {
Background.imageDetails.photoTitle = title;
- Background.imageDetails.flickableArea.yPosition = 0;
Background.imageDetails.photoDescription = description;
Background.imageDetails.photoTags = tags;
Background.imageDetails.photoWidth = photoWidth;
@@ -129,15 +128,12 @@ Item {
states: [
State {
name: "gridView"
- SetProperty { target: Wrapper; property: "moveToParent"; value: GridViewPackage }
+ SetProperties { target: Wrapper; explicit: true; property: "moveToParent"; value: GridViewPackage }
},
State {
name: "pathView"
- SetProperty { target: Wrapper; property: "scale"; value: PathViewPackage.PathView.scale }
- SetProperty { target: Wrapper; property: "scale"; binding: "PathViewPackage.PathView.scale" }
- SetProperty { target: Wrapper; property: "angle"; value: PathViewPackage.PathView.angle }
- SetProperty { target: Wrapper; property: "angle"; binding: "PathViewPackage.PathView.angle" }
- SetProperty { target: Wrapper; property: "moveToParent"; value: PathViewPackage }
+ SetProperties { target: Wrapper; scale: PathViewPackage.PathView.scale; angle: PathViewPackage.PathView.angle; }
+ SetProperties { target: Wrapper; explicit: true; moveToParent: PathViewPackage }
}
]
transitions: [
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml
index 889ab87..3dcc20d 100644
--- a/demos/declarative/webbrowser/webbrowser.qml
+++ b/demos/declarative/webbrowser/webbrowser.qml
@@ -151,20 +151,12 @@ Item {
State {
name: "Normal"
when: WebView.progress == 1.0
- SetProperty {
- target: Header
- property: "progressOff"
- value: 1
- }
+ SetProperties { target: Header; progressOff: 1 }
},
State {
name: "ProgressShown"
when: WebView.progress < 1.0
- SetProperty {
- target: Header
- property: "progressOff"
- value: 0
- }
+ SetProperties { target: Header; progressOff: 0; }
}
]
transitions: [
@@ -255,30 +247,14 @@ Item {
State {
name: "Enabled"
when: WebView.back.enabled==true
- SetProperty {
- target: back_e
- property: "opacity"
- value: 1
- }
- SetProperty {
- target: back_d
- property: "opacity"
- value: 0
- }
+ SetProperties { target: back_e; opacity: 1 }
+ SetProperties { target: back_d; opacity: 0 }
},
State {
name: "Disabled"
when: WebView.back.enabled==false
- SetProperty {
- target: back_e
- property: "opacity"
- value: 0
- }
- SetProperty {
- target: back_d
- property: "opacity"
- value: 1
- }
+ SetProperties { target: back_e; opacity: 0 }
+ SetProperties { target: back_d; opacity: 1 }
}
]
transitions: [
@@ -327,30 +303,14 @@ Item {
State {
name: "Enabled"
when: WebView.forward.enabled==true
- SetProperty {
- target: forward_e
- property: "opacity"
- value: 1
- }
- SetProperty {
- target: forward_d
- property: "opacity"
- value: 0
- }
+ SetProperties { target: forward_e; opacity: 1 }
+ SetProperties { target: forward_d; opacity: 0 }
},
State {
name: "Disabled"
when: WebView.forward.enabled==false
- SetProperty {
- target: forward_e
- property: "opacity"
- value: 0
- }
- SetProperty {
- target: forward_d
- property: "opacity"
- value: 1
- }
+ SetProperties { target: forward_e; opacity: 0 }
+ SetProperties { target: forward_d; opacity: 1 }
}
]
transitions: [
@@ -372,29 +332,13 @@ Item {
states: [
State {
name: "Normal"
- SetProperty {
- target: WebView
- property: "zoomedOut"
- value: 0
- }
- SetProperty {
- target: Flick
- property: "xPosition"
- value: Math.min(WebView.width-Flick.width,Math.max(0,Flick.centerX-Flick.width/2))
- }
- SetProperty {
- target: Flick
- property: "yPosition"
- value: Math.min(WebView.height-Flick.height,Math.max(0,Flick.centerY-Flick.height/2))
- }
+ SetProperties { target: WebView; zoomedOut: 0 }
+ SetProperties { target: Flick; explicit: true; xPosition: Math.min(WebView.width-Flick.width,Math.max(0,Flick.centerX-Flick.width/2)) }
+ SetProperties { target: Flick; explicit: true; yPosition: Math.min(WebView.height-Flick.height,Math.max(0,Flick.centerY-Flick.height/2)) }
},
State {
name: "ZoomedOut"
- SetProperty {
- target: WebView
- property: "zoomedOut"
- value: 1
- }
+ SetProperties { target: WebView; zoomedOut: 1 }
}
]
transitions: [