diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-08-13 05:36:54 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-08-13 05:36:54 (GMT) |
commit | 601b52bb6520e94b2a573a7925d5f141ee60c312 (patch) | |
tree | 6f361a894dd274a973e0098147ec862966d9459e /examples | |
parent | 5731119be208ffb7d2967746cea2df54424b7885 (diff) | |
parent | b1e221a249adbcec7e37e475fdd14ff636c18b2c (diff) | |
download | Qt-601b52bb6520e94b2a573a7925d5f141ee60c312.zip Qt-601b52bb6520e94b2a573a7925d5f141ee60c312.tar.gz Qt-601b52bb6520e94b2a573a7925d5f141ee60c312.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'examples')
23 files changed, 32 insertions, 24 deletions
diff --git a/examples/declarative/dynamic/DynRect.qml b/examples/declarative/dynamic/DynRect.qml index 3f83afb..ec27441 100644 --- a/examples/declarative/dynamic/DynRect.qml +++ b/examples/declarative/dynamic/DynRect.qml @@ -1,3 +1,9 @@ import Qt 4.6 -Rect { color: "steelblue"; width: 100; height: 100; id: newRect } +Item { + states: State{ name: "dying"; SetProperties{ target: newRect; opacity: 0 } } + transitions: Transition{ + NumberAnimation{ properties: "opacity"; target: newRect; duration:500 } + } + Rect {color: "steelblue"; width: 100; height: 100; id: newRect } +} diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml index 286e449..54d8dc8 100644 --- a/examples/declarative/dynamic/dynamic.qml +++ b/examples/declarative/dynamic/dynamic.qml @@ -19,10 +19,12 @@ Rect { id: page; width: 800; height: 800; color:"black" if(a!=null) { a.parent = targetItem2;//BUG: this should happen automatically fourthBox = a; + print(a.toStr()); extendStars = true; } } else { - fourthBox.destroy(); + fourthBox.state = 'dying'; + fourthBox.destroy(500); fourthBox = null; extendStars = false; } diff --git a/examples/declarative/easing/easing.qml b/examples/declarative/easing/easing.qml index e3c22c9..8089f16 100644 --- a/examples/declarative/easing/easing.qml +++ b/examples/declarative/easing/easing.qml @@ -51,7 +51,7 @@ Rect { ListElement { type: "easeOutInBounce" } } - VerticalLayout { + VerticalPositioner { id: Layout anchors.left: Window.left anchors.right: Window.right diff --git a/examples/declarative/fonts/fonts.qml b/examples/declarative/fonts/fonts.qml index c981e51..9fd409a 100644 --- a/examples/declarative/fonts/fonts.qml +++ b/examples/declarative/fonts/fonts.qml @@ -16,7 +16,7 @@ Rect { FontLoader { id: WebFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" } FontLoader { id: WebFont2; source: "http://wrong.address.org" } - VerticalLayout { + VerticalPositioner { anchors.fill: parent anchors.leftMargin: 10; anchors.rightMargin: 10 Text { diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml index 092ce66..ea9feb0 100644 --- a/examples/declarative/listview/highlight.qml +++ b/examples/declarative/listview/highlight.qml @@ -14,7 +14,7 @@ Rect { Item { id: Wrapper width: 200; height: 50 - VerticalLayout { + VerticalPositioner { Text { text: 'Name: ' + name } Text { text: 'Type: ' + type } Text { text: 'Age: ' + age } diff --git a/examples/declarative/listview/itemlist.qml b/examples/declarative/listview/itemlist.qml index 046321b..4b81614 100644 --- a/examples/declarative/listview/itemlist.qml +++ b/examples/declarative/listview/itemlist.qml @@ -40,7 +40,7 @@ Rect { height: 30 width: 240 - HorizontalLayout { + HorizontalPositioner { anchors.centerIn: parent spacing: 20 Repeater { diff --git a/examples/declarative/listview/listview.qml b/examples/declarative/listview/listview.qml index 82b04ed..6b8d3d6 100644 --- a/examples/declarative/listview/listview.qml +++ b/examples/declarative/listview/listview.qml @@ -14,7 +14,7 @@ Rect { Item { id: Wrapper width: 200; height: 50 - VerticalLayout { + VerticalPositioner { Text { text: 'Name: ' + name } Text { text: 'Type: ' + type } Text { text: 'Age: ' + age } diff --git a/examples/declarative/listview/recipes.qml b/examples/declarative/listview/recipes.qml index 8b12527..7abadd0 100644 --- a/examples/declarative/listview/recipes.qml +++ b/examples/declarative/listview/recipes.qml @@ -37,7 +37,7 @@ Rect { // Layout the page. Picture, title and ingredients at the top, method at the // bottom. Note that elements that should not be visible in the list // mode have their opacity set to wrapper.detailsOpacity. - HorizontalLayout { + HorizontalPositioner { id: topLayout x: 10; y: 10; height: recipePic.height; width: parent.width spacing: 10 @@ -45,7 +45,7 @@ Rect { id: recipePic source: picture; width: 48; height: 48 } - VerticalLayout { + VerticalPositioner { height: recipePic.height; width: background.width-recipePic.width-20 spacing: 5 Text { id: name; text: title; font.bold: true; font.size: 16 } diff --git a/examples/declarative/listview/sections.qml b/examples/declarative/listview/sections.qml index 415f524..ab9fbdf 100644 --- a/examples/declarative/listview/sections.qml +++ b/examples/declarative/listview/sections.qml @@ -36,7 +36,7 @@ Rect { x: 5 height: Layout.height + 4 anchors.top: Separator.bottom - VerticalLayout { + VerticalPositioner { id: Layout y: 2 Text { text: 'Name: ' + name } diff --git a/examples/declarative/modules/installed-version.qml b/examples/declarative/modules/installed-version.qml index 8098b9b..0d3fa09 100644 --- a/examples/declarative/modules/installed-version.qml +++ b/examples/declarative/modules/installed-version.qml @@ -2,7 +2,7 @@ import Qt 4.6 import com.nokia.Foo 1.6 import com.nokia.Foo 1.7 as NewFoo -VerticalLayout { +VerticalPositioner { Bar { } Baz { } NewFoo.Bar { } diff --git a/examples/declarative/modules/local-qualified.qml b/examples/declarative/modules/local-qualified.qml index 8658031..f321738 100644 --- a/examples/declarative/modules/local-qualified.qml +++ b/examples/declarative/modules/local-qualified.qml @@ -3,7 +3,7 @@ import Qt 4.6 import "local" as X import "local/SubLib" as Y -VerticalLayout { +VerticalPositioner { X.Foo { } Y.Bar { } } diff --git a/examples/declarative/smooth/rect-painting.qml b/examples/declarative/smooth/rect-painting.qml index 2f01e4b..ba6c16f 100644 --- a/examples/declarative/smooth/rect-painting.qml +++ b/examples/declarative/smooth/rect-painting.qml @@ -12,7 +12,7 @@ Rect { color: "#eeeeee" } - GridLayout { + GridPositioner { anchors.centerIn: parent columns: 8; rows:4; spacing: 30 diff --git a/examples/declarative/snow/snow.qml b/examples/declarative/snow/snow.qml index f63f090..8470331 100644 --- a/examples/declarative/snow/snow.qml +++ b/examples/declarative/snow/snow.qml @@ -22,7 +22,7 @@ Rect { Item { anchors.centerIn: parent - HorizontalLayout { + HorizontalPositioner { id: MyLayout property real targetX: -(selectedX + imageWidth / 2) diff --git a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/1_Drawing_and_animation.qml b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/1_Drawing_and_animation.qml index 92ca377..a70ef16 100644 --- a/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/1_Drawing_and_animation.qml +++ b/examples/declarative/tutorials/contacts/1_Drawing_and_Animation/1_Drawing_and_animation.qml @@ -5,7 +5,7 @@ Rect { width: layout.width height: layout.height color: "white" - VerticalLayout { + VerticalPositioner { id: layout width: contents.width GroupBox { diff --git a/examples/declarative/tutorials/contacts/2_Reuse/2_Reuse.qml b/examples/declarative/tutorials/contacts/2_Reuse/2_Reuse.qml index 3b0ef67..7ac513e 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/2_Reuse.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/2_Reuse.qml @@ -5,7 +5,7 @@ Rect { width: layout.width height: layout.height color: "white" - GridLayout { + GridPositioner { id: layout columns: 2 rows: 4 diff --git a/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml b/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml index 4c458c8..8c54cd6 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/3/Contact.qml @@ -14,7 +14,7 @@ Item { onEmailChanged: { emailField.value = email } onPhoneChanged: { phoneField.value = phone } - VerticalLayout { + VerticalPositioner { id: layout anchors.fill: parent spacing: 5 diff --git a/examples/declarative/tutorials/contacts/2_Reuse/4/Contact.qml b/examples/declarative/tutorials/contacts/2_Reuse/4/Contact.qml index f70153b..37fd8d3 100644 --- a/examples/declarative/tutorials/contacts/2_Reuse/4/Contact.qml +++ b/examples/declarative/tutorials/contacts/2_Reuse/4/Contact.qml @@ -17,7 +17,7 @@ Item { onEmailChanged: { emailField.value = email } onPhoneChanged: { phoneField.value = phone } - VerticalLayout { + VerticalPositioner { id: layout anchors.fill: parent spacing: 5 diff --git a/examples/declarative/tutorials/contacts/3_Collections/3_Collections.qml b/examples/declarative/tutorials/contacts/3_Collections/3_Collections.qml index 21615cb..d61705c 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/3_Collections.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/3_Collections.qml @@ -11,7 +11,7 @@ Rect { } // relies on the current focus behavior whereby setting focus=true on a // component removes focus from any previous element - GridLayout { + GridPositioner { id: layout width: contents.width height: contents.height diff --git a/examples/declarative/tutorials/contacts/3_Collections/lib/Contact.qml b/examples/declarative/tutorials/contacts/3_Collections/lib/Contact.qml index 129ea85..6f40e24 100644 --- a/examples/declarative/tutorials/contacts/3_Collections/lib/Contact.qml +++ b/examples/declarative/tutorials/contacts/3_Collections/lib/Contact.qml @@ -13,7 +13,7 @@ Item { onEmailChanged: { emailField.value = email } onPhoneChanged: { phoneField.value = phone } - VerticalLayout { + VerticalPositioner { id: layout anchors.fill: parent spacing: 5 diff --git a/examples/declarative/tutorials/helloworld/t2/tutorial2.qml b/examples/declarative/tutorials/helloworld/t2/tutorial2.qml index fdb8f3c..efbdbf1 100644 --- a/examples/declarative/tutorials/helloworld/t2/tutorial2.qml +++ b/examples/declarative/tutorials/helloworld/t2/tutorial2.qml @@ -13,7 +13,7 @@ Rect { y: 30 anchors.horizontalCenter: Page.horizontalCenter } - GridLayout { + GridPositioner { id: ColorPicker x: 0 anchors.bottom: Page.bottom diff --git a/examples/declarative/tutorials/helloworld/t3/tutorial3.qml b/examples/declarative/tutorials/helloworld/t3/tutorial3.qml index 557f2ca..3e93632 100644 --- a/examples/declarative/tutorials/helloworld/t3/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/t3/tutorial3.qml @@ -40,7 +40,7 @@ Rect { ] } MouseRegion { id: MouseRegion; anchors.fill: HelloText } - GridLayout { + GridPositioner { id: ColorPicker x: 0 anchors.bottom: Page.bottom diff --git a/examples/declarative/velocity/velocity.qml b/examples/declarative/velocity/velocity.qml index a1fbcc1..f609537 100644 --- a/examples/declarative/velocity/velocity.qml +++ b/examples/declarative/velocity/velocity.qml @@ -98,7 +98,7 @@ Rect { id: Flick anchors.fill: parent viewportWidth: Lay.width - HorizontalLayout { + HorizontalPositioner { id: Lay Repeater { dataSource: List diff --git a/examples/declarative/webview/autosize.qml b/examples/declarative/webview/autosize.qml index 2930657..d8e2063 100644 --- a/examples/declarative/webview/autosize.qml +++ b/examples/declarative/webview/autosize.qml @@ -7,7 +7,7 @@ Rect { color: "white" width: 200 height: Layout.height - VerticalLayout { + VerticalPositioner { id: Layout spacing: 2 WebView { |