| Home · All Classes · Annotated · Functions |
The QDocumentSelector widget allows the user to select documents from a list of documents available on the device. More...
#include <QDocumentSelector>
Inherits QWidget.
The QDocumentSelector widget allows the user to select documents from a list of documents available on the device.
The QDocumentSelector widget builds the list of documents by using Qtopia::findDocuments() to find all documents that match the mime type filter given in the widget constructor.
The following functionality is provided:
When setNewEnabled() is enabled QDocumentSelector adds a new document icon to the selection widget. When the icon is selected the newDocument() signal is emitted.
When a document is selected, QDocumentSelector emits a documentSelected() signal and a QContent for the selected document is passed with the signal and the selected document is retrieved using selectedDocument().
When the list of documents is modified as a result of a change of:
QDocumentSelector emits a documentsChanged() signal.
The following code is an example of how to:
QDocumentSelector *selector = new QDocumentSelector( "*", this );
selector->setSortMode( QDocumentSelector::Chronological );
selector->setNewEnabled( true );
connect( selector, SIGNAL(newSelected()), this, SLOT(newDocument()) );
connect( selector, SIGNAL(documentSelected(const QContent&)),
this, SLOT(openDocument(const QContent&)) );
QDocumentSelector is often the first widget seen in a document-oriented application . Used in combination with QStackedWidget, a typical application allows selecton of a document using the selector before revealing the document viewer or editor.
See also QImageDocumentSelector.
This enum specifies the sort order of the documents.
| Constant | Value |
|---|---|
| QDocumentSelector::Alphabetical | 0 |
| QDocumentSelector::ReverseAlphabetical | 1 |
| QDocumentSelector::Chronological | 2 |
| QDocumentSelector::ReverseChronological | 3 |
Constructs a QDocumentSelector with mime type filter mimeTypes and parent parent.
The mime type filter string may contain multiple wild-card patterns separated by semicolons. For example:
Constructs a QDocumentSelector with mime type filter mimeTypes, Category filter catFilter and parent parent.
The mime type filter is as above by semicolons. For example:
Constructs a QDocumentSelector with parent parent displaying all records in the QContentSet documents.
Constructs a QDocumentSelector with parent parent displaying all records from the backing store which pass all the filters listed in filter.
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 a document is selected. A QContent for the selected document is given in document.
Returns the list of documents available for selection.
See also setDocuments() and count().
This signal is emitted when the list of documents is changed as a result of a change to the:
Returns the filter which determines what documents from the backing store are displayed.
See also setFilter().
This signal is emitted when the new document icon is selected.
See also setNewEnabled().
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 list of documents available for selection.
See also documents().
Sets the filter which determines what documents from the backing store are displayed.
See also filter().
When newEnabled is true, a new document icon is added to the selection widget.
New is disabled by default.
See also newSelected().
Sets the document sort mode to mode.
The default mode is QDocumentSelector::Alphabetical.
See also sortMode().
Returns the current document sort mode.
See also setSortMode().
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |