diff options
author | Martin Jones <martin.jones@nokia.com> | 2009-05-21 01:50:11 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2009-05-21 01:50:11 (GMT) |
commit | cbffed3af04495f7bd28a054a1c04ee33ca43a80 (patch) | |
tree | 3b87ce85cde837f8669c8104c8a2ee51de22f487 | |
parent | f6b9e75f3f7fd7bdef3855dd07ffdc9fa10b2dae (diff) | |
download | Qt-cbffed3af04495f7bd28a054a1c04ee33ca43a80.zip Qt-cbffed3af04495f7bd28a054a1c04ee33ca43a80.tar.gz Qt-cbffed3af04495f7bd28a054a1c04ee33ca43a80.tar.bz2 |
Convert visual autotests.
31 files changed, 635 insertions, 333 deletions
diff --git a/tests/auto/declarative/visual/ListView/basic1/basic1.qml b/tests/auto/declarative/visual/ListView/basic1/basic1.qml new file mode 100644 index 0000000..605457b --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic1/basic1.qml @@ -0,0 +1,25 @@ +Rect { + color: "blue" + width: 300 + height: 200 + id: Page + ListView { + anchors.fill: parent + delegate: Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + model: ListModel { + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + } +} diff --git a/tests/auto/declarative/visual/ListView/basic1/basic1.xml b/tests/auto/declarative/visual/ListView/basic1/basic1.xml deleted file mode 100644 index 5038c0a..0000000 --- a/tests/auto/declarative/visual/ListView/basic1/basic1.xml +++ /dev/null @@ -1,19 +0,0 @@ -<Rect color="blue" width="800" height="600" id="Page"> - <ListView anchors.fill="{parent}"> - <delegate> - <Rect color="red" width="100" height="100"> - <Text text="{name}" /> - </Rect> - </delegate> - <model> - <ListModel> - <Month> - <name>January</name> - </Month> - <Month> - <name>February</name> - </Month> - </ListModel> - </model> - </ListView> -</Rect> diff --git a/tests/auto/declarative/visual/ListView/basic2/basic2.qml b/tests/auto/declarative/visual/ListView/basic2/basic2.qml new file mode 100644 index 0000000..e5996cf --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic2/basic2.qml @@ -0,0 +1,29 @@ +Rect { + color: "blue" + width: 200 + height: 300 + id: Page + Component { + id: Delegate + Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + ListView { + anchors.fill: parent + delegate: Delegate + model: ListModel { + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + } +} diff --git a/tests/auto/declarative/visual/ListView/basic2/basic2.xml b/tests/auto/declarative/visual/ListView/basic2/basic2.xml deleted file mode 100644 index 5e139fe..0000000 --- a/tests/auto/declarative/visual/ListView/basic2/basic2.xml +++ /dev/null @@ -1,20 +0,0 @@ -<Rect color="blue" width="800" height="600" id="Page"> - <Component id="Delegate"> - <Rect color="red" width="100" height="100"> - <Text text="{name}" /> - </Rect> - </Component> - - <ListView anchors.fill="{parent}" delegate="{Delegate}"> - <model> - <ListModel> - <Month> - <name>January</name> - </Month> - <Month> - <name>February</name> - </Month> - </ListModel> - </model> - </ListView> -</Rect> diff --git a/tests/auto/declarative/visual/ListView/basic3/basic3.qml b/tests/auto/declarative/visual/ListView/basic3/basic3.qml new file mode 100644 index 0000000..98aa5fb --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic3/basic3.qml @@ -0,0 +1,27 @@ +Rect { + color: "blue" + width: 200 + height: 300 + id: Page + ListModel { + id: Model + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + ListView { + anchors.fill: parent + model: Model + delegate: Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } +} diff --git a/tests/auto/declarative/visual/ListView/basic3/basic3.xml b/tests/auto/declarative/visual/ListView/basic3/basic3.xml deleted file mode 100644 index a587b82..0000000 --- a/tests/auto/declarative/visual/ListView/basic3/basic3.xml +++ /dev/null @@ -1,18 +0,0 @@ -<Rect color="blue" width="800" height="600" id="Page"> - <ListModel id="Model"> - <Month> - <name>January</name> - </Month> - <Month> - <name>February</name> - </Month> - </ListModel> - - <ListView anchors.fill="{parent}" model="{Model}"> - <delegate> - <Rect color="red" width="100" height="100"> - <Text text="{name}" /> - </Rect> - </delegate> - </ListView> -</Rect> diff --git a/tests/auto/declarative/visual/ListView/basic4/basic4.qml b/tests/auto/declarative/visual/ListView/basic4/basic4.qml new file mode 100644 index 0000000..9e5229a --- /dev/null +++ b/tests/auto/declarative/visual/ListView/basic4/basic4.qml @@ -0,0 +1,31 @@ +Rect { + color: "blue" + width: 200 + height: 300 + id: Page + ListModel { + id: Model + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + Component { + id: Delegate + Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + ListView { + anchors.fill: parent + model: Model + delegate: Delegate + } +} diff --git a/tests/auto/declarative/visual/ListView/basic4/basic4.xml b/tests/auto/declarative/visual/ListView/basic4/basic4.xml deleted file mode 100644 index 4b9201c..0000000 --- a/tests/auto/declarative/visual/ListView/basic4/basic4.xml +++ /dev/null @@ -1,19 +0,0 @@ -<Rect color="blue" width="800" height="600" id="Page"> - <ListModel id="Model"> - <Month> - <name>January</name> - </Month> - <Month> - <name>February</name> - </Month> - </ListModel> - - <Component id="Delegate"> - <Rect color="red" width="100" height="100"> - <Text text="{name}" /> - </Rect> - </Component> - - <ListView anchors.fill="{parent}" model="{Model}" delegate="{Delegate}"> - </ListView> -</Rect> diff --git a/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml b/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml new file mode 100644 index 0000000..56878dc --- /dev/null +++ b/tests/auto/declarative/visual/bindinganimation/bindinganimation.qml @@ -0,0 +1,40 @@ +Rect { + color: "blue" + width: 320 + height: 240 + id: Page + Rect { + id: MyRect + width: 100 + height: 100 + color: "red" + x: 10 + } + states: [ + State { + name: "hello" + SetProperty { + target: MyRect + property: "x" + binding: 100 + } + SetProperty { + target: MyMouseRegion + property: "onClicked" + value: "Page.currentState = ''" + } + } + ] + transitions: [ + Transition { + NumericAnimation { + properties: "x" + } + } + ] + MouseRegion { + id: MyMouseRegion + anchors.fill: parent + onClicked: { Page.currentState= 'hello' } + } +} diff --git a/tests/auto/declarative/visual/bindinganimation/bindinganimation.xml b/tests/auto/declarative/visual/bindinganimation/bindinganimation.xml deleted file mode 100644 index 30b0b6a..0000000 --- a/tests/auto/declarative/visual/bindinganimation/bindinganimation.xml +++ /dev/null @@ -1,19 +0,0 @@ -<Rect color="blue" width="320" height="240" id="Page"> - <Rect id="MyRect" width="100" height="100" color="red" x="{10}" /> - - <states> - <State name="hello"> - <SetProperty target="{MyRect}" property="x" binding="100" /> - <SetProperty target="{MyMouseRegion}" property="onClick" value="Page.currentState = ''" /> - </State> - </states> - - <transitions> - <Transition> - <NumericAnimation properties="x" /> - </Transition> - </transitions> - - <MouseRegion id="MyMouseRegion" anchors.fill="{parent}" onClick="Page.currentState= 'hello'" /> - -</Rect> diff --git a/tests/auto/declarative/visual/bindinganimation/test b/tests/auto/declarative/visual/bindinganimation/test index 964c489..bb59333 100644 --- a/tests/auto/declarative/visual/bindinganimation/test +++ b/tests/auto/declarative/visual/bindinganimation/test @@ -1 +1 @@ -bindinganimation.xml +bindinganimation.qml diff --git a/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml b/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml new file mode 100644 index 0000000..69460c5 --- /dev/null +++ b/tests/auto/declarative/visual/colorAnimation/colorAnimation.qml @@ -0,0 +1,40 @@ +Rect { + id: mainrect + state: "first" + states: [ + State { + name: "first" + SetProperty { + target: mainrect + property: "color" + value: "red" + } + }, + State { + name: "second" + SetProperty { + target: mainrect + property: "color" + value: "blue" + } + } + ] + transitions: [ + Transition { + fromState: "first" + toState: "second" + reversible: true + SequentialAnimation { + ColorAnimation { + duration: 2000 + target: mainrect + property: "color" + } + } + } + ] + MouseRegion { + anchors.fill: parent + onClicked: { mainrect.state = 'second' } + } +} diff --git a/tests/auto/declarative/visual/colorAnimation/colorAnimation.xml b/tests/auto/declarative/visual/colorAnimation/colorAnimation.xml deleted file mode 100644 index 39d08be..0000000 --- a/tests/auto/declarative/visual/colorAnimation/colorAnimation.xml +++ /dev/null @@ -1,18 +0,0 @@ -<Rect id="mainrect" currentState="first"> -<states> - <State name="first"> - <SetProperty target="{mainrect}" property="color" value="red"/> - </State> - <State name="second" > - <SetProperty target="{mainrect}" property="color" value="blue"/> - </State> -</states> -<transitions> - <Transition fromState="first" toState="second" reversible="true" > - <SerialAnimation> - <ColorAnimation duration="2000" target="{mainrect}" property="color" /> - </SerialAnimation> - </Transition> -</transitions> -<MouseRegion anchors.fill="{parent}" onClick="mainrect.currentState = 'second'" /> -</Rect> diff --git a/tests/auto/declarative/visual/easing/easing.qml b/tests/auto/declarative/visual/easing/easing.qml new file mode 100644 index 0000000..4a0ed14 --- /dev/null +++ b/tests/auto/declarative/visual/easing/easing.qml @@ -0,0 +1,186 @@ +Rect { + id: item + width: 600 + height: layout.height + color: "white" + resources: [ + ListModel { + id: easingtypes + ListElement { + type: "easeNone" + } + ListElement { + type: "easeInQuad" + } + ListElement { + type: "easeOutQuad" + } + ListElement { + type: "easeInOutQuad" + } + ListElement { + type: "easeOutInQuad" + } + ListElement { + type: "easeInCubic" + } + ListElement { + type: "easeOutCubic" + } + ListElement { + type: "easeInOutCubic" + } + ListElement { + type: "easeOutInCubic" + } + ListElement { + type: "easeInQuart" + } + ListElement { + type: "easeOutQuart" + } + ListElement { + type: "easeInOutQuart" + } + ListElement { + type: "easeOutInQuart" + } + ListElement { + type: "easeInQuint" + } + ListElement { + type: "easeOutQuint" + } + ListElement { + type: "easeInOutQuint" + } + ListElement { + type: "easeOutInQuint" + } + ListElement { + type: "easeInSine" + } + ListElement { + type: "easeOutSine" + } + ListElement { + type: "easeInOutSine" + } + ListElement { + type: "easeOutInSine" + } + ListElement { + type: "easeInExpo" + } + ListElement { + type: "easeOutExpo" + } + ListElement { + type: "easeInOutExpo" + } + ListElement { + type: "easeOutInExpo" + } + ListElement { + type: "easeInCirc" + } + ListElement { + type: "easeOutCirc" + } + ListElement { + type: "easeInOutCirc" + } + ListElement { + type: "easeOutInCirc" + } + ListElement { + type: "easeInElastic" + } + ListElement { + type: "easeOutElastic" + } + ListElement { + type: "easeInOutElastic" + } + ListElement { + type: "easeOutInElastic" + } + ListElement { + type: "easeInBack" + } + ListElement { + type: "easeOutBack" + } + ListElement { + type: "easeInOutBack" + } + ListElement { + type: "easeOutInBack" + } + ListElement { + type: "easeOutBounce" + } + ListElement { + type: "easeInBounce" + } + ListElement { + type: "easeInOutBounce" + } + ListElement { + type: "easeOutInBounce" + } + } + ] + VerticalLayout { + id: layout + anchors.left: item.left + anchors.right: item.right + Repeater { + dataSource: easingtypes + Component { + Text { + id: text + text: type + height: 18 + font.italic: true + color: "black" + states: [ + State { + name: "from" + when: !mouse.pressed + SetProperty { + target: text + property: "x" + value: 0 + } + }, + State { + name: "to" + when: mouse.pressed + SetProperty { + target: text + property: "x" + value: item.width-100 + } + } + ] + transitions: [ + Transition { + fromState: "*" + toState: "to" + reversible: true + NumericAnimation { + properties: "x" + easing: type + } + } + ] + } + } + } + } + MouseRegion { + id: mouse + anchors.fill: layout + } +} diff --git a/tests/auto/declarative/visual/easing/easing.xml b/tests/auto/declarative/visual/easing/easing.xml deleted file mode 100644 index 01a7d6c..0000000 --- a/tests/auto/declarative/visual/easing/easing.xml +++ /dev/null @@ -1,70 +0,0 @@ -<Rect id="item" width="600" height="{layout.height}" color="white"> - <resources> - <ListModel id="easingtypes"> - <ListItem><type>easeNone</type></ListItem> - <ListItem><type>easeInQuad</type></ListItem> - <ListItem><type>easeOutQuad</type></ListItem> - <ListItem><type>easeInOutQuad</type></ListItem> - <ListItem><type>easeOutInQuad</type></ListItem> - <ListItem><type>easeInCubic</type></ListItem> - <ListItem><type>easeOutCubic</type></ListItem> - <ListItem><type>easeInOutCubic</type></ListItem> - <ListItem><type>easeOutInCubic</type></ListItem> - <ListItem><type>easeInQuart</type></ListItem> - <ListItem><type>easeOutQuart</type></ListItem> - <ListItem><type>easeInOutQuart</type></ListItem> - <ListItem><type>easeOutInQuart</type></ListItem> - <ListItem><type>easeInQuint</type></ListItem> - <ListItem><type>easeOutQuint</type></ListItem> - <ListItem><type>easeInOutQuint</type></ListItem> - <ListItem><type>easeOutInQuint</type></ListItem> - <ListItem><type>easeInSine</type></ListItem> - <ListItem><type>easeOutSine</type></ListItem> - <ListItem><type>easeInOutSine</type></ListItem> - <ListItem><type>easeOutInSine</type></ListItem> - <ListItem><type>easeInExpo</type></ListItem> - <ListItem><type>easeOutExpo</type></ListItem> - <ListItem><type>easeInOutExpo</type></ListItem> - <ListItem><type>easeOutInExpo</type></ListItem> - <ListItem><type>easeInCirc</type></ListItem> - <ListItem><type>easeOutCirc</type></ListItem> - <ListItem><type>easeInOutCirc</type></ListItem> - <ListItem><type>easeOutInCirc</type></ListItem> - <ListItem><type>easeInElastic</type></ListItem> - <ListItem><type>easeOutElastic</type></ListItem> - <ListItem><type>easeInOutElastic</type></ListItem> - <ListItem><type>easeOutInElastic</type></ListItem> - <ListItem><type>easeInBack</type></ListItem> - <ListItem><type>easeOutBack</type></ListItem> - <ListItem><type>easeInOutBack</type></ListItem> - <ListItem><type>easeOutInBack</type></ListItem> - <ListItem><type>easeOutBounce</type></ListItem> - <ListItem><type>easeInBounce</type></ListItem> - <ListItem><type>easeInOutBounce</type></ListItem> - <ListItem><type>easeOutInBounce</type></ListItem> - </ListModel> - </resources> - - <VerticalLayout id="layout" anchors.left="{item.left}" anchors.right="{item.right}"> - <Repeater dataSource="{easingtypes}" > - <Component> - <Text id="text" text="{type}" height="18" font.italic="true" color="black"> - <states> - <State name="from" when="{!mouse.pressed}"> - <SetProperty target="{text}" property="x" value="0"/> - </State> - <State name="to" when="{mouse.pressed}"> - <SetProperty target="{text}" property="x" value="{item.width-100}"/> - </State> - </states> - <transitions> - <Transition fromState="*" toState="to" reversible="true"> - <NumericAnimation properties="x" easing="{type}" /> - </Transition> - </transitions> - </Text> - </Component> - </Repeater> - </VerticalLayout> - <MouseRegion id="mouse" anchors.fill="{layout}"/> -</Rect> diff --git a/tests/auto/declarative/visual/flickable/Day.qml b/tests/auto/declarative/visual/flickable/Day.qml index 0765e2f..63fbc78 100644 --- a/tests/auto/declarative/visual/flickable/Day.qml +++ b/tests/auto/declarative/visual/flickable/Day.qml @@ -1,8 +1,26 @@ -<Rect width="400" height="500" radius="7" pen.color="black" id="Page"> - <properties> - <Property name="day" type="string" /> - </properties> +Rect { + property string day - <Image x="10" y="10" file="cork.jpg" opaque="true"/> - <Text x="20" y="20" height="40" font.size="14" font.bold="true" width="370" text="{day}" style="Outline" styleColor="#dedede"/> -</Rect> + width: 400 + height: 500 + radius: 7 + pen.color: "black" + id: Page + Image { + x: 10 + y: 10 + source: "cork.jpg" + opaque: true + } + Text { + x: 20 + y: 20 + height: 40 + font.size: 14 + font.bold: true + width: 370 + text: day + style: "Outline" + styleColor: "#dedede" + } +} diff --git a/tests/auto/declarative/visual/flickable/flickable.qml b/tests/auto/declarative/visual/flickable/flickable.qml new file mode 100644 index 0000000..5946c40 --- /dev/null +++ b/tests/auto/declarative/visual/flickable/flickable.qml @@ -0,0 +1,53 @@ +Rect { + color: "lightSteelBlue" + width: 800 + height: 500 + ListModel { + id: List + ListElement { + name: "Sunday" + dayColor: "#808080" + } + ListElement { + name: "Monday" + dayColor: "blue" + } + ListElement { + name: "Tuesday" + dayColor: "yellow" + } + ListElement { + name: "Wednesday" + dayColor: "purple" + } + ListElement { + name: "Thursday" + dayColor: "blue" + } + ListElement { + name: "Friday" + dayColor: "green" + } + ListElement { + name: "Saturday" + dayColor: "orange" + } + } + Flickable { + id: Flick + anchors.fill: parent + viewportWidth: Lay.width + HorizontalLayout { + id: Lay + Repeater { + dataSource: List + Component { + Day { + day: name + color: dayColor + } + } + } + } + } +} diff --git a/tests/auto/declarative/visual/flickable/flickable.xml b/tests/auto/declarative/visual/flickable/flickable.xml deleted file mode 100644 index 78bf42f..0000000 --- a/tests/auto/declarative/visual/flickable/flickable.xml +++ /dev/null @@ -1,43 +0,0 @@ -<Rect color="lightSteelBlue" width="800" height="500"> - <ListModel id="List"> - <Day> - <name>Sunday</name> - <dayColor>#808080</dayColor> - </Day> - <Day> - <name>Monday</name> - <dayColor>blue</dayColor> - </Day> - <Day> - <name>Tuesday</name> - <dayColor>yellow</dayColor> - </Day> - <Day> - <name>Wednesday</name> - <dayColor>purple</dayColor> - </Day> - <Day> - <name>Thursday</name> - <dayColor>blue</dayColor> - </Day> - <Day> - <name>Friday</name> - <dayColor>green</dayColor> - </Day> - <Day> - <name>Saturday</name> - <dayColor>orange</dayColor> - </Day> - </ListModel> - - <Flickable id="Flick" anchors.fill="{parent}" viewportWidth="{Lay.width}"> - <HorizontalLayout id="Lay"> - <Repeater dataSource="{List}"> - <Component> - <Day day="{name}" color="{dayColor}" /> - </Component> - </Repeater> - </HorizontalLayout> - </Flickable> - -</Rect> diff --git a/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.qml b/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.qml new file mode 100644 index 0000000..5c00f58 --- /dev/null +++ b/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.qml @@ -0,0 +1,28 @@ +Rect { + id: rect + width: 120 + height: 200 + color: "white" + Image { + id: img + source: "pics/qtlogo.png" + x: 60-width/2 + y: 200-height + y: SequentialAnimation { + running: true + repeat: true + NumericAnimation { + to: 0; duration: 500 + easing: "easeInOutQuad" + } + NumericAnimation { + to: 200-img.height + easing: "easeOutBounce" + duration: 2000 + } + PauseAnimation { + duration: 1000 + } + } + } +} diff --git a/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.xml b/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.xml deleted file mode 100644 index bb411e2..0000000 --- a/tests/auto/declarative/visual/pauseAnimation/pauseAnimation.xml +++ /dev/null @@ -1,13 +0,0 @@ -<Rect id="rect" width="120" height="200" color="white"> - <Image id="img" file="pics/qtlogo.png" - x="{60-img.width/2}" y="{200-img.height}"> - <y> - <SerialAnimation running="true" repeat="true"> - <NumericAnimation to="{200-img.height}" - easing="easeOutBounce(amplitude:100)" - duration="2000" /> - <PauseAnimation duration="1000" /> - </SerialAnimation> - </y> - </Image> -</Rect> diff --git a/tests/auto/declarative/visual/qfxtext/elide/elide.qml b/tests/auto/declarative/visual/qfxtext/elide/elide.qml new file mode 100644 index 0000000..23e6885 --- /dev/null +++ b/tests/auto/declarative/visual/qfxtext/elide/elide.qml @@ -0,0 +1,33 @@ +Rect { + width: contents.width + height: contents.height + VerticalLayout { + width: 80 + height: Text.height*4 + Text { + elide: "ElideLeft" + text: "aaa bbb ccc ddd eee fff" + width: 80 + color: "white" + id: Text + } + Text { + elide: "ElideMiddle" + text: "aaa bbb ccc ddd eee fff" + width: 80 + color: "white" + } + Text { + elide: "ElideRight" + text: "aaa bbb ccc ddd eee fff" + width: 80 + color: "white" + } + Text { + elide: "ElideNone" + text: "aaa bbb ccc ddd eee fff" + width: 80 + color: "white" + } + } +} diff --git a/tests/auto/declarative/visual/qfxtext/elide/elide.xml b/tests/auto/declarative/visual/qfxtext/elide/elide.xml deleted file mode 100644 index 398da82..0000000 --- a/tests/auto/declarative/visual/qfxtext/elide/elide.xml +++ /dev/null @@ -1,6 +0,0 @@ -<VerticalLayout width="80" height="{Text.height*4}"> - <Text elide="ElideLeft" text="aaa bbb ccc ddd eee fff" width="80" color="white" id="Text"/> - <Text elide="ElideMiddle" text="aaa bbb ccc ddd eee fff" width="80" color="white"/> - <Text elide="ElideRight" text="aaa bbb ccc ddd eee fff" width="80" color="white"/> - <Text elide="ElideNone" text="aaa bbb ccc ddd eee fff" width="80" color="white"/> -</VerticalLayout> diff --git a/tests/auto/declarative/visual/repeater/basic1/basic1.qml b/tests/auto/declarative/visual/repeater/basic1/basic1.qml new file mode 100644 index 0000000..3c66508 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic1/basic1.qml @@ -0,0 +1,26 @@ +Rect { + color: "blue" + width: 800 + height: 600 + id: Page + HorizontalLayout { + Repeater { + component: Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + dataSource: ListModel { + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + } + } +} diff --git a/tests/auto/declarative/visual/repeater/basic1/basic1.xml b/tests/auto/declarative/visual/repeater/basic1/basic1.xml deleted file mode 100644 index def809f..0000000 --- a/tests/auto/declarative/visual/repeater/basic1/basic1.xml +++ /dev/null @@ -1,21 +0,0 @@ -<Rect color="blue" width="800" height="600" id="Page"> - <HorizontalLayout> - <Repeater > - <component> - <Rect color="red" width="100" height="100"> - <Text text="{name}" /> - </Rect> - </component> - <dataSource> - <ListModel> - <Month> - <name>January</name> - </Month> - <Month> - <name>February</name> - </Month> - </ListModel> - </dataSource> - </Repeater> - </HorizontalLayout> -</Rect> diff --git a/tests/auto/declarative/visual/repeater/basic2/basic2.qml b/tests/auto/declarative/visual/repeater/basic2/basic2.qml new file mode 100644 index 0000000..1228be8 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic2/basic2.qml @@ -0,0 +1,30 @@ +Rect { + color: "blue" + width: 800 + height: 600 + id: Page + Component { + id: Delegate + Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + HorizontalLayout { + Repeater { + component: Delegate + dataSource: ListModel { + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + } + } +} diff --git a/tests/auto/declarative/visual/repeater/basic2/basic2.xml b/tests/auto/declarative/visual/repeater/basic2/basic2.xml deleted file mode 100644 index b16fbfe..0000000 --- a/tests/auto/declarative/visual/repeater/basic2/basic2.xml +++ /dev/null @@ -1,22 +0,0 @@ -<Rect color="blue" width="800" height="600" id="Page"> - <Component id="Delegate"> - <Rect color="red" width="100" height="100"> - <Text text="{name}" /> - </Rect> - </Component> - - <HorizontalLayout> - <Repeater component="{Delegate}"> - <dataSource> - <ListModel> - <Month> - <name>January</name> - </Month> - <Month> - <name>February</name> - </Month> - </ListModel> - </dataSource> - </Repeater> - </HorizontalLayout> -</Rect> diff --git a/tests/auto/declarative/visual/repeater/basic3/basic3.qml b/tests/auto/declarative/visual/repeater/basic3/basic3.qml new file mode 100644 index 0000000..7b8b9ef --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic3/basic3.qml @@ -0,0 +1,28 @@ +Rect { + color: "blue" + width: 800 + height: 600 + id: Page + ListModel { + id: DataSource + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + HorizontalLayout { + Repeater { + dataSource: DataSource + component: Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + } +} diff --git a/tests/auto/declarative/visual/repeater/basic3/basic3.xml b/tests/auto/declarative/visual/repeater/basic3/basic3.xml deleted file mode 100644 index 1135f16..0000000 --- a/tests/auto/declarative/visual/repeater/basic3/basic3.xml +++ /dev/null @@ -1,19 +0,0 @@ -<Rect color="blue" width="800" height="600" id="Page"> - <ListModel id="DataSource"> - <Month> - <name>January</name> - </Month> - <Month> - <name>February</name> - </Month> - </ListModel> - <HorizontalLayout> - <Repeater dataSource="{DataSource}"> - <component> - <Rect color="red" width="100" height="100"> - <Text text="{name}" /> - </Rect> - </component> - </Repeater> - </HorizontalLayout> -</Rect> diff --git a/tests/auto/declarative/visual/repeater/basic4/basic4.qml b/tests/auto/declarative/visual/repeater/basic4/basic4.qml new file mode 100644 index 0000000..2111c24 --- /dev/null +++ b/tests/auto/declarative/visual/repeater/basic4/basic4.qml @@ -0,0 +1,32 @@ +Rect { + color: "blue" + width: 800 + height: 600 + id: Page + ListModel { + id: DataSource + ListElement { + name: "January" + } + ListElement { + name: "February" + } + } + Component { + id: Delegate + Rect { + color: "red" + width: 100 + height: 100 + Text { + text: name + } + } + } + HorizontalLayout { + Repeater { + dataSource: DataSource + component: Delegate + } + } +} diff --git a/tests/auto/declarative/visual/repeater/basic4/basic4.xml b/tests/auto/declarative/visual/repeater/basic4/basic4.xml deleted file mode 100644 index 53b8ff9..0000000 --- a/tests/auto/declarative/visual/repeater/basic4/basic4.xml +++ /dev/null @@ -1,18 +0,0 @@ -<Rect color="blue" width="800" height="600" id="Page"> - <ListModel id="DataSource"> - <Month> - <name>January</name> - </Month> - <Month> - <name>February</name> - </Month> - </ListModel> - <Component id="Delegate"> - <Rect color="red" width="100" height="100"> - <Text text="{name}" /> - </Rect> - </Component> - <HorizontalLayout> - <Repeater dataSource="{DataSource}" component="{Delegate}" /> - </HorizontalLayout> -</Rect> diff --git a/tests/auto/declarative/visual/runtests.sh b/tests/auto/declarative/visual/runtests.sh index f690381..4380884 100755 --- a/tests/auto/declarative/visual/runtests.sh +++ b/tests/auto/declarative/visual/runtests.sh @@ -1,2 +1,3 @@ #!/bin/sh +export QFX_USE_SIMPLECANVAS=1 for a in `cat tests`; do ./tst_visual -testdir $a; done |