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  · 

Gallery QML Plugin

Overview

The QML Gallery plugin contains features that can be used to search for and retrieve documents from the Document Gallery.

Search Filters

Searching is performed by creating a filter based on a derived gallery filter class. This results in a set of Gallery QML elements for filtering. The Search parameters can be set by specifying property values which refer to the meta-data of the documents. For example, a meta-data key might be "author". Then, for example, by setting the filter property to "author" and the value to "torvalds" the filter is ready to enable a search for all documents authored by "torvalds".

Available filters include

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.

There is nothing to prevent the developer creating a number of filters. Then she could use either a GalleryFilterUnion or a GalleryFilterIntersection to find the result of OR-ing or AND-ing the criteria respectively to create a more complex search requirement.

Gallery Item

DocumentGalleryItems are elements that are a means to request information about a single item from a gallery. The information may include monitoring the state of the request, reading the meta-data for the document or writing meta-data.

When a request is made the status property contains the current status of the request including whether it is active or canceled.

Progress of the request is available through the qreal (floating point number) item property progress.

Query Requests

The DocumentGalleryModel element is used to perform the requests on a document gallery. The following snippet of QML from the DocumentGalleryModel documentation is worth a closer look because it puts together several of the elements discussed in this overview.

 import QtMobility.gallery 1.1

     ...

     model: DocumentGalleryModel {
         rootType: DocumentGallery.Image
         properties: ["url"]
         filter: GalleryWildcardFilter {
             property: "fileName";
             value: "*.jpg";
         }
     }

     ...

Here we have a model using a DocumentGalleryQueryModel. Within Qt the term 'model' usually refers to the Model part of a variation on the Model-View-Controller design pattern. In essence it is a data-oriented part of the Gallery query object, what data types are part of this query. For a clearer understanding see the Qt documentation.

Classes

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.

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 80
  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. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  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 6
Page suivante

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