diff options
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data/borderimages')
8 files changed, 922 insertions, 0 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/SimpleBorderImage.qml b/tests/manual/scenegraph_lancelot/data/borderimages/SimpleBorderImage.qml new file mode 100644 index 0000000000..9a1822515a --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/borderimages/SimpleBorderImage.qml @@ -0,0 +1,22 @@ +import QtQuick 2.0 + + +Rectangle{ + id: tr + property alias lbl: txt.text + property alias hTileMode: img.horizontalTileMode + property alias vTileMode: img.verticalTileMode + property alias xPos: tr.x + property int yPos: tr.y + property alias smoothing: img.smooth + + BorderImage{ id: img; source: "../shared/world.png"; width: 70; height: 70; border { top: 6; bottom: 6; left: 6; right: 6} } + Text{ + id: txt + text: "default" + anchors.top: img.bottom + anchors.horizontalCenter: img.horizontalCenter + font.family: "Arial" + font.pointSize: 8 + } +} diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/SimpleNoBorder.qml b/tests/manual/scenegraph_lancelot/data/borderimages/SimpleNoBorder.qml new file mode 100644 index 0000000000..12d54c7cfd --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/borderimages/SimpleNoBorder.qml @@ -0,0 +1,22 @@ +import QtQuick 2.0 + + +Rectangle{ + id: tr + property alias lbl: txt.text + property alias hTileMode: img.horizontalTileMode + property alias vTileMode: img.verticalTileMode + property alias xPos: tr.x + property int yPos: tr.y + property alias smoothing: img.smooth + + BorderImage{ id: img; source: "../shared/world.png"; width: 70; height: 70; } + Text{ + id: txt + text: "default" + anchors.top: img.bottom + anchors.horizontalCenter: img.horizontalCenter + font.family: "Arial" + font.pointSize: 8 + } +} diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage.qml new file mode 100644 index 0000000000..ed91c9f9e4 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage.qml @@ -0,0 +1,182 @@ +import QtQuick 2.0 + + +Flickable { + + id: f1 + width: 320 + height: 480 + + contentWidth: 360 + contentHeight: 1000 + + property int cumulativeX; + property int cumulativeY; + + function changeLabel(obj,txt){ + obj.item.lbl = txt + } + function changeTileMode(obj,val,mode){ + if (mode == "h") + obj.item.hTileMode = val; + else + obj.item.vTileMode = val; + } + + Component{ + id: borderImageComponent + SimpleBorderImage{ + } + } + Column { + x: 20 + y: 20 + spacing: 30 + Row { + spacing: 20 + Item{ + id: image_0001 + width: 70 + height: 70 + Loader{ id: ldr1; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr1,"H: Stretch") + changeTileMode(ldr1,BorderImage.Stretch,"h") + ldr1.item.hTileMode = BorderImage.Stretch + } + } + Item{ + id: image_0002 + width: 70 + height: 70 + Loader{ id: ldr2; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr2,"H: Repeat") + changeTileMode(ldr2,BorderImage.Repeat,"h") + } + } + Item{ + + id: image_0003 + width: 70 + height: 70 + Loader{ id: ldr3; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr3,"H: Round") + changeTileMode(ldr1,BorderImage.Round,"h") + } + } + } + Row { + spacing: 20 + Item{ + + id: image_0004 + width: 70 + height: 70 + Loader{ id: ldr4; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr4,"V: Stretch") + changeTileMode(ldr4,BorderImage.Stretch,"v") + } + } + Item{ + id: image_0005 + width: 70 + height: 70 + Loader{ id: ldr5; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr5,"V: Repeat") + changeTileMode(ldr5,BorderImage.Repeat,"v") + } + } + Item{ + id: image_0006 + width: 70 + height: 70 + Loader{ id: ldr6; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr6,"H: Round") + changeTileMode(ldr6,BorderImage.Round,"v") + } + } + } + Row { + spacing: 20 + + Item{ + id: image_0007 + width: 70 + height: 70 + Loader{ id: ldr7; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr7,"H/V: Stretch") + changeTileMode(ldr7,BorderImage.Stretch,"v") + changeTileMode(ldr7,BorderImage.Stretch,"h") + } + } + Item{ + id: image_0008 + width: 70 + height: 70 + Loader{ id: ldr8; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr8,"H/V: Repeat") + changeTileMode(ldr8,BorderImage.Repeat,"v") + changeTileMode(ldr8,BorderImage.Repeat,"h") + } + } + Item{ + id: image_0009 + width: 70 + height: 70 + Loader{ id: ldr9; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr9,"H/V: Round") + changeTileMode(ldr9,BorderImage.Round,"v") + changeTileMode(ldr9,BorderImage.Round,"h") + } + } + } + Row { + spacing: 20 + + Item{ + id: image_0010 + width: 70 + height: 70 + Loader{ id: ldr10; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr10,"H/V: Stretch\nsmooth") + changeTileMode(ldr10,BorderImage.Stretch,"v") + changeTileMode(ldr10,BorderImage.Stretch,"h") + ldr10.item.smoothing = true + } + } + Item{ + id: image_0011 + width: 70 + height: 70 + Loader{ id: ldr11; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr11,"H/V: Repeat\nsmooth") + changeTileMode(ldr11,BorderImage.Repeat,"v") + changeTileMode(ldr11,BorderImage.Repeat,"h") + ldr11.item.smoothing = true + } + } + Item{ + id: image_0012 + width: 70 + height: 70 + Loader{ id: ldr12; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr12,"H/V: Round\nsmooth") + changeTileMode(ldr12,BorderImage.Round,"v") + changeTileMode(ldr12,BorderImage.Round,"h") + ldr10.item.smoothing = true + } + } + } + } +} diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_no_border.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_no_border.qml new file mode 100644 index 0000000000..5856870dfa --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_no_border.qml @@ -0,0 +1,191 @@ +import QtQuick 2.0 + + +Flickable { + + id: f1 + width: 320 + height: 480 + + contentWidth: 360 + contentHeight: 1000 + + property int cumulativeX; + property int cumulativeY; + + function changeLabel(obj,txt){ + obj.item.lbl = txt + } + function changeTileMode(obj,val,mode){ + if (mode == "h") + obj.item.hTileMode = val; + else + obj.item.vTileMode = val; + } + + Component{ + id: borderImageComponent + SimpleNoBorder{ + } + } + Column { + x: 20 + y: 20 + spacing: 30 + Row { + Text{ + id: topLabel + text: "Border Images with no borders set" + font.family: "Arial" + font.pointSize: 12 + } + } + + Row { + spacing: 20 + Item{ + id: image_0001 + width: 70 + height: 70 + Loader{ id: ldr1; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr1,"H: Stretch") + changeTileMode(ldr1,BorderImage.Stretch,"h") + ldr1.item.hTileMode = BorderImage.Stretch + } + } + Item{ + id: image_0002 + width: 70 + height: 70 + Loader{ id: ldr2; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr2,"H: Repeat") + changeTileMode(ldr2,BorderImage.Repeat,"h") + } + } + Item{ + + id: image_0003 + width: 70 + height: 70 + Loader{ id: ldr3; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr3,"H: Round") + changeTileMode(ldr1,BorderImage.Round,"h") + } + } + } + Row { + spacing: 20 + Item{ + + id: image_0004 + width: 70 + height: 70 + Loader{ id: ldr4; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr4,"V: Stretch") + changeTileMode(ldr4,BorderImage.Stretch,"v") + } + } + Item{ + id: image_0005 + width: 70 + height: 70 + Loader{ id: ldr5; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr5,"V: Repeat") + changeTileMode(ldr5,BorderImage.Repeat,"v") + } + } + Item{ + id: image_0006 + width: 70 + height: 70 + Loader{ id: ldr6; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr6,"H: Round") + changeTileMode(ldr6,BorderImage.Round,"v") + } + } + } + Row { + spacing: 20 + + Item{ + id: image_0007 + width: 70 + height: 70 + Loader{ id: ldr7; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr7,"H/V: Stretch") + changeTileMode(ldr7,BorderImage.Stretch,"v") + changeTileMode(ldr7,BorderImage.Stretch,"h") + } + } + Item{ + id: image_0008 + width: 70 + height: 70 + Loader{ id: ldr8; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr8,"H/V: Repeat") + changeTileMode(ldr8,BorderImage.Repeat,"v") + changeTileMode(ldr8,BorderImage.Repeat,"h") + } + } + Item{ + id: image_0009 + width: 70 + height: 70 + Loader{ id: ldr9; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr9,"H/V: Round") + changeTileMode(ldr9,BorderImage.Round,"v") + changeTileMode(ldr9,BorderImage.Round,"h") + } + } + } + Row { + spacing: 20 + + Item{ + id: image_0010 + width: 70 + height: 70 + Loader{ id: ldr10; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr10,"H/V: Stretch\nsmooth") + changeTileMode(ldr10,BorderImage.Stretch,"v") + changeTileMode(ldr10,BorderImage.Stretch,"h") + ldr10.item.smoothing = true + } + } + Item{ + id: image_0011 + width: 70 + height: 70 + Loader{ id: ldr11; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr11,"H/V: Repeat\nsmooth") + changeTileMode(ldr11,BorderImage.Repeat,"v") + changeTileMode(ldr11,BorderImage.Repeat,"h") + ldr11.item.smoothing = true + } + } + Item{ + id: image_0012 + width: 70 + height: 70 + Loader{ id: ldr12; sourceComponent: borderImageComponent } + Component.onCompleted: { + changeLabel(ldr12,"H/V: Round\nsmooth") + changeTileMode(ldr12,BorderImage.Round,"v") + changeTileMode(ldr12,BorderImage.Round,"h") + ldr10.item.smoothing = true + } + } + } + } +} diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_smoothed.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_smoothed.qml new file mode 100644 index 0000000000..9906586fc9 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_smoothed.qml @@ -0,0 +1,175 @@ +import QtQuick 2.0 + +Rectangle { + width: 320 + height: 480 + property bool smoothing: true + Rectangle{ + id: rect_0_0 + width: 160 + height: 160 + x: 0 + y: 0 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 1" + z: 1 + } + BorderImage { + id: borderImage_1 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 1; border.top: 1 + border.right: 1; border.bottom: 1 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_0_1 + width: 160 + height: 160 + x: 160 + y: 0 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 2" + z: 1 + } + BorderImage { + id: borderImage_2 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 2; border.top: 2 + border.right: 2; border.bottom: 2 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_1_0 + width: 160 + height: 160 + x: 0 + y: 160 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 3" + z: 1 + } + BorderImage { + id: borderImage_3 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 3; border.top: 3 + border.right: 3; border.bottom: 3 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_1_1 + width: 160 + height: 160 + x: 160 + y: 160 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 4" + z: 1 + } + BorderImage { + id: borderImage_4 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 4; border.top: 4 + border.right: 4; border.bottom: 4 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_2_0 + width: 160 + height: 160 + x: 0 + y: 320 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 5" + z: 1 + } + BorderImage { + id: borderImage_5 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 5; border.top: 5 + border.right: 5; border.bottom: 5 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_2_1 + width: 160 + height: 160 + x: 160 + y: 320 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 6" + z: 1 + } + BorderImage { + id: borderImage_6 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 6; border.top: 6 + border.right: 6; border.bottom: 6 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_3_0 + width: 160 + height: 160 + x: 0 + y: 480 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 7" + z: 1 + } + BorderImage { + id: borderImage_7 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 7; border.top: 7 + border.right: 7; border.bottom: 7 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_3_1 + width: 160 + height: 160 + x: 160 + y: 480 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 8" + z: 1 + } + BorderImage { + id: borderImage_8 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 8; border.top: 8 + border.right: 8; border.bottom: 8 + anchors.centerIn: parent + } + } +} diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_tiling_horizontal.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_tiling_horizontal.qml new file mode 100644 index 0000000000..7151f3a958 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_tiling_horizontal.qml @@ -0,0 +1,76 @@ +import QtQuick 2.0 + +Rectangle { + width: 320 + height: 480 + property bool smoothing: true + Rectangle{ + id: rect_0_0 + width: 160 + height: 160 + x: 0 + y: 0 + + BorderImage { + id: borderImage_0 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 10; border.top: 10 + border.right: 10; border.bottom: 10 + horizontalTileMode: BorderImage.Stretch + anchors.centerIn: parent + } + Text { + anchors.top: borderImage_0.bottom + text: "mode: stretch" + z: 1 + } + } + Rectangle{ + id: rect_0_1 + width: 160 + height: 160 + x: 160 + y: 0 + + BorderImage { + id: borderImage_1 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 10; border.top: 10 + border.right: 10; border.bottom: 10 + horizontalTileMode: BorderImage.Repeat + anchors.centerIn: parent + } + Text { + anchors.top: borderImage_1.bottom + text: "mode: repeat" + z: 1 + } + } + Rectangle{ + id: rect_1_0 + width: 160 + height: 160 + x: 0 + y: 160 + + BorderImage { + id: borderImage_2 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 10; border.top: 10 + border.right: 10; border.bottom: 10 + horizontalTileMode: BorderImage.Round + anchors.centerIn: parent + } + Text { + anchors.top: borderImage_2.bottom + text: "mode: round" + z: 1 + } + } +} diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_tiling_vertical.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_tiling_vertical.qml new file mode 100644 index 0000000000..02ec66cdf7 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_tiling_vertical.qml @@ -0,0 +1,76 @@ +import QtQuick 2.0 + +Rectangle { + width: 320 + height: 480 + property bool smoothing: true + Rectangle{ + id: rect_0_0 + width: 160 + height: 160 + x: 0 + y: 0 + + BorderImage { + id: borderImage_0 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 10; border.top: 10 + border.right: 10; border.bottom: 10 + verticalTileMode: BorderImage.Stretch + anchors.centerIn: parent + } + Text { + anchors.top: borderImage_0.bottom + text: "mode: stretch" + z: 1 + } + } + Rectangle{ + id: rect_0_1 + width: 160 + height: 160 + x: 160 + y: 0 + + BorderImage { + id: borderImage_1 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 10; border.top: 10 + border.right: 10; border.bottom: 10 + verticalTileMode: BorderImage.Repeat + anchors.centerIn: parent + } + Text { + anchors.top: borderImage_1.bottom + text: "mode: repeat" + z: 1 + } + } + Rectangle{ + id: rect_1_0 + width: 160 + height: 160 + x: 0 + y: 160 + + BorderImage { + id: borderImage_2 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 10; border.top: 10 + border.right: 10; border.bottom: 10 + verticalTileMode: BorderImage.Round + anchors.centerIn: parent + } + Text { + anchors.top: borderImage_2.bottom + text: "mode: round" + z: 1 + } + } +} diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_unsmoothed.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_unsmoothed.qml new file mode 100644 index 0000000000..a19c203278 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_unsmoothed.qml @@ -0,0 +1,178 @@ +import QtQuick 2.0 + +Rectangle { + width: 320 + height: 480 + property bool smoothing: false + + Rectangle{ + id: rect_0_0 + width: 160 + height: 160 + x: 0 + y: 0 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 1" + z: 1 + } + BorderImage { + id: borderImage_1 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 1; border.top: 1 + border.right: 1; border.bottom: 1 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_0_1 + width: 160 + height: 160 + x: 160 + y: 0 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 2" + z: 1 + } + BorderImage { + id: borderImage_2 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 2; border.top: 2 + border.right: 2; border.bottom: 2 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_1_0 + width: 160 + height: 160 + x: 0 + y: 160 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 3" + z: 1 + } + BorderImage { + id: borderImage_3 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 3; border.top: 3 + border.right: 3; border.bottom: 3 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_1_1 + width: 160 + height: 160 + x: 160 + y: 160 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 4" + z: 1 + } + BorderImage { + id: borderImage_4 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 4; border.top: 4 + border.right: 4; border.bottom: 4 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_2_0 + width: 160 + height: 160 + x: 0 + y: 320 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 5" + z: 1 + } + BorderImage { + id: borderImage_5 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 5; border.top: 5 + border.right: 5; border.bottom: 5 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_2_1 + width: 160 + height: 160 + x: 160 + y: 320 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 6" + z: 1 + } + BorderImage { + id: borderImage_6 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 6; border.top: 6 + border.right: 6; border.bottom: 6 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_3_0 + width: 160 + height: 160 + x: 0 + y: 480 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 7" + z: 1 + } + BorderImage { + id: borderImage_7 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 7; border.top: 7 + border.right: 7; border.bottom: 7 + anchors.centerIn: parent + } + } + Rectangle{ + id: rect_3_1 + width: 160 + height: 160 + x: 160 + y: 480 + Text { + anchors.verticalCenter: parent.TopLeft + text: "border size 8" + z: 1 + } + BorderImage { + id: borderImage_8 + smooth: smoothing + source: "../shared/sample_1.png" + width: 120; height: 120 + border.left: 8; border.top: 8 + border.right: 8; border.bottom: 8 + anchors.centerIn: parent + } + } + + +} |