Skip to content
guillaume charbonnier edited this page Mar 9, 2019 · 6 revisions

Flick'r

😅 (difficulty) ⌛ (time-Box) 🔗 (related to)
2️⃣ / 5️⃣ 30 - 60 mn Multimedia

Use the (public flick'r feed)[https://www.flickr.com/services/feeds/docs/photos_public/] to display pictures...

✔️ primary objectives

:suspect: Piece of cake

  • Display an image knowing its url

:rage1: Easy

:rage3: Normal

  • Create a model to retrieve images provided with flick'r service based on a criteria and display the provided image
  • Add a textfield to define the requested tags
  • Add a combobox to select the langage feed
  • display meta data (publication date, credits,..)
  • clicking on an image enlarge it with a nice animation

👶 Newbies area

Warning : Spoilers !!!
QML types Module Useful for...
XmlListModel QtQuick.XmlListModel A model specialized for xml source

ℹ️ useful information and hints

  • XmlListModel is very handy when it comes to get rss data : simply set the url to its source property and defined the model role you would like to have as xpath.
XmlListModel operating with flick'r (if you really don't want to bother)

'''qml

 XmlListModel{
   id:flickerModel
   source: "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tags=" + searchTag.text
   onStatusChanged: {
       if (status ==  XmlListModel.Error)
           console.log(errorString())
   }

   query: "/rss/channel/item"
   namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"
   XmlRole { name:"title"; query: "title/string()"}
   XmlRole { name:"url"; query: "media:thumbnail/@url/string()"}
}

'''

  • One can also use XMLHttpRequest (javascript object) to get data and for instance parse its result in json

⚠️ cautions and warnings

N/A

secondary objectives (only for the braves 🏆 )

:rage4: very difficult

  • download image as full resolution but show a low res image until the full res image is not loaded

:goberserk: Nightmare

  • upload a picture

:godmode: God mode

Clone this wiki locally