Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1071

Gallery QML DocumentGalleryModel sort order not supported

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • Not Evaluated
    • None
    • 1.1.x
    • Document Gallery
    • fecbb8e6644f1d956e8e7426a4262fb2614f68bb

    Description

      DocumentGalleryModel does not have any support for sort order (ASC/DESC). Now it seems to be always ASC.

      There should be possibility to set sort order by sortProperty as it is quite common case that pictures are primary sorted by DESC dateTaken/lastModified and secondary sorted by fileName/title.

      One possible way to add sort order support for DocumentGalleryModel:

      DocumentGalleryModel {
                  id:photoModel
                  rootType: DocumentGallery.Image
                  properties: [ "url",
                      "title",
                      "lastModified",
                      "dateTaken"]
                  sortProperties: ["dateTaken", "lastModified", "title"]
                  sortPropertiesOrders: ["DESC", "DESC", "ASC"]
              }    
      

      Another possible way to add sort order support for DocumentGalleryModel:

      DocumentGalleryModel {
                  id:photoModel
                  rootType: DocumentGallery.Image
                  properties: [ "url",
                      "title",
                      "lastModified",
                      "dateTaken"]
                  sortProperties: ["dateTaken (DESC)", "lastModified (DESC)", "title (ASC)"]
              }   
      

      Attachments

        Activity

          People

            xizzhu Xizhi Zhu (Steven)
            tliljend Teemu Liljendahl
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: