QtMobility Reference Documentation

QDocumentGallery Class Reference

The QDocumentGallery class provides access to a gallery of documents and media present on a device. More...

 #include <QDocumentGallery>

Inherits: QAbstractGallery.

This class was introduced in Qt Mobility 1.1.

Public Types

enum Error { NoError, NoGallery, NotSupported, ConnectionError, ..., FilterError }

Public Functions

QDocumentGallery ( QObject * parent = 0 )
~QDocumentGallery ()
QStringList itemTypePropertyNames ( const QString & itemType ) const
QGalleryProperty::Attributes propertyAttributes ( const QString & propertyName, const QString & itemType ) const

Reimplemented Public Functions

virtual bool isRequestSupported ( QGalleryAbstractRequest::RequestType type ) const

Static Public Members

const QGalleryType Album
const QGalleryType AlbumArtist
const QGalleryType Artist
const QGalleryType Audio
const QGalleryType AudioGenre
const QGalleryType Document
const QGalleryType File
const QGalleryType Folder
const QGalleryType Image
const QGalleryType PhotoAlbum
const QGalleryType Playlist
const QGalleryType Text
const QGalleryType Video
const QGalleryProperty albumArtist
const QGalleryProperty albumTitle
const QGalleryProperty artist
const QGalleryProperty audioBitRate
const QGalleryProperty audioCodec
const QGalleryProperty author
const QGalleryProperty cameraManufacturer
const QGalleryProperty cameraModel
const QGalleryProperty channelCount
const QGalleryProperty comments
const QGalleryProperty composer
const QGalleryProperty copyright
const QGalleryProperty count
const QGalleryProperty created
const QGalleryProperty dateTaken
const QGalleryProperty description
const QGalleryProperty director
const QGalleryProperty discNumber
const QGalleryProperty duration
const QGalleryProperty exposureProgram
const QGalleryProperty exposureTime
const QGalleryProperty fNumber
const QGalleryProperty fileExtension
const QGalleryProperty fileName
const QGalleryProperty filePath
const QGalleryProperty fileSize
const QGalleryProperty flashEnabled
const QGalleryProperty focalLength
const QGalleryProperty frameRate
const QGalleryProperty genre
const QGalleryProperty height
const QGalleryProperty keywords
const QGalleryProperty language
const QGalleryProperty lastAccessed
const QGalleryProperty lastModified
const QGalleryProperty lastPlayed
const QGalleryProperty lyrics
const QGalleryProperty meteringMode
const QGalleryProperty mimeType
const QGalleryProperty orientation
const QGalleryProperty pageCount
const QGalleryProperty path
const QGalleryProperty performer
const QGalleryProperty playCount
const QGalleryProperty producer
const QGalleryProperty rating
const QGalleryProperty resumePosition
const QGalleryProperty sampleRate
const QGalleryProperty subject
const QGalleryProperty title
const QGalleryProperty trackCount
const QGalleryProperty trackNumber
const QGalleryProperty url
const QGalleryProperty videoBitRate
const QGalleryProperty videoCodec
const QGalleryProperty whiteBalance
const QGalleryProperty width
const QGalleryProperty wordCount
  • 4 static public members inherited from QObject

Reimplemented Protected Functions

virtual QGalleryAbstractResponse * createResponse ( QGalleryAbstractRequest * request )

Additional Inherited Members

Detailed Description

The QDocumentGallery class provides access to a gallery of documents and media present on a device.

Requests

Requests are the interface through which queries and actions are executed against a QDocumentGallery.

  • QGalleryQueryRequest can be used with QDocumentGallery to find and navigate items present on a device.
  • QGalleryItemRequest provides an API to query information about a single item in a QDocumentGallery.
  • QGalleryTypeRequest provides a query for information about an item type supported by QDocumentGallery.

Item types

The items present in a QDocumentGallery can be of both file type such as documents and media, or categorical type such as genres or albums.

File types

Currently on Symbian, Folder, Document, Text, and Playlist are not supported.

Categorical types

Properties

The item meta-data stored in a QDocumentGallery is addressed through properties.

The set of properties addressable differs between item type but some properties are shared by most types.

Common item properties

Currently on Maemo, only the title property is available for the categorical types.

For Maemo 5, comments is only supported for Document. The property of description is not supported by Document, Video, and Playlist. Also, rating is not supported for Document.

On Symbian, for file types, keywords and subject are not supported, and language is only supported for Video; for categorical types, only title is supported, and url is only supported for PhotoAlbum.

Common type properties

Member Type Documentation

enum QDocumentGallery::Error

This enum defines errors in a Gallery.

ConstantValueDescription
QDocumentGallery::NoErrorQGalleryAbstractRequest::NoErrorNo error.
QDocumentGallery::NoGalleryQGalleryAbstractRequest::NoGalleryNo Gallery defined or found.
QDocumentGallery::NotSupportedQGalleryAbstractRequest::NotSupportedGallery is not supported.
QDocumentGallery::ConnectionErrorQGalleryAbstractRequest::GalleryErrorConnection to gallery is broken.
QDocumentGallery::ItemIdError?Id of a item is wrong.
QDocumentGallery::ItemTypeError?Type of an item is wrong.
QDocumentGallery::FilterError?Error in filter found.

