diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2009-10-02 03:15:19 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2009-10-02 03:15:19 (GMT) |
commit | b148b182b5b48d60c2b57d8b74ad0f30272bb578 (patch) | |
tree | 43de2ac7798d4baf18f638d56cee403e70000e6b /demos | |
parent | 6d06a9d19b4e0fc3ec2b7e32a014103c58e93ae0 (diff) | |
parent | d1b4ce6a10267a7a7ca0fde24c2030815c96522d (diff) | |
download | Qt-b148b182b5b48d60c2b57d8b74ad0f30272bb578.zip Qt-b148b182b5b48d60c2b57d8b74ad0f30272bb578.tar.gz Qt-b148b182b5b48d60c2b57d8b74ad0f30272bb578.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'demos')
-rw-r--r-- | demos/declarative/calculator/CalcButton.qml | 8 | ||||
-rw-r--r-- | demos/declarative/calculator/calculator.qml | 3 | ||||
-rw-r--r-- | demos/declarative/flickr/flickr-mobile.qml | 17 | ||||
-rw-r--r-- | demos/declarative/flickr/mobile/GridDelegate.qml | 4 | ||||
-rw-r--r-- | demos/declarative/flickr/mobile/ImageDetails.qml | 5 |
5 files changed, 22 insertions, 15 deletions
diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml index 966c8e4..55b5f0c 100644 --- a/demos/declarative/calculator/CalcButton.qml +++ b/demos/declarative/calculator/CalcButton.qml @@ -1,9 +1,9 @@ import Qt 4.6 Rectangle { - property string operation - property bool toggable : false - property bool toggled : false + property alias operation: Label.text + property bool toggable: false + property bool toggled: false signal clicked id: Button; width: 50; height: 30 @@ -13,7 +13,7 @@ Rectangle { GradientStop { id: G2; position: 1.0; color: Palette.button } } - Text { anchors.centerIn: parent; text: operation; color: Palette.buttonText } + Text { id: Label; anchors.centerIn: parent; color: Palette.buttonText } MouseRegion { id: ClickRegion diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml index b95cc7ab..d93f04a 100644 --- a/demos/declarative/calculator/calculator.qml +++ b/demos/declarative/calculator/calculator.qml @@ -12,7 +12,7 @@ Rectangle { Rectangle { id: Container - width: 316; height: 50; z: 2 + width: 316; height: 50 border.color: Palette.dark; color: Palette.base Text { @@ -104,7 +104,6 @@ Rectangle { CalcButton { operation: "M+" } CalcButton { operation: "+/-" } } - } } diff --git a/demos/declarative/flickr/flickr-mobile.qml b/demos/declarative/flickr/flickr-mobile.qml index 9d2a3fb..32f3e37 100644 --- a/demos/declarative/flickr/flickr-mobile.qml +++ b/demos/declarative/flickr/flickr-mobile.qml @@ -53,13 +53,26 @@ Item { onButton2Clicked: if (Screen.inListView == true) Screen.inListView = false; else Screen.inListView = true } + Connection { + sender: ImageDetails; signal: "closed()" + script: { + if (Background.state == "DetailedView") { + Background.state = ''; + ImageDetails.photoUrl = ""; + } + } + } + states: State { name: "DetailedView" PropertyChanges { target: Views; x: -parent.width } PropertyChanges { target: ToolBar; button1Label: "More..." } - PropertyChanges { target: ToolBar; onButton1Clicked: { } } + PropertyChanges { + target: ToolBar + onButton1Clicked: if (ImageDetails.state=='') ImageDetails.state='Back'; else ImageDetails.state='' + } PropertyChanges { target: ToolBar; button2Label: "Back" } - PropertyChanges { target: ToolBar; onButton2Clicked: { } } + PropertyChanges { target: ToolBar; onButton2Clicked: ImageDetails.closed() } } transitions: Transition { diff --git a/demos/declarative/flickr/mobile/GridDelegate.qml b/demos/declarative/flickr/mobile/GridDelegate.qml index 890e020..19369b2 100644 --- a/demos/declarative/flickr/mobile/GridDelegate.qml +++ b/demos/declarative/flickr/mobile/GridDelegate.qml @@ -44,8 +44,8 @@ PropertyChanges { target: ScaleMe; scale: 1 } }, State { - name: "Details"; extend: "Show" - //PropertyChanges { target: ImageDetails; z: 2 } + name: "Details" + PropertyChanges { target: ScaleMe; scale: 1 } ParentChange { target: Wrapper; parent: ImageDetails.frontContainer } PropertyChanges { target: Wrapper; x: 20; y: 60; z: 1000 } PropertyChanges { target: Background; state: "DetailedView" } diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index 617fe40..c55ab50 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -32,11 +32,6 @@ Flipable { color: "black"; opacity: 0.4 } - Connection { - sender: ToolBar; signal: "button1Clicked()" - script: if (Container.state=='') Container.state='Back'; else Container.state='' - } - Column { spacing: 10 anchors { |