diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 05:10:39 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-07-31 05:10:39 (GMT) |
commit | 1af063d9aaff5d0e5e8715202baeced55bbbb0bc (patch) | |
tree | 07f350fce0def816328a9dca23f7801bd40d4d7d /examples/declarative | |
parent | 510b9523339d97b8b52175ddb5a21bff706b3d7c (diff) | |
download | Qt-1af063d9aaff5d0e5e8715202baeced55bbbb0bc.zip Qt-1af063d9aaff5d0e5e8715202baeced55bbbb0bc.tar.gz Qt-1af063d9aaff5d0e5e8715202baeced55bbbb0bc.tar.bz2 |
tile/preservseAspect are now fillMode
as per API review
Diffstat (limited to 'examples/declarative')
-rw-r--r-- | examples/declarative/aspectratio/scale_to_fit_simple.qml | 2 | ||||
-rw-r--r-- | examples/declarative/fillmode/face.png | bin | 0 -> 905 bytes | |||
-rw-r--r-- | examples/declarative/fillmode/fillmode.qml | 39 | ||||
-rw-r--r-- | examples/declarative/minehunt/minehunt.qml | 2 | ||||
-rw-r--r-- | examples/declarative/snow/ImageBatch.qml | 2 |
5 files changed, 42 insertions, 3 deletions
diff --git a/examples/declarative/aspectratio/scale_to_fit_simple.qml b/examples/declarative/aspectratio/scale_to_fit_simple.qml index f9c0e04..5381bb4 100644 --- a/examples/declarative/aspectratio/scale_to_fit_simple.qml +++ b/examples/declarative/aspectratio/scale_to_fit_simple.qml @@ -13,7 +13,7 @@ Rect { Image { id: Image source: "pics/face.png" - preserveAspect: true + fillMode: "PreserveAspect" anchors.fill: parent } } diff --git a/examples/declarative/fillmode/face.png b/examples/declarative/fillmode/face.png Binary files differnew file mode 100644 index 0000000..9623b1a --- /dev/null +++ b/examples/declarative/fillmode/face.png diff --git a/examples/declarative/fillmode/fillmode.qml b/examples/declarative/fillmode/fillmode.qml new file mode 100644 index 0000000..473f553 --- /dev/null +++ b/examples/declarative/fillmode/fillmode.qml @@ -0,0 +1,39 @@ +import Qt 4.6 + +Image { + width: 400 + height: 250 + source: "face.png" + fillMode: SequentialAnimation { + running: true + repeat: true + SetPropertyAction { value: "Stretch" } + SetPropertyAction { target: Label; property: "text"; value: "Stretch" } + PauseAnimation { duration: 1000 } + SetPropertyAction { value: "PreserveAspect" } + SetPropertyAction { target: Label; property: "text"; value: "PreserveAspect" } + PauseAnimation { duration: 1000 } + SetPropertyAction { value: "Tile" } + SetPropertyAction { target: Label; property: "text"; value: "Tile" } + PauseAnimation { duration: 1000 } + SetPropertyAction { value: "TileHorizontally" } + SetPropertyAction { target: Label; property: "text"; value: "TileHorizontally" } + PauseAnimation { duration: 1000 } + SetPropertyAction { value: "TileVertically" } + SetPropertyAction { target: Label; property: "text"; value: "TileVertically" } + PauseAnimation { duration: 1000 } + } + Text { + id: Label + font.size: 24 + color: "blue" + style: "Outline" + styleColor: "white" + anchors { centeredIn: parent } + } + Rect { + pen.color: "black" + color: "transparent" + anchors { fill: parent; rightMargin: 1; bottomMargin: 1} + } +} diff --git a/examples/declarative/minehunt/minehunt.qml b/examples/declarative/minehunt/minehunt.qml index e1f48ef..6b45b79 100644 --- a/examples/declarative/minehunt/minehunt.qml +++ b/examples/declarative/minehunt/minehunt.qml @@ -119,7 +119,7 @@ Item { ] Image { source: "pics/No-Ones-Laughing-3.jpg" - tile: true + fillMode: "Tile" } Description { text: "Use the 'minehunt' executable to run this demo!" diff --git a/examples/declarative/snow/ImageBatch.qml b/examples/declarative/snow/ImageBatch.qml index 77bacab..bac4328 100644 --- a/examples/declarative/snow/ImageBatch.qml +++ b/examples/declarative/snow/ImageBatch.qml @@ -41,7 +41,7 @@ GridView { transformOrigin: "Center" width: MyGrid.imageWidth; height: MyGrid.imageHeight; - Image { id: Image; source: url; preserveAspect: true; smooth: true; anchors.fill: parent; + Image { id: Image; source: url; fillMode: "PreserveAspect"; smooth: true; anchors.fill: parent; opacity: (status == 0)?1:0; opacity: Behavior { NumberAnimation { properties: "opacity" } } } Loading { anchors.centeredIn: parent; visible: Image.status } |