summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/declarative/twitter/content/AuthView.qml10
-rw-r--r--demos/declarative/twitter/content/Button.qml38
-rw-r--r--demos/declarative/twitter/content/FatDelegate.qml5
-rw-r--r--demos/declarative/twitter/content/HomeTitleBar.qml6
-rw-r--r--demos/declarative/twitter/content/Loading.qml8
-rw-r--r--demos/declarative/twitter/content/MultiTitleBar.qml1
-rw-r--r--demos/declarative/twitter/content/TitleBar.qml76
-rw-r--r--demos/declarative/twitter/content/ToolBar.qml24
-rw-r--r--demos/declarative/twitter/content/images/gloss.pngbin0 -> 1236 bytes
-rw-r--r--demos/declarative/twitter/content/images/lineedit.pngbin0 -> 1415 bytes
-rw-r--r--demos/declarative/twitter/content/images/lineedit.sci5
-rw-r--r--demos/declarative/twitter/content/images/loading.pngbin0 -> 813 bytes
-rw-r--r--demos/declarative/twitter/content/images/stripes.pngbin0 -> 257 bytes
-rw-r--r--demos/declarative/twitter/content/images/titlebar.pngbin0 -> 1436 bytes
-rw-r--r--demos/declarative/twitter/content/images/titlebar.sci5
-rw-r--r--demos/declarative/twitter/content/images/toolbutton.pngbin0 -> 2550 bytes
-rw-r--r--demos/declarative/twitter/content/images/toolbutton.sci5
-rw-r--r--demos/declarative/twitter/twitter.qml13
-rw-r--r--examples/declarative/animations/color-animation.qml (renamed from examples/declarative/animation/color-animation.qml)0
-rw-r--r--examples/declarative/animations/easing.qml (renamed from examples/declarative/animation/easing.qml)0
-rw-r--r--examples/declarative/animations/images/face-smile.png (renamed from examples/declarative/animation/images/face-smile.png)bin15408 -> 15408 bytes
-rw-r--r--examples/declarative/animations/images/moon.png (renamed from examples/declarative/animation/images/moon.png)bin2433 -> 2433 bytes
-rw-r--r--examples/declarative/animations/images/shadow.png (renamed from examples/declarative/animation/images/shadow.png)bin425 -> 425 bytes
-rw-r--r--examples/declarative/animations/images/star.png (renamed from examples/declarative/animation/images/star.png)bin349 -> 349 bytes
-rw-r--r--examples/declarative/animations/images/sun.png (renamed from examples/declarative/animation/images/sun.png)bin8153 -> 8153 bytes
-rw-r--r--examples/declarative/animations/property-animation.qml (renamed from examples/declarative/animation/property-animation.qml)0
-rw-r--r--examples/declarative/clocks/content/Clock.qml6
-rw-r--r--examples/declarative/dial/content/Dial.qml (renamed from examples/declarative/dial/DialLibrary/Dial.qml)2
-rw-r--r--examples/declarative/dial/content/background.png (renamed from examples/declarative/dial/DialLibrary/background.png)bin35876 -> 35876 bytes
-rw-r--r--examples/declarative/dial/content/needle.png (renamed from examples/declarative/dial/DialLibrary/needle.png)bin342 -> 342 bytes
-rw-r--r--examples/declarative/dial/content/needle_shadow.png (renamed from examples/declarative/dial/DialLibrary/needle_shadow.png)bin632 -> 632 bytes
-rw-r--r--examples/declarative/dial/content/overlay.png (renamed from examples/declarative/dial/DialLibrary/overlay.png)bin3564 -> 3564 bytes
-rw-r--r--examples/declarative/dial/dial.pro9
-rw-r--r--examples/declarative/dial/dial.qml26
-rw-r--r--examples/declarative/dial/dial.qrc10
-rw-r--r--examples/declarative/dial/main.cpp58
-rw-r--r--examples/declarative/effects/effects.qml (renamed from examples/declarative/effects/test.qml)20
-rw-r--r--examples/declarative/effects/pic.jpgbin7016 -> 0 bytes
-rw-r--r--examples/declarative/effects/pic.pngbin0 -> 12933 bytes
-rw-r--r--examples/declarative/parallax/parallax.qml34
-rw-r--r--examples/declarative/parallax/qml/ParallaxView.qml (renamed from examples/declarative/parallax/ParallaxView.qml)12
-rw-r--r--examples/declarative/parallax/qml/Smiley.qml (renamed from examples/declarative/parallax/Smiley.qml)4
42 files changed, 219 insertions, 158 deletions
diff --git a/demos/declarative/twitter/content/AuthView.qml b/demos/declarative/twitter/content/AuthView.qml
index 320eef6..c924649 100644
--- a/demos/declarative/twitter/content/AuthView.qml
+++ b/demos/declarative/twitter/content/AuthView.qml
@@ -1,6 +1,4 @@
import Qt 4.6
-import "../../flickr/common"
-import "../../flickr/mobile"
Item {
id: wrapper
@@ -12,14 +10,14 @@ Item {
Text {
width: 100
text: "Screen name:"
- font.pointSize: 10; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
+ font.pointSize: 14; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Qt.AlignRight
}
Item {
width: 160
height: 28
- BorderImage { source: "../../flickr/mobile/images/lineedit.sci"; anchors.fill: parent }
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
TextInput{
id: nameIn
width: parent.width - 8
@@ -42,14 +40,14 @@ Item {
Text {
width: 100
text: "Password:"
- font.pointSize: 10; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
+ font.pointSize: 14; font.bold: true; color: "white"; style: Text.Raised; styleColor: "black"
anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Qt.AlignRight
}
Item {
width: 160
height: 28
- BorderImage { source: "../../flickr/mobile/images/lineedit.sci"; anchors.fill: parent }
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
TextInput{
id: passIn
width: parent.width - 8
diff --git a/demos/declarative/twitter/content/Button.qml b/demos/declarative/twitter/content/Button.qml
new file mode 100644
index 0000000..770330c
--- /dev/null
+++ b/demos/declarative/twitter/content/Button.qml
@@ -0,0 +1,38 @@
+import Qt 4.6
+
+Item {
+ id: container
+
+ signal clicked
+
+ property string text
+
+ BorderImage {
+ id: buttonImage
+ source: "images/toolbutton.sci"
+ width: container.width; height: container.height
+ }
+ BorderImage {
+ id: pressed
+ opacity: 0
+ source: "images/toolbutton.sci"
+ width: container.width; height: container.height
+ }
+ MouseRegion {
+ id: mouseRegion
+ anchors.fill: buttonImage
+ onClicked: { container.clicked(); }
+ }
+ Text {
+ color: "white"
+ anchors.centerIn: buttonImage; font.bold: true
+ text: container.text; style: Text.Raised; styleColor: "black"
+ }
+ states: [
+ State {
+ name: "Pressed"
+ when: mouseRegion.pressed == true
+ PropertyChanges { target: pressed; opacity: 1 }
+ }
+ ]
+}
diff --git a/demos/declarative/twitter/content/FatDelegate.qml b/demos/declarative/twitter/content/FatDelegate.qml
index 194ffb3..7125746 100644
--- a/demos/declarative/twitter/content/FatDelegate.qml
+++ b/demos/declarative/twitter/content/FatDelegate.qml
@@ -1,5 +1,4 @@
import Qt 4.6
-import "../../flickr/common"
Component {
id: ListDelegate
@@ -15,8 +14,8 @@ Component {
}
}
function addTags(str){
- ret = str.replace(/@[a-zA-Z0-9_]+/g, '<a href="app://$&">$&</a>');//click to jump to user?
- ret2 = ret.replace(/http:\/\/[^ \n\t]+/g, '<a href="$&">$&</a>');//surrounds http links with html link tags
+ var ret = str.replace(/@[a-zA-Z0-9_]+/g, '<a href="app://$&">$&</a>');//click to jump to user?
+ var ret2 = ret.replace(/http:\/\/[^ \n\t]+/g, '<a href="$&">$&</a>');//surrounds http links with html link tags
return ret2;
}
}
diff --git a/demos/declarative/twitter/content/HomeTitleBar.qml b/demos/declarative/twitter/content/HomeTitleBar.qml
index b0995f3..f0d6d75 100644
--- a/demos/declarative/twitter/content/HomeTitleBar.qml
+++ b/demos/declarative/twitter/content/HomeTitleBar.qml
@@ -1,6 +1,4 @@
import Qt 4.6
-import "../../flickr/mobile"
-import "../../flickr/common"
Item {
id: titleBar
@@ -8,7 +6,7 @@ Item {
signal update()
onYChanged: state="" //When switching titlebars
- BorderImage { source: "../../flickr/mobile/images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
Item {
id: container
width: (parent.width * 2) - 55 ; height: parent.height
@@ -73,7 +71,7 @@ Item {
id: txtEdit;
anchors.left: tagButton.right; anchors.leftMargin: 5; y: 4
anchors.right: parent.right; anchors.rightMargin: 40; height: parent.height - 9
- BorderImage { source: "../../flickr/mobile/images/lineedit.sci"; anchors.fill: parent }
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
Binding {//TODO: Can this be a function, which also resets the cursor? And flashes?
when: editor.text.length > 140
diff --git a/demos/declarative/twitter/content/Loading.qml b/demos/declarative/twitter/content/Loading.qml
new file mode 100644
index 0000000..8b22e70
--- /dev/null
+++ b/demos/declarative/twitter/content/Loading.qml
@@ -0,0 +1,8 @@
+import Qt 4.6
+
+Image {
+ id: loading; source: "images/loading.png"; transformOrigin: "Center"
+ rotation: NumberAnimation {
+ id: "RotationAnimation"; from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900
+ }
+}
diff --git a/demos/declarative/twitter/content/MultiTitleBar.qml b/demos/declarative/twitter/content/MultiTitleBar.qml
index da0794d..ef7de65 100644
--- a/demos/declarative/twitter/content/MultiTitleBar.qml
+++ b/demos/declarative/twitter/content/MultiTitleBar.qml
@@ -1,5 +1,4 @@
import Qt 4.6
-import "../../flickr/mobile"
Item {
height: homeBar.height
diff --git a/demos/declarative/twitter/content/TitleBar.qml b/demos/declarative/twitter/content/TitleBar.qml
new file mode 100644
index 0000000..07b9762
--- /dev/null
+++ b/demos/declarative/twitter/content/TitleBar.qml
@@ -0,0 +1,76 @@
+import Qt 4.6
+
+Item {
+ id: titleBar
+ property string untaggedString: "Uploads from everyone"
+ property string taggedString: "Recent uploads tagged "
+
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+
+ Item {
+ id: container
+ width: (parent.width * 2) - 55 ; height: parent.height
+
+ Script {
+ function accept() {
+ titleBar.state = ""
+ background.state = ""
+ rssModel.tags = editor.text
+ }
+ }
+
+ Text {
+ id: categoryText
+ anchors {
+ left: parent.left; right: tagButton.left; leftMargin: 10; rightMargin: 10
+ verticalCenter: parent.verticalCenter
+ }
+ elide: Text.ElideLeft
+ text: (rssModel.tags=="" ? untaggedString : taggedString + rssModel.tags)
+ font.bold: true; color: "White"; style: Text.Raised; styleColor: "Black"
+ }
+
+ Button {
+ id: tagButton; x: titleBar.width - 50; width: 45; height: 32; text: "..."
+ onClicked: if (titleBar.state == "Tags") accept(); else titleBar.state = "Tags"
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Item {
+ id: lineEdit
+ y: 4; height: parent.height - 9
+ anchors { left: tagButton.right; leftMargin: 5; right: parent.right; rightMargin: 5 }
+
+ BorderImage { source: "images/lineedit.sci"; anchors.fill: parent }
+
+ TextInput {
+ id: editor
+ anchors {
+ left: parent.left; right: parent.right; leftMargin: 10; rightMargin: 10
+ verticalCenter: parent.verticalCenter
+ }
+ cursorVisible: true; font.bold: true
+ color: "#151515"; selectionColor: "Green"
+ }
+
+ Keys.forwardTo: [ (returnKey), (editor)]
+
+ Item {
+ id: returnKey
+ Keys.onReturnPressed: accept()
+ Keys.onEscapePressed: titleBar.state = ""
+ }
+ }
+ }
+
+ states: State {
+ name: "Tags"
+ PropertyChanges { target: container; x: -tagButton.x + 5 }
+ PropertyChanges { target: tagButton; text: "OK" }
+ PropertyChanges { target: lineEdit; focus: true }
+ }
+
+ transitions: Transition {
+ NumberAnimation { properties: "x"; easing: "easeInOutQuad" }
+ }
+}
diff --git a/demos/declarative/twitter/content/ToolBar.qml b/demos/declarative/twitter/content/ToolBar.qml
new file mode 100644
index 0000000..f96c767
--- /dev/null
+++ b/demos/declarative/twitter/content/ToolBar.qml
@@ -0,0 +1,24 @@
+import Qt 4.6
+
+Item {
+ id: toolbar
+
+ property alias button1Label: button1.text
+ property alias button2Label: button2.text
+ signal button1Clicked
+ signal button2Clicked
+
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+
+ Button {
+ id: button1
+ anchors.left: parent.left; anchors.leftMargin: 5; y: 3; width: 140; height: 32
+ onClicked: toolbar.button1Clicked()
+ }
+
+ Button {
+ id: button2
+ anchors.right: parent.right; anchors.rightMargin: 5; y: 3; width: 140; height: 32
+ onClicked: toolbar.button2Clicked()
+ }
+}
diff --git a/demos/declarative/twitter/content/images/gloss.png b/demos/declarative/twitter/content/images/gloss.png
new file mode 100644
index 0000000..5d370cd
--- /dev/null
+++ b/demos/declarative/twitter/content/images/gloss.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/lineedit.png b/demos/declarative/twitter/content/images/lineedit.png
new file mode 100644
index 0000000..2cc38dc
--- /dev/null
+++ b/demos/declarative/twitter/content/images/lineedit.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/lineedit.sci b/demos/declarative/twitter/content/images/lineedit.sci
new file mode 100644
index 0000000..054bff7
--- /dev/null
+++ b/demos/declarative/twitter/content/images/lineedit.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 10
+border.bottom: 10
+border.right: 10
+source: lineedit.png
diff --git a/demos/declarative/twitter/content/images/loading.png b/demos/declarative/twitter/content/images/loading.png
new file mode 100644
index 0000000..47a1589
--- /dev/null
+++ b/demos/declarative/twitter/content/images/loading.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/stripes.png b/demos/declarative/twitter/content/images/stripes.png
new file mode 100644
index 0000000..9f36727
--- /dev/null
+++ b/demos/declarative/twitter/content/images/stripes.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/titlebar.png b/demos/declarative/twitter/content/images/titlebar.png
new file mode 100644
index 0000000..51c9008
--- /dev/null
+++ b/demos/declarative/twitter/content/images/titlebar.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/titlebar.sci b/demos/declarative/twitter/content/images/titlebar.sci
new file mode 100644
index 0000000..0418d94
--- /dev/null
+++ b/demos/declarative/twitter/content/images/titlebar.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 12
+border.bottom: 12
+border.right: 10
+source: titlebar.png
diff --git a/demos/declarative/twitter/content/images/toolbutton.png b/demos/declarative/twitter/content/images/toolbutton.png
new file mode 100644
index 0000000..1131001
--- /dev/null
+++ b/demos/declarative/twitter/content/images/toolbutton.png
Binary files differ
diff --git a/demos/declarative/twitter/content/images/toolbutton.sci b/demos/declarative/twitter/content/images/toolbutton.sci
new file mode 100644
index 0000000..9e4f965
--- /dev/null
+++ b/demos/declarative/twitter/content/images/toolbutton.sci
@@ -0,0 +1,5 @@
+border.left: 15
+border.top: 4
+border.bottom: 4
+border.right: 15
+source: toolbutton.png
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
index fdeb839..6cc67a1 100644
--- a/demos/declarative/twitter/twitter.qml
+++ b/demos/declarative/twitter/twitter.qml
@@ -1,7 +1,5 @@
import Qt 4.6
import "content" as Twitter
-import "../flickr/common" as Common
-import "../flickr/mobile" as Mobile
Item {
id: screen; width: 320; height: 480
@@ -20,7 +18,6 @@ Item {
//Workaround for bug 260266
Timer{ interval: 1; running: false; repeat: false; onTriggered: reallySetUser(); id:hack }
Script {
-// var tmpStr;
function setUser(str){hack.running = true; tmpStr = str}
function reallySetUser(){rssModel.tags = tmpStr;}
}
@@ -29,10 +26,10 @@ Item {
id: background
anchors.fill: parent; color: "#343434";
- Image { source: "mobile/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
+ Image { source: "content/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 }
Twitter.RssModel { id: rssModel }
- Common.Loading { anchors.centerIn: parent; visible: rssModel.status==XmlListModel.Loading && state!='unauthed'}
+ Twitter.Loading { anchors.centerIn: parent; visible: rssModel.status==XmlListModel.Loading && state!='unauthed'}
Text {
width: 180
text: "Could not access twitter using this screen name and password pair.";
@@ -61,10 +58,10 @@ Item {
}
Twitter.MultiTitleBar { id: titleBar; width: parent.width }
- Mobile.ToolBar { id: toolBar; height: 40;
+ Twitter.ToolBar { id: toolBar; height: 40;
//anchors.bottom: parent.bottom;
//TODO: Use anchor changes instead of hard coding
- y: 440
+ y: screen.height - 40
width: parent.width; opacity: 0.9
button1Label: "Update"
button2Label: "View others"
@@ -86,7 +83,7 @@ Item {
PropertyChanges { target: authView; x: 0 }
PropertyChanges { target: mainView; x: -(parent.width * 1.5) }
PropertyChanges { target: titleBar; y: -80 }
- PropertyChanges { target: toolBar; y: screen.height + 80 }
+ PropertyChanges { target: toolBar; y: screen.height }
}
]
transitions: [
diff --git a/examples/declarative/animation/color-animation.qml b/examples/declarative/animations/color-animation.qml
index edb0659..edb0659 100644
--- a/examples/declarative/animation/color-animation.qml
+++ b/examples/declarative/animations/color-animation.qml
diff --git a/examples/declarative/animation/easing.qml b/examples/declarative/animations/easing.qml
index 59e9b17..59e9b17 100644
--- a/examples/declarative/animation/easing.qml
+++ b/examples/declarative/animations/easing.qml
diff --git a/examples/declarative/animation/images/face-smile.png b/examples/declarative/animations/images/face-smile.png
index 3d66d72..3d66d72 100644
--- a/examples/declarative/animation/images/face-smile.png
+++ b/examples/declarative/animations/images/face-smile.png
Binary files differ
diff --git a/examples/declarative/animation/images/moon.png b/examples/declarative/animations/images/moon.png
index 9407b2b..9407b2b 100644
--- a/examples/declarative/animation/images/moon.png
+++ b/examples/declarative/animations/images/moon.png
Binary files differ
diff --git a/examples/declarative/animation/images/shadow.png b/examples/declarative/animations/images/shadow.png
index 8270565..8270565 100644
--- a/examples/declarative/animation/images/shadow.png
+++ b/examples/declarative/animations/images/shadow.png
Binary files differ
diff --git a/examples/declarative/animation/images/star.png b/examples/declarative/animations/images/star.png
index 27ef924..27ef924 100644
--- a/examples/declarative/animation/images/star.png
+++ b/examples/declarative/animations/images/star.png
Binary files differ
diff --git a/examples/declarative/animation/images/sun.png b/examples/declarative/animations/images/sun.png
index 7713ca5..7713ca5 100644
--- a/examples/declarative/animation/images/sun.png
+++ b/examples/declarative/animations/images/sun.png
Binary files differ
diff --git a/examples/declarative/animation/property-animation.qml b/examples/declarative/animations/property-animation.qml
index 0256137..0256137 100644
--- a/examples/declarative/animation/property-animation.qml
+++ b/examples/declarative/animations/property-animation.qml
diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml
index 4e9984f..2aac5f1 100644
--- a/examples/declarative/clocks/content/Clock.qml
+++ b/examples/declarative/clocks/content/Clock.qml
@@ -12,13 +12,13 @@ Item {
function timeChanged() {
var date = new Date;
- hours = date.getUTCHours() + Math.floor(clock.shift)
- minutes = date.getUTCMinutes() + ((clock.shift % 1) * 60);
+ hours = shift ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours()
+ minutes = shift ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes()
seconds = date.getUTCSeconds();
}
Timer {
- interval: 1000; running: true; repeat: true; triggeredOnStart: true
+ interval: 100; running: true; repeat: true; triggeredOnStart: true
onTriggered: clock.timeChanged()
}
diff --git a/examples/declarative/dial/DialLibrary/Dial.qml b/examples/declarative/dial/content/Dial.qml
index c1e9770..6fd0f39 100644
--- a/examples/declarative/dial/DialLibrary/Dial.qml
+++ b/examples/declarative/dial/content/Dial.qml
@@ -29,7 +29,7 @@ Item {
angle: SpringFollow {
spring: 1.4
damping: .15
- source: Math.min(Math.max(-130, root.value*2.2 - 130), 133)
+ source: Math.min(Math.max(-130, root.value*2.6 - 130), 133)
}
}
}
diff --git a/examples/declarative/dial/DialLibrary/background.png b/examples/declarative/dial/content/background.png
index 75d555d..75d555d 100644
--- a/examples/declarative/dial/DialLibrary/background.png
+++ b/examples/declarative/dial/content/background.png
Binary files differ
diff --git a/examples/declarative/dial/DialLibrary/needle.png b/examples/declarative/dial/content/needle.png
index 2d19f75..2d19f75 100644
--- a/examples/declarative/dial/DialLibrary/needle.png
+++ b/examples/declarative/dial/content/needle.png
Binary files differ
diff --git a/examples/declarative/dial/DialLibrary/needle_shadow.png b/examples/declarative/dial/content/needle_shadow.png
index 8d8a928..8d8a928 100644
--- a/examples/declarative/dial/DialLibrary/needle_shadow.png
+++ b/examples/declarative/dial/content/needle_shadow.png
Binary files differ
diff --git a/examples/declarative/dial/DialLibrary/overlay.png b/examples/declarative/dial/content/overlay.png
index 3860a7b..3860a7b 100644
--- a/examples/declarative/dial/DialLibrary/overlay.png
+++ b/examples/declarative/dial/content/overlay.png
Binary files differ
diff --git a/examples/declarative/dial/dial.pro b/examples/declarative/dial/dial.pro
deleted file mode 100644
index 1d1f811..0000000
--- a/examples/declarative/dial/dial.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-SOURCES = main.cpp
-RESOURCES = dial.qrc
-
-QT += script declarative
-
-target.path = $$[QT_INSTALL_EXAMPLES]/declarative/dial
-sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS dial.pro
-sources.path = $$[QT_INSTALL_EXAMPLES]/declarative/dial
-INSTALLS += target sources
diff --git a/examples/declarative/dial/dial.qml b/examples/declarative/dial/dial.qml
index c7baf25..c7b7659 100644
--- a/examples/declarative/dial/dial.qml
+++ b/examples/declarative/dial/dial.qml
@@ -1,32 +1,34 @@
import Qt 4.6
+import "content"
-import "DialLibrary"
Rectangle {
- color: "white"
- width: 210; height: 240
+ color: "#545454"
+ width: 300; height: 300
// Dial with a slider to adjust it
- Dial { id: dial; value: slider.x-2 }
+ Dial { id: dial; anchors.centerIn: parent; value: slider.x *100 / (container.width - 34) }
Rectangle {
- anchors.top: dial.bottom
- x: 20; width: 160; height: 16
+ id: container
+ anchors.bottom: parent.bottom; anchors.bottomMargin: 10
+ anchors.left: parent.left; anchors.leftMargin: 20
+ anchors.right: parent.right; anchors.rightMargin: 20; height: 16
gradient: Gradient {
- GradientStop { position: 0.0; color: "steelblue" }
- GradientStop { position: 1.0; color: "lightsteelblue" }
+ GradientStop { position: 0.0; color: "gray" }
+ GradientStop { position: 1.0; color: "white" }
}
radius: 8; opacity: 0.7; smooth: true
Rectangle {
id: slider
- x: 2; y: 2; width: 30; height: 12
+ x: 1; y: 1; width: 30; height: 14
radius: 6; smooth: true
gradient: Gradient {
- GradientStop { position: 0.0; color: "lightgray" }
- GradientStop { position: 1.0; color: "gray" }
+ GradientStop { position: 0.0; color: "#424242" }
+ GradientStop { position: 1.0; color: "black" }
}
MouseRegion {
anchors.fill: parent
- drag.target: parent; drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: 128
+ drag.target: parent; drag.axis: "XAxis"; drag.minimumX: 2; drag.maximumX: container.width - 32
}
}
}
diff --git a/examples/declarative/dial/dial.qrc b/examples/declarative/dial/dial.qrc
deleted file mode 100644
index 77354c0..0000000
--- a/examples/declarative/dial/dial.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>DialLibrary/background.png</file>
- <file>DialLibrary/overlay.png</file>
- <file>DialLibrary/needle_shadow.png</file>
- <file>DialLibrary/needle.png</file>
- <file>DialLibrary/Dial.qml</file>
- <file>dial.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/declarative/dial/main.cpp b/examples/declarative/dial/main.cpp
deleted file mode 100644
index 6b0633d..0000000
--- a/examples/declarative/dial/main.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <QApplication>
-#include <QUrl>
-#include <qmlview.h>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QmlView *canvas = new QmlView;
- canvas->setUrl(QUrl("qrc:/dial.qml"));
- canvas->execute();
- canvas->resize(210,240);
- canvas->show();
-
- return app.exec();
-}
-
-
diff --git a/examples/declarative/effects/test.qml b/examples/declarative/effects/effects.qml
index 73c6839..851b2fe 100644
--- a/examples/declarative/effects/test.qml
+++ b/examples/declarative/effects/effects.qml
@@ -7,13 +7,13 @@ Rectangle {
Image {
id: blur
- source: "pic.jpg"
+ source: "pic.png"
effect: Blur {
blurRadius: NumberAnimation {
id: blurEffect
from: 0; to: 10
- duration: 200
+ duration: 1000
repeat: true
}
}
@@ -25,7 +25,7 @@ Rectangle {
Image {
id: grayscale
- source: "pic.jpg"
+ source: "pic.png"
x: 200
effect: Grayscale {}
@@ -35,7 +35,7 @@ Rectangle {
Image {
id: colorize
- source: "pic.jpg"
+ source: "pic.png"
x: 400
effect: Colorize { color: "blue" }
@@ -45,14 +45,14 @@ Rectangle {
Image {
id: pixelize
- source: "pic.jpg"
+ source: "pic.png"
y: 300
effect: Pixelize {
pixelSize: NumberAnimation {
id: pixelizeEffect
from: 0; to: 10
- duration: 200
+ duration: 1000
repeat: true
}
}
@@ -64,14 +64,14 @@ Rectangle {
Image {
id: dropShadow
- source: "pic.jpg"
+ source: "pic.png"
x: 200
y: 300
effect: DropShadow {
blurRadius: 3
offset.x: 3
- offset.y: NumberAnimation { id: dropShadowEffect; from: 0; to: 10; duration: 200; repeat: true; }
+ offset.y: NumberAnimation { id: dropShadowEffect; from: 0; to: 10; duration: 1000; repeat: true; }
}
MouseRegion { anchors.fill: parent; onClicked: dropShadowEffect.running = !dropShadowEffect.running }
@@ -81,7 +81,7 @@ Rectangle {
Image {
id: bloom
- source: "pic.jpg"
+ source: "pic.png"
x: 400
y: 300
@@ -91,7 +91,7 @@ Rectangle {
strength: NumberAnimation {
id: bloomEffect
from: 0; to: 1
- duration: 200
+ duration: 1000
repeat: true
}
}
diff --git a/examples/declarative/effects/pic.jpg b/examples/declarative/effects/pic.jpg
deleted file mode 100644
index 5775518..0000000
--- a/examples/declarative/effects/pic.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/effects/pic.png b/examples/declarative/effects/pic.png
new file mode 100644
index 0000000..051e738
--- /dev/null
+++ b/examples/declarative/effects/pic.png
Binary files differ
diff --git a/examples/declarative/parallax/parallax.qml b/examples/declarative/parallax/parallax.qml
index 52bd210..6193f27 100644
--- a/examples/declarative/parallax/parallax.qml
+++ b/examples/declarative/parallax/parallax.qml
@@ -1,11 +1,11 @@
import Qt 4.6
-import "../clock"
+import "../clocks/content"
+import "qml"
Rectangle {
id: root
- width: 320
- height: 480
+ width: 320; height: 480
ParallaxView {
id: parallax
@@ -14,38 +14,24 @@ Rectangle {
Item {
property url icon: "pics/yast-wol.png"
- width: 320
- height: 480
-
- Clock {
- anchors.centerIn: parent
- }
+ width: 320; height: 480
+ Clock { anchors.centerIn: parent }
}
Item {
property url icon: "pics/home-page.svg"
-
- width: 320
- height: 480
-
- Smiley {}
+ width: 320; height: 480
+ Smiley { }
}
Item {
property url icon: "pics/yast-joystick.png"
-
- width: 320
- height: 480
+ width: 320; height: 480
Loader {
- anchors.top: parent.top
- anchors.topMargin: 10
- anchors.horizontalCenter: parent.horizontalCenter
-
+ anchors { top: parent.top; topMargin: 10; horizontalCenter: parent.horizontalCenter }
width: 300; height: 400
- clip: true
- resizeMode: Loader.SizeItemToLoader
-
+ clip: true; resizeMode: Loader.SizeItemToLoader
source: "../../../demos/declarative/samegame/samegame.qml"
}
}
diff --git a/examples/declarative/parallax/ParallaxView.qml b/examples/declarative/parallax/qml/ParallaxView.qml
index 50ab72c..ac84b47 100644
--- a/examples/declarative/parallax/ParallaxView.qml
+++ b/examples/declarative/parallax/qml/ParallaxView.qml
@@ -37,6 +37,11 @@ Item {
ListView {
id: selector
+ Rectangle {
+ color: "#60FFFFFF"
+ x: -10; y: -10; radius: 10; z: -1
+ width: parent.width + 20; height: parent.height + 20
+ }
currentIndex: root.currentIndex
onCurrentIndexChanged: root.currentIndex = currentIndex
@@ -80,12 +85,5 @@ Item {
}
}
model: visualModel.children
-
- Rectangle {
- color: "#40FFFFFF"
- x: -10;
- y: -10;
- width: parent.width + 20; height: parent.height + 10
- }
}
}
diff --git a/examples/declarative/parallax/Smiley.qml b/examples/declarative/parallax/qml/Smiley.qml
index db87412..e8917f6 100644
--- a/examples/declarative/parallax/Smiley.qml
+++ b/examples/declarative/parallax/qml/Smiley.qml
@@ -7,7 +7,7 @@ Item {
// The shadow for the smiley face
Image {
anchors.horizontalCenter: parent.horizontalCenter
- source: "pics/shadow.png"; y: smiley.minHeight + 58
+ source: "../pics/shadow.png"; y: smiley.minHeight + 58
transformOrigin: Item.Center
// The scale property depends on the y position of the smiley face.
@@ -20,7 +20,7 @@ Item {
property int minHeight: 2 * window.height / 3
anchors.horizontalCenter: parent.horizontalCenter
- source: "pics/face-smile.png"; y: minHeight
+ source: "../pics/face-smile.png"; y: minHeight
// Animate the y property. Setting repeat to true makes the
// animation repeat indefinitely, otherwise it would only run once.