• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KIO

KIconButton Class Reference

A pushbutton for choosing an icon. More...

#include <kicondialog.h>

Inheritance diagram for KIconButton:

Inheritance graph
[legend]

List of all members.


Signals

void iconChanged (const QString &icon)

Public Member Functions

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

Properties

QString icon
int iconSize
bool strictIconSize

Detailed Description

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 A push button that allows selection of an icon.

Definition at line 243 of file kicondialog.h.


Constructor & Destructor Documentation

KIconButton::KIconButton ( QWidget *  parent = 0L  )  [explicit]

Constructs a KIconButton using the global iconloader.

Parameters:
parent The parent widget.

Definition at line 766 of file kicondialog.cpp.

KIconButton::KIconButton ( KIconLoader *  loader,
QWidget *  parent 
)

Constructs a KIconButton using a specific KIconLoader.

Parameters:
loader The icon loader to use.
parent The parent widget.

Definition at line 772 of file kicondialog.cpp.

KIconButton::~KIconButton (  ) 

Destructs the button.

Definition at line 799 of file kicondialog.cpp.


Member Function Documentation

int KIconButton::buttonIconSize (  )  const

Returns the Button's Icon-Size.

Since:
4.1

Definition at line 834 of file kicondialog.cpp.

const QString& KIconButton::icon (  )  const

Returns the name of the selected icon.

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

Emitted when the icon has changed.

int KIconButton::iconSize (  )  const

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

Definition at line 866 of file kicondialog.cpp.

void KIconButton::setButtonIconSize ( int  size  ) 

Sets the size of the icon to be shown on the button.

See also:
KIconLoader::StdSizes

buttonIconSize

Since:
4.1

Definition at line 828 of file kicondialog.cpp.

void KIconButton::setIcon ( const QIcon &  icon  ) 

Definition at line 861 of file kicondialog.cpp.

void KIconButton::setIcon ( const QString &  icon  ) 

Sets the button's initial icon.

Definition at line 846 of file kicondialog.cpp.

void KIconButton::setIconSize ( int  size  ) 

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

See also:
KIconLoader::StdSizes

iconSize

Definition at line 814 of file kicondialog.cpp.

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

Sets the icon group and context.

Use KIconLoader::NoGroup if you want to allow icons for any group in the given context.

Definition at line 839 of file kicondialog.cpp.

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.

Definition at line 804 of file kicondialog.cpp.

bool KIconButton::strictIconSize (  )  const

Returns true if a strict icon size policy is set.


Property Documentation

const QString & KIconButton::icon [read, write]

Definition at line 246 of file kicondialog.h.

int KIconButton::iconSize [read, write]

Definition at line 247 of file kicondialog.h.

bool KIconButton::strictIconSize [read, write]

Definition at line 248 of file kicondialog.h.


The documentation for this class was generated from the following files:
  • kicondialog.h
  • kicondialog.cpp

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal