Home · All Classes · Annotated · Functions

QImageDocumentSelectorDialog Class Reference

The QImageDocumentSelectorDialog class allows the user to select an image from a list of image documents available on the device. More...

#include <QImageDocumentSelectorDialog>

Inherits QDialog.

Public Functions

Additional Inherited Members


Detailed Description

The QImageDocumentSelectorDialog class allows the user to select an image from a list of image documents available on the device.

QImageDocumentSelectorDialog is a convenience class that presents the QImageDocumentSelector widget in a dialog.

The following code uses QImageDocumentSelectorDialog to allow the user to select a wallpaper image from the Qtopia directories:

    QStringList locations;
    QStringList qtopiaPaths = Qtopia::installPaths();
    foreach( QString path, qtopiaPaths ) {
        locations.append( path + "pics/wallpaper" );
    }

    QImageDocumentSelectorDialog dialog( locations, this );
    if( QtopiaApplication::execDialog( &dialog ) ) {
        // Accept
        QContent wallpaper = dialog.selectedDocument();
    } else {
        // Reject
    }

See also QImageDocumentSelector.


Member Function Documentation

QImageDocumentSelectorDialog::QImageDocumentSelectorDialog ( QWidget * parent = 0 )

Construct an QImageDocumentSelectorDialog with parent parent.

The dialog lists all documents with the image mime type. The dialog is modal by default.

QImageDocumentSelectorDialog::QImageDocumentSelectorDialog ( const QContentSet::QContentFilter & filter, QWidget * parent = 0 )

Construct an QImageDocumentSelectorDialog with parent parent.

The dialog lists all images from the backing store matching filter or if filter is empty, all documents with the image mime type.

The dialog is modal by default.

QImageDocumentSelectorDialog::QImageDocumentSelectorDialog ( const QContentSet & documents, QWidget * parent = 0 )

Construct an QImageDocumentSelectorDialog with parent parent.

The dialog lists all images from the documents QContentSet.

The dialog is modal by default.

QImageDocumentSelectorDialog::~QImageDocumentSelectorDialog ()

Destroys the widget.

int QImageDocumentSelectorDialog::count () const

Returns the number of documents available for selection.

See also documents().

QContentSet QImageDocumentSelectorDialog::documents () const

Returns the list of documents available for selection.

See also count().

QContentSet::QContentFilter QImageDocumentSelectorDialog::filter () const

Returns the current documents filter.

See also setFilter().

QContent QImageDocumentSelectorDialog::selectedDocument () const

Returns a QContent for the currently selected image, or an invalid QContent if there is no current selection.

void QImageDocumentSelectorDialog::setFilter ( const QContentSet::QContentFilter & filter )

Sets the filter which determines what documents from the backing store are displayed.

See also filter().

void QImageDocumentSelectorDialog::setThumbnailSize ( const QSize & size )

Sets the maximum size of a thumbnail to size.

The default size is QSize( 65, 65 ).

See also thumbnailSize().

QSize QImageDocumentSelectorDialog::thumbnailSize () const

Returns the current maximum size of a thumbnail.

See also setThumbnailSize().


Copyright © 2006 Trolltech Trademarks
Qtopia 4.1.7