class KIconLoaderDialog

Dialog for interactive selection of icons. More...

Definition#include <kiconloaderdialog.h>
InheritsQDialog
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.

KIconLoaderDialog ()

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'.

void  setDir ( const QStrList *l )

int  exec (QString filter)

void  filterChanged ()

[protected slot]

void  dirChanged (const char *)

[protected slot]

void  reject ()

[protected slot]

void  needReload ()

[protected slot]

void  init ()

[protected]

void  resizeEvent ( QResizeEvent *e )

[protected virtual]

KIconLoaderCanvas * canvas

[protected]

QLabel * l_name

[protected]

QLineEdit * i_filter

[protected]

QLabel * l_filter

[protected]

QPushButton * ok

[protected]

QPushButton * cancel

[protected]

QLabel * text

[protected]

QComboBox * cb_dirs

[protected]

KIconLoader * icon_loader

[protected]


Generated by: root@george.devel.redhat.com on Thu Sep 14 21:18:43 2000, using kdoc 2.0a36.