diff options
Diffstat (limited to 'demos/declarative/flickr')
19 files changed, 25 insertions, 101 deletions
diff --git a/demos/declarative/flickr/common/LikeOMeter.qml b/demos/declarative/flickr/common/LikeOMeter.qml deleted file mode 100644 index 17e3998..0000000 --- a/demos/declarative/flickr/common/LikeOMeter.qml +++ /dev/null @@ -1,35 +0,0 @@ -import Qt 4.7 - -Item { - id: container - - property int rating: 2 - - Row { - Star { - rating: 0 - onClicked: { container.rating = rating } - on: container.rating >= 0 - } - Star { - rating: 1 - onClicked: { container.rating = rating } - on: container.rating >= 1 - } - Star { - rating: 2 - onClicked: { container.rating = rating } - on: container.rating >= 2 - } - Star { - rating: 3 - onClicked: { container.rating = rating } - on: container.rating >= 3 - } - Star { - rating: 4 - onClicked: { container.rating = rating } - on: container.rating >= 4 - } - } -} diff --git a/demos/declarative/flickr/common/Loading.qml b/demos/declarative/flickr/common/Loading.qml deleted file mode 100644 index 8daed48..0000000 --- a/demos/declarative/flickr/common/Loading.qml +++ /dev/null @@ -1,8 +0,0 @@ -import Qt 4.7 - -Image { - id: loading; source: "pics/loading.png" - NumberAnimation on rotation { - from: 0; to: 360; running: loading.visible == true; loops: Animation.Infinite; duration: 900 - } -} diff --git a/demos/declarative/flickr/common/RssModel.qml b/demos/declarative/flickr/common/RssModel.qml index d0960db..415a9e9 100644 --- a/demos/declarative/flickr/common/RssModel.qml +++ b/demos/declarative/flickr/common/RssModel.qml @@ -3,7 +3,12 @@ import Qt 4.7 XmlListModel { property string tags : "" - source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2" + function commasep(x) + { + return x.replace(' ',','); + } + + source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+commasep(tags)+"&" : "")+"format=rss2" query: "/rss/channel/item" namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";" diff --git a/demos/declarative/flickr/common/Star.qml b/demos/declarative/flickr/common/Star.qml deleted file mode 100644 index fcca742..0000000 --- a/demos/declarative/flickr/common/Star.qml +++ /dev/null @@ -1,45 +0,0 @@ -import Qt 4.7 - -Item { - id: container - width: 24 - height: 24 - - property int rating - property bool on - signal clicked - - Image { - id: starImage - source: "pics/ghns_star.png" - x: 6 - y: 7 - opacity: 0.4 - scale: 0.5 - } - MouseArea { - anchors.fill: container - onClicked: { container.clicked() } - } - states: [ - State { - name: "on" - when: container.on == true - PropertyChanges { - target: starImage - opacity: 1 - scale: 1 - x: 1 - y: 0 - } - } - ] - transitions: [ - Transition { - NumberAnimation { - properties: "opacity,scale,x,y" - easing.type: "OutBounce" - } - } - ] -} diff --git a/demos/declarative/flickr/common/pics/background.png b/demos/declarative/flickr/common/pics/background.png Binary files differdeleted file mode 100644 index 5b37072..0000000 --- a/demos/declarative/flickr/common/pics/background.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/button-pressed.png b/demos/declarative/flickr/common/pics/button-pressed.png Binary files differdeleted file mode 100644 index e434d32..0000000 --- a/demos/declarative/flickr/common/pics/button-pressed.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/button-pressed.sci b/demos/declarative/flickr/common/pics/button-pressed.sci deleted file mode 100644 index b8db272..0000000 --- a/demos/declarative/flickr/common/pics/button-pressed.sci +++ /dev/null @@ -1,5 +0,0 @@ -border.left: 8 -border.top: 4 -border.bottom: 4 -border.right: 8 -source: button.png diff --git a/demos/declarative/flickr/common/pics/button.png b/demos/declarative/flickr/common/pics/button.png Binary files differdeleted file mode 100644 index 56a63ce..0000000 --- a/demos/declarative/flickr/common/pics/button.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/button.sci b/demos/declarative/flickr/common/pics/button.sci deleted file mode 100644 index b8db272..0000000 --- a/demos/declarative/flickr/common/pics/button.sci +++ /dev/null @@ -1,5 +0,0 @@ -border.left: 8 -border.top: 4 -border.bottom: 4 -border.right: 8 -source: button.png diff --git a/demos/declarative/flickr/common/pics/ghns_star.png b/demos/declarative/flickr/common/pics/ghns_star.png Binary files differdeleted file mode 100644 index 4ad43cc..0000000 --- a/demos/declarative/flickr/common/pics/ghns_star.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/loading.png b/demos/declarative/flickr/common/pics/loading.png Binary files differdeleted file mode 100644 index 47a1589..0000000 --- a/demos/declarative/flickr/common/pics/loading.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/reflection.png b/demos/declarative/flickr/common/pics/reflection.png Binary files differdeleted file mode 100644 index c143a48..0000000 --- a/demos/declarative/flickr/common/pics/reflection.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/shadow-bottom.png b/demos/declarative/flickr/common/pics/shadow-bottom.png Binary files differdeleted file mode 100644 index 523f6e7..0000000 --- a/demos/declarative/flickr/common/pics/shadow-bottom.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/shadow-corner.png b/demos/declarative/flickr/common/pics/shadow-corner.png Binary files differdeleted file mode 100644 index ef8c856..0000000 --- a/demos/declarative/flickr/common/pics/shadow-corner.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/shadow-right-screen.png b/demos/declarative/flickr/common/pics/shadow-right-screen.png Binary files differdeleted file mode 100644 index 9856c4f..0000000 --- a/demos/declarative/flickr/common/pics/shadow-right-screen.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/shadow-right.png b/demos/declarative/flickr/common/pics/shadow-right.png Binary files differdeleted file mode 100644 index f534a35..0000000 --- a/demos/declarative/flickr/common/pics/shadow-right.png +++ /dev/null diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index aa550d2..8b73beb 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -13,7 +13,6 @@ Item { Image { source: "mobile/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 } Common.RssModel { id: rssModel } - Common.Loading { anchors.centerIn: parent; visible: rssModel.status == 2 } Item { id: views @@ -22,8 +21,9 @@ Item { Mobile.GridDelegate { id: gridDelegate } GridView { + x: (width/4-79)/2; y: x id: photoGridView; model: rssModel; delegate: gridDelegate; cacheBuffer: 100 - cellWidth: 79; cellHeight: 79; width: parent.width; height: parent.height - 1; z: 6 + cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height - 1; z: 6 } Mobile.ListDelegate { id: listDelegate } diff --git a/demos/declarative/flickr/flickr.qmlproject b/demos/declarative/flickr/flickr.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/flickr/flickr.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index 72b779f..71d9385 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -12,6 +12,7 @@ Item { width: (parent.width * 2) - 55 ; height: parent.height function accept() { + imageDetails.closed() titleBar.state = "" background.state = "" rssModel.tags = editor.text |