KIO
#include <kicondialog.h>

Signals | |
void | newIconName (const QString &) |
![]() | |
void | aboutToShowDetails () |
void | applyClicked () |
void | buttonClicked (KDialog::ButtonCode button) |
void | cancelClicked () |
void | closeClicked () |
void | defaultClicked () |
void | finished () |
void | helpClicked () |
void | hidden () |
void | layoutHintChanged () |
void | noClicked () |
void | okClicked () |
void | resetClicked () |
void | tryClicked () |
void | user1Clicked () |
void | user2Clicked () |
void | user3Clicked () |
void | yesClicked () |
Public Member Functions | |
KIconDialog (KIconLoader *loader, QWidget *parent=0) | |
KIconDialog (QWidget *parent=0L) | |
~KIconDialog () | |
int | iconSize () const |
QString | openDialog () |
void | setCustomLocation (const QString &location) |
void | setIconSize (int size) |
void | setStrictIconSize (bool b) |
void | setup (KIconLoader::Group group, KIconLoader::Context context=KIconLoader::Application, bool strictIconSize=false, int iconSize=0, bool user=false, bool lockUser=false, bool lockCustomDir=false) |
void | showDialog () |
bool | strictIconSize () const |
![]() | |
KDialog (QWidget *parent=0, Qt::WindowFlags flags=0) | |
~KDialog () | |
KPushButton * | button (ButtonCode id) const |
KIcon | buttonIcon (ButtonCode id) const |
QString | buttonText (ButtonCode id) const |
QString | buttonToolTip (ButtonCode id) const |
QString | buttonWhatsThis (ButtonCode id) const |
ButtonCode | defaultButton () const |
QString | helpLinkText () const |
void | incrementInitialSize (const QSize &size) |
bool | isButtonEnabled (ButtonCode id) const |
QWidget * | mainWidget () |
virtual QSize | minimumSizeHint () const |
void | restoreDialogSize (const KConfigGroup &config) |
void | saveDialogSize (KConfigGroup &config, KConfigGroup::WriteConfigFlags options=KConfigGroup::Normal) const |
void | setButtonFocus (ButtonCode id) |
void | setButtonGuiItem (ButtonCode id, const KGuiItem &item) |
void | setButtonIcon (ButtonCode id, const KIcon &icon) |
void | setButtonMenu (ButtonCode id, QMenu *menu, ButtonPopupMode popupmode=InstantPopup) |
void | setButtons (ButtonCodes buttonMask) |
void | setButtonsOrientation (Qt::Orientation orientation) |
void | setButtonText (ButtonCode id, const QString &text) |
void | setButtonToolTip (ButtonCode id, const QString &text) |
void | setButtonWhatsThis (ButtonCode id, const QString &text) |
void | setDefaultButton (ButtonCode id) |
void | setEscapeButton (ButtonCode id) |
void | setInitialSize (const QSize &size) |
void | setMainWidget (QWidget *widget) |
void | showButton (ButtonCode id, bool state) |
void | showButtonSeparator (bool state) |
virtual QSize | sizeHint () const |
Static Public Member Functions | |
static QString | getIcon (KIconLoader::Group group=KIconLoader::Desktop, KIconLoader::Context context=KIconLoader::Application, bool strictIconSize=false, int iconSize=0, bool user=false, QWidget *parent=0, const QString &caption=QString()) |
![]() | |
static bool | avoidArea (QWidget *widget, const QRect &area, int screen=-1) |
static void | centerOnScreen (QWidget *widget, int screen=-1) |
static int | groupSpacingHint () |
static QString | makeStandardCaption (const QString &userCaption, QWidget *window=0, CaptionFlags flags=HIGCompliantCaption) |
static int | marginHint () |
static void | resizeLayout (QLayout *lay, int margin, int spacing) |
static void | resizeLayout (QWidget *widget, int margin, int spacing) |
static void | setAllowEmbeddingInGraphicsView (bool allowEmbedding) |
static int | spacingHint () |
Protected Slots | |
void | slotOk () |
![]() | |
virtual void | slotButtonClicked (int button) |
void | updateGeometry () |
Additional Inherited Members | |
![]() | |
enum | ButtonCode |
enum | ButtonPopupMode |
enum | CaptionFlag |
![]() | |
void | delayedDestruct () |
void | enableButton (ButtonCode id, bool state) |
void | enableButtonApply (bool state) |
void | enableButtonCancel (bool state) |
void | enableButtonOk (bool state) |
void | enableLinkedHelp (bool state) |
bool | isDetailsWidgetVisible () const |
virtual void | setCaption (const QString &caption) |
virtual void | setCaption (const QString &caption, bool modified) |
void | setDetailsWidget (QWidget *detailsWidget) |
void | setDetailsWidgetVisible (bool visible) |
void | setHelp (const QString &anchor, const QString &appname=QString()) |
void | setHelpLinkText (const QString &text) |
virtual void | setPlainCaption (const QString &caption) |
![]() | |
Apply | |
AppNameCaption | |
Cancel | |
Close | |
Default | |
DelayedPopup | |
Details | |
Help | |
HIGCompliantCaption | |
InstantPopup | |
ModifiedCaption | |
No | |
NoCaptionFlags | |
NoDefault | |
None | |
Ok | |
Reset | |
Try | |
User1 | |
User2 | |
User3 | |
Yes | |
![]() | |
KDialog (KDialogPrivate &dd, QWidget *parent, Qt::WindowFlags flags=0) | |
virtual void | closeEvent (QCloseEvent *e) |
virtual void | hideEvent (QHideEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
![]() | |
KDialogPrivate *const | d_ptr |
Detailed Description
Dialog for interactive selection of icons.
Use the function getIcon() let the user select an icon.
An icon selection dialog.
Definition at line 107 of file kicondialog.h.
Constructor & Destructor Documentation
◆ KIconDialog() [1/2]
|
explicit |
Constructs an icon selection dialog using the global iconloader.
- Parameters
-
parent The parent widget.
Definition at line 329 of file kicondialog.cpp.
◆ KIconDialog() [2/2]
|
explicit |
Constructs an icon selection dialog using a specific iconloader.
- Parameters
-
loader The icon loader to use. parent The parent widget.
Definition at line 341 of file kicondialog.cpp.
◆ ~KIconDialog()
KIconDialog::~KIconDialog | ( | ) |
Destructs the dialog.
Definition at line 480 of file kicondialog.cpp.
Member Function Documentation
◆ getIcon()
|
static |
Pops up the dialog an lets the user select an icon.
- Parameters
-
group The icon group this icon is intended for. Providing the group shows the icons in the dialog with the same appearance as when used outside the dialog. context The initial icon context. Initially, the icons having this context are shown in the dialog. The user can change this. strictIconSize When true, only icons of the specified group's size are shown, otherwise icon not available in the desired group's size will also be selectable. iconSize the size of the icons – the default of the icongroup if set to 0 user Begin with the "user icons" instead of "system icons". parent The parent widget of the dialog. caption The caption to use for the dialog.
- Returns
- The name of the icon, suitable for loading with KIconLoader.
Definition at line 657 of file kicondialog.cpp.
◆ iconSize()
int KIconDialog::iconSize | ( | ) | const |
Returns the iconsize set via setIconSize() or 0, if the default iconsize will be used.
Definition at line 559 of file kicondialog.cpp.
◆ newIconName
|
signal |
◆ openDialog()
QString KIconDialog::openDialog | ( | ) |
exec()utes this modal dialog and returns the name of the selected icon, or QString() if the dialog was aborted.
- Returns
- the name of the icon, suitable for loading with KIconLoader.
- See also
- getIcon
Definition at line 610 of file kicondialog.cpp.
◆ setCustomLocation()
void KIconDialog::setCustomLocation | ( | const QString & | location | ) |
sets a custom icon directory
Definition at line 605 of file kicondialog.cpp.
◆ setIconSize()
void KIconDialog::setIconSize | ( | int | size | ) |
Sets the size of the icons to be shown / selected.
- See also
- KIconLoader::StdSizes
- iconSize
Definition at line 549 of file kicondialog.cpp.
◆ setStrictIconSize()
void KIconDialog::setStrictIconSize | ( | bool | b | ) |
Sets a strict icon size policy for allowed icons.
When true, only icons of the specified group's size in getIcon() are shown. When false, icons not available at the desired group's size will also be selectable.
Definition at line 539 of file kicondialog.cpp.
◆ setup()
void KIconDialog::setup | ( | KIconLoader::Group | group, |
KIconLoader::Context | context = KIconLoader::Application , |
||
bool | strictIconSize = false , |
||
int | iconSize = 0 , |
||
bool | user = false , |
||
bool | lockUser = false , |
||
bool | lockCustomDir = false |
||
) |
Allows you to set the same parameters as in the class method getIcon(), as well as two additional parameters to lock the choice between system and user dirs and to lock the custom user dir itself.
Definition at line 565 of file kicondialog.cpp.
◆ showDialog()
void KIconDialog::showDialog | ( | ) |
show()es this dialog and emits a newIcon(const QString&) signal when successful.
QString() will be emitted if the dialog was aborted.
Definition at line 632 of file kicondialog.cpp.
◆ slotOk
|
protectedslot |
Definition at line 640 of file kicondialog.cpp.
◆ strictIconSize()
bool KIconDialog::strictIconSize | ( | ) | const |
Returns true if a strict icon size policy is set.
Definition at line 544 of file kicondialog.cpp.
The documentation for this class was generated from the following files:
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.