Member Function Documentation

QDocumentGallery::QDocumentGallery ( QObject * parent = 0 )

Constructs a new document gallery.

The parent is passed to QAbstractGallery.

QDocumentGallery::~QDocumentGallery ()

Destroys a document gallery.

QGalleryAbstractResponse * QDocumentGallery::createResponse ( QGalleryAbstractRequest * request ) [virtual protected]

Reimplemented from QAbstractGallery::createResponse().

This function was introduced in Qt Mobility 1.1.

bool QDocumentGallery::isRequestSupported ( QGalleryAbstractRequest::RequestType type ) const [virtual]

Reimplemented from QAbstractGallery::isRequestSupported().

This function was introduced in Qt Mobility 1.1.

QStringList QDocumentGallery::itemTypePropertyNames ( const QString & itemType ) const

Returns a list of names of properties that are valid for an itemType.

This function was introduced in Qt Mobility 1.1.

QGalleryProperty::Attributes QDocumentGallery::propertyAttributes ( const QString & propertyName, const QString & itemType ) const

Returns the attributes of a property of itemType identified by propertyName

This function was introduced in Qt Mobility 1.1.

Member Variable Documentation

const QGalleryType QDocumentGallery::Album

This type matches all albums in the document gallery.

Properties typically available from albums include:

Note that only albumTitle is supported on Symbian.

const QGalleryType QDocumentGallery::AlbumArtist

This type matches all album artists in the document gallery.

Properties typically available from album artists include:

Note that only albumArtist and artist are supported on Symbian.

const QGalleryType QDocumentGallery::Artist

This type matches all artists in the document gallery.

Properties typically available from artists include:

Note that only artist is supported on Symbian.

const QGalleryType QDocumentGallery::Audio

This type matches all audio files in the document gallery.

In addition to the properties derived from the File type audio files may also provide:

const QGalleryType QDocumentGallery::AudioGenre

This type matches all audio genres in the document gallery.

Properties typically available from genres include:

Note that only genre is supported on Symbian.

const QGalleryType QDocumentGallery::Document

This type matches all document files in the document gallery.

In addition to the properties derived from the File type documents may also provide:

const QGalleryType QDocumentGallery::File

This type matches all files in the document gallery.

Properties typically available from files include:

const QGalleryType QDocumentGallery::Folder

This type matches all file-system folders in the document gallery.

In addition to the properties derived from the File type folders may also provide:

const QGalleryType QDocumentGallery::Image

This type matches all image files in the document gallery.

In addition to the properties derived from the File type image files may also provide:

const QGalleryType QDocumentGallery::PhotoAlbum

This type matches all photo albums in the document gallery.

const QGalleryType QDocumentGallery::Playlist

This type matches all playlist files in the document gallery.

In addition to the properties derived from the File type playlist files may also provide:

const QGalleryType QDocumentGallery::Text

This type matches all plain text files, e.g. HTML files, in the document gallery.

In addition to the properties derived from the File type text files may also provide:

const QGalleryType QDocumentGallery::Video

This type matches all video files in the document gallery.

In addition to the properties derived from the File type video files may also provide:

const QGalleryProperty QDocumentGallery::albumArtist

This property contains the name of the title artist of a music album.

const QGalleryProperty QDocumentGallery::albumTitle

This property contains the title of the album a music track belongs to.

const QGalleryProperty QDocumentGallery::artist

This property contains the names of artists contributing to a music track.

const QGalleryProperty QDocumentGallery::audioBitRate

This property contains the bit rate of the audio in a media file.

Note that this property for Video is not supported on Symbian and Maemo 5.

const QGalleryProperty QDocumentGallery::audioCodec

This property contains the name of the codec used to encode audio in a media file.

Note that this property for Video is not supported on Symbian and Maemo 5.

const QGalleryProperty QDocumentGallery::author

This property contains the name of the author of an item in the document gallery.

const QGalleryProperty QDocumentGallery::cameraManufacturer

This property contains the manufacturer name of the camera used to take a photo.

const QGalleryProperty QDocumentGallery::cameraModel

This property contains the model name of the camera used to take a photo.

const QGalleryProperty QDocumentGallery::channelCount

This property contains the number of audio channels in a media file.

Note that this property is not supported on Symbian.

This property for Video is not supported on Maemo 5.

const QGalleryProperty QDocumentGallery::comments

This property contains a user comment about an item in the document gallery.

const QGalleryProperty QDocumentGallery::composer

This property contains the name of the composer of a music track.

This property is not supported on Maemo 5.

const QGalleryProperty QDocumentGallery::copyright

This property contains a copyright statement for an item in the document gallery.

const QGalleryProperty QDocumentGallery::count

This property contains the number of items within the scope of a parent item or an item type.

const QGalleryProperty QDocumentGallery::created

This property contains the date and time a document was created.

This property is not supported on Maemo 5.

const QGalleryProperty QDocumentGallery::dateTaken

