summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/calculator/CalcButton.qml64
-rw-r--r--demos/declarative/calculator/calculator.qml208
-rw-r--r--demos/declarative/mediabrowser/content/MediaButton.qml4
-rw-r--r--demos/declarative/mediabrowser/content/PhoneInfoContainer.qml (renamed from demos/declarative/mediabrowser/content/MovieInfoContainer.qml)32
-rw-r--r--demos/declarative/mediabrowser/content/PhonesPathView.qml (renamed from demos/declarative/mediabrowser/content/MoviesPathView.qml)45
-rw-r--r--demos/declarative/mediabrowser/content/Star.qml2
-rw-r--r--demos/declarative/mediabrowser/dummydata/MoviesModel.qml38
-rw-r--r--demos/declarative/mediabrowser/dummydata/PhonesModel.qml137
-rw-r--r--demos/declarative/mediabrowser/mediabrowser.qml14
-rw-r--r--demos/declarative/webbrowser/content/RectSoftShadow.qml8
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml22
-rw-r--r--demos/qtdemo/colors.cpp31
-rw-r--r--demos/qtdemo/colors.h4
-rw-r--r--demos/qtdemo/mainwindow.cpp15
-rw-r--r--demos/qtdemo/xml/examples.xml7
15 files changed, 392 insertions, 239 deletions
diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml
index c925314..f4ccdae 100644
--- a/demos/declarative/calculator/CalcButton.qml
+++ b/demos/declarative/calculator/CalcButton.qml
@@ -1,12 +1,13 @@
-<Item id="Button" width="50" height="30">
+Item {
+ id: Button; width: 50; height: 30
- <properties>
- <Property name="operation" type="string"/>
- <Property name="toggable" value="false"/>
- <Property name="toggled" value="false"/>
- </properties>
+ properties: [
+ Property { name: "operation"; type: "string" },
+ Property { name: "toggable"; value: false },
+ Property { name: "toggled"; value: false }
+ ]
- <Script>
+ Script {
function buttonClicked(operation) {
if (Button.toggable == true) {
if (Button.toggled == true) {
@@ -20,21 +21,42 @@
else
doOp(operation);
}
- </Script>
+ }
- <Image id="Image" src="pics/button.sci" width="{Button.width}" height="{Button.height}"/>
- <Image id="ImagePressed" src="pics/button-pressed.sci" width="{Button.width}" height="{Button.height}" opacity="0"/>
- <Text anchors.centeredIn="{Image}" text="{Button.operation}" color="white" font.bold="true"/>
- <MouseRegion id="MouseRegion" anchors.fill="{Button}" onClicked="buttonClicked(Button.operation)"/>
+ Image {
+ id: Image
+ source: "pics/button.sci"
+ width: Button.width; height: Button.height
+ }
- <states>
- <State name="Pressed" when="{MouseRegion.pressed == true}">
- <SetProperties target="{ImagePressed}" opacity="1"/>
- </State>
- <State name="Toggled" when="{Button.toggled == true}">
- <SetProperties target="{ImagePressed}" opacity="1"/>
- </State>
- </states>
+ Image {
+ id: ImagePressed
+ source: "pics/button-pressed.sci"
+ width: Button.width; height: Button.height
+ opacity: 0
+ }
-</Item>
+ Text {
+ anchors.centeredIn: Image
+ text: Button.operation
+ color: "white"
+ font.bold: true
+ }
+ MouseRegion {
+ id: MouseRegion
+ anchors.fill: Button
+ onClicked: { buttonClicked(Button.operation) }
+ }
+
+ states: [
+ State {
+ name: "Pressed"; when: MouseRegion.pressed == true
+ SetProperties { target: ImagePressed; opacity: 1 }
+ },
+ State {
+ name: "Toggled"; when: Button.toggled == true
+ SetProperties { target: ImagePressed; opacity: 1 }
+ }
+ ]
+}
diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml
index 4ada896..145435b 100644
--- a/demos/declarative/calculator/calculator.qml
+++ b/demos/declarative/calculator/calculator.qml
@@ -1,83 +1,127 @@
-<Rect id="MainWindow" width="320" height="270" color="black">
- <Script src="calculator.js"/>
-
- <VerticalLayout spacing="2" margin="2">
- <Rect id="Container" height="60" z="2" width="316" pen.color="white" color="#343434">
- <Text id="CurNum" font.bold="true" color="white" font.size="16" anchors.right="{Container.right}" anchors.rightMargin="5"
- anchors.verticalCenter="{Container.verticalCenter}"/>
- <Text id="CurrentOperation" color="white" font.bold="true" font.size="16" anchors.left="{Container.left}" anchors.leftMargin="5"
- anchors.verticalCenter="{Container.verticalCenter}"/>
- </Rect>
-
- <Item width="320" height="30">
- <CalcButton id="AdvancedCheckBox" x="55" width="206" operation="Advanced Mode" toggable="true"/>
- </Item>
-
- <Item width="320">
- <Item id="BasicButtons" x="55" width="160" height="160">
- <CalcButton operation="Bksp" id="Bksp" width="67" opacity="0"/>
- <CalcButton operation="C" id="C" width="76"/>
- <CalcButton operation="AC" id="AC" x="78" width="76"/>
-
- <GridLayout id="NumKeypad" y="32" spacing="2" columns="3">
- <CalcButton operation="7"/>
- <CalcButton operation="8"/>
- <CalcButton operation="9"/>
- <CalcButton operation="4"/>
- <CalcButton operation="5"/>
- <CalcButton operation="6"/>
- <CalcButton operation="1"/>
- <CalcButton operation="2"/>
- <CalcButton operation="3"/>
- </GridLayout>
-
- <HorizontalLayout y="128" spacing="2">
- <CalcButton operation="0" width="50"/>
- <CalcButton operation="." x="77" width="50"/>
- <CalcButton operation="=" id="Equals" x="77" width="102"/>
- </HorizontalLayout>
-
- <VerticalLayout id="SimpleOperations" x="156" y="0" spacing="2">
- <CalcButton operation="x"/>
- <CalcButton operation="/"/>
- <CalcButton operation="-"/>
- <CalcButton operation="+"/>
- </VerticalLayout>
- </Item>
-
- <GridLayout id="AdvancedButtons" x="350" spacing="2" columns="2" opacity="0">
- <CalcButton operation="Abs"/>
- <CalcButton operation="Int"/>
- <CalcButton operation="MC"/>
- <CalcButton operation="Sqrt"/>
- <CalcButton operation="MR"/>
- <CalcButton operation="^2"/>
- <CalcButton operation="MS"/>
- <CalcButton operation="1/x"/>
- <CalcButton operation="M+"/>
- <CalcButton operation="+/-"/>
- </GridLayout>
- </Item>
- </VerticalLayout>
-
- <states>
- <State name="Advanced" when="{AdvancedCheckBox.toggled == true}">
- <SetProperties target="{BasicButtons}" x="0"/>
- <SetProperties target="{SimpleOperations}" y="32"/>
- <SetProperties target="{Bksp}" opacity="1"/>
- <SetProperties target="{C}" x="69" width="67"/>
- <SetProperties target="{AC}" x="138" width="67"/>
- <SetProperties target="{Equals}" width="50"/>
- <SetProperties target="{AdvancedButtons}" x="210" opacity="1"/>
- </State>
- </states>
-
- <transitions>
- <Transition>
- <NumericAnimation properties="x,y,width" easing="easeOutBounce" duration="500"/>
- <NumericAnimation properties="opacity" easing="easeInOutQuad" duration="500"/>
- </Transition>
- </transitions>
-
-</Rect>
+Rect {
+ id: MainWindow;
+ width: 320; height: 270; color: "black"
+ Script { source: "calculator.js" }
+
+ VerticalLayout {
+ spacing: 2; margin: 2
+
+ Rect {
+ id: Container
+ width: 316; height: 60; z: 2
+ pen.color: "white"; color: "#343434"
+
+ Text {
+ id: CurNum
+ font.bold: true; font.size: 16
+ color: "white"
+ anchors.right: Container.right
+ anchors.rightMargin: 5
+ anchors.verticalCenter: Container.verticalCenter
+ }
+
+ Text {
+ id: CurrentOperation
+ color: "white"
+ font.bold: true; font.size: 16
+ anchors.left: Container.left
+ anchors.leftMargin: 5
+ anchors.verticalCenter: Container.verticalCenter
+ }
+ }
+
+ Item {
+ width: 320; height: 30
+
+ CalcButton {
+ id: AdvancedCheckBox
+ x: 55; width: 206
+ operation: "Advanced Mode"
+ toggable: true
+ }
+ }
+
+ Item {
+ width: 320
+
+ Item {
+ id: BasicButtons
+ x: 55; width: 160; height: 160
+
+ CalcButton { operation: "Bksp"; id: Bksp; width: 67; opacity: 0 }
+ CalcButton { operation: "C"; id: C; width: 76 }
+ CalcButton { operation: "AC"; id: AC; x: 78; width: 76 }
+
+ GridLayout {
+ id: NumKeypad; y: 32; spacing: 2; columns: 3
+
+ CalcButton { operation: 7 }
+ CalcButton { operation: 8 }
+ CalcButton { operation: 9 }
+ CalcButton { operation: 4 }
+ CalcButton { operation: 5 }
+ CalcButton { operation: 6 }
+ CalcButton { operation: 1 }
+ CalcButton { operation: 2 }
+ CalcButton { operation: 3 }
+ }
+
+ HorizontalLayout {
+ y: 128; spacing: 2
+
+ CalcButton { operation: 0; width: 50 }
+ CalcButton { operation: "."; x: 77; width: 50 }
+ CalcButton { operation: "="; id: Equals; x: 77; width: 102 }
+ }
+
+ VerticalLayout {
+ id: SimpleOperations
+ x: 156; y: 0; spacing: 2
+
+ CalcButton { operation: "x" }
+ CalcButton { operation: "/" }
+ CalcButton { operation: "-" }
+ CalcButton { operation: "+" }
+ }
+ }
+
+ GridLayout {
+ id: AdvancedButtons
+ x: 350; spacing: 2; columns: 2; opacity: 0
+
+ CalcButton { operation: "Abs" }
+ CalcButton { operation: "Int" }
+ CalcButton { operation: "MC" }
+ CalcButton { operation: "Sqrt" }
+ CalcButton { operation: "MR" }
+ CalcButton { operation: "^2" }
+ CalcButton { operation: "MS" }
+ CalcButton { operation: "1/x" }
+ CalcButton { operation: "M+" }
+ CalcButton { operation: "+/-" }
+ }
+
+ }
+ }
+
+ states: [
+ State {
+ name: "Advanced"; when: AdvancedCheckBox.toggled == true
+ SetProperties { target: BasicButtons; x: 0 }
+ SetProperties { target: SimpleOperations; y: 32 }
+ SetProperties { target: Bksp; opacity: 1 }
+ SetProperties { target: C; x: 69; width: 67 }
+ SetProperties { target: AC; x: 138; width: 67 }
+ SetProperties { target: Equals; width: 50 }
+ SetProperties { target: AdvancedButtons; x: 210; opacity: 1 }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ NumericAnimation { properties: "x,y,width"; easing: "easeOutBounce"; duration: 500 }
+ NumericAnimation { properties: "opacity"; easing: "easeInOutQuad"; duration: 500 }
+ }
+ ]
+}
diff --git a/demos/declarative/mediabrowser/content/MediaButton.qml b/demos/declarative/mediabrowser/content/MediaButton.qml
index c92305a..6c672ea 100644
--- a/demos/declarative/mediabrowser/content/MediaButton.qml
+++ b/demos/declarative/mediabrowser/content/MediaButton.qml
@@ -7,8 +7,8 @@
<Property name="text"/>
</properties>
- <Image id="Image" src="pics/button.png"/>
- <Image id="Pressed" src="pics/button-pressed.png" opacity="0"/>
+ <Image id="Image" source="pics/button.png"/>
+ <Image id="Pressed" source="pics/button-pressed.png" opacity="0"/>
<MouseRegion id="MouseRegion" anchors.fill="{Image}" onClicked="Container.clicked.emit();"/>
<Text font.bold="true" color="white" anchors.centeredIn="{Image}" text="{Container.text}"/>
<width>{Image.width}</width>
diff --git a/demos/declarative/mediabrowser/content/MovieInfoContainer.qml b/demos/declarative/mediabrowser/content/PhoneInfoContainer.qml
index 8ffc76e..34fd889 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>
@@ -11,9 +13,9 @@
<Signal name="closed"/>
</signals>
- <transform>
- <AxisRotation id="Axis" axis.startX="{Container.width / 2}" axis.endX="{Container.width / 2}" axis.endY="1" />
- </transform>
+ <axis>
+ <Axis startX="{Container.width / 2}" endX="{Container.width / 2}" endY="1" />
+ </axis>
<front>
<Item id="ContainerFront" anchors.fill="{Container}">
@@ -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,19 +43,23 @@
<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>
<states>
<State name="Back">
- <SetProperty target="{Axis}" property="angle" value="180"/>
+ <SetProperty target="{Container}" property="rotation" value="180"/>
</State>
</states>
<transitions>
<Transition>
- <NumericAnimation easing="easeInOutQuad" properties="angle" duration="500"/>
+ <NumericAnimation easing="easeInOutQuad" properties="rotation" duration="500"/>
</Transition>
</transitions>
diff --git a/demos/declarative/mediabrowser/content/MoviesPathView.qml b/demos/declarative/mediabrowser/content/PhonesPathView.qml
index a13437a..df7e742 100644
--- a/demos/declarative/mediabrowser/content/MoviesPathView.qml
+++ b/demos/declarative/mediabrowser/content/PhonesPathView.qml
@@ -1,49 +1,54 @@
-<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"/>
<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"/>
<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"/>
</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}">
+ <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" source="{thumb}" scale="{0.95*Math.min(Dvd.height/height,Dvd.width/width)}"/>
+ </Item>
+ <!-- <Image source="pics/reflection.png" anchors.fill="{parent}"/> -->
+ <Image source="pics/shadow-right.png" x="{Dvd.width}" height="{Dvd.height}"/>
+ <Image source="pics/shadow-bottom.png" y="{Dvd.height}" width="{Dvd.width}"/>
+ <Image id="Corner" source="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/content/Star.qml b/demos/declarative/mediabrowser/content/Star.qml
index 1db29e8..37d314b 100644
--- a/demos/declarative/mediabrowser/content/Star.qml
+++ b/demos/declarative/mediabrowser/content/Star.qml
@@ -8,7 +8,7 @@
<Signal name="clicked"/>
</signals>
- <Image id="Image" src="pics/ghns_star.png" x="6" y="7" opacity="0.4" scale="0.5"/>
+ <Image id="Image" source="pics/ghns_star.png" x="6" y="7" opacity="0.4" scale="0.5"/>
<MouseRegion anchors.fill="{Container}" onClicked="Container.clicked.emit()"/>
<states>
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/dummydata/PhonesModel.qml b/demos/declarative/mediabrowser/dummydata/PhonesModel.qml
new file mode 100644
index 0000000..d4f6269
--- /dev/null
+++ b/demos/declarative/mediabrowser/dummydata/PhonesModel.qml
@@ -0,0 +1,137 @@
+<ListModel id="PhonesModel">
+ <Phone>
+ <title>Nokia N97</title>
+ <thumb>http://www.forum.nokia.com/devices/pics/N97_main.jpg</thumb>
+ <description>
+ The Nokia N97 is a S60 5th Edition mobile computer with a large 3,5?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) TFT color display with resistive touch screen and tactile feedback. The device provides excellent user experience for internet and entertainment by combining qwerty keyboard with touch UI and Home screen functionality. Use the N97 to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include game titles with N-Gage, a 5 mega pixel camera with dual LED flash and automatic geotagging of images and videos.
+ </description>
+ <specifications>
+ <![CDATA[
+ <table width=300>
+ <tr><td width=50%>Resolution <td width=50%>360 x 640
+ <tr><td>Color Depth <td>24 bit
+ <tr><td>Device Size <td>117.2 x 55.3 x 15.9 mm
+ <tr><td>Volume <td>88 cc
+ <tr><td>Weight <td>150 g
+ </table>
+ ]]>
+ </specifications>
+ <url>http://www.forum.nokia.com/devices/N97</url>
+ <rating>5</rating>
+ </Phone>
+ <Phone>
+ <title>Nokia 5800 XpressMusic</title>
+ <thumb>http://www.forum.nokia.com/devices/pics/5800_main.jpg</thumb>
+ <description>
+ The Nokia 5800 XpressMusic is a S60 5th Edition device with a resistive touch screen and tactile feedback. The device has a large 3,2?, bright nHD (640 x 360 pixels and 16:9 aspect ratio) color display. The device has variety of input methods: stylus, plectrum and finger touch support for text input and UI control (alphanumeric keypad, full and mini qwerty keyboard, handwriting recognition). Use the Nokia 5800 XpressMusic to connect to mobile broadband using WLAN or HSDPA (3.5G). Find directions and locations with the integrated A-GPS and included maps. Additional features include a 3.2 megapixel camera with dual LED flash, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available.
+ </description>
+ <specifications>
+ <![CDATA[
+ <table width=300>
+ <tr><td width=50%>Resolution <td width=50%>360 x 640
+ <tr><td>Color Depth <td>24 bit
+ <tr><td>Device Size <td>111 x 51.7 x 15.5 mm
+ <tr><td>Volume <td>83 cc
+ <tr><td>Weight <td>109 g
+ </table>
+ ]]>
+ </specifications>
+ <url>http://www.forum.nokia.com/devices/5800_XpressMusic</url>
+ <rating>5</rating>
+ </Phone>
+ <Phone>
+ <title>E75</title>
+ <thumb>http://www.forum.nokia.com/devices/pics/E75_main.jpg</thumb>
+ <description>The Nokia E75 is a GSM/WCDMA dual-mode business smartphone supporting WCDMA/HSDPA, EGSM, and WLAN. The device features a side slider qwerty keyboard for optimal email experience. Enjoy videos, music, and graphics on the 2.4? QVGA display and orientation sensor. Find directions and locations with the integrated A-GPS and included maps. Take photos with a 3.2-megapixel autofocus camera. Additional features include USB charging with simultaneous data transfer, Bluetooth 2.0 +EDR, and USB 2.0 High-Speed. Supported WCDMA frequencies depend on the region where the device is available.</description>
+ <specifications>
+ <![CDATA[
+ <table width=300>
+ <tr><td width=50%>Resolution <td width=50%>240 x 320
+ <tr><td>Color Depth <td>24 bit
+ <tr><td>Device Size <td>111.8 x 501 x 14.4 mm
+ <tr><td>Volume <td>69 cc
+ <tr><td>Weight <td>139 g
+ </table>
+ ]]>
+ </specifications>
+ <url>http://www.forum.nokia.com/devices/E75</url>
+ <rating>5</rating>
+ </Phone>
+ <Phone>
+ <title>Nokia N810</title>
+ <thumb>http://www.forum.nokia.com/devices/pics/n810_main.jpg</thumb>
+ <description>
+ The Nokia N810 features include Voice-over-IP (VoIP) Internet and video calling, Instant Messaging, an integrated slide-out QWERTY keyboard and touch screen. The N810 lets you stay connected on the go with WLAN or Bluetooth 2.0 +EDR and a Bluetooth enabled mobile phone. The hi-resolution 4.13", 800 x 480 screen and the integrated web cam add to the internet experience. Use the Nokia N810 to play music and videos with the built-in stereo speakers or use the 3.5mm stereo plug with headphones. The Nokia N810 also has an integrated GPS receiver which allows you to pinpoint your position and find points-of-interests using pre-loaded maps.
+ </description>
+ <specifications>
+ <![CDATA[
+ <table width=300>
+ <tr><td width=50%>Resolution <td width=50%>800 x 480
+ <tr><td>Color Depth <td>16 bit
+ <tr><td>Device Size <td>128 x 72 x 14 mm
+ <tr><td>Weight <td>225 g
+ </table>
+ ]]>
+ </specifications>
+ <url>http://www.forum.nokia.com/devices/N810</url>
+ <rating>5</rating>
+ </Phone>
+ <Phone>
+ <title>Nokia 6260 slide</title>
+ <thumb>http://www.forum.nokia.com/devices/pics/6260slide_main.jpg</thumb>
+ <description>
+ The Nokia 6260 slide is a Series 40 6th Edition phone, supporting quad-band GSM 850/900/1800/1900, triple-band WCDMA 900/1900/2100 and WLAN. Other key features include integrated A-GPS with included maps, a 5.0 megapixel camera with LED flash and Carl Zeiss optics, WebKit Open Source Browser, Flash Lite 3.0, Bluetooth 2.1 + EDR and MIDP Java 2.1 with additional Java APIs. Supported WCDMA frequencies depend on the region where the device is available.
+ </description>
+ <specifications>
+ <![CDATA[
+ <table width=300>
+ <tr><td width=50%>Resolution <td width=50%>320 x 480
+ <tr><td>Color Depth <td>24 bit
+ <tr><td>Device Size <td>99.4 x 46.5 x 15.4 mm
+ <tr><td>Volume <td>64.5 cc
+ <tr><td>Weight <td>114 g
+ </table>
+ ]]>
+ </specifications>
+ <url>http://www.forum.nokia.com/devices/6260_slide</url>
+ <rating>5</rating>
+ </Phone>
+ <Phone>
+ <title>Nokia 2330 classic</title>
+ <thumb>http://www.forum.nokia.com/devices/pics/2330_main.jpg</thumb>
+ <description>
+ The Nokia 2330 classic is a Dual-band GPRS phone for EGSM 900/1800 or GSM 850/1900 (for some markets) that includes a VGA camera, Stereo FM radio with recording feature, Bluetooth 2.0, Mail on Ovi and MIDP 2.1 APIs for application creation.
+ </description>
+ <specifications>
+ <![CDATA[
+ <table width=300>
+ <tr><td width=50%>Resolution <td width=50%>128 x 160
+ <tr><td>Color Depth <td>16 bit
+ <tr><td>Device Size <td>107 x 46 x 13.8 mm
+ <tr><td>Weight <td>80 g
+ </table>
+ ]]>
+ </specifications>
+ <url>http://www.forum.nokia.com/devices/2330_classic</url>
+ <rating>5</rating>
+ </Phone>
+ <Phone>
+ <title>Nokia 2355</title>
+ <thumb>http://www.forum.nokia.com/devices/pics/2355_main.jpg</thumb>
+ <description>
+ The Nokia 2355 CDMA phone features a 64K color display, FM radio, integrated flashlight, WAP 2.0 browsing, MMS, Java(tm) and Brew. It's stylishly polished fold design will keep you in the spotlight.
+ </description>
+ <specifications>
+ <![CDATA[
+ <table width=300>
+ <tr><td width=50%>Resolution <td width=50%>128 x 128
+ <tr><td>Color Depth <td>16 bit
+ <tr><td>Device Size <td>81 x 43 x 22 mm
+ <tr><td>Weight <td>78 g
+ </table>
+ ]]>
+ </specifications>
+ <url>http://www.forum.nokia.com/devices/2355</url>
+ <rating>5</rating>
+ </Phone>
+</ListModel>
diff --git a/demos/declarative/mediabrowser/mediabrowser.qml b/demos/declarative/mediabrowser/mediabrowser.qml
index df7baa9..be87fa7 100644
--- a/demos/declarative/mediabrowser/mediabrowser.qml
+++ b/demos/declarative/mediabrowser/mediabrowser.qml
@@ -5,15 +5,15 @@
</properties>
<Item id="Background">
- <Image src="content/pics/background.png" opaque="true"/>
+ <Image source="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"/>
- <Image src="content/pics/shadow-right-screen.png" x="150" height="480" tile="true"/>
+ <Text id="IconText" x="40" y="110" font.bold="true" font.size="9" text="Nokia Devices" color="white" style="Raised" styleColor="black"/>
+ <Image source="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"/>
+ <PhonesPathView id="PhonesPathView" model="{PhonesModel}" y="60" width="800" height="360"/>
+ <PhoneInfoContainer id="PhoneInfoContainer" width="750" x="25" y="500" height="440"/>
<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>
diff --git a/demos/declarative/webbrowser/content/RectSoftShadow.qml b/demos/declarative/webbrowser/content/RectSoftShadow.qml
index 0235842..2b39422 100644
--- a/demos/declarative/webbrowser/content/RectSoftShadow.qml
+++ b/demos/declarative/webbrowser/content/RectSoftShadow.qml
@@ -1,10 +1,10 @@
<Item>
- <Image src="pics/softshadow-left.sci" x="-16" y="-16"
+ <Image source="pics/softshadow-left.sci" x="-16" y="-16"
width="16" height="{parent.height+32}" />
- <Image src="pics/softshadow-right.sci" x="{parent.width}" y="-16"
+ <Image source="pics/softshadow-right.sci" x="{parent.width}" y="-16"
width="16" height="{parent.height+32}" />
- <Image src="pics/softshadow-top.png" x="0" y="-16"
+ <Image source="pics/softshadow-top.png" x="0" y="-16"
width="{parent.width}" height="16" />
- <Image src="pics/softshadow-bottom.png" x="0" y="{parent.height}"
+ <Image source="pics/softshadow-bottom.png" x="0" y="{parent.height}"
width="{webview.width*webview.scale}" height="16" />
</Item>
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml
index 7618f4d..cf96b3f 100644
--- a/demos/declarative/webbrowser/webbrowser.qml
+++ b/demos/declarative/webbrowser/webbrowser.qml
@@ -18,8 +18,8 @@
<Item id="WebPanel" anchors.fill="{parent}" clip="true">
<Rect color="#555555" anchors.fill="{parent}"/>
- <Image src="content/pics/softshadow-bottom.png" width="{WebPanel.width}" height="16" />
- <Image src="content/pics/softshadow-top.png" width="{WebPanel.width}" anchors.bottom="{Footer.top}" height="16" />
+ <Image source="content/pics/softshadow-bottom.png" width="{WebPanel.width}" height="16" />
+ <Image source="content/pics/softshadow-top.png" width="{WebPanel.width}" anchors.bottom="{Footer.top}" height="16" />
<RectSoftShadow x="{-Flick.xPosition}" y="{-Flick.yPosition}"
width="{WebView.width*WebView.scale}" height="{Flick.y+WebView.height*WebView.scale}"/>
<Item id="HeaderSpace" width="{parent.width}" height="60" z="1">
@@ -30,7 +30,7 @@
? -Flick.xPosition+Flick.viewportWidth-Flick.width
: 0}"
y="{Flick.yPosition &lt; 0 ? -Flick.yPosition : progressOff*(Flick.yPosition>height?-height:-Flick.yPosition)}"
- height="64" src="content/pics/header.png">
+ height="64" source="content/pics/header.png">
<Text id="HeaderText" text="{WebView.title!='' || WebView.progress == 1.0 ? WebView.title : 'Loading...'}"
color="white" styleColor="black" style="Raised"
font.family="Helvetica" font.size="10" font.bold="true" elide="ElideRight"
@@ -39,8 +39,8 @@
anchors.top="{Header.top}" anchors.topMargin="4" hAlign="AlignHCenter"/>
<Item anchors.top="{HeaderText.bottom}" anchors.topMargin="2" anchors.bottom="{parent.bottom}" width="{parent.width}">
<Item id="UrlBox" anchors.left="{parent.left}" anchors.leftMargin="12" anchors.right="{parent.right}" anchors.rightMargin="12" height="31" anchors.top="{parent.top}" clip="true">
- <Image src="content/pics/addressbar.sci" anchors.fill="{UrlBox}"/>
- <Image id="UrlBoxhl" src="content/pics/addressbar-filled.sci" opacity="{1-Header.progressOff}" clip="true" width="{parent.width*WebView.progress}" height="{parent.height}"/>
+ <Image source="content/pics/addressbar.sci" anchors.fill="{UrlBox}"/>
+ <Image id="UrlBoxhl" source="content/pics/addressbar-filled.sci" opacity="{1-Header.progressOff}" clip="true" width="{parent.width*WebView.progress}" height="{parent.height}"/>
<KeyProxy id="proxy" anchors.left="{UrlBox.left}" anchors.fill="{UrlBox}" focusable="true" targets="{[keyActions,EditUrl]}"/>
<KeyActions id="keyActions" return="WebBrowser.url = EditUrl.text; proxy.focus=false;"/>
<TextEdit id="EditUrl" color="#555555" text="{WebView.url == '' ? ' ' : WebView.url}"
@@ -104,11 +104,11 @@
</Rect>
</Flickable>
<Image id="Footer" width="{parent.width}" anchors.bottom="{parent.bottom}"
- height="43" src="content/pics/footer.sci">
+ height="43" source="content/pics/footer.sci">
<Rect y="-1" width="{parent.width}" height="1" color="#555555"/>
<Item id="backbutton" anchors.right="{reload.left}" anchors.rightMargin="10" anchors.verticalCenter="{parent.verticalCenter}" width="{back_e.width}" height="{back_e.height}">
- <Image anchors.fill="{parent}" id="back_e" src="content/pics/back.png" />
- <Image anchors.fill="{parent}" id="back_d" src="content/pics/back-disabled.png" />
+ <Image anchors.fill="{parent}" id="back_e" source="content/pics/back.png" />
+ <Image anchors.fill="{parent}" id="back_d" source="content/pics/back-disabled.png" />
<states>
<State name="Enabled" when="{WebView.back.enabled==true}">
<SetProperty target="{back_e}" property="opacity" value="1"/>
@@ -126,11 +126,11 @@
</transitions>
<MouseRegion anchors.fill="{back_e}" onClicked="if (WebView.back.enabled) WebView.back.trigger()"/>
</Item>
- <Image id="reload" src="content/pics/reload.png" anchors.horizontalCenter="{parent.horizontalCenter}" anchors.verticalCenter="{parent.verticalCenter}"/>
+ <Image id="reload" source="content/pics/reload.png" anchors.horizontalCenter="{parent.horizontalCenter}" anchors.verticalCenter="{parent.verticalCenter}"/>
<MouseRegion anchors.fill="{reload}" onClicked="WebView.reload.trigger()"/>
<Item id="forwardbutton" anchors.left="{reload.right}" anchors.leftMargin="10" anchors.verticalCenter="{parent.verticalCenter}" width="{forward_e.width}" height="{forward_e.height}">
- <Image anchors.fill="{parent}" anchors.verticalCenter="{parent.verticalCenter}" id="forward_e" src="content/pics/forward.png" />
- <Image anchors.fill="{parent}" id="forward_d" src="content/pics/forward-disabled.png" />
+ <Image anchors.fill="{parent}" anchors.verticalCenter="{parent.verticalCenter}" id="forward_e" source="content/pics/forward.png" />
+ <Image anchors.fill="{parent}" id="forward_d" source="content/pics/forward-disabled.png" />
<states>
<State name="Enabled" when="{WebView.forward.enabled==true}">
<SetProperty target="{forward_e}" property="opacity" value="1"/>
diff --git a/demos/qtdemo/colors.cpp b/demos/qtdemo/colors.cpp
index 41bbfb3..733b285 100644
--- a/demos/qtdemo/colors.cpp
+++ b/demos/qtdemo/colors.cpp
@@ -72,10 +72,8 @@ int Colors::contentHeight = 510;
// Properties:
bool Colors::openGlRendering = false;
-bool Colors::direct3dRendering = false;
bool Colors::softwareRendering = false;
-bool Colors::openGlAwailable = true;
-bool Colors::direct3dAwailable = true;
+bool Colors::openGlAvailable = true;
bool Colors::xRenderPresent = true;
bool Colors::noTicker = false;
@@ -206,8 +204,6 @@ void Colors::parseArgs(int argc, char *argv[])
QString s(argv[i]);
if (s == "-opengl")
Colors::openGlRendering = true;
- else if (s == "-direct3d")
- Colors::direct3dRendering = true;
else if (s == "-software")
Colors::softwareRendering = true;
else if (s == "-no-opengl") // support old style
@@ -270,7 +266,7 @@ void Colors::parseArgs(int argc, char *argv[])
Colors::fps = int(parseFloat(s, "-fps"));
else if (s.startsWith("-h") || s.startsWith("-help")){
QMessageBox::warning(0, "Arguments",
- QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-direct3d] [-software] [-fullscreen] [-ticker[0|1]] ")
+ QString("Usage: qtdemo [-verbose] [-no-adapt] [-opengl] [-software] [-fullscreen] [-ticker[0|1]] ")
+ "[-animations[0|1]] [-no-blending] [-no-sync] [-use-timer-update[0|1]] [-pause[0|1]] "
+ "[-use-window-mask] [-no-rescale] "
+ "[-use-pixmaps] [-show-fps] [-show-br] [-8bit[0|1]] [-menu<int>] [-use-loop] [-use-balls] "
@@ -290,7 +286,6 @@ void Colors::parseArgs(int argc, char *argv[])
void Colors::setLowSettings()
{
Colors::openGlRendering = false;
- Colors::direct3dRendering = false;
Colors::softwareRendering = true;
Colors::noTicker = true;
Colors::noTimerUpdate = true;
@@ -325,15 +320,11 @@ void Colors::detectSystemResources()
qDebug() << "- OpenGL not supported by current build of Qt";
#endif
{
- Colors::openGlAwailable = false;
+ Colors::openGlAvailable = false;
if (Colors::verbose)
qDebug("- OpenGL not recommended on this system");
}
-#if defined(Q_WS_WIN)
- Colors::direct3dAwailable = false; // for now.
-#endif
-
#if defined(Q_WS_X11)
// check if X render is present:
QPixmap tmp(1, 1);
@@ -369,21 +360,9 @@ void Colors::postConfigure()
}
}
-#if !defined(Q_WS_WIN)
- if (Colors::direct3dRendering){
- Colors::direct3dRendering = false;
- qDebug() << "- WARNING: Direct3D specified, but not supported on this platform";
- }
-#endif
-
- if (!Colors::openGlRendering && !Colors::direct3dRendering && !Colors::softwareRendering){
+ if (!Colors::openGlRendering && !Colors::softwareRendering){
// The user has not decided rendering system. So we do it instead:
-#if defined(Q_WS_WIN)
- if (Colors::direct3dAwailable)
- Colors::direct3dRendering = true;
- else
-#endif
- if (Colors::openGlAwailable)
+ if (Colors::openGlAvailable)
Colors::openGlRendering = true;
else
Colors::softwareRendering = true;
diff --git a/demos/qtdemo/colors.h b/demos/qtdemo/colors.h
index 58865c6..31eb93b 100644
--- a/demos/qtdemo/colors.h
+++ b/demos/qtdemo/colors.h
@@ -81,11 +81,9 @@ public:
static int contentHeight;
// properties:
+ static bool openGlAvailable;
static bool openGlRendering;
- static bool direct3dRendering;
static bool softwareRendering;
- static bool openGlAwailable;
- static bool direct3dAwailable;
static bool xRenderPresent;
static bool noAdapt;
static bool noTicker;
diff --git a/demos/qtdemo/mainwindow.cpp b/demos/qtdemo/mainwindow.cpp
index 8723823..0da69b2 100644
--- a/demos/qtdemo/mainwindow.cpp
+++ b/demos/qtdemo/mainwindow.cpp
@@ -100,14 +100,8 @@ void MainWindow::setRenderingSystem()
{
QWidget *viewport = 0;
- if (Colors::direct3dRendering){
- viewport->setAttribute(Qt::WA_MSWindowsUseDirect3D);
- setCacheMode(QGraphicsView::CacheNone);
- if (Colors::verbose)
- qDebug() << "- using Direct3D";
- }
#ifndef QT_NO_OPENGL
- else if (Colors::openGlRendering){
+ if (Colors::openGlRendering) {
QGLWidget *glw = new QGLWidget(QGLFormat(QGL::SampleBuffers));
if (Colors::noScreenSync)
glw->format().setSwapInterval(0);
@@ -116,9 +110,10 @@ void MainWindow::setRenderingSystem()
setCacheMode(QGraphicsView::CacheNone);
if (Colors::verbose)
qDebug() << "- using OpenGL";
- }
+ } else // software rendering
#endif
- else{ // software rendering
+ {
+ // software rendering
viewport = new QWidget;
setCacheMode(QGraphicsView::CacheBackground);
if (Colors::verbose)
@@ -389,8 +384,6 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
s += "Rendering system: ";
if (Colors::openGlRendering)
s += "OpenGL";
- else if (Colors::direct3dRendering)
- s += "Direct3D";
else
s += "software";
diff --git a/demos/qtdemo/xml/examples.xml b/demos/qtdemo/xml/examples.xml
index 03b59f3..96a3e80 100644
--- a/demos/qtdemo/xml/examples.xml
+++ b/demos/qtdemo/xml/examples.xml
@@ -118,6 +118,7 @@
<example filename="threadedfortuneserver" name="Threaded Fort. Server" />
<example filename="torrent" name="Torrent Client" />
<example filename="securesocketclient" name="Secure Socket Client" />
+ <example filename="googlesuggest" name="Google Suggest" />
</category>
<category dirname="opengl" name="OpenGL">
<example filename="2dpainting" name="2D Painting" />
@@ -213,6 +214,12 @@
<example filename="wiggly" name="Wiggly" />
<example filename="windowflags" name="Window Flags" />
</category>
+ <category dirname="webkit" name="WebKit">
+ <example filename="formextractor" name="Form Extractor" />
+ <example filename="previewer" name="HTML Previewer" />
+ <example filename="fancybrowser" name="Fancy Browser" />
+ <example filename="googlechat" name="Google Chat" />
+ </category>
<category dirname="xml" name="XML">
<example filename="saxbookmarks" name="SAX Bookmarks" />
<example filename="dombookmarks" name="DOM Bookmarks" />