class KIconLoader

Iconloader for KDE. More...

Definition#include <kiconloader.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

Iconloader for KDE.

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 icons are stored on disk in an icon theme or in a standalone directory. The icon theme directories contain multiple sizes and/or depths for the same icon. The iconloader will load the correct one based on the icon group and the current theme. Icon themes are stored globally in share/icons, or, application specific in share/apps/$appdir/icons.

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".

 KIconLoader (const QString& appname=QString::null, KStandardDirs *dirs = 0)

Construct the iconloader.

Parameters:

KIconLoader ()

Cleanup

void  addAppDir (const QString& appname)

Add appname to the list of application specific directories.

Parameters:

QPixmap  loadIcon (const QString& name, int group, int size=0, int state=KIcon::DefaultState, QString *path_store=0L, bool canReturnNull=false)

[const]

Load 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 canReturnNull parameter.

Parameters:

QString  iconPath (const QString& name, int group_or_size, bool canReturnNull=false)

[const]

Returns the path of an icon.

Parameters:

QStringList  loadAnimated (const QString& name, int group, int size=0)

[const]

Load an animated icon. In the future, this will be replaced by a routine which loads an MNG animation and returns a QMovie.

Parameters:

Returns: A QStringList containing the absolute path of all the frames making up the animation.

QStringList  queryIcons (int group_or_size, int context=KIcon::Any)

[const]

Query all available icons for a specific group, having a specific context.

Parameters:

QStringList  queryIconsByContext (int group_or_size, int context=KIcon::Any)

[const]

Query all available icons for a specific context.

Parameters:

Returns: A QStringList containing the icon names available for that context

int  currentSize (int group)

Returns: the current size for an icon group.

KIconThemetheme ()

Returns a pointer to the current theme. Can be used to query available and default sizes for groups.

KIconEffecticonEffect ()

Returns a pointer to the KIconEffect object used by the icon loader.

void  reconfigure ( const QString& _appname, KStandardDirs *_dirs )

Called by KInstance::newIconLoader to reconfigure the icon loader


Generated by: baudens@ke.mandrakesoft.com on Thu Oct 26 17:36:19 2000, using kdoc 2.0a40.