This property contains the date and time a photo was taken.

const QGalleryProperty QDocumentGallery::description

This property contains a description of an item in the document gallery.

const QGalleryProperty QDocumentGallery::director

This property contains the name of the director of a video.

Note that this property is not supported on Symbian and Maemo 5.

const QGalleryProperty QDocumentGallery::discNumber

This property contains the disc number of an album in a set.

Note that this property is not supported on Symbian.

const QGalleryProperty QDocumentGallery::duration

This property contains the duration of an audio or video file.

const QGalleryProperty QDocumentGallery::exposureProgram

This property contains the name of the exposure program used when taking a photo.

Note that this property is not supported on Maemo.

const QGalleryProperty QDocumentGallery::exposureTime

This property contains the exposure time of a photo in seconds.

const QGalleryProperty QDocumentGallery::fNumber

This property contains the F-number of a photo.

const QGalleryProperty QDocumentGallery::fileExtension

This property contains the file extension of a file.

Note that this property is not supported on Symbian and Maemo 5.

const QGalleryProperty QDocumentGallery::fileName

This property contains the file name excluding the path of a file in the document gallery.

const QGalleryProperty QDocumentGallery::filePath

This property contains the absolute path including the file name of a file in the document gallery.

const QGalleryProperty QDocumentGallery::fileSize

This property contains the size in bytes of a file.

const QGalleryProperty QDocumentGallery::flashEnabled

This property contains whether a flash was used when taking a photo.

const QGalleryProperty QDocumentGallery::focalLength

This property contains the focal length used when taking a photo.

const QGalleryProperty QDocumentGallery::frameRate

This property contains the frame rate of a video.

const QGalleryProperty QDocumentGallery::genre

This property contains the genre of a media file.

const QGalleryProperty QDocumentGallery::height

This property contains the height in pixels of an image or video file.

const QGalleryProperty QDocumentGallery::keywords

This property contains keywords relevant to an item in the document gallery.

const QGalleryProperty QDocumentGallery::language

This property contains the language of the content of an item in the document gallery.

const QGalleryProperty QDocumentGallery::lastAccessed

This property contains the date and time a file was last accessed.

Note that this property is not supported on Symbian.

const QGalleryProperty QDocumentGallery::lastModified

This property contains the date and time a file was last modified.

const QGalleryProperty QDocumentGallery::lastPlayed

This property contains the date and time an audio or video file was last played.

Note that this property is not supported on Symbian.

This property for Video is not supported on Maemo 5.

const QGalleryProperty QDocumentGallery::lyrics

This property contains the lyrics to a music track.

Note that this property is not supported on Symbian.

const QGalleryProperty QDocumentGallery::meteringMode

This property contains the metering mode used when taking a photo.

const QGalleryProperty QDocumentGallery::mimeType

This property contains the MIME type of a file.

const QGalleryProperty QDocumentGallery::orientation

This property contains the orientation of an image.

const QGalleryProperty QDocumentGallery::pageCount

This property contains the number of pages in a document.

const QGalleryProperty QDocumentGallery::path

This property contains the absolute path excluding the file name of a file in the document gallery.

const QGalleryProperty QDocumentGallery::performer

This property contains the names of performers in a media file.

Note that this property for Video is not supported on Maemo 5.

const QGalleryProperty QDocumentGallery::playCount

This property contains the number of times an audio or video file has been played.

const QGalleryProperty QDocumentGallery::producer

This property contains the name of the producer of a media file.

Note that this property for Audio is not supported on Maemo, for Video is not supported on Maemo 5.

This property is not supported on Symbian for neither Audio nor Video.

const QGalleryProperty QDocumentGallery::rating

This property contains a rating for an item in the document gallery.

const QGalleryProperty QDocumentGallery::resumePosition

This property contains the position in a video where playback was interrupted.

const QGalleryProperty QDocumentGallery::sampleRate

This property contains the sample rate of the audio in a media file.

Note that this property for Video is not supported on Symbian and Maemo 5.

const QGalleryProperty QDocumentGallery::subject

This property contains the subject of item in the document gallery.

const QGalleryProperty QDocumentGallery::title

This property contains the title of an item in the document gallery.

const QGalleryProperty QDocumentGallery::trackCount

This property contains the number of music tracks in an album.

const QGalleryProperty QDocumentGallery::trackNumber

This property contains the track number of a music track in an album.

const QGalleryProperty QDocumentGallery::url

This property contains canonical url of an item in the document gallery.

const QGalleryProperty QDocumentGallery::videoBitRate

This property contains the bit rate of the video in a media file.

const QGalleryProperty QDocumentGallery::videoCodec

This property contains the codec used to encode the video in a media file.

Note that this property is not supported on Symbian.

const QGalleryProperty QDocumentGallery::whiteBalance

This property contains the white balance setting used when taking a photo.

const QGalleryProperty QDocumentGallery::width

This property contains the width in pixels of an image or video file.

const QGalleryProperty QDocumentGallery::wordCount

This property contains the number of words in document.

This property for Text is not supported on Maemo 5.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.