Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KIconButton Class Reference

A push button that allows selection of an icon. More...

#include <kicondialog.h>

List of all members.

Signals

void iconChanged (QString icon)

Public Methods

 KIconButton (QWidget *parent=0L, const char *name=0L)
 KIconButton (KIconLoader *loader, QWidget *parent, const char *name=0L)
 ~KIconButton ()
void setStrictIconSize (bool b)
bool strictIconSize () const
void setIconType (KIcon::Group group, KIcon::Context context, bool user=false)
void setIcon (const QString &icon)
void resetIcon ()
QString icon () const
void setIconSize (int size)
int iconSize () const


Detailed Description

A push button that allows selection of an icon.

A pushbutton for choosing an icon. Pressing on the button will open a KIconDialog for the user to select an icon. The current icon will be displayed on the button.

See also:
KIconDialog

Definition at line 227 of file kicondialog.h.


Constructor & Destructor Documentation

KIconButton::KIconButton (  QWidget *    parent = 0L,
const char *    name = 0L
) 
 

Constructs a KIconButton using the global iconloader.

KIconButton::KIconButton (  KIconLoader *    loader,
QWidget *    parent,
const char *    name = 0L
) 
 

Constructs a KIconButton using a specific KIconLoader.

KIconButton::~KIconButton (    ) 
 

Destructs the button.


Member Function Documentation

QString KIconButton::icon (    )  const [inline]
 

Returns the name of the selected icon.

Definition at line 276 of file kicondialog.h.

void KIconButton::iconChanged (  QString    icon )  [signal]
 

Emitted when the icon has changed.

int KIconButton::iconSize (    ) 
 

Returns the iconsize set via setIconSize() or 0, if the default iconsize will be used.

void KIconButton::resetIcon (    ) 
 

Resets the icon (reverts to an empty button).

void KIconButton::setIcon (  const QString &    icon ) 
 

Sets the button's initial icon.

void KIconButton::setIconSize (  int    size ) 
 

Sets the size of the icon to be shown / selected.

See also:
KIcon::StdSizes , iconSize

void KIconButton::setIconType (  KIcon::Group    group,
KIcon::Context    context,
bool    user = false
) 
 

Sets the icon group and context. Use KIcon::NoGroup if you want to allow icons for any group in the given context.

void KIconButton::setStrictIconSize (  bool    b ) 
 

Sets a strict icon size policy for allowed icons. When true, only icons of the specified group's size in setIconType are allowed, and only icons of that size will be shown in the icon dialog.

bool KIconButton::strictIconSize (    ) 
 

Returns true if a strict icon size policy is set.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:15 2003 for kdelibs by doxygen1.2.18