.TH "KIconButton" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KIconButton \- A pushbutton for choosing an icon. A push button that allows selection of an icon.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kicondialog.h>\fP
.PP
Inherits \fBQPushButton\fP.
.PP
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBiconChanged\fP (\fBQString\fP icon)"
.br
.RI "\fIEmitted when the icon has changed. \fP"
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKIconButton\fP (\fBQWidget\fP *parent=0L, const  char *name=0L)"
.br
.RI "\fIConstructs a KIconButton using the global iconloader. \fP"
.ti -1c
.RI "\fBKIconButton\fP (\fBKIconLoader\fP *loader, \fBQWidget\fP *parent, const  char *name=0L)"
.br
.RI "\fIConstructs a KIconButton using a specific \fBKIconLoader\fP. \fP"
.ti -1c
.RI "\fB~KIconButton\fP ()"
.br
.RI "\fIDestructs the button. \fP"
.ti -1c
.RI "void \fBsetStrictIconSize\fP (bool b)"
.br
.RI "\fISets a strict icon size policy for allowed icons. \fP"
.ti -1c
.RI "bool \fBstrictIconSize\fP () const "
.br
.RI "\fIReturns true if a strict icon size policy is set. \fP"
.ti -1c
.RI "void \fBsetIconType\fP (\fBKIcon::Group\fP \fBgroup\fP, \fBKIcon::Context\fP context, bool user=false)"
.br
.RI "\fISets the icon group and context. \fP"
.ti -1c
.RI "void \fBsetIcon\fP (const  \fBQString\fP &icon)"
.br
.RI "\fISets the button's initial icon. \fP"
.ti -1c
.RI "void \fBresetIcon\fP ()"
.br
.RI "\fIResets the icon (reverts to an empty button). \fP"
.ti -1c
.RI "\fBQString\fP \fBicon\fP () const "
.br
.RI "\fIReturns the name of the selected icon. \fP"
.ti -1c
.RI "void \fBsetIconSize\fP (int size)"
.br
.RI "\fISets the size of the icon to be shown / selected. \fP"
.ti -1c
.RI "int \fBiconSize\fP () const "
.br
.RI "\fIReturns the iconsize set via \fBsetIconSize\fP() or 0, if the default iconsize will be used. \fP"
.in -1c
.SH "Detailed Description"
.PP 
A pushbutton for choosing an icon. A push button that allows selection of an icon. 

Pressing on the button will open a \fBKIconDialog\fP for the user to select an icon. The current icon will be displayed on the button.
.PP
\fBSee also:\fP
.RS 4
\fBKIconDialog\fP 
.RE
.PP

.PP
Definition at line 227 of file kicondialog.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KIconButton::KIconButton (\fBQWidget\fP * parent = 0L, const char * name = 0L)"
.PP
Constructs a KIconButton using the global iconloader. Definition at line 477 of file kicondialog.cpp.
.PP
References KIcon::Application, QPushButton::clicked(), KGlobal::iconLoader(), and KStdAccel::name().
.SS "KIconButton::KIconButton (\fBKIconLoader\fP * loader, \fBQWidget\fP * parent, const char * name = 0L)"
.PP
Constructs a KIconButton using a specific \fBKIconLoader\fP. Definition at line 491 of file kicondialog.cpp.
.PP
References KIcon::Application, QPushButton::clicked(), and KStdAccel::name().
.SS "KIconButton::~\fBKIconButton\fP ()"
.PP
Destructs the button. Definition at line 505 of file kicondialog.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KIconButton::setStrictIconSize (bool b)"
.PP
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. Definition at line 511 of file kicondialog.cpp.
.PP
Referenced by KFilePropsPlugin::KFilePropsPlugin(), and KURLBarItemDialog::KURLBarItemDialog().
.SS "bool KIconButton::strictIconSize () const"
.PP
Returns true if a strict icon size policy is set. Definition at line 516 of file kicondialog.cpp.
.SS "void KIconButton::setIconType (\fBKIcon::Group\fP group, \fBKIcon::Context\fP context, bool user = false)"
.PP
Sets the icon group and context. Use KIcon::NoGroup if you want to allow icons for any group in the given context. Definition at line 531 of file kicondialog.cpp.
.PP
Referenced by KFilePropsPlugin::KFilePropsPlugin().
.SS "void KIconButton::setIcon (const \fBQString\fP & icon)"
.PP
Sets the button's initial icon. Definition at line 538 of file kicondialog.cpp.
.PP
References KIconLoader::iconPath(), KIconLoader::loadIcon(), KIconDialog::setCustomLocation(), and QPushButton::setPixmap().
.PP
Referenced by KFilePropsPlugin::KFilePropsPlugin(), and KURLBarItemDialog::KURLBarItemDialog().
.SS "void KIconButton::resetIcon ()"
.PP
Resets the icon (reverts to an empty button). Definition at line 548 of file kicondialog.cpp.
.PP
References QPushButton::setPixmap().
.SS "\fBQString\fP KIconButton::icon () const\fC [inline]\fP"
.PP
Returns the name of the selected icon. Definition at line 276 of file kicondialog.h.
.PP
Referenced by KDevicePropsPlugin::applyChanges(), and KURLBarItemDialog::icon().
.SS "void KIconButton::setIconSize (int size)"
.PP
Sets the size of the icon to be shown / selected. \fBSee also:\fP
.RS 4
\fBKIcon::StdSizes\fP 
.PP
\fBiconSize\fP 
.RE
.PP
Definition at line 521 of file kicondialog.cpp.
.PP
Referenced by KURLBarItemDialog::KURLBarItemDialog().
.SS "int KIconButton::iconSize () const"
.PP
Returns the iconsize set via \fBsetIconSize\fP() or 0, if the default iconsize will be used. Definition at line 526 of file kicondialog.cpp.
.SS "void KIconButton::iconChanged (\fBQString\fP icon)\fC [signal]\fP"
.PP
Emitted when the icon has changed. 

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
