class KIconLoaderDialog

Dialog for interactive selection of icons. More...

Definition#include <kiconloaderdialog.h>
InheritsQDialog (qt)
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Slots

Protected Members


Detailed Description

Dialog for interactive selection of icons.

KIconLoaderDialog is a derived class from QDialog. It provides one function selectIcon() which displays a dialog. This dialog lets you select the icons within the IconPath by image.

 KIconLoaderDialog ( QWidget *parent=0, const char *name=0 )

The KIconLoaderDialog is a modal dialog; i.e. it has its own eventloop and the normal program will stop after a call to selectIcon() until selectIcon() returns. This constructor creates a KIconLoaderDialog that will call KApplication::getKApplication()->getIconLoader() to load any icons. Note that it will not use this KIconLoader to display the icons, but the QPixmap that it returns will be know to this KIconLoader. KIconLoaderDialog caches all icons it has loaded as long as they are in the same directory between two calls to selectIcon(). So it is a good idea to delete the KIconLoaderDialog when it is not needed anymore.

 KIconLoaderDialog ( KIconLoader *loader, QWidget *parent=0, const char *name=0 )

If you want to use another KIconLoader you can create the KIconLoaderDialog with this constructor which accepts a pointer to a KIconLoader. Make sure that this pointer is valid.

QPixmap  selectIcon ( QString &name, const QString &filter)

This function pops up a modal dialog and lets you select an icon by its picture not name. The function returns a QPixmap object and the icons name in 'name' if the user has selected an icon, or null if the user has pressed the cancel button. So check the result before taking any action. The argument filter specifies a filter for the names of the icons to display. For example "*" displays all icons and "mini*" displays only those icons which names start with 'mini'.


Generated by: tasin@pcw-home on Sun Feb 13 22:02:02 2000, using kdoc 2.0a35.