#include <kicondialog.h>
Inherits KDialogBase.
Signals | |
void | newIconName (const TQString &) |
Public Member Functions | |
TDEIconDialog (TQWidget *parent=0L, const char *name=0L) | |
TDEIconDialog (TDEIconLoader *loader, TQWidget *parent=0, const char *name=0) | |
~TDEIconDialog () | |
void | setStrictIconSize (bool b) |
bool | strictIconSize () const |
void | setCustomLocation (const TQString &location) |
void | setIconSize (int size) |
int | iconSize () const |
TQString | selectIcon (TDEIcon::Group group=TDEIcon::Desktop, TDEIcon::Context context=TDEIcon::Application, bool user=false) |
void | setup (TDEIcon::Group group, TDEIcon::Context context=TDEIcon::Application, bool strictIconSize=false, int iconSize=0, bool user=false) |
void | setup (TDEIcon::Group group, TDEIcon::Context context, bool strictIconSize, int iconSize, bool user, bool lockUser, bool lockCustomDir) |
TQString | openDialog () |
void | showDialog () |
Static Public Member Functions | |
static TQString | getIcon (TDEIcon::Group group=TDEIcon::Desktop, TDEIcon::Context context=TDEIcon::Application, bool strictIconSize=false, int iconSize=0, bool user=false, TQWidget *parent=0, const TQString &caption=TQString::null) |
Protected Slots | |
void | slotOk () |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
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 91 of file kicondialog.h.
Constructor & Destructor Documentation
◆ TDEIconDialog() [1/2]
TDEIconDialog::TDEIconDialog | ( | TQWidget * | parent = 0L , |
const char * | name = 0L |
||
) |
Constructs an icon selection dialog using the global iconloader.
Definition at line 240 of file kicondialog.cpp.
◆ TDEIconDialog() [2/2]
TDEIconDialog::TDEIconDialog | ( | TDEIconLoader * | loader, |
TQWidget * | parent = 0 , |
||
const char * | name = 0 |
||
) |
Constructs an icon selection dialog using a specific iconloader.
Definition at line 248 of file kicondialog.cpp.
◆ ~TDEIconDialog()
TDEIconDialog::~TDEIconDialog | ( | ) |
Destructs the dialog.
Definition at line 379 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 TDEIconLoader.
- Version
- New in 3.0
Definition at line 546 of file kicondialog.cpp.
◆ iconSize()
int TDEIconDialog::iconSize | ( | ) | const |
Returns the iconsize set via setIconSize() or 0, if the default iconsize will be used.
Definition at line 438 of file kicondialog.cpp.
◆ openDialog()
TQString TDEIconDialog::openDialog | ( | ) |
exec()utes this modal dialog and returns the name of the selected icon, or TQString::null if the dialog was aborted.
- Returns
- the name of the icon, suitable for loading with TDEIconLoader.
- See also
- getIcon
Definition at line 501 of file kicondialog.cpp.
◆ selectIcon()
TQString TDEIconDialog::selectIcon | ( | TDEIcon::Group | group = TDEIcon::Desktop , |
TDEIcon::Context | context = TDEIcon::Application , |
||
bool | user = false |
||
) |
- Deprecated:
- in KDE 3.0, use the static method getIcon instead.
Definition at line 445 of file kicondialog.cpp.
◆ setCustomLocation()
void TDEIconDialog::setCustomLocation | ( | const TQString & | location | ) |
◆ setIconSize()
void TDEIconDialog::setIconSize | ( | int | size | ) |
Sets the size of the icons to be shown / selected.
- See also
- TDEIcon::StdSizes
- iconSize
Definition at line 429 of file kicondialog.cpp.
◆ setStrictIconSize()
void TDEIconDialog::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 419 of file kicondialog.cpp.
◆ setup() [1/2]
void TDEIconDialog::setup | ( | TDEIcon::Group | group, |
TDEIcon::Context | context, | ||
bool | strictIconSize, | ||
int | iconSize, | ||
bool | user, | ||
bool | lockUser, | ||
bool | lockCustomDir | ||
) |
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.
- Since
- 3.3
Definition at line 465 of file kicondialog.cpp.
◆ setup() [2/2]
void TDEIconDialog::setup | ( | TDEIcon::Group | group, |
TDEIcon::Context | context = TDEIcon::Application , |
||
bool | strictIconSize = false , |
||
int | iconSize = 0 , |
||
bool | user = false |
||
) |
Allows you to set the same parameters as in the class method getIcon().
Definition at line 452 of file kicondialog.cpp.
◆ showDialog()
void TDEIconDialog::showDialog | ( | ) |
show()es this dialog and emits a newIcon(const TQString&) signal when successful.
TQString::null will be emitted if the dialog was aborted.
Definition at line 518 of file kicondialog.cpp.
◆ strictIconSize()
bool TDEIconDialog::strictIconSize | ( | ) | const |
Returns true if a strict icon size policy is set.
Definition at line 424 of file kicondialog.cpp.
The documentation for this class was generated from the following files: