QContentSet Class Reference
|
Constant | Value | Description |
---|---|---|
QContentSet::LowPriority | 0 | use low priority |
QContentSet::NormalPriority | 1 | use normal priority |
QContentSet::HighPriority | 2 | use low priority - directory will be scanned before lower priority jobs. |
Indicates whether the contents of a content set should be updated synchronously or asynchronously.
Constant | Value | Description |
---|---|---|
QContentSet::Synchronous | 1 | Update the content set in the current thread of execution. |
QContentSet::Asynchronous | 0 | Update the content set in a background thread. |
Constructs a new unfiltered QContentSet with the specified parent.
The QContentSet can be populated with content from the backing store by specifying a filtering criteria with setCriteria() or addCriteria().
See also setCriteria(), addCriteria(), and setSortCriteria().
Constructs a new QContentSet with the specified parent containing all content from the backing store which matches the filtering criteria.
See also addCriteria() and setSortCriteria().
This function is deprecated.
Constructs a new QContentSet with the specified parent containing all content from the backing store which matches the filtering criteria and is sorted by sortOrder.
Note: The use of a QStringList to specify the sort order is deprecated, use a QContentSortCriteria instead.
See also addCriteria() and setSortOrder().
Constructs a new QContentSet with the specified parent containing all content from the backing store which matches the tag filtering criteria filter.
See also addCriteria() and setSortCriteria().
This function is deprecated.
Constructs a new QContentSet with the specified parent containing all content from the backing store which matches the tag filtering criteria filter and is sorted by sortOrder.
Example: Construct a QContentSet containing wave files sorted by most recently modified.
QContentSet contentSet( QContentFilter::MimeType, "audio/wav", "time desc" );
Note: The use of a QStringList to specify the sort order is deprecated, use a QContentSortCriteria instead.
See also addCriteria() and setSortOrder().
Constructs a new QContentSet with the specified parent, containing all content from original.
Constructs an unfiltered QContentSet with the specified parent and update mode.
The QContentSet can be populated with content from the backing store by specifying a filtering criteria with setCriteria() or addCriteria().
See also setCriteria(), addCriteria(), and setSortCriteria().
Constructs a QContentSet with the specified parent and update mode containing all content from the backing store which matches the filtering criteria.
See also addCriteria() and setSortCriteria().
Constructs a QContentSet with the specified parent and update mode containing all content from the backing store which matches the filtering criteria and is sorted by sort.
Example: Construct an asynchronous QContentSet containing wave files sorted by most recently modified.
QContentSet contentSet( QContentFilter::mimeType( "audio/wav" ) QContentSortCriteria( QContentSortCriteria::LastUpdated, Qt::DescendingOrder ) QContentSet::Asynchronous );
See also addCriteria().
Destroys the QContentSet.
This signal is emitted when this QContentSet is about to be sorted.
Adds content to an explicitly maintained internal list of content. Items in this list appear in the content set irregardless of whether they match the filtering criteria.
See also remove(), contains(), and clear().
Appends a kind filter matching the value filter to the existing filtering criteria using the given operand.
Example: Filter for documents with the mime type image/jpeg or image/png.
QContentSet contentSet; contentSet.addCriteria( QContentFilter::MimeType, "image/jpeg", QContentFilter::Or ); contentSet.addCriteria( QContentFilter::MimeType, "image/png", QContentFilter::Or ); contentSet.addCriteria( QContentFilter::Role", "Document", QContentFilter::And );
This is an overloaded member function, provided for convenience.
Appends filter to the existing filtering criteria using the given operand.
Example: Filter for documents with the mime type image/jpeg or image/png.
QContentSet contentSet( QContentFilter( QContent::Document ) ); contentSet.addCriteria( QContentFilter::mimeType( "image/jpeg" ) | QContentFilter::mimeType( "image/png" ), QContentFilter::And );
Appends the contents of other to this QContentSet. Currently it appends them as explicit items to the current QContentSet, in the future, it will concatenate the two filter sets to create a new aggregate filter set.
This signal is emitted when QContent included in the filter expression for this QContentSet are changed by another application, or by removable media being inserted or removed.
idList contains a list of the Ids of QContent items that have changed.
type specifies the type of change that is being signalled.
This is an overloaded member function, provided for convenience.
This signal is emitted when a large number of QContent objects included in the filter expression for this QContentSet are changed by another application or by removable media being inserted or removed.
Removes the filtering criteria, and all explicitly added content from the set.
This will remove all content from the set.
See also add(), remove(), contains(), setCriteria(), addCriteria(), and clearFilter().
Clears the content set's current filtering criteria. This will remove all filtered content from the set but leave content that was explicitly added.
See also filter() and addCriteria().
Returns true if the set contains the object content, that is:
See also add(), remove(), and clear().
Returns the QContent at index in a set.
This signal is emitted when content items are about to be inserted between the start and end indexes.
Content may be inserted into a set a result of the filtering criteria changing, a QContent being explicitly added to the set, a new QContent being created on the device, or attributes of a QContent changing so that it matches the filtering criteria.
See also contentInserted().
This signal is emitted when content items between the start and end indexes are about to be removed.
Content may be removed from a set as a result of the filtering criteria changing, a QContent being explicitly removed from the set, a QContent being deleted from the device, or attributes of a QContent changing so that it no longer matches the filtering criteria.
See also contentRemoved().
This signal is emitted when content items between the start and end indexes have changed.
Returns the ID of the QContent at index in a set.
This signal is emitted when the content insertion indicated by contentAboutToBeInserted() has been completed.
See also contentAboutToBeInserted().
This signal is emitted when the content removal indicated by contentAboutToBeRemoved() has been completed.
See also contentAboutToBeRemoved().
Return the number of QContent objects in this set.
This is an overloaded member function, provided for convenience.
Returns the number of QContents in the database that match a content filter.
Returns the current filtering criteria of the QContentSet.
Finds all documents in the system's document directories which match the filter mimefilter, and appends the resulting QContent objects to folder.
Find a QContent object for the executable exec in the current QContentSet. Returns an empty/invalid QContent if unsuccessful.
See also QContent::InvalidId.
Find a QContent object for the filename in the current QContentSet. Returns an empty/invalid QContent if unsuccessful.
Paths are not acceptable in filename, ie the filename must not contain any "/" characters.
Note that if more than one item with the filename exists in the QContentSet no guarantee is provided as to which one is returned.
This method is typically used with filters such that only one filename item exists in the filtered set.
See also QContent::InvalidId.
Returns true if this set is empty.
Return a QContentIdList of content IDs in this set.
This is a relatively expensive operation, and generally should not be used unless it is known that only a few items will be returned.
It is also a snapshot of the currently known items in the list, which has a possibility of going out of date immediately after it is obtained.
Instead of using this method consider iterating over the set directly instead.
for( int i = 0; i < contentSet.count(); i++ ) { QContentId contentId = contentSet.contentId( i ); ... }
See also QContentSetModel and items().
Return a QContentList of items in this set.
This is a relatively expensive operation, and generally should not be used unless it is known that only a few items will be returned.
It is also a snapshot of the currently known items in the list, which has a possibility of going out of date immediately after it is obtained.
Instead of using this method consider iterating over the set directly instead.
for( int i = 0; i < contentSet.count(); i++ ) { QContent content = contentSet.content( i ); ... }
See also QContentSetModel and itemIds().
Removes content from an explicitly maintained internal list of content. Items in this list appear in the content set irregardless of whether they match the filtering criteria.
See also add(), contains(), and clear().
Initiates a document scan of a path and its sub-directories looking for documents that have been added, removed, or modified to bring the backing store's view of the path up to date with the file system.
Scans are performed threaded in a server process, the scan priority sets the run priority of the scanner threads. A higher priority scan will finish sooner but may reduce the device responsiveness.
Sets the filtering criteria of a QContentSet to a kind filter matching the value filter.
This will replace any existing filtering criteria.
This is an overloaded member function, provided for convenience.
Sets the filtering criteria of a QContentSet to filter.
This will replace any existing filtering criteria.
Example: Filter for documents with the mime type image/jpeg or image/png.
QContentSet contentSet; contentSet.setCriteria( QContentFilter( QContent::Document ) & ( QContentFilter::mimeType( "image/jpeg" ) | QContentFilter::mimeType( "image/png" ) ) );
Sets the sort criteria used to order the set.
See also sortCriteria().
This function is deprecated.
Sets the attributes that content in this QContentSet is ordered by to sortOrder.
Valid sort attributes are:
To specify whether to sort in ascending or descending order append asc or desc preceded by a space to the end of the attribute name.
Example: Sorting a QContent by last modified date in descending order.
contentSet.setSortOrder( QStringList << "time desc" );
This method has been deprecated, use setSortCriteria() instead.
See also sortOrder() and setSortCriteria().
Returns the sort criteria used to order the set.
See also setSortCriteria().
This function is deprecated.
Returns the attributes the content in this QContentSet is ordered by.
This method has been deprecated, use sortCriteria() instead.
See also setSortOrder() and sortCriteria().
This signal is emitted when this QContentSet has been sorted.
Returns the list of mime-types contained in this set.
For applications, games and settings the type is application/x-executable.
For documents the type is the document's MIME type, or application/octet-stream if the file type is unknown.
Returns the update mode of the content set; either Synchronous or Asynchronous.
Assigns the given contentset to this QContentSet and returns a reference to this QContentSet.
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 qtextended4.4 | |
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 ! |
Copyright © 2000-2012 - www.developpez.com