summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-04-29 03:52:12 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-04-29 03:52:12 (GMT)
commite50b584c8ca90eb7bbee69b92f47827d3d56df3e (patch)
treec3e1c2d3ba72c8d6f2ea00e05a82ad5351b0fe8c /demos
parentbfaf510408a95d95e1540be1a1f522a0ebfe0eff (diff)
downloadQt-e50b584c8ca90eb7bbee69b92f47827d3d56df3e.zip
Qt-e50b584c8ca90eb7bbee69b92f47827d3d56df3e.tar.gz
Qt-e50b584c8ca90eb7bbee69b92f47827d3d56df3e.tar.bz2
Phones info media, not movie info media.
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/mediabrowser/content/PhoneInfoContainer.qml (renamed from demos/declarative/mediabrowser/content/MovieInfoContainer.qml)22
-rw-r--r--demos/declarative/mediabrowser/content/PhonesPathView.qml (renamed from demos/declarative/mediabrowser/content/MoviesPathView.qml)48
-rw-r--r--demos/declarative/mediabrowser/dummydata/MoviesModel.qml38
-rw-r--r--demos/declarative/mediabrowser/mediabrowser.qml10
4 files changed, 47 insertions, 71 deletions
diff --git a/demos/declarative/mediabrowser/content/MovieInfoContainer.qml b/demos/declarative/mediabrowser/content/PhoneInfoContainer.qml
index c53fab6..dbf25f5 100644
--- a/demos/declarative/mediabrowser/content/MovieInfoContainer.qml
+++ b/demos/declarative/mediabrowser/content/PhoneInfoContainer.qml
@@ -2,8 +2,10 @@
<properties>
<Property name="frontContainer" value="{ContainerFront}"/>
<Property name="flickableArea" value="{Flickable}"/>
- <Property name="movieTitle" value="N/A"/>
- <Property name="movieDescription" value="..."/>
+ <Property name="phoneTitle" value="N/A"/>
+ <Property name="phoneDescription" value="..."/>
+ <Property name="phoneSpecifications" value=""/>
+ <Property name="phoneUrl" value=""/>
<Property name="rating" value="2"/>
</properties>
@@ -22,17 +24,17 @@
<MediaButton id="BackButton" x="630" y="400" text="Back" onClicked="Container.closed.emit()"/>
<MediaButton id="MoreButton" x="530" y="400" text="More..." onClicked="Container.state='Back'"/>
- <Text id="TitleText" style="Raised" styleColor="black" color="white" x="320" y="30" width="{parent.width}"
- text="{Container.movieTitle}" font.size="22"/>
+ <Text id="TitleText" style="Raised" styleColor="black" color="white" x="420" y="30" width="{parent.width}"
+ text="{Container.phoneTitle}" font.size="22"/>
- <LikeOMeter x="320" y="75" rating="{Container.rating}"/>
+ <LikeOMeter x="420" y="75" rating="{Container.rating}"/>
- <Flickable id="Flickable" x="320" width="380" height="260" y="120" clip="true" viewportWidth="380"
+ <Flickable id="Flickable" x="420" width="280" height="260" y="120" clip="true" viewportWidth="280"
viewportHeight="{DescriptionText.height}">
<Text id="DescriptionText" wrap="true" color="white" width="{parent.width}"
- text="{Container.movieDescription}" font.size="12"/>
+ text="{Container.phoneDescription}" font.size="12"/>
</Flickable>
-
+ <Text color="white" width="300" x="50" y="300" text="{Container.phoneSpecifications}"/>
<ScrollBar id="ScrollBar" x="720" y="{Flickable.y}" width="7" height="{Flickable.height}" opacity="0"
flickableArea="{Flickable}" clip="true"/>
</Item>
@@ -41,6 +43,10 @@
<back>
<Item anchors.fill="{Container}">
<Rect anchors.fill="{parent}" color="black" opacity="0.4" pen.color="white" pen.width="2"/>
+ <Flickable x="10" width="{Container.width-20}" height="{Container.height-20}" y="10" clip="true"
+ viewportWidth="{UrlView.width}" viewportHeight="{UrlView.height}">
+ <WebView id="UrlView" url="{Container.phoneUrl}" idealWidth="{parent.width}"/>
+ </Flickable>
<MediaButton id="BackButton2" x="630" y="400" text="Back" onClicked="Container.state=''"/>
</Item>
</back>
diff --git a/demos/declarative/mediabrowser/content/MoviesPathView.qml b/demos/declarative/mediabrowser/content/PhonesPathView.qml
index a13437a..e08e13f 100644
--- a/demos/declarative/mediabrowser/content/MoviesPathView.qml
+++ b/demos/declarative/mediabrowser/content/PhonesPathView.qml
@@ -1,49 +1,57 @@
-<PathView id="Container">
+<PathView id="Container" pathItemCount="6">
<path>
<Path startX="-50" startY="40">
- <PathAttribute name="scale" value="0.4"/>
+ <PathAttribute name="scale" value="0.2"/>
+ <PathAttribute name="opacity" value="0"/>
<PathCubic x="400" y="220" control1X="140" control1Y="40" control2X="210" control2Y="220"/>
- <PathAttribute name="scale" value="0.7"/>
+ <PathAttribute name="scale" value="1.2"/>
+ <PathAttribute name="z" value="1"/>
+ <PathAttribute name="opacity" value="1"/>
<PathCubic x="850" y="40" control2X="660" control2Y="40" control1X="590" control1Y="220"/>
- <PathAttribute name="scale" value="0.4"/>
+ <PathAttribute name="scale" value="0.2"/>
+ <PathAttribute name="opacity" value="0"/>
</Path>
</path>
<delegate>
- <Component id="MovieDelegate">
- <Item id="Wrapper" width="220" height="310" scale="{Wrapper.PathView.scale}">
- <Connection sender="{MovieInfoContainer}" script="if (Wrapper.state == 'Details') Wrapper.state = ''" signal="closed()"/>
+ <Component id="PhoneDelegate">
+ <Item id="Wrapper" width="320" height="200" scale="{Wrapper.PathView.scale}" z="{Wrapper.PathView.z}" opacity="{Wrapper.PathView.opacity}">
+ <Connection sender="{PhoneInfoContainer}" script="if (Wrapper.state == 'Details') Wrapper.state = ''" signal="closed()"/>
<Script>
- function movieClicked() {
+ function phoneClicked() {
if (MainWindow.minimized == true) {
MainWindow.minimized = false;
} else {
- MovieInfoContainer.movieTitle = title;
- MovieInfoContainer.flickableArea.yPosition = 0;
- MovieInfoContainer.movieDescription = description;
- MovieInfoContainer.rating = rating;
+ PhoneInfoContainer.phoneTitle = title;
+ PhoneInfoContainer.flickableArea.yPosition = 0;
+ PhoneInfoContainer.phoneDescription = description;
+ PhoneInfoContainer.phoneSpecifications = specifications;
+ PhoneInfoContainer.phoneUrl = url;
+ PhoneInfoContainer.rating = rating;
Wrapper.state = "Details";
}
}
</Script>
<Rect id="Dvd" anchors.fill="{parent}" color="white">
- <Image src="{thumb}" width="215" height="305" anchors.centeredIn="{parent}" opaque="true"/>
- <Image src="pics/reflection.png" anchors.centeredIn="{parent}"/>
- <Image src="pics/shadow-right.png" x="220"/>
- <Image src="pics/shadow-bottom.png" y="310"/>
- <Image src="pics/shadow-corner.png" x="220" y="310"/>
+ <Item x="{(parent.width-width)/2}" y="{(parent.height-height)/2}" width="{Thumb.width*Thumb.scale}" height="{Thumb.height*Thumb.scale}">
+ <Image id="Thumb" src="{thumb}" scale="{0.95*Math.min(Dvd.height/height,Dvd.width/width)}"/>
+ </Item>
+ <!-- <Image src="pics/reflection.png" anchors.fill="{parent}"/> -->
+ <Image src="pics/shadow-right.png" x="{Dvd.width}" height="{Dvd.height}"/>
+ <Image src="pics/shadow-bottom.png" y="{Dvd.height}" width="{Dvd.width}"/>
+ <Image id="Corner" src="pics/shadow-corner.png" x="{Dvd.width}" y="{Dvd.height}"/>
</Rect>
- <MouseRegion anchors.fill="{Wrapper}" onClicked="movieClicked()"/>
+ <MouseRegion anchors.fill="{Wrapper}" onClicked="phoneClicked()"/>
<states>
<State name="Details">
- <ParentChange target="{Wrapper}" parent="{MovieInfoContainer.frontContainer}"/>
+ <ParentChange target="{Wrapper}" parent="{PhoneInfoContainer.frontContainer}"/>
<SetProperties target="{Wrapper}" x="50" y="60" scale="1"/>
- <SetProperties target="{MovieInfoContainer}" y="20"/>
+ <SetProperties target="{PhoneInfoContainer}" y="20"/>
<SetProperties target="{Container}" y="-480"/>
<SetProperties target="{CloseButton}" opacity="0"/>
<SetProperties target="{CategoryText}" y="-50"/>
diff --git a/demos/declarative/mediabrowser/dummydata/MoviesModel.qml b/demos/declarative/mediabrowser/dummydata/MoviesModel.qml
deleted file mode 100644
index 87bca37..0000000
--- a/demos/declarative/mediabrowser/dummydata/MoviesModel.qml
+++ /dev/null
@@ -1,38 +0,0 @@
-<ListModel id="MoviesModel">
- <Movie>
- <title>Repoman</title>
- <thumb>http://www.impawards.com/1984/posters/repo_man.jpg</thumb>
- <description>Cult classic. Car repossession. Radiation. Plate O' Shrimp.</description>
- <rating>2</rating>
- </Movie>
- <Movie>
- <title>Monsters vs Aliens</title>
- <thumb>http://www.impawards.com/2009/posters/monsters_vs_aliens_ver6.jpg</thumb>
- <description>Love Monsters? Love Aliens? You're in luck.</description>
- <rating>1</rating>
- </Movie>
- <Movie>
- <title>Cruel Intentions</title>
- <thumb>http://impawards.com/1999/posters/cruel_intentions_ver1.jpg</thumb>
- <description>Modern-day update of Les Liaisons Dangereuses. Better because it has nothing to do with the French.</description>
- <rating>3</rating>
- </Movie>
- <Movie>
- <title>Lord of War</title>
- <thumb>http://www.impawards.com/2005/posters/lord_of_war_ver2.jpg</thumb>
- <description>There are over 500 million fire arms in worldwide circulation. That is one fire arm for every twelve people on the planet. The only question is how do we arm the other eleven?</description>
- <rating>4</rating>
- </Movie>
- <Movie>
- <title>The Devil's Advocate</title>
- <thumb>http://impawards.com/1997/posters/devils_advocate_ver1.jpg</thumb>
- <description>An ambitious your district attorney joins a powerful New York law firm headed by the devil.</description>
- <rating>4</rating>
- </Movie>
- <Movie>
- <title>Team America: World Police</title>
- <thumb>http://impawards.com/2004/posters/team_america_world_police.jpg</thumb>
- <description>Hey terrorist, terrorize this.</description>
- <rating>1</rating>
- </Movie>
-</ListModel>
diff --git a/demos/declarative/mediabrowser/mediabrowser.qml b/demos/declarative/mediabrowser/mediabrowser.qml
index df7baa9..338aed2 100644
--- a/demos/declarative/mediabrowser/mediabrowser.qml
+++ b/demos/declarative/mediabrowser/mediabrowser.qml
@@ -8,12 +8,12 @@
<Image src="content/pics/background.png" opaque="true"/>
<Rect id="Menu" x="-150" width="150" height="480" color="#232323">
- <Text id="IconText" x="30" y="122" font.bold="true" font.size="9" text="Coming Soon" color="white" style="Raised" styleColor="black"/>
+ <Text id="IconText" x="40" y="110" font.bold="true" font.size="9" text="Nokia Devices" color="white" style="Raised" styleColor="black"/>
<Image src="content/pics/shadow-right-screen.png" x="150" height="480" tile="true"/>
</Rect>
- <MovieInfoContainer id="MovieInfoContainer" width="750" x="25" y="500" height="440"/>
- <MoviesPathView id="MoviesPathView" model="{MoviesModel}" y="60" width="800" height="360"/>
+ <PhoneInfoContainer id="PhoneInfoContainer" width="750" x="25" y="500" height="440"/>
+ <PhonesPathView id="PhonesPathView" model="{PhonesModel}" y="60" width="800" height="360"/>
<MediaButton id="CloseButton" x="680" y="440" text="Close" onClicked="MainWindow.minimized = true"/>
<states>
@@ -29,8 +29,8 @@
</transitions>
</Item>
- <Text id="CategoryText" x="300" y="15" text="Coming Soon" font.size="22" color="white" style="Raised" styleColor="black"/>
- <Item id="Stack" x="50" y="50"/>
+ <Text id="CategoryText" x="300" y="15" text="Nokia Devices" font.size="22" color="white" style="Raised" styleColor="black"/>
+ <Item id="Stack" x="45" y="50"/>
</Item>