summaryrefslogtreecommitdiffstats
path: root/demos/declarative/flickr/common/RssModel.qml
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-08-25 04:01:28 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-08-25 04:01:28 (GMT)
commit0cde5e06acfe8895e563e195f4fc3b16a18db486 (patch)
treee5cde1b6469d9ee139c3562318837472ff02d072 /demos/declarative/flickr/common/RssModel.qml
parent128828d0fc00dd75f155bed1eaaea287a9de15f1 (diff)
downloadQt-0cde5e06acfe8895e563e195f4fc3b16a18db486.zip
Qt-0cde5e06acfe8895e563e195f4fc3b16a18db486.tar.gz
Qt-0cde5e06acfe8895e563e195f4fc3b16a18db486.tar.bz2
Forgot to commit RssModel.qml
Diffstat (limited to 'demos/declarative/flickr/common/RssModel.qml')
-rw-r--r--demos/declarative/flickr/common/RssModel.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/demos/declarative/flickr/common/RssModel.qml b/demos/declarative/flickr/common/RssModel.qml
new file mode 100644
index 0000000..ed9fd5c
--- /dev/null
+++ b/demos/declarative/flickr/common/RssModel.qml
@@ -0,0 +1,20 @@
+import Qt 4.6
+
+XmlListModel {
+ property string tags : ""
+
+ source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2"
+ query: "/rss/channel/item"
+ namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
+
+ XmlRole { name: "title"; query: "title/string()" }
+ XmlRole { name: "imagePath"; query: "media:thumbnail/@url/string()" }
+ XmlRole { name: "url"; query: "media:content/@url/string()" }
+ XmlRole { name: "description"; query: "description/string()" }
+ XmlRole { name: "tags"; query: "media:category/string()" }
+ XmlRole { name: "photoWidth"; query: "media:content/@width/string()" }
+ XmlRole { name: "photoHeight"; query: "media:content/@height/string()" }
+ XmlRole { name: "photoType"; query: "media:content/@type/string()" }
+ XmlRole { name: "photoAuthor"; query: "author/string()" }
+ XmlRole { name: "photoDate"; query: "pubDate/string()" }
+}