| Home · All Classes · Annotated · Functions |
The QImageDocumentSelector widget allows the selection of images from a list of image documents available on the device. More...
#include <QImageDocumentSelector>
Inherits QWidget.
The QImageDocumentSelector widget allows the selection of images from a list of image documents available on the device.
The QImageDocumentSelector widget builds a list of documents by using Qtopia::findDocuments() to locate all images in the device document directories. Alternatively, the list can be built with images from the source directories given in the widget constructor.
The following functionality is provided:
In addition QImageDocumentSelector provides control of the presentation of image documents for selection. If a single image selection is required, consider using the QImageDocumentSelectorDialog convience class.
Documents may be presented in two modes:
The size of thumbnails is manipulated using:
Images are displayed one at a time and are selected via the stylus or select key and arrow keys are used to navigate through the list of image documents.
When an image is selected the following occurs:
Whenever the list of documents is changed as a result of a change of a category filter or a file system change QImageDocumentSelector will emit a documentsChanged() signal.
For example, the following code allows the user to select 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(const QContent&)),
this, SLOT(openImage(const QContent&)) );
QImageDocumentSelector is often the first widget seen in a document-oriented application . When used with QStackedWidget, an application allows selection of a document using the selector before revealing the document viewer or editor.
See also QImageDocumentSelectorDialog and QDocumentSelector.
This enum describes presentation 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 QImageDocumentSelector with parent parent.
The list shows all documents with the image mime type.
Construct an QImageDocumentSelector with parent parent.
Images in the documents QContentSet are shown. Non-image documents are not filtered out if included in the set.
Construct an QImageDocumentSelector with parent parent.
Images in the backing store matching filter are shown.
If filter is empty, the list shows all documents with the image mime type. If no mime type filter is specified the image mime filter will be added.
Destroys the widget.
Returns the current category filter.
See also setCategoryFilter().
Returns the number of documents available for selection.
See also documents().
This signal is emitted when the user selects an image. A QContent for the image document is given in image.
Returns the list of documents available for selection.
See also count().
This signal is emitted when the list of documents is changes as a result of a change to the category filter or a file system change.
Returns the current documents filter.
See also setFilter().
Returns a QContent for the currently selected image, or an invalid QContent if there is no current selection.
Sets the category filter to filter. Only documents that pass the filter will be available for selection.
The default category filter is QCategoryFilter::All.
See also categoryFilter().
Sets the filter which determines what documents from the backing store are displayed.
See also 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 maximum size of a thumbnail to size.
The default size is QSize( 65, 65 ).
See also thumbnailSize().
Sets the display mode to mode.
The default mode is QImageDocumentSelector::Thumbnail.
See QImageDocumentSelector::ViewMode for a listing of supported modes.
See also viewMode().
Returns the current maximum size of a thumbnail.
See also setThumbnailSize().
Returns the current display mode.
See QImageDocumentSelector::ViewMode for a listing of supported modes.
See also setViewMode().
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |