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

QImageSourceSelectorDialog Class Reference
[QtBaseModule]

The QImageSourceSelectorDialog class allows the user to select an image from a variety of sources. More...

    #include <QImageSourceSelectorDialog>

Inherits QDialog.

Public Functions

Additional Inherited Members


Detailed Description

The QImageSourceSelectorDialog class allows the user to select an image from a variety of sources.

QImageSourceSelectorDialog allows the user to select an image from the documents system or from any QDS service on the device that allows a image to be retrieved, such as a camera. It allows the selected image to be modified by any QDS service on the device that can modify images, and returns the user's selection to the client code as a QContent object.

The dialog will allow the user to invoke any QDS service that returns data in "image/x-qpixmap" form and has the "get" attribute, or to select an image document. Once an image is selected, the dialog will allow the user to invoke any QDS service that returns data in "image/x-qpixmap" form and has the "edit" attribute.

The following code uses QImageSourceSelectorDialog to allow the user to select an image from any source:

    QImageSourceSelectorDialog dialog( this );
    if( QtopiaApplication::execDialog( &dialog ) ) {
        // Accept
        QContent image = dialog.content();
    } else {
        // Reject
    }

See also QImageDocumentSelector and QDSServiceInfo.


Member Function Documentation

QImageSourceSelectorDialog::QImageSourceSelectorDialog ( QWidget * parent )

Constructs a QImageSourceSelectorDialog as a child of parent.

QImageSourceSelectorDialog::~QImageSourceSelectorDialog ()   [virtual]

Destroys the QImageSourceSelectorDialog object.

QContent QImageSourceSelectorDialog::content () const   [virtual]

Returns the image selected by the user. If the user accepts the dialog while the currently selected image is not stored, the dialog will store the image in PNG format.

See also setContent().

QSize QImageSourceSelectorDialog::maximumImageSize () const

Returns the maximum size used by the image retrieval QDS services.

See also setMaximumImageSize().

void QImageSourceSelectorDialog::setContent ( const QContent & image )   [virtual]

Sets the dialog to show image as the selected image.

See also content().

void QImageSourceSelectorDialog::setMaximumImageSize ( const QSize & size )

Sets the maximum size forwarded to the image retrieval QDS services to size. This size might be used by a camera, for example, to determine at what size to take a picture.

See also maximumImageSize().


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3