| Home · All Classes · Grouped 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:
Example:
QContentSet set(QContentFilter::Role, "Document");
QContentSetModel model(&set);
As the model is automatically kept up-to-date, this is preferable method of accessing a list of QContent objects
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 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. |
Constructs a new unfiltered QContentSet with the specified parent.
Constructs a new QContentSet with the specified parent, containing all records from the backing store which match the filters listed in catFilters.
Constructs a new QContentSet with the specified parent, containing all records from the backing store which match the filters listed in catFilters sorted by sortOrder.
Constructs a new QContentSet with the specified parent, containing all records from the backing store which match the filtering criteria specified by tag and filter.
Constructs a new QContentSet with the specified parent, containing all records from the backing store which match the filtering criteria specified by tag and filter and sorted by sortOrder.
Constructs a new QContentSet with the specified parent, containing all records from original.
Destroys the QContentSet.
This signal is emitted when this QContentSet is about to be sorted.
Explicitly add the QContent object content to this set but not to the backing store. contains() is called first to test if the content already exists in the set, and does not add it if it is already present.
If using this method and remove(), a filter expression is not used for these items. This is useful for building up a set of QContent objects to display or to perform bulk operations upon, 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.
See also remove(), contains(), and clear().
Joins a filtering criteria of filter type kind and value filter to the current filter set using the given operand.
This is an overloaded member function, provided for convenience.
Joins a group of filtering criteria filters to the current filter set using the given operand.
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 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.
Remove all filters and explicitly added QContent objects from this set.
See also add(), remove(), and contains().
Clears the current filter expression on the set
Return true if the set contains the object content, that is:
See also add(), remove(), and clear().
This signal is emitted when content items are about to be inserted between the start and end indexes.
This signal is emitted when content items between the start and end indexes are about to be removed.
This signal is emitted when content items between the start and end indexes have changed.
This signal is emitted when the content insertion indicated by contentAboutToBeInserted() has been completed.
This signal is emitted when the content removal indicated by contentAboutToBeRemoved() has been completed.
Return the number of QContent objects in this set.
This is an overloaded member function, provided for convenience.
Returns the number of content items in the database that match the content filter filter.
Returns a copy of the current filter set for this 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.
Store the meta information objects into the backing store, and create a file on the file system if the content type is appropriate.
See also uninstallContent().
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.
When considering use of this method first examine the process of retrieving a pointer to the internal model and using a Model/View solution.
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.
When considering use of this method first examine the process of retrieving a pointer to the internal model and using a Model/View solution.
See also QContentSetModel and itemIds().
Remove the QContent object cl from this set. This does not remove the object from the backing store. This is useful for trimming down a set of QContent 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 add(), contains(), and clear().
Scan for added/removed content in path with the specified priority. Directories will be scanned recusively in a background thread located in the server process.
Sets a filtering criteria of FilterType kind and value filter to the current filter set. This operation will replace all previously specified filters.
This is an overloaded member function, provided for convenience.
Sets a group of filtering criteria filters to the current filter set. This operation will replace all previously specified filters.
Sets the attribute(s) that content in this QContentSet is ordered by to sortOrder.
See also sortOrder().
Returns the attribute(s) the content in this QContentSet is ordered by.
See also setSortOrder().
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.
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.
See also installContent().
Assigns the given contentset to this QContentSet and returns a reference to this QContentSet.
| Copyright © 2007 Trolltech | Trademarks | Qtopia 4.2.5 |