![]() Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded |
![]() |
The ImageSelectorDialog widget presents the ImageSelector widget as a dialog. It allows the user to select from a collection of images. More...
#include <qtopia/imageselector.h>
This code snippet allows the user to select a wallpaper from the Qtopia directories:
QStringList locations; QStringList qtopiaPaths = Global::qtopiaPaths(); for( QStringList::Iterator it = qtopiaPaths.begin(); it != qtopiaPaths.end(); ++it ) locations.append( *it + "pics/wallpaper" ); ImageSelectorDialog dialog( locations, this ); if( QPEApplication::execDialog( &dialog ) ) { // Accept } else { // Reject }
You can retrieve the selected image with selectedDocument(), selectedFilename() and selectedImage(). The selectedImage() function returns a QPixmap containing a scaled copy of the selected image.
First availability: Qtopia 2.0
See also ImageSelector and Qtopia Classes.
The dialog is modal if modal is TRUE (default), otherwise the dialog is modeless.
Images are taken from the Documents directory.
First availability: Qtopia 2.1
The dialog is modal if modal is TRUE (default), otherwise the dialog is modeless.
Images are taken from the directories given in source. If source is empty images are taken from the Documents directory.
First availability: Qtopia 2.1
Return a list of images in the current category.
Return the context menu.
Return the DocLnk of the currently selected image, or invalid DocLnk if there is no current selection.
Return the file path of the currently selected image, or QString::null if there is no current selection.
Return a QPixmap containing a scaled copy of the currently selected image, or null QPixmap if there is no current selection.
The image will be scaled to fit within width and height while maintaining the original width to height ratio.
Set the maximum side (in pixel units) of a thumbnail to maxSide. The largest thumbnail will be no greater than maxSide x maxSide pixels.
maxSide must be greater than 0.
See also thumbnailSize().
Return the current maximum side (in pixel units) of a thumbnail.
See also setThumbnailSize().
This file is part of the Qtopia platform, copyright © 1995-2004 Trolltech, all rights reserved.
Copyright © 2001-2005 Trolltech | Trademarks | Qtopia version 2.1.1
|