Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Document Gallery

Namespace

The QtMobility APIs are placed into the QtMobility namespace. This is done to facilitate the future migration of Mobility APIs into Qt. See the Quickstart guide for an example on how the namespace impacts on application development.

Overview

The Document Gallery provides an API for navigating and querying documents using their meta-data. The common use case would be populating the media selection views of a music player, or image viewer. It also provides API's for querying and editing the meta-data of individual documents.

Typically all files in user directories should be available in the document gallery. The principal types are Audio, Video, Image, and (Office) Document, but files can also be categorized as a File, Folder, Text, or Playlist. There are also some meta-types composed from the meta-data of files, these are Artist, Album, AudioGenre, and PhotoAlbum.

The document gallery API is composed of a set of asynchronous request (QGalleryAbstractRequest) classes which talk to the system file indexing service, this would be tracker on Maemo platforms, the meta-data system (MDS) on Symbian and potentially Windows Search, or Spotlight on macs. There are three requests; QGalleryQueryRequest takes a type, a parent item, and some filtering criteria (QGalleryFilter) and returns meta-data for all matching items. QGalleryItemRequest takes an item ID and returns meta-data for just that item. And QGalleryTypeRequest takes an item type and returns meta-data describing that type.

The requests operate on implementations of the QAbstractGallery. The default implementation is QDocumentGallery, but it's possible to create alternative implementations which talk to a media server or web services.

The primary interface to the results of a request is the QGalleryResultSet class which provides accessors for reading and writing the meta-data of a set of items.

A QGalleryResultSet cannot be created directly and may not need to be accessed directly, instead an instance must be requested from a gallery using one of the gallery request classes which typically also provide convenience functions for accessing the items in a result set.

Requests

The gallery request classes inherit from QGalleryAbstractRequest and are used to fetch items from a gallery, or to initiate service provided by a gallery.

QGalleryAbstractRequest

Base class for gallery requests

QGalleryItemRequest

Request for the properties of a single item from a gallery

QGalleryQueryRequest

Request for a set of items from a gallery

QGalleryTypeRequest

Interface for requesting the properties of a type from a gallery

Filters

The filter classes provide a way to describe meta-data criteria items must satisfy to be included in the results of some requests.

QGalleryFilter

Filtering criteria for gallery requests

QGalleryIntersectionFilter

Filter which matches the intersection of two or more meta-data filters

QGalleryMetaDataFilter

Filter which accepts items with meta-data properties matching a specific value

QGalleryUnionFilter

Filter which matches the union of two or more meta-data filters

Galleries

The gallery classes provide instances of different gallery types. Currently the only gallery type is the Document Gallery.

QAbstractGallery

Base class for gallery implementations

QDocumentGallery

Access to a gallery of documents and media present on a device

QGalleryQueryModel

The QGalleryQueryModel class implements a QAbstractItemModel using QGalleryQueryRequest. This is a convenience class which simplifies the process of presenting gallery items in a list view.

QML Elements

QML elements providing access to the document gallery are implemented in the Gallery QML Plugin.

QML DocumentGalleryItem Element

The DocumentGalleryItem element allows you to request information about a single item from the document gallery

QML DocumentGalleryModel Element

The DocumentGalleryModel element is used to specify a model containing items from the document gallery.

QML DocumentGalleryType Element

The DocumentGalleryType element allows you to request information about an item type from the document gallery.

QML GalleryContainsFilter Element

The GalleryContainsFilter element provides a filter which tests if a meta-data property contains a string.

QML GalleryEndsWithFilter Element

The GalleryEndsWithFilter element provides a filter which tests if a meta-data property ends with a string.

QML GalleryEqualsFilter Element

The GalleryEqualsFilter element provides a filter which tests if a meta-data property is equal to a value.

QML GalleryFilterIntersection Element

The GalleryFilterIntersection elements provides a intersection of gallery filters.

QML GalleryFilterUnion Element

The GalleryFilterUnion elements provides a union of gallery filters.

QML GalleryGreaterThanEqualsFilter Element

The GalleryGreaterThanEqualsFilter element provides a filter which tests if a meta-data property is greater than or equal to a value.

QML GalleryGreaterThanFilter Element

The GalleryGreaterThanFilter element provides a filter which tests if a meta-data property is greater than a value.

QML GalleryLessThanEqualsFilter Element

The GalleryLessThanEqualsFilter element provides a filter which tests if a meta-data property is less than or equal to a value.

QML GalleryLessThanFilter Element

The GalleryLessThanEqualsFilter element provides a filter which tests if a meta-data property is less than a value.

QML GalleryStartsWithFilter Element

The GalleryStartsWithFilter element provides a filter which tests if a meta-data property starts with a string.

QML GalleryWildcardFilter Element

The GalleryWildcardFilter element provides a filter which tests a meta-data property against a value using wildcard matching.

Examples

Document Properties

Media Browser

Music Browser

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.

[0]; s.parentNode.insertBefore(ga, s); })();
Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 42
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. 2017 : un quinquennat pour une nouvelle version du C++ ? Possible, selon Herb Sutter 7
Page suivante

Le blog Digia au hasard

Logo

Créer des applications avec un style Metro avec Qt, exemples en QML et C++, un article de Digia Qt traduit par Thibaut Cuvelier

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.1
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web