• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KIO

Signals | Public Member Functions | Properties | List of all members
KIconButton Class Reference

#include <kicondialog.h>

Inheritance diagram for KIconButton:
QPushButton

Signals

void iconChanged (const QString &icon)
 

Public Member Functions

 KIconButton (KIconLoader *loader, QWidget *parent)
 
 KIconButton (QWidget *parent=0L)
 
 ~KIconButton ()
 
int buttonIconSize () const
 
const QString & icon () const
 
int iconSize () const
 
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
 

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() [1/2]

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

Constructs a KIconButton using the global iconloader.

Parameters
parentThe parent widget.

Definition at line 769 of file kicondialog.cpp.

◆ KIconButton() [2/2]

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

Constructs a KIconButton using a specific KIconLoader.

Parameters
loaderThe icon loader to use.
parentThe parent widget.

Definition at line 775 of file kicondialog.cpp.

◆ ~KIconButton()

KIconButton::~KIconButton ( )

Destructs the button.

Definition at line 802 of file kicondialog.cpp.

Member Function Documentation

◆ buttonIconSize()

int KIconButton::buttonIconSize ( ) const

Returns the Button's Icon-Size.

Since
4.1

Definition at line 837 of file kicondialog.cpp.

◆ icon()

const QString & KIconButton::icon ( ) const

Returns the name of the selected icon.

Definition at line 875 of file kicondialog.cpp.

◆ iconChanged

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

Emitted when the icon has changed.

◆ iconSize()

int KIconButton::iconSize ( ) const

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

Definition at line 826 of file kicondialog.cpp.

◆ resetIcon()

void KIconButton::resetIcon ( )

Resets the icon (reverts to an empty button).

Definition at line 869 of file kicondialog.cpp.

◆ setButtonIconSize()

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 831 of file kicondialog.cpp.

◆ setIcon() [1/2]

void KIconButton::setIcon ( const QIcon &  icon)

Definition at line 864 of file kicondialog.cpp.

◆ setIcon() [2/2]

void KIconButton::setIcon ( const QString &  icon)

Sets the button's initial icon.

Definition at line 849 of file kicondialog.cpp.

◆ setIconSize()

void KIconButton::setIconSize ( int  size)

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

See also
KIconLoader::StdSizes
iconSize

Definition at line 817 of file kicondialog.cpp.

◆ setIconType()

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 842 of file kicondialog.cpp.

◆ setStrictIconSize()

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 807 of file kicondialog.cpp.

◆ strictIconSize()

bool KIconButton::strictIconSize ( ) const

Returns true if a strict icon size policy is set.

Definition at line 812 of file kicondialog.cpp.

Property Documentation

◆ icon

QString KIconButton::icon
readwrite

Definition at line 220 of file kicondialog.h.

◆ iconSize

int KIconButton::iconSize
readwrite

Definition at line 220 of file kicondialog.h.

◆ strictIconSize

bool KIconButton::strictIconSize
readwrite

Definition at line 220 of file kicondialog.h.


The documentation for this class was generated from the following files:
  • kicondialog.h
  • kicondialog.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal