QuiaFlickrBigView.qml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import Qt 4.7
  2. Rectangle {
  3. id: flickrBigView
  4. width: 800
  5. height: 480
  6. color: "darkgrey"
  7. property string ownerId
  8. property string setId
  9. RssModel {
  10. id: flickrRssModel
  11. ownerId: ownerId
  12. setId: setId
  13. }
  14. GridView {
  15. id: gridPhotoView
  16. width: 800
  17. height: 480
  18. model: flickrRssModel
  19. cellWidth: 300
  20. cellHeight: 200
  21. delegate: GridDelegate {
  22. id: gridDelegate
  23. }
  24. /*Rectangle {
  25. width: parent.cellWidth
  26. height: parent.cellHeight
  27. color: "darkgrey"
  28. radius: 7
  29. Image {
  30. width: parent.width-10
  31. height: parent.height-10
  32. source: {
  33. return content.slice(content.indexOf(".static.flickr.com")-12, content.indexOf("_m.jpg")+6);
  34. }
  35. }
  36. }
  37. /*QuiaPhotoItem {
  38. thumbUrl: {
  39. return content.slice(content.indexOf(".static.flickr.com")-12, content.indexOf("_m.jpg")+6);
  40. }
  41. bigUrl: hq
  42. imageWidth: 200
  43. imageHeight: 180
  44. }*/
  45. }
  46. function reloadFlickrModel() {
  47. flickrRssModel.setId = setId;
  48. flickrRssModel.ownerId = ownerId;
  49. flickrRssModel.source = "http://api.flickr.com/services/feeds/photoset.gne?set="+setId+"&nsid="+ownerId;
  50. flickrRssModel.reload();
  51. }
  52. }