16#include "kiconthemes_export.h"
22#include <kiconloader.h>
44#if KICONTHEMES_ENABLE_DEPRECATED_SINCE(5, 104)
53 KICONTHEMES_DEPRECATED_VERSION(5, 104,
"Use KIconDialog(QWidget *) instead")
113 bool strictIconSize =
false,
116 bool lockUser =
false,
117 bool lockCustomDir =
false);
153 bool strictIconSize =
false,
156 QWidget *parent =
nullptr,
157 const QString &title = QString());
160 void newIconName(
const QString &iconName);
166 std::unique_ptr<class KIconDialogPrivate>
const d;
168 friend class ShowEventFilter;
169 friend class KIconDialogPrivate;
Dialog for interactive selection of icons.
Definition kicondialog.h:33
bool strictIconSize() const
Returns true if a strict icon size policy is set.
KIconDialog(QWidget *parent=nullptr)
Constructs an icon selection dialog using the global icon loader.
void setStrictIconSize(bool policy)
Sets a strict icon size policy for allowed icons.
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)
Allows you to set the same parameters as in the class method getIcon(), as well as two additional par...
~KIconDialog() override
Destructs the dialog.
int iconSize() const
Returns the icon size set via setIconSize() or 0, if the default icon size will be used.
void setSelectedIcon(const QString &iconName)
Sets the icon that is initially selected in the dialog.
void showDialog()
show()s this dialog and emits a newIconName(const QString&) signal when successful.
QString openDialog()
exec()utes this modal dialog and returns the name of the selected icon, or QString() if the dialog wa...
void setIconSize(int size)
Sets the size of the icons to be shown / selected.
static QString getIcon(KIconLoader::Group group=KIconLoader::Desktop, KIconLoader::Context context=KIconLoader::Application, bool strictIconSize=false, int iconSize=0, bool user=false, QWidget *parent=nullptr, const QString &title=QString())
Pops up the dialog an lets the user select an icon.
void setCustomLocation(const QString &location)
Sets the location of the custom icon directory.
Iconloader for KDE.
Definition kiconloader.h:74
Group
The group of the icon.
Definition kiconloader.h:125
@ Desktop
Desktop icons.
Definition kiconloader.h:129
Context
Defines the context of the icon.
Definition kiconloader.h:81
@ Application
An icon that represents an application.
Definition kiconloader.h:84