| Home · All Classes · Annotated · Functions |
The QContentSet class represents a set of QContent objects. More...
#include <QContentSet>
Inherits QObject.
The QContentSet class represents a set of QContent objects.
When building GUI elements representing a collection of QContent objects perform the following:
As the model is automatically kept up-to-date, this is preferable to accessing a list of QContent.
The set is synchronized so that the data is as up-to-date as possible when new storage media (such as CF or SD cards) are inserted or removed, or when other applications change content files.
The mechanism for this synchronization is as follows:
This enum specifies the type of filter being used to filter the QContentSet down a useable set of QContent objects.
| Constant | Value | Description |
|---|---|---|
| QContentSet::Location | 0 | filter by a directory, and any directories contained below it. |
| QContentSet::QtopiaType | 1 | filter by UsageMode, Applications, Documents, etc |
| QContentSet::MimeType | 2 | filter by mime type, image/gif etc |
| QContentSet::Directory | 3 | filter by directory name (subdirectories not included) |
| QContentSet::Category | 4 | filter by category |
| QContentSet::DRM | 5 | filter by drm permissions |
| QContentSet::Synthetic | 6 | filter by synthetic attributes eg mtime, event |
| QContentSet::SortOrder | 7 | set a sort ordering (field per entry) (eg, name/type/file/size/time, append " desc" for descending sort) |
| QContentSet::Unknown | 100 | invalid filter type, probable error |
This enum specifies the priority to use when scanning a directory.
| 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. |
A searchable container of filters for a QContentSet
Create a new empty QContentSet with parent parent.
Create a new QContentSet with parent parent, containing all records from the backing store which pass all the filters listed in catFilters.
Create a new QContentSet with parent parent, containing all records from the backing store which pass the filtering criteria specified by tag and filter.
Create a new QContentSet with parent parent, containing all records from original.
Destroy the QContentSet object.
Explicitly add the QContent object content to this set but not to the backing store. QContentSet::contains() is called first and does not add if the object is already present.
If using this method and QContentSet::remove(), a filter expression is not used. This is useful for building up a set of Content objects to display or to perform bulk operations such as moving to a new location.
If a filter expression is used and the object added matches it, this method is effectively a null operation - although it will update the internal cache.
Adds a filtering criteria of FilterType kind and value filter to the current filter set.
This is an overloaded member function, provided for convenience.
Adds a group of filtering criteria filters to the current filter set.
Appends the contents of other to this QContentSet. Currently it appends them as explicit items to the current QContenSet, in the future, it will concatenate the two filter sets to create a new aggregate filter set.
This signal is emitted when QContent with Ids idList, included in the filter expression for this QContentSet are changed, for example, by another application.
type specifies the type of change QContent::ChangeType.
This is an overloaded member function, provided for convenience.
Emitted when a 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.
Remove all content from this set.
Clear the current filter expression on the set
Return the number of QContent objects in this set.
Returns a copy of the current filter for this QContentSet.
Find a QContent object for the executable exec in the current QContentSet. Returns an empty/invalid QContent if unsuccessful.
Store the meta information objects into the backing store, and create a file on the file system if the content type is appropriate.
Returns true if this set is empty; otherwise false.
Return a QContentIdList of content Ids in this set.
It is a snapshot of the currently known content in the list, which could go out of date immediately after it is obtained.
When considering using this method first examine the process of retrieving a pointer to the internal model and using an MVC solution.
See also QContentSet::items().
Return a QList<QContent> of items in this set. Note: 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 could go out of date immediately after it is obtained.
When considering using this method first examine the process of retrieving a pointer to the internal model and using an MVC solution.
Remove the QContent object cl from this set. Note: This does not remove the object from the backing store. This is useful for trimming down a set of Content objects to display to the user, or perform bulk operations on such as moving to a new location.
The method cannot remove an object that matches the filter expression, if one is set.
See also QContentSet::add().
Scan for added/removed content in path with priority priority. Directories will be scanned recusively in the background.
Sets a filtering criteria of FilterType kind and value filter to the current filter set.
This is an overloaded member function, provided for convenience.
Sets a group of filtering criteria filters to the current filter set.
Returns the list of types in the 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 unknown.
Remove the meta information objects in this set from the backing store, and remove any files from the file system if the content type is appropriate. In the case of DRM controlled files this will also remove any rights objects.
Assigns the given content to this QContent and returns a reference to this QContent.
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |