#include <kiconloader.h>
Public Methods | |
| KIconLoader (const QString &appname=QString::null, KStandardDirs *dirs=0) | |
| ~KIconLoader () | |
| void | addAppDir (const QString &appname) |
| QPixmap | loadIcon (const QString &name, KIcon::Group group, int size=0, int state=KIcon::DefaultState, QString *path_store=0L, bool canReturnNull=false) const |
| QIconSet | loadIconSet (const QString &name, KIcon::Group group, int size, bool canReturnNull) |
| QIconSet | loadIconSet (const QString &name, KIcon::Group group, int size=0) |
| QString | iconPath (const QString &name, int group_or_size, bool canReturnNull=false) const |
| QMovie | loadMovie (const QString &name, KIcon::Group group, int size=0) const |
| QString | moviePath (const QString &name, KIcon::Group group, int size=0) const |
| QStringList | loadAnimated (const QString &name, KIcon::Group group, int size=0) const |
| QStringList | queryIcons (int group_or_size, KIcon::Context context=KIcon::Any) const |
| QStringList | queryIconsByContext (int group_or_size, KIcon::Context context=KIcon::Any) const |
| QStringList | queryIconsByDir (const QString &iconsDir) const |
| int | currentSize (KIcon::Group group) const |
| KIconTheme * | theme () const |
| KIconEffect * | iconEffect () const |
| void | reconfigure (const QString &_appname, KStandardDirs *_dirs) |
| bool | alphaBlending (KIcon::Group group) const |
| void | addExtraDesktopThemes () |
| bool | extraDesktopThemesAdded () const |
| void | enableDelayedIconSetLoading (bool enable) |
| bool | isDelayedIconSetLoadingEnabled () const |
Static Public Methods | |
| QPixmap | unknown () |
KIconLoader will load the current icon theme and all its base themes. Icons will be searched in any of these themes. Additionally, it caches icons and applies effects according the the user's preferences.
In KDE, it is encouraged to load icons by "Group". An icon group is a location on the screen where icons are being used. Standard groups are: Desktop, Toolbar, MainToolbar, Small and Panel. Each group has some centrally configured properties bound to it, including the icon size and effects. This makes it possible to offer a consistent icon look in all KDE applications.
The standard groups are defined below.
The standalone directories contain just one version of an icon. The directories that are searched are: $appdir/pics and $appdir/toolbar. Icons in these directories can be loaded by using the special group "User".
Definition at line 79 of file kiconloader.h.
|
||||||||||||
|
Constructs an iconloader.
|
|
|
Cleanup |
|
|
Adds
|
|
|
Adds all the default themes from other desktops at the end of the list of icon themes.
|
|
|
Returns if the user wants to use blend the icons with the background using the alpha channel information for a given group.
|
|
|
Returns the current size of the group.
|
|
|
Enables on-demand icon loading for QIconSets using QIconFactory. Icons loaded via loadIconSet() will be loaded as soon as they need to be displayed, not earlier. Note that enabling or disabling this only affects loadIconSet() calls after this setting is changed. The default is disabled, as the iconloader object must not be destroyed before all those iconsets are destroyed. (Some broken applications use temporary KIconLoader objects). Every KInstance 's iconloader has this feature enabled.
|
|
|
Returns if the default icon themes of other desktops have been added to the list of icon themes where icons are searched.
|
|
|
Returns a pointer to the KIconEffect object used by the icon loader.
|
|
||||||||||||||||
|
Returns the path of an icon.
|
|
|
|
|
||||||||||||||||
|
Loads an animated icon. In the future, this will be replaced by a routine which loads an MNG animation and returns a QMovie.
|
|
||||||||||||||||||||||||||||
|
Loads an icon. It will try very hard to find an icon which is suitable. If no exact match is found, a close match is searched. If neither an exact nor a close match is found, a null pixmap or the "unknown" pixmap is returned, depending on the value of the
|
|
||||||||||||||||
|
Creates an icon set, that will do on-demand loading of the icon. Loading itself is done by calling loadIcon .
|
|
||||||||||||||||||||
|
Creates an icon set, that will do on-demand loading of the icon. Loading itself is done by calling loadIcon .
|
|
||||||||||||||||
|
Loads an animated icon.
|
|
||||||||||||||||
|
Returns the path to an animated icon.
|
|
||||||||||||
|
Queries all available icons for a specific group, having a specific context.
|
|
||||||||||||
|
Queries all available icons for a specific context.
|
|
|
Returns a list of all icons (*.png or *.xpm extension) in the given directory.
|
|
||||||||||||
|
Called by KInstance::newIconLoader to reconfigure the icon loader.
|
|
|
Returns a pointer to the current theme. Can be used to query available and default sizes for groups.
|
|
|
Returns the unknown icon. An icon that is used when no other icon can be found.
|
1.2.18