summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/declarative/flickr/mobile/GridDelegate.qml2
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml12
-rw-r--r--demos/declarative/twitter/TwitterCore/FatDelegate.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/HomeTitleBar.qml2
-rw-r--r--examples/declarative/listview/dynamic.qml2
-rw-r--r--examples/declarative/listview/itemlist.qml4
-rw-r--r--examples/declarative/listview/listview-example.qml4
-rw-r--r--examples/declarative/scrollbar/ScrollBar.qml16
-rw-r--r--examples/declarative/scrollbar/display.qml4
9 files changed, 26 insertions, 22 deletions
diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml
index eccdc34..df608bc 100644
--- a/demos/declarative/flickr/mobile/GridDelegate.qml
+++ b/demos/declarative/flickr/mobile/GridDelegate.qml
@@ -38,7 +38,7 @@
states: [
State {
- name: "Show"; when: thumb.status == 1
+ name: "Show"; when: thumb.status == Image.Ready
PropertyChanges { target: scaleMe; scale: 1 }
},
State {
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index 310c9df..caf1571 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -54,7 +54,11 @@ Flipable {
Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 }
- Common.Progress { anchors.centerIn: parent; width: 200; height: 18; progress: bigImage.progress; visible: bigImage.status!=1 }
+ Common.Progress {
+ anchors.centerIn: parent; width: 200; height: 18
+ progress: bigImage.progress; visible: bigImage.status != Image.Ready
+ }
+
Flickable {
id: flickable; anchors.fill: parent; clip: true
contentWidth: imageContainer.width; contentHeight: imageContainer.height
@@ -69,7 +73,7 @@ Flipable {
anchors.centerIn: parent; smooth: !flickable.moving
onStatusChanged : {
// Default scale shows the entire image.
- if (status == 1 && width != 0) {
+ if (status == Image.Ready && width != 0) {
slider.minimum = Math.min(flickable.width / width, flickable.height / height);
prevScale = Math.min(slider.minimum, 1);
slider.value = prevScale;
@@ -81,12 +85,12 @@ Flipable {
Text {
text: "Image Unavailable"
- visible: bigImage.status == 'Error'
+ visible: bigImage.status == Image.Error
anchors.centerIn: parent; color: "white"; font.bold: true
}
Common.Slider {
- id: slider; visible: { bigImage.status == 1 && maximum > minimum }
+ id: slider; visible: { bigImage.status == Image.Ready && maximum > minimum }
anchors {
bottom: parent.bottom; bottomMargin: 65
left: parent.left; leftMargin: 25
diff --git a/demos/declarative/twitter/TwitterCore/FatDelegate.qml b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
index 62ee11a..72e5ecc 100644
--- a/demos/declarative/twitter/TwitterCore/FatDelegate.qml
+++ b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
@@ -27,7 +27,7 @@ Component {
id: whiteRect; x: 6; width: 50; height: 50; color: "white"; smooth: true
anchors.verticalCenter: parent.verticalCenter
- Loading { x: 1; y: 1; width: 48; height: 48; visible: realImage.status != 1 }
+ Loading { x: 1; y: 1; width: 48; height: 48; visible: realImage.status != Image.Ready }
Image { id: realImage; source: userImage; x: 1; y: 1; width:48; height:48 }
}
Text { id:txt; y:4; x: 56
diff --git a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
index 11aa74f..26ad1a9 100644
--- a/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
+++ b/demos/declarative/twitter/TwitterCore/HomeTitleBar.qml
@@ -37,7 +37,7 @@ Item {
UserModel { user: rssModel.authName; id: userModel }
Component { id: imgDelegate;
Item {
- Loading { width:48; height:48; visible: realImage.status != 1 }
+ Loading { width:48; height:48; visible: realImage.status != Image.Ready }
Image { source: image; width:48; height:48; id: realImage }
}
}
diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml
index 952f6a7..9b05ad5 100644
--- a/examples/declarative/listview/dynamic.qml
+++ b/examples/declarative/listview/dynamic.qml
@@ -145,7 +145,7 @@ Rectangle {
width: 8; height: view.height; anchors.right: view.right
opacity: 0
- orientation: "Vertical"
+ orientation: Qt.Vertical
position: view.visibleArea.yPosition
pageSize: view.visibleArea.heightRatio
diff --git a/examples/declarative/listview/itemlist.qml b/examples/declarative/listview/itemlist.qml
index e387f28..b73b3a3 100644
--- a/examples/declarative/listview/itemlist.qml
+++ b/examples/declarative/listview/itemlist.qml
@@ -33,7 +33,7 @@ Rectangle {
anchors { fill: parent; bottomMargin: 30 }
model: itemModel
preferredHighlightBegin: 0; preferredHighlightEnd: 0
- highlightRangeMode: "StrictlyEnforceRange"
+ highlightRangeMode: ListView.StrictlyEnforceRange
orientation: ListView.Horizontal
snapMode: ListView.SnapOneItem; flickDeceleration: 2000
}
@@ -55,7 +55,7 @@ Rectangle {
radius: 3
color: view.currentIndex == index ? "blue" : "white"
- MouseArea {
+ MouseArea {
width: 20; height: 20
anchors.centerIn: parent
onClicked: view.currentIndex = index
diff --git a/examples/declarative/listview/listview-example.qml b/examples/declarative/listview/listview-example.qml
index 6feedf6..2e8cdda 100644
--- a/examples/declarative/listview/listview-example.qml
+++ b/examples/declarative/listview/listview-example.qml
@@ -75,7 +75,7 @@ Rectangle {
highlight: petHighlight
currentIndex: list1.currentIndex
preferredHighlightBegin: 80; preferredHighlightEnd: 220
- highlightRangeMode: "ApplyRange"
+ highlightRangeMode: ListView.ApplyRange
}
ListView {
@@ -87,7 +87,7 @@ Rectangle {
highlight: Rectangle { color: "lightsteelblue" }
currentIndex: list1.currentIndex
preferredHighlightBegin: 125; preferredHighlightEnd: 125
- highlightRangeMode: "StrictlyEnforceRange"
+ highlightRangeMode: ListView.StrictlyEnforceRange
flickDeceleration: 1000
}
}
diff --git a/examples/declarative/scrollbar/ScrollBar.qml b/examples/declarative/scrollbar/ScrollBar.qml
index 5433156..c628a20 100644
--- a/examples/declarative/scrollbar/ScrollBar.qml
+++ b/examples/declarative/scrollbar/ScrollBar.qml
@@ -7,26 +7,26 @@ Item {
// position and pageSize are in the range 0.0 - 1.0. They are relative to the
// height of the page, i.e. a pageSize of 0.5 means that you can see 50%
// of the height of the view.
- // orientation can be either 'Vertical' or 'Horizontal'
+ // orientation can be either Qt.Vertical or Qt.Horizontal
property real position
property real pageSize
- property variant orientation : "Vertical"
+ property variant orientation : Qt.Vertical
// A light, semi-transparent background
Rectangle {
id: background
anchors.fill: parent
- radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
color: "white"
opacity: 0.3
}
// Size the bar to the required size, depending upon the orientation.
Rectangle {
- x: orientation == 'Vertical' ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
- y: orientation == 'Vertical' ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
- width: orientation == 'Vertical' ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
- height: orientation == 'Vertical' ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
- radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ x: orientation == Qt.Vertical ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
+ y: orientation == Qt.Vertical ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
+ width: orientation == Qt.Vertical ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
+ height: orientation == Qt.Vertical ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
+ radius: orientation == Qt.Vertical ? (width/2 - 1) : (height/2 - 1)
color: "black"
opacity: 0.7
}
diff --git a/examples/declarative/scrollbar/display.qml b/examples/declarative/scrollbar/display.qml
index cb1da16..b8a5e36 100644
--- a/examples/declarative/scrollbar/display.qml
+++ b/examples/declarative/scrollbar/display.qml
@@ -37,7 +37,7 @@ Rectangle {
width: 12; height: view.height-12
anchors.right: view.right
opacity: 0
- orientation: "Vertical"
+ orientation: Qt.Vertical
position: view.visibleArea.yPosition
pageSize: view.visibleArea.heightRatio
}
@@ -47,7 +47,7 @@ Rectangle {
width: view.width-12; height: 12
anchors.bottom: view.bottom
opacity: 0
- orientation: "Horizontal"
+ orientation: Qt.Horizontal
position: view.visibleArea.xPosition
pageSize: view.visibleArea.widthRatio
}