Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QContentFilterDialog widget provides a dialog box for selecting content filters. More...
#include <QContentFilterDialog>
Inherits QDialog.
The QContentFilterDialog widget provides a dialog box for selecting content filters.
QContentFilterDialog is based on QContentFilterModel and its contents are defined using a QContentFilterModel::Template.
A content filter dialog may be either single or multiple selection depending on its set model template. The filter selected in a single selection scenario may be retrieved using the selectedFilter() method, and the checkedFilter() method will return the checked filters in a multiple selection scenario. A brief summary of the checked filter's labels may also be retrieved using the checkedLabel() method.
Using a content filter dialog to select an or'ed combination of mime type filters:
QContentFilter selectMimeTypes() { QContentFilterDialog dialog( QContentFilter::MimeType, QString(), QContentFilterModel::CheckList | QContentFilterModel::SelectAll ); dialog.setFilter( QContentFilter( QContent::Document ) ); QtopiaApplication::execDialog( &dialog ); return dialog.checkedFilters(); }
Using a content filter dialog to select a an album filter from a list grouped by artist.
QContentFilter selectAlbum() { QContentFilterModel::Template albums( QContent::Album ); QContentFilterModel::Template artists( album, QContent::Artist ); QContentFilterDialog dialog; dialog.setModelTemplate( artists ); if( QtopiaApplication::execDialog( &dialog ) == QDialog::Accept ) return dialog.selectedFilter(); else return QContentFilter(); }
See also QContentFilterModel and QContentFilterSelector.
Constructs a content filter dialog with the parent parent.
Constructs a content filter selector dialog with the parent parent and the initial template modelTemplate.
Constructs a content filter dialog parented to parent that lists the possible values of property according to the filter model template options options.
The properties listed in the checked list will be checked by default.
Constructs a content filter dialog parented to parent that lists filters which are of type type and within the given scope according to the filter model template options options.
Any filters with an argument that matches one in the checked list will be checked by default.
Returns a filter combining all filters checked by the user.
Returns a short summary describing the checked filters, if a single filter is checked the display text for that label is returned concatenated with a list of it's parent filter's display text. If multiple filters are checked then the text 'Multi' is returned concatenated to a list of parents common to all checked filters.
Returns the base filter.
See also setFilter().
Returns the current model template
See also setModelTemplate().
Returns the filter selected by the user.
Sets the base filter.
See also filter().
Sets the model template to modelTemplate.
See also modelTemplate().
This is an overloaded member function, provided for convenience.
Sets the model template to a list of possible values of property according to the given options.
The properties listed in the checked list will be checked by default.
This is an overloaded member function, provided for convenience.
Set the model template to a list of filters of type type with the specialization scope according to the given options.
Any filters with an argument that matches one in the checked list will be checked by default.
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |