summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/declarative/border-image/MyBorderImage.qml13
-rw-r--r--examples/declarative/border-image/animated.qml12
-rw-r--r--examples/declarative/border-image/example.qml8
3 files changed, 17 insertions, 16 deletions
diff --git a/examples/declarative/border-image/MyBorderImage.qml b/examples/declarative/border-image/MyBorderImage.qml
index f9531df..395b648 100644
--- a/examples/declarative/border-image/MyBorderImage.qml
+++ b/examples/declarative/border-image/MyBorderImage.qml
@@ -1,9 +1,9 @@
import Qt 4.6
Item {
- property var horizontalMode : "Stretch"
- property var verticalMode : "Stretch"
- property string source
+ property var horizontalMode : BorderImage.Stretch
+ property var verticalMode : BorderImage.Stretch
+ property alias source: MyImage.source
property int minWidth
property int minHeight
property int maxWidth
@@ -13,19 +13,20 @@ Item {
id: Container
width: 240; height: 240
BorderImage {
- x: Container.width / 2 - width / 2
- y: Container.height / 2 - height / 2
+ id: MyImage; x: Container.width / 2 - width / 2; y: Container.height / 2 - height / 2
+
width: SequentialAnimation {
running: true; repeat: true
NumberAnimation { from: Container.minWidth; to: Container.maxWidth; duration: 2000; easing: "easeInOutQuad"}
NumberAnimation { from: Container.maxWidth; to: Container.minWidth; duration: 2000; easing: "easeInOutQuad" }
}
+
height: SequentialAnimation {
running: true; repeat: true
NumberAnimation { from: Container.minHeight; to: Container.maxHeight; duration: 2000; easing: "easeInOutQuad"}
NumberAnimation { from: Container.maxHeight; to: Container.minHeight; duration: 2000; easing: "easeInOutQuad" }
}
- source: Container.source
+
horizontalTileMode: Container.horizontalMode
verticalTileMode: Container.verticalMode
border.top: Container.margin
diff --git a/examples/declarative/border-image/animated.qml b/examples/declarative/border-image/animated.qml
index 2fe2ea9..b34753f 100644
--- a/examples/declarative/border-image/animated.qml
+++ b/examples/declarative/border-image/animated.qml
@@ -14,19 +14,19 @@ Rectangle {
x: 270; y: 20; minWidth: 120; maxWidth: 240
minHeight: 120; maxHeight: 240
source: "colors.png"; margin: 30
- horizontalMode: "Repeat"; verticalMode: "Repeat"
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
}
MyBorderImage {
x: 520; y: 20; minWidth: 120; maxWidth: 240
minHeight: 120; maxHeight: 240
source: "colors.png"; margin: 30
- horizontalMode: "Stretch"; verticalMode: "Repeat"
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
}
MyBorderImage {
x: 770; y: 20; minWidth: 120; maxWidth: 240
minHeight: 120; maxHeight: 240
source: "colors.png"; margin: 30
- horizontalMode: "Round"; verticalMode: "Round"
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
}
MyBorderImage {
x: 20; y: 280; minWidth: 60; maxWidth: 200
@@ -37,18 +37,18 @@ Rectangle {
x: 270; y: 280; minWidth: 60; maxWidth: 200
minHeight: 40; maxHeight: 200
source: "bw.png"; margin: 10
- horizontalMode: "Repeat"; verticalMode: "Repeat"
+ horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat
}
MyBorderImage {
x: 520; y: 280; minWidth: 60; maxWidth: 200
minHeight: 40; maxHeight: 200
source: "bw.png"; margin: 10
- horizontalMode: "Stretch"; verticalMode: "Repeat"
+ horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat
}
MyBorderImage {
x: 770; y: 280; minWidth: 60; maxWidth: 200
minHeight: 40; maxHeight: 200
source: "bw.png"; margin: 10
- horizontalMode: "Round"; verticalMode: "Round"
+ horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round
}
}
diff --git a/examples/declarative/border-image/example.qml b/examples/declarative/border-image/example.qml
index 87d3f37..a0b02b7 100644
--- a/examples/declarative/border-image/example.qml
+++ b/examples/declarative/border-image/example.qml
@@ -13,8 +13,8 @@ Rectangle {
width: 180; height: 180
border.left: 30; border.top: 30
border.right: 30; border.bottom: 30
- horizontalTileMode: "Stretch"
- verticalTileMode: "Stretch"
+ horizontalTileMode: BorderImage.Stretch
+ verticalTileMode: BorderImage.Stretch
source: "colors.png"
}
@@ -22,8 +22,8 @@ Rectangle {
width: 180; height: 180
border.left: 30; border.top: 30
border.right: 30; border.bottom: 30
- horizontalTileMode: "Round"
- verticalTileMode: "Round"
+ horizontalTileMode: BorderImage.Round
+ verticalTileMode: BorderImage.Round
source: "colors.png"
}
//! [0]