Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QImageDocumentSelector widget allows the selection an image from a list of image documents available on the device. More...
#include <QImageDocumentSelector>
Inherits QWidget.
The QImageDocumentSelector widget allows the selection an image from a list of image documents available on the device.
The QImageDocumentSelector widget builds a list of documents by locating all images in the device document directories. Alternatively, the list can be built with images which match a custom content filter.
Some of the commonly used functionality is:
Function/slot | Usage |
---|---|
setFilter() | filter the list of image documents using a QContentFilter. |
filter() | retrieve the current QContentFilter. |
documents() | Returns image documents listed. |
documentSelected() | notifies which document was chosen. |
In addition documents may be viewed in two modes:
The size of thumbnails is manipulated using:
Images are highlighted one at a time and a articular image can be chosen vi the stylus or select key and arrow keys are used to navigate through the list of image documents.
When an image is chosen the following occurs:
Whenever the list of documents is changed as a result of a filter change or a file system change, QImageDocumentSelector will emit a documentsChanged() signal.
The following code allows the user to choose from all image documents available on the device using the thumbnail view mode with a custom thumbnail size:
QImageDocumentSelector *selector = new QImageDocumentSelector( this ); selector->setThumbnailSize( QSize( 100, 100 ) ); connect( selector, SIGNAL(documentSelected(QContent)), this, SLOT(openImage(QContent)) );
QImageDocumentSelector is often the first widget seen in a document-oriented application. When used with QStackedWidget, an application allows choosing of a document using the selector before revealing the document viewer or editor.
See also QImageDocumentSelectorDialog, QDocumentSelector, and QDocumentSelectorDialog.
This enum describes the types of viewing modes.
Constant | Value | Description |
---|---|---|
QImageDocumentSelector::Single | 0 | Images are displayed one at a time. |
QImageDocumentSelector::Thumbnail | 1 | Multiple images are displayed in an icon type scroll view. |
Construct an image document selector widget with the given parent.
Destroys the widget.
Returns a QContent for the currently selected image, or an invalid QContent if there is no current selection.
See also documents().
Returns the categories checked by default in the document selector's category filter dialog.
See also setDefaultCategories().
This signal is emitted when the user chooses an image. A QContent for the image document is given in image.
Returns the content set of image documents listed by the selector
See also currentDocument().
This signal is emitted when the list of documents changes as a result of a filter change or a file system change.
Returns the current documents filter.
The filter defines the subset of image documents on the device the user can select from.
See also setFilter() and QContentSet::filter().
Returns the permissions a document must have in order to be choosable by the document selector.
See also setMandatoryPermissions(), setSelectPermission(), and selectPermission().
Returns the permissions a document should give in order to be choosable.
The permissions effectively describe the document's intended usage.
See also setSelectPermission(), mandatoryPermissions(), and setMandatoryPermissions().
Sets the categories checked by default in the document selector's category filter dialog.
If a supplied category does not match those available in the category filter dialog, the document selector will not filter with that category. Upon invocation this function will set the default checked categories within the category filter dialog, and filter according to the supplied categories. 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(), and setFilter().
Sets the filter which defines the subset of image documents on the device the user can select from.
See also filter() and QContentSet::filter().
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its parents is the active window.
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().
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 permissions for the document is used.
See also selectPermission(), setMandatoryPermissions(), and mandatoryPermissions().
Sets the document sort criteria.
This will set the document selector sort mode to SortCriteria.
See also sortCriteria() and setSortMode().
Sets the document sortMode
The default mode is QDocumentSelector::Alphabetical.
See also sortMode().
Sets the maximum size of a thumbnail.
The default size is QSize( 65, 65 ).
See also thumbnailSize().
Sets the viewing mode
The default mode is QImageDocumentSelector::Thumbnail.
See QImageDocumentSelector::ViewMode for a listing of supported view modes.
See also viewMode().
Returns the current document sort criteria.
See also setSortCriteria().
Returns the current document sort mode.
See also setSortMode().
Returns the current maximum size of a thumbnail.
See also setThumbnailSize().
Returns the current view mode.
See QImageDocumentSelector::ViewMode for a listing of supported view modes.
See also setViewMode().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |