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

Gallery QML DocumentGalleryModel documentation is missing critical information

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • 1.2.0
    • 1.1.x
    • Document Gallery
    • None
    • ebdb9bea0ab6f1b3c06b6584643aa663cd00c01c

      Documentation of DocumentGalleryModel is lacking. Worst thing is that property "properties" explanation does not contain any information what are valid values and how it should behave if some of those values are wrong.

      Current explanation of "properties":

      properties : QStringList

      This property holds the item properties a query should return values for.

      This lack leads to that developers have to read QtMobility sources, find correct place and understand what some macros are doing.

      If some one is using QML DocumentGalleryModel element he would probably be happy about following list (values that can be used in properties list):

      // Common
      static const QGalleryProperty url;
      static const QGalleryProperty author;
      static const QGalleryProperty copyright;
      static const QGalleryProperty description;
      static const QGalleryProperty comments;
      static const QGalleryProperty rating;
      static const QGalleryProperty title;
      static const QGalleryProperty subject;
      static const QGalleryProperty keywords;
      static const QGalleryProperty language;

      // File
      static const QGalleryProperty path;
      static const QGalleryProperty filePath;
      static const QGalleryProperty fileName;
      static const QGalleryProperty fileExtension;
      static const QGalleryProperty fileSize;
      static const QGalleryProperty mimeType;
      static const QGalleryProperty lastModified;
      static const QGalleryProperty lastAccessed;

      // Document
      static const QGalleryProperty pageCount;
      static const QGalleryProperty wordCount;
      static const QGalleryProperty created;

      // Media
      static const QGalleryProperty duration;
      static const QGalleryProperty producer;
      static const QGalleryProperty lastPlayed;
      static const QGalleryProperty playCount;
      static const QGalleryProperty performer;

      // Audio
      static const QGalleryProperty audioCodec;
      static const QGalleryProperty audioBitRate;
      static const QGalleryProperty sampleRate;
      static const QGalleryProperty channelCount;

      // Music
      static const QGalleryProperty artist;
      static const QGalleryProperty albumArtist;
      static const QGalleryProperty albumTitle;
      static const QGalleryProperty composer;
      static const QGalleryProperty genre;
      static const QGalleryProperty lyrics;
      static const QGalleryProperty trackCount;
      static const QGalleryProperty trackNumber;
      static const QGalleryProperty discNumber;

      // Image, Video common.
      static const QGalleryProperty width;
      static const QGalleryProperty height;

      // Image
      static const QGalleryProperty orientation;

      // Photo
      static const QGalleryProperty dateTaken;
      static const QGalleryProperty cameraManufacturer;
      static const QGalleryProperty cameraModel;
      static const QGalleryProperty exposureProgram;
      static const QGalleryProperty exposureTime;
      static const QGalleryProperty fNumber;
      static const QGalleryProperty flashEnabled;
      static const QGalleryProperty focalLength;
      static const QGalleryProperty meteringMode;
      static const QGalleryProperty whiteBalance;

      // Video
      static const QGalleryProperty frameRate;
      static const QGalleryProperty videoCodec;
      static const QGalleryProperty videoBitRate;
      static const QGalleryProperty resumePosition;
      static const QGalleryProperty director;

      And example how to request nice set of information for images:

      model: DocumentGalleryModel

      { rootType: DocumentGallery.Image properties: [ "url", "lastAccessed", "lastModified", "dateTaken", "fileSize", "focalLength", "cameraManufacturer", "cameraModel", "exposureTime", "exposureProgram", "fNumber", "flashEnabled", "focalLength", "meteringMode", "whiteBalance", "path", "filePath", "fileName", "fileExtension", "mimeType" ] }

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes