Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QDocumentSelectorDialog Class Reference
[QtBaseModule]

The QDocumentSelectorDialog class provides a user with the ability to select documents from a list of documents available on the device. More...

    #include <QDocumentSelectorDialog>

Inherits QDialog.

Public Functions

Additional Inherited Members


Detailed Description

The QDocumentSelectorDialog class provides a user with the ability to select documents from a list of documents available on the device.

The QDocumentSelectorDialog is a convenience class which is built around a QDocumentSelector, which provides all the base functionality for choosing a document.

The document chosen in the dialog is retrieved using the selectedDocument() method.

See also QDocumentSelector, QImageDocumentSelector, and QImageDocumentSelectorDialog.


Member Function Documentation

QDocumentSelectorDialog::QDocumentSelectorDialog ( QWidget * parent = 0 )

Constructs a new document selector dialog with the given parent.

QDocumentSelectorDialog::~QDocumentSelectorDialog ()

Destroys the dialog.

QStringList QDocumentSelectorDialog::defaultCategories () const

Returns the categories checked by default in the document selector's category filter dialog.

See also setDefaultCategories() and Categories.

void QDocumentSelectorDialog::disableOptions ( QDocumentSelector::Options options )

Disables the the given options.

See also enableOptions(), options(), and setOptions().

const QContentSet & QDocumentSelectorDialog::documents () const

Returns the content set of documents listed by the selector.

See also selectedDocument().

void QDocumentSelectorDialog::enableOptions ( QDocumentSelector::Options options )

Enables the document selector options, in addition to those already enabled.

See also disableOptions(), setOptions(), and options().

QContentFilter QDocumentSelectorDialog::filter () const

Returns the current documents filter.

The filter defines the subset of content on the device the user can select from.

See also setFilter() and QContentSet::filter().

QDrmRights::Permissions QDocumentSelectorDialog::mandatoryPermissions () const

Returns the permissions a document must have in order to be choosable by the document selector.

See also setMandatoryPermissions(), setSelectPermission(), and selectPermission().

bool QDocumentSelectorDialog::newSelected () const

Returns true if the new document item from the list is selected.

See also selectedDocument().

QDocumentSelector::Options QDocumentSelectorDialog::options () const

Returns the enabled document selector options.

See also setOptions(), enableOptions(), and disableOptions().

QDrmRights::Permission QDocumentSelectorDialog::selectPermission () const

Returns the permissions a document should give in order to be choosable.

The permissions effectively describe the document's intended usage.

See also setSelectPermission(), setMandatoryPermissions(), and mandatoryPermissions().

QStringList QDocumentSelectorDialog::selectedCategories () const

Returns a list of categories selected in a document selector's category filter dialog.

See also setDefaultCategories().

QContent QDocumentSelectorDialog::selectedDocument () const

Returns a QContent for the currently selected document.

A null QContent is returned if there is no current selection or if the new document item is currently selected.

See also newSelected() and documents().

void QDocumentSelectorDialog::setDefaultCategories ( const QStringList & categories )

Sets the categories checked by default in the document selector's category filter dialog.

The categories displayed in a document selector's category filter dialog are restricted to categories assigned to documents that would appear in the document selector with no categories checked. If a default category does not match any visible in the category filter dialog it will be ignored.

Setting a default category will filter the visible documents by that category (assuming there are documents belonging to that category) but the user is able to remove the filtering by unchecking the category in the filter dialog. To apply a filter that cannot be removed use setFilter() instead.

Note: Once the dialog has been shown once, this function no longer has any effect.

Filtering according to categories is applied after the filter defined by filter().

See also defaultCategories(), filter(), setFilter(), and Categories.

void QDocumentSelectorDialog::setFilter ( const QContentFilter & filter )

Sets the filter which defines the subset of content on the device the user can select from.

The document list is filtered when control returns to the event loop.

See also filter() and QContentSet::filter().

void QDocumentSelectorDialog::setMandatoryPermissions ( QDrmRights::Permissions permissions )

Sets the permissions a document must have in order to be choosable from the document selector.

Unlike select permissions, if a document is missing a mandatory permission it will not be activated, and the document cannot be chosen.

Because the permissions are mandatory, passing QDrmRights::InvalidPermission as a parameter does not exhibit the same behavior as in setSelectPermission().

See also mandatoryPermissions(), setSelectPermission(), and selectPermission().

void QDocumentSelectorDialog::setOptions ( QDocumentSelector::Options options )

Sets the enabled set of selector options.

See also enableOptions(), disableOptions(), and options().

void QDocumentSelectorDialog::setSelectPermission ( QDrmRights::Permission permission )

Sets the permission a document should give in order to be choosable. The permissions effectively specify the intended usage for that document.

If a document does not have provide the given permission, the document selector will try to activate and thus acquire permissions for the document. If the document cannot be activated with that permission, it will not be choosable from the list and visual indication of this is given.

If the permission is QDrmRights::InvalidPermission the default permission for the document is used.

See also selectPermission(), setMandatoryPermissions(), and mandatoryPermissions().

void QDocumentSelectorDialog::setSortCriteria ( const QContentSortCriteria & sort )

Sets the document sort criteria.

This will set the document selector sort mode to SortCriteria.

The document list is sorted when control returns to the event loop.

See also sortCriteria() and setSortMode().

void QDocumentSelectorDialog::setSortMode ( QDocumentSelector::SortMode mode )

Sets the document sort mode.

The default mode is QDocumentSelector::Alphabetical.

Setting the sort mode to SortCriteria will not change the sorting of the documents.

See also sortMode() and setSortCriteria().

QContentSortCriteria QDocumentSelectorDialog::sortCriteria () const

Returns the current document sort criteria.

See also setSortCriteria().

QDocumentSelector::SortMode QDocumentSelectorDialog::sortMode () const

Returns the current document sort mode.

If the sort mode is SortCriteria sortCriteria() must be queried to get the actual document sorting.

See also setSortMode() and sortCriteria().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3