\section{KIcon\-Loader Class Reference}
\label{classKIconLoader}\index{KIconLoader@{KIconLoader}}
Iconloader for {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})}.  


{\tt \#include $<$kiconloader.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KIcon\-Loader} (const {\bf QString} \&appname=QString::null, {\bf KStandard\-Dirs} $\ast$dirs=0)
\item 
{\bf $\sim$KIcon\-Loader} ()
\item 
void {\bf add\-App\-Dir} (const {\bf QString} \&appname)
\item 
{\bf QPixmap} {\bf load\-Icon} (const {\bf QString} \&name, {\bf KIcon::Group} group, int size=0, int state=KIcon::Default\-State, {\bf QString} $\ast$path\_\-store=0L, bool can\-Return\-Null=false) const 
\item 
{\bf QIcon\-Set} {\bf load\-Icon\-Set} (const {\bf QString} \&name, {\bf KIcon::Group} group, int size, bool can\-Return\-Null)
\item 
{\bf QIcon\-Set} {\bf load\-Icon\-Set} (const {\bf QString} \&name, {\bf KIcon::Group} group, int size=0)
\item 
{\bf QString} {\bf icon\-Path} (const {\bf QString} \&name, int group\_\-or\_\-size, bool can\-Return\-Null=false) const 
\item 
{\bf QMovie} {\bf load\-Movie} (const {\bf QString} \&name, {\bf KIcon::Group} group, int size=0) const 
\item 
{\bf QString} {\bf movie\-Path} (const {\bf QString} \&name, {\bf KIcon::Group} group, int size=0) const 
\item 
{\bf QString\-List} {\bf load\-Animated} (const {\bf QString} \&name, {\bf KIcon::Group} group, int size=0) const 
\item 
{\bf QString\-List} {\bf query\-Icons} (int group\_\-or\_\-size, {\bf KIcon::Context} context=KIcon::Any) const 
\item 
{\bf QString\-List} {\bf query\-Icons\-By\-Context} (int group\_\-or\_\-size, {\bf KIcon::Context} context=KIcon::Any) const 
\item 
{\bf QString\-List} {\bf query\-Icons\-By\-Dir} (const {\bf QString} \&icons\-Dir) const 
\item 
int {\bf current\-Size} ({\bf KIcon::Group} group) const 
\item 
{\bf KIcon\-Theme} $\ast$ {\bf theme} () const 
\item 
{\bf KIcon\-Effect} $\ast$ {\bf icon\-Effect} () const 
\item 
void {\bf reconfigure} (const {\bf QString} \&\_\-appname, {\bf KStandard\-Dirs} $\ast$\_\-dirs)
\item 
bool {\bf alpha\-Blending} ({\bf KIcon::Group} group) const 
\item 
void {\bf add\-Extra\-Desktop\-Themes} ()
\item 
bool {\bf extra\-Desktop\-Themes\-Added} () const 
\item 
void {\bf enable\-Delayed\-Icon\-Set\-Loading} (bool enable)
\item 
bool {\bf is\-Delayed\-Icon\-Set\-Loading\-Enabled} () const 
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf QPixmap} {\bf unknown} ()
\end{CompactItemize}
\subsection*{Related Functions}
(Note that these are not member functions.) \begin{CompactItemize}
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf Desktop\-Icon} (const {\bf QString} \&name, int size=0, int state=KIcon::Default\-State, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf Desktop\-Icon} (const {\bf QString} \&name, {\bf KInstance} $\ast$instance)
\item 
KDECORE\_\-EXPORT {\bf QIcon\-Set} {\bf Desktop\-Icon\-Set} (const {\bf QString} \&name, int size=0, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf Bar\-Icon} (const {\bf QString} \&name, int size=0, int state=KIcon::Default\-State, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf Bar\-Icon} (const {\bf QString} \&name, {\bf KInstance} $\ast$instance)
\item 
KDECORE\_\-EXPORT {\bf QIcon\-Set} {\bf Bar\-Icon\-Set} (const {\bf QString} \&name, int size=0, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf Small\-Icon} (const {\bf QString} \&name, int size=0, int state=KIcon::Default\-State, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf Small\-Icon} (const {\bf QString} \&name, {\bf KInstance} $\ast$instance)
\item 
KDECORE\_\-EXPORT {\bf QIcon\-Set} {\bf Small\-Icon\-Set} (const {\bf QString} \&name, int size=0, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf Main\-Bar\-Icon} (const {\bf QString} \&name, int size=0, int state=KIcon::Default\-State, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf Main\-Bar\-Icon} (const {\bf QString} \&name, {\bf KInstance} $\ast$instance)
\item 
KDECORE\_\-EXPORT {\bf QIcon\-Set} {\bf Main\-Bar\-Icon\-Set} (const {\bf QString} \&name, int size=0, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf User\-Icon} (const {\bf QString} \&name, int state=KIcon::Default\-State, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT {\bf QPixmap} {\bf User\-Icon} (const {\bf QString} \&name, {\bf KInstance} $\ast$instance)
\item 
KDECORE\_\-EXPORT {\bf QIcon\-Set} {\bf User\-Icon\-Set} (const {\bf QString} \&name, {\bf KInstance} $\ast$instance=KGlobal::instance())
\item 
KDECORE\_\-EXPORT int {\bf Icon\-Size} ({\bf KIcon::Group} group, {\bf KInstance} $\ast$instance=KGlobal::instance())
\end{CompactItemize}


\subsection{Detailed Description}
Iconloader for {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})}. 

KIcon\-Loader 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 {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})}, it is encouraged to load icons by \char`\"{}Group\char`\"{}. An icon group is a location on the screen where icons are being used. Standard groups are: Desktop, Toolbar, Main\-Toolbar, 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 {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} applications.

The standard groups are defined below.

\begin{itemize}
\item {\bf KIcon::Desktop}{\rm (p.\,\pageref{classKIcon_w39w12})}: Icons in the iconview of konqueror, kdesktop and similar apps. \item {\bf KIcon::Toolbar}{\rm (p.\,\pageref{classKIcon_w39w14})}: Icons in toolbars. \item {\bf KIcon::Main\-Toolbar}{\rm (p.\,\pageref{classKIcon_w39w15})}: Icons in the main toolbars. \item {\bf KIcon::Small}{\rm (p.\,\pageref{classKIcon_w39w16})}: Various small (typical 16x16) places: titlebars, listviews and menu entries. \item {\bf KIcon::Panel}{\rm (p.\,\pageref{classKIcon_w39w17})}: Icons in kicker's panel\end{itemize}
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 \char`\"{}User\char`\"{}. 



Definition at line 77 of file kiconloader.h.

\subsection{Constructor \& Destructor Documentation}
\index{KIconLoader@{KIcon\-Loader}!KIconLoader@{KIconLoader}}
\index{KIconLoader@{KIconLoader}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIcon\-Loader::KIcon\-Loader (const {\bf QString} \& {\em appname} = {\tt QString::null}, {\bf KStandard\-Dirs} $\ast$ {\em dirs} = {\tt 0})}\label{classKIconLoader_a0}


Constructs an iconloader. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em appname}]Add the data directories of this application to the icon search path for the \char`\"{}User\char`\"{} group. The default argument adds the directories of the current application. \item[{\em dirs}]the {\bf KStandard\-Dirs}{\rm (p.\,\pageref{classKStandardDirs})} object to use. If null the global one is used\end{description}
\end{Desc}
Usually, you use the default iconloader, which can be accessed via {\bf KGlobal::icon\-Loader()}{\rm (p.\,\pageref{classKGlobal_e4})}, so you hardly ever have to create an iconloader object yourself. That one is the current KInstance's (typically KApplication's) iconloader. \begin{Desc}
\item[See also:]{\bf KGlobal::icon\-Loader()}{\rm (p.\,\pageref{classKGlobal_e4})} 

{\bf KInstance::icon\-Loader()}{\rm (p.\,\pageref{classKInstance_a7})} \end{Desc}


Definition at line 160 of file kiconloader.cpp.

References QValue\-List::append(), QValue\-List::begin(), QValue\-List::end(), and QValue\-List::remove().\index{KIconLoader@{KIcon\-Loader}!~KIconLoader@{$\sim$KIconLoader}}
\index{~KIconLoader@{$\sim$KIconLoader}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIcon\-Loader::$\sim${\bf KIcon\-Loader} ()}\label{classKIconLoader_a1}


Cleanup. 



Definition at line 276 of file kiconloader.cpp.

References QValue\-List::begin(), and QValue\-List::end().

\subsection{Member Function Documentation}
\index{KIconLoader@{KIcon\-Loader}!addAppDir@{addAppDir}}
\index{addAppDir@{addAppDir}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIcon\-Loader::add\-App\-Dir (const {\bf QString} \& {\em appname})}\label{classKIconLoader_a2}


Adds {\tt appname} to the list of application specific directories. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em appname}]The application name. \end{description}
\end{Desc}


Definition at line 308 of file kiconloader.cpp.\index{KIconLoader@{KIcon\-Loader}!loadIcon@{loadIcon}}
\index{loadIcon@{loadIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPixmap} KIcon\-Loader::load\-Icon (const {\bf QString} \& {\em name}, {\bf KIcon::Group} {\em group}, int {\em size} = {\tt 0}, int {\em state} = {\tt KIcon::DefaultState}, {\bf QString} $\ast$ {\em path\_\-store} = {\tt 0L}, bool {\em can\-Return\-Null} = {\tt false}) const}\label{classKIconLoader_a3}


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 \char`\"{}unknown\char`\"{} pixmap is returned, depending on the value of the {\tt can\-Return\-Null} parameter.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The name of the icon, without extension. \item[{\em group}]The icon group. This will specify the size of and effects to be applied to the icon. \item[{\em size}]If nonzero, this overrides the size specified by {\tt group}. See {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})}. \item[{\em state}]The icon state: {\tt Default\-State}, {\tt Active\-State} or {\tt Disabled\-State}. Depending on the user's preferences, the iconloader may apply a visual effect to hint about its state. \item[{\em path\_\-store}]If not null, the path of the icon is stored here. \item[{\em can\-Return\-Null}]Can return a null pixmap? If false, the \char`\"{}unknown\char`\"{} pixmap is returned when no appropriate icon has been found. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the {\bf QPixmap}. Can be null when not found, depending on {\tt can\-Return\-Null}. \end{Desc}


Definition at line 594 of file kiconloader.cpp.

References KIcon::context, QPixmap::convert\-From\-Image(), QImage::copy(), QPixmap::create\-Heuristic\-Mask(), endl(), QPixmap\-Cache::find(), QString::from\-Latin1(), QPixmap::height(), icon\-Path(), QPixmap\-Cache::insert(), QString::is\-Empty(), QImage::is\-Null(), QPixmap::is\-Null(), KIcon::is\-Valid(), QString::latin1(), KIcon\-Theme::link\-Overlay(), KIcon\-Theme::lock\-Overlay(), QPixmap::mask(), QString::number(), KIcon\-Effect::overlay(), KIcon::path, QString::right(), QImage::scan\-Line(), QPixmap::set\-Mask(), KIcon\-Theme::share\-Overlay(), QImage::smooth\-Scale(), QString::starts\-With(), KGlobal::static\-QString(), theme(), KIcon::threshold, KIcon::type, QString::upper(), QPixmap::width(), QImage::width(), and KIcon\-Theme::zip\-Overlay().

Referenced by Bar\-Icon(), Desktop\-Icon(), load\-Icon\-Set(), Main\-Bar\-Icon(), Small\-Icon(), and User\-Icon().\index{KIconLoader@{KIcon\-Loader}!loadIconSet@{loadIconSet}}
\index{loadIconSet@{loadIconSet}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QIcon\-Set} KIcon\-Loader::load\-Icon\-Set (const {\bf QString} \& {\em name}, {\bf KIcon::Group} {\em group}, int {\em size}, bool {\em can\-Return\-Null})}\label{classKIconLoader_a4}


Creates an icon set, that will do on-demand loading of the icon. 

Loading itself is done by calling load\-Icon .

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The name of the icon, without extension. \item[{\em group}]The icon group. This will specify the size of and effects to be applied to the icon. \item[{\em size}]If nonzero, this overrides the size specified by {\tt group}. See {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})}. \item[{\em can\-Return\-Null}]Can return a null iconset? If false, iconset containing the \char`\"{}unknown\char`\"{} pixmap is returned when no appropriate icon has been found. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the icon set. Can be null when not found, depending on {\tt can\-Return\-Null}. \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 1163 of file kiconloader.cpp.

References endl(), QIcon\-Set::install\-Icon\-Factory(), QPixmap::is\-Null(), and load\-Icon().

Referenced by Bar\-Icon\-Set(), Desktop\-Icon\-Set(), load\-Icon\-Set(), Main\-Bar\-Icon\-Set(), Small\-Icon\-Set(), and User\-Icon\-Set().\index{KIconLoader@{KIcon\-Loader}!loadIconSet@{loadIconSet}}
\index{loadIconSet@{loadIconSet}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QIcon\-Set} KIcon\-Loader::load\-Icon\-Set (const {\bf QString} \& {\em name}, {\bf KIcon::Group} {\em group}, int {\em size} = {\tt 0})}\label{classKIconLoader_a5}


Creates an icon set, that will do on-demand loading of the icon. 

Loading itself is done by calling load\-Icon .

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The name of the icon, without extension. \item[{\em group}]The icon group. This will specify the size of and effects to be applied to the icon. \item[{\em size}]If nonzero, this overrides the size specified by {\tt group}. See {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the icon set. Can be null when not found \end{Desc}


Definition at line 1141 of file kiconloader.cpp.

References load\-Icon\-Set().\index{KIconLoader@{KIcon\-Loader}!iconPath@{iconPath}}
\index{iconPath@{iconPath}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KIcon\-Loader::icon\-Path (const {\bf QString} \& {\em name}, int {\em group\_\-or\_\-size}, bool {\em can\-Return\-Null} = {\tt false}) const}\label{classKIconLoader_a6}


Returns the path of an icon. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The name of the icon, without extension. If an absolute path is supplied for this parameter, icon\-Path will return it directly. \item[{\em group\_\-or\_\-size}]If positive, search icons whose size is specified by the icon group {\tt group\_\-or\_\-size}. If negative, search icons whose size is - {\tt group\_\-or\_\-size}. See {\bf KIcon::Group}{\rm (p.\,\pageref{classKIcon_w39})} and {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})} \item[{\em can\-Return\-Null}]Can return a null string? If not, a path to the \char`\"{}unknown\char`\"{} icon will be returned. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the path of an icon, can be null or the \char`\"{}unknown\char`\"{} icon when not found, depending on {\tt can\-Return\-Null}. \end{Desc}


Definition at line 527 of file kiconloader.cpp.

References endl(), QString::is\-Empty(), KIcon::is\-Valid(), KIcon::path, and KGlobal::static\-QString().

Referenced by load\-Icon(), load\-Movie(), and unknown().\index{KIconLoader@{KIcon\-Loader}!loadMovie@{loadMovie}}
\index{loadMovie@{loadMovie}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QMovie} KIcon\-Loader::load\-Movie (const {\bf QString} \& {\em name}, {\bf KIcon::Group} {\em group}, int {\em size} = {\tt 0}) const}\label{classKIconLoader_a7}


Loads an animated icon. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The name of the icon. \item[{\em group}]The icon group. See {\bf load\-Icon()}{\rm (p.\,\pageref{classKIconLoader_a3})}. \item[{\em size}]Override the default size for {\tt group}. See {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A {\bf QMovie} object. Can be null if not found. \end{Desc}


Definition at line 900 of file kiconloader.cpp.

References QString::find\-Rev(), icon\-Path(), QString::is\-Empty(), QString::left(), and movie\-Path().\index{KIconLoader@{KIcon\-Loader}!moviePath@{moviePath}}
\index{moviePath@{moviePath}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KIcon\-Loader::movie\-Path (const {\bf QString} \& {\em name}, {\bf KIcon::Group} {\em group}, int {\em size} = {\tt 0}) const}\label{classKIconLoader_a8}


Returns the path to an animated icon. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The name of the icon. \item[{\em group}]The icon group. See {\bf load\-Icon()}{\rm (p.\,\pageref{classKIconLoader_a3})}. \item[{\em size}]Override the default size for {\tt group}. See {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the full path to the movie, ready to be passed to QMovie's constructor. Empty string if not found. \end{Desc}


Definition at line 912 of file kiconloader.cpp.

References endl(), KIcon::is\-Valid(), and KIcon::path.

Referenced by load\-Movie().\index{KIconLoader@{KIcon\-Loader}!loadAnimated@{loadAnimated}}
\index{loadAnimated@{loadAnimated}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KIcon\-Loader::load\-Animated (const {\bf QString} \& {\em name}, {\bf KIcon::Group} {\em group}, int {\em size} = {\tt 0}) const}\label{classKIconLoader_a9}


Loads an animated icon as a series of still frames. 

If you want to load a .mng animation as {\bf QMovie} instead, please use {\bf load\-Movie()}{\rm (p.\,\pageref{classKIconLoader_a7})} instead. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The name of the icon. \item[{\em group}]The icon group. See {\bf load\-Icon()}{\rm (p.\,\pageref{classKIconLoader_a3})}. \item[{\em size}]Override the default size for {\tt group}. See {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A {\bf QString\-List} containing the absolute path of all the frames making up the animation. \end{Desc}


Definition at line 964 of file kiconloader.cpp.

References endl(), QString::is\-Empty(), KIcon::is\-Valid(), QString::left(), QString::length(), KIcon::path, and QString\-List::sort().\index{KIconLoader@{KIcon\-Loader}!queryIcons@{queryIcons}}
\index{queryIcons@{queryIcons}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KIcon\-Loader::query\-Icons (int {\em group\_\-or\_\-size}, {\bf KIcon::Context} {\em context} = {\tt KIcon::Any}) const}\label{classKIconLoader_a10}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em group\_\-or\_\-size}]If positive, search icons whose size is specified by the icon group {\tt group\_\-or\_\-size}. If negative, search icons whose size is - {\tt group\_\-or\_\-size}. See {\bf KIcon::Group}{\rm (p.\,\pageref{classKIcon_w39})} and {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})} \item[{\em context}]The icon context. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]a list of all icons \end{Desc}


Definition at line 1085 of file kiconloader.cpp.

References endl(), and QString::mid().\index{KIconLoader@{KIcon\-Loader}!queryIconsByContext@{queryIconsByContext}}
\index{queryIconsByContext@{queryIconsByContext}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KIcon\-Loader::query\-Icons\-By\-Context (int {\em group\_\-or\_\-size}, {\bf KIcon::Context} {\em context} = {\tt KIcon::Any}) const}\label{classKIconLoader_a11}


Queries all available icons for a specific context. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em group\_\-or\_\-size}]The icon preferred group or size. If available at this group or size, those icons will be returned, in other case, icons of undefined size will be returned. Positive numbers are groups, negative numbers are negated sizes. See {\bf KIcon::Group}{\rm (p.\,\pageref{classKIcon_w39})} and {\bf KIcon::Std\-Sizes}{\rm (p.\,\pageref{classKIcon_w40})} \item[{\em context}]The icon context. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A {\bf QString\-List} containing the icon names available for that context \end{Desc}


Definition at line 1044 of file kiconloader.cpp.

References endl(), and QString::mid().\index{KIconLoader@{KIcon\-Loader}!queryIconsByDir@{queryIconsByDir}}
\index{queryIconsByDir@{queryIconsByDir}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KIcon\-Loader::query\-Icons\-By\-Dir (const {\bf QString} \& {\em icons\-Dir}) const}\label{classKIconLoader_a12}


Returns a list of all icons ($\ast$.png or $\ast$.xpm extension) in the given directory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em icons\-Dir}]the directory to search in \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A {\bf QString\-List} containing the icon paths \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 1033 of file kiconloader.cpp.

References QDir::entry\-List().\index{KIconLoader@{KIcon\-Loader}!currentSize@{currentSize}}
\index{currentSize@{currentSize}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KIcon\-Loader::current\-Size ({\bf KIcon::Group} {\em group}) const}\label{classKIconLoader_a13}


Returns the current size of the group. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em group}]the group to check. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the current size for an icon group. \end{Desc}


Definition at line 1021 of file kiconloader.cpp.

References endl().

Referenced by Icon\-Size().\index{KIconLoader@{KIcon\-Loader}!theme@{theme}}
\index{theme@{theme}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIcon\-Theme} $\ast$ KIcon\-Loader::theme () const}\label{classKIconLoader_a14}


Returns a pointer to the current theme. 

Can be used to query available and default sizes for groups. \begin{Desc}
\item[Returns:]a pointer to the current theme. 0 if no theme set. \end{Desc}


Definition at line 1015 of file kiconloader.cpp.

Referenced by load\-Icon().\index{KIconLoader@{KIcon\-Loader}!iconEffect@{iconEffect}}
\index{iconEffect@{iconEffect}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIcon\-Effect} $\ast$ KIcon\-Loader::icon\-Effect () const}\label{classKIconLoader_a15}


Returns a pointer to the {\bf KIcon\-Effect}{\rm (p.\,\pageref{classKIconEffect})} object used by the icon loader. 

\begin{Desc}
\item[Returns:]the {\bf KIcon\-Effect}{\rm (p.\,\pageref{classKIconEffect})}. \end{Desc}


Definition at line 1124 of file kiconloader.cpp.\index{KIconLoader@{KIcon\-Loader}!reconfigure@{reconfigure}}
\index{reconfigure@{reconfigure}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIcon\-Loader::reconfigure (const {\bf QString} \& {\em \_\-appname}, {\bf KStandard\-Dirs} $\ast$ {\em \_\-dirs})}\label{classKIconLoader_a16}


Called by {\bf KInstance::new\-Icon\-Loader}{\rm (p.\,\pageref{classKInstance_a8})} to reconfigure the icon loader. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-appname}]the new application name \item[{\em \_\-dirs}]the new standard directories. If 0, the directories from {\bf KGlobal}{\rm (p.\,\pageref{classKGlobal})} will be taken. \end{description}
\end{Desc}


Definition at line 181 of file kiconloader.cpp.

Referenced by KInstance::new\-Icon\-Loader().\index{KIconLoader@{KIcon\-Loader}!unknown@{unknown}}
\index{unknown@{unknown}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPixmap} KIcon\-Loader::unknown ()\hspace{0.3cm}{\tt  [static]}}\label{classKIconLoader_e0}


Returns the unknown icon. 

An icon that is used when no other icon can be found. \begin{Desc}
\item[Returns:]the unknown pixmap \end{Desc}


Definition at line 1374 of file kiconloader.cpp.

References endl(), KGlobal::icon\-Loader(), icon\-Path(), QPixmap\-Cache::insert(), QString::is\-Empty(), QPixmap::load(), and QPixmap::resize().\index{KIconLoader@{KIcon\-Loader}!alphaBlending@{alphaBlending}}
\index{alphaBlending@{alphaBlending}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIcon\-Loader::alpha\-Blending ({\bf KIcon::Group} {\em group}) const}\label{classKIconLoader_a17}


Checks whether the user wants to blend the icons with the background using the alpha channel information for a given group. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em group}]the group to check \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if alpha blending is desired \end{Desc}
\begin{Desc}
\item[{\bf Deprecated}]\end{Desc}


Definition at line 1129 of file kiconloader.cpp.

References endl().\index{KIconLoader@{KIcon\-Loader}!addExtraDesktopThemes@{addExtraDesktopThemes}}
\index{addExtraDesktopThemes@{addExtraDesktopThemes}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIcon\-Loader::add\-Extra\-Desktop\-Themes ()}\label{classKIconLoader_a18}


Adds all the default themes from other desktops at the end of the list of icon themes. 

\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 361 of file kiconloader.cpp.

References QDir::dir\-Name(), KGlobal::dirs(), QDir::entry\-List(), QDir::exists(), and KStandard\-Dirs::resource\-Dirs().\index{KIconLoader@{KIcon\-Loader}!extraDesktopThemesAdded@{extraDesktopThemesAdded}}
\index{extraDesktopThemesAdded@{extraDesktopThemesAdded}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIcon\-Loader::extra\-Desktop\-Themes\-Added () const}\label{classKIconLoader_a19}


Returns if the default icon themes of other desktops have been added to the list of icon themes where icons are searched. 

\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 412 of file kiconloader.cpp.\index{KIconLoader@{KIcon\-Loader}!enableDelayedIconSetLoading@{enableDelayedIconSetLoading}}
\index{enableDelayedIconSetLoading@{enableDelayedIconSetLoading}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIcon\-Loader::enable\-Delayed\-Icon\-Set\-Loading (bool {\em enable})}\label{classKIconLoader_a20}


Enables on-demand icon loading for QIcon\-Sets using {\bf QIcon\-Factory}. 

Icons loaded via {\bf load\-Icon\-Set()}{\rm (p.\,\pageref{classKIconLoader_a4})} will be loaded as soon as they need to be displayed, not earlier.

Note that enabling or disabling this only affects {\bf load\-Icon\-Set()}{\rm (p.\,\pageref{classKIconLoader_a4})} 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 KIcon\-Loader objects). Every {\bf KInstance}{\rm (p.\,\pageref{classKInstance})} 's iconloader has this feature enabled.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em enable}]true to enable delayed icon loading, false to disable \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf is\-Delayed\-Icon\-Set\-Loading\-Enabled()}{\rm (p.\,\pageref{classKIconLoader_a21})} 

{\bf QIcon\-Factory} \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 298 of file kiconloader.cpp.

Referenced by KInstance::icon\-Loader().\index{KIconLoader@{KIcon\-Loader}!isDelayedIconSetLoadingEnabled@{isDelayedIconSetLoadingEnabled}}
\index{isDelayedIconSetLoadingEnabled@{isDelayedIconSetLoadingEnabled}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIcon\-Loader::is\-Delayed\-Icon\-Set\-Loading\-Enabled () const}\label{classKIconLoader_a21}


Checks whether delayed loading for {\bf QIcon\-Set} is enabled. 

\begin{Desc}
\item[Returns:]whether icons for QIcon\-Sets will be loaded on demand. \end{Desc}
\begin{Desc}
\item[See also:]{\bf enable\-Delayed\-Icon\-Set\-Loading()}{\rm (p.\,\pageref{classKIconLoader_a20})} 

{\bf QIcon\-Factory} \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 303 of file kiconloader.cpp.

\subsection{Friends And Related Function Documentation}
\index{KIconLoader@{KIcon\-Loader}!DesktopIcon@{DesktopIcon}}
\index{DesktopIcon@{DesktopIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} Desktop\-Icon (const {\bf QString} \& {\em name}, int {\em size} = {\tt 0}, int {\em state} = {\tt KIcon::DefaultState}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m0}


Load a desktop icon. 



Definition at line 1279 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon().\index{KIconLoader@{KIcon\-Loader}!DesktopIcon@{DesktopIcon}}
\index{DesktopIcon@{DesktopIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} Desktop\-Icon (const {\bf QString} \& {\em name}, {\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m1}


Load a desktop icon. 



Definition at line 1286 of file kiconloader.cpp.\index{KIconLoader@{KIcon\-Loader}!DesktopIconSet@{DesktopIconSet}}
\index{DesktopIconSet@{DesktopIconSet}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QIcon\-Set} Desktop\-Icon\-Set (const {\bf QString} \& {\em name}, int {\em size} = {\tt 0}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m2}


Load a desktop icon, and apply the necessary effects to get an Icon\-Set. 



Definition at line 1291 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon\-Set().\index{KIconLoader@{KIcon\-Loader}!BarIcon@{BarIcon}}
\index{BarIcon@{BarIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} Bar\-Icon (const {\bf QString} \& {\em name}, int {\em size} = {\tt 0}, int {\em state} = {\tt KIcon::DefaultState}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m3}


Load a toolbar icon. 



Definition at line 1297 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon().\index{KIconLoader@{KIcon\-Loader}!BarIcon@{BarIcon}}
\index{BarIcon@{BarIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} Bar\-Icon (const {\bf QString} \& {\em name}, {\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m4}


Load a toolbar icon. 



Definition at line 1304 of file kiconloader.cpp.\index{KIconLoader@{KIcon\-Loader}!BarIconSet@{BarIconSet}}
\index{BarIconSet@{BarIconSet}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QIcon\-Set} Bar\-Icon\-Set (const {\bf QString} \& {\em name}, int {\em size} = {\tt 0}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m5}


Load a toolbar icon, and apply the necessary effects to get an Icon\-Set. 



Definition at line 1309 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon\-Set().\index{KIconLoader@{KIcon\-Loader}!SmallIcon@{SmallIcon}}
\index{SmallIcon@{SmallIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} Small\-Icon (const {\bf QString} \& {\em name}, int {\em size} = {\tt 0}, int {\em state} = {\tt KIcon::DefaultState}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m6}


Load a small icon. 



Definition at line 1315 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon().\index{KIconLoader@{KIcon\-Loader}!SmallIcon@{SmallIcon}}
\index{SmallIcon@{SmallIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} Small\-Icon (const {\bf QString} \& {\em name}, {\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m7}


Load a small icon. 



Definition at line 1322 of file kiconloader.cpp.\index{KIconLoader@{KIcon\-Loader}!SmallIconSet@{SmallIconSet}}
\index{SmallIconSet@{SmallIconSet}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QIcon\-Set} Small\-Icon\-Set (const {\bf QString} \& {\em name}, int {\em size} = {\tt 0}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m8}


Load a small icon, and apply the necessary effects to get an Icon\-Set. 



Definition at line 1327 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon\-Set().\index{KIconLoader@{KIcon\-Loader}!MainBarIcon@{MainBarIcon}}
\index{MainBarIcon@{MainBarIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} Main\-Bar\-Icon (const {\bf QString} \& {\em name}, int {\em size} = {\tt 0}, int {\em state} = {\tt KIcon::DefaultState}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m9}


Load a main toolbar icon. 



Definition at line 1333 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon().\index{KIconLoader@{KIcon\-Loader}!MainBarIcon@{MainBarIcon}}
\index{MainBarIcon@{MainBarIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} Main\-Bar\-Icon (const {\bf QString} \& {\em name}, {\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m10}


Load a main toolbar icon. 



Definition at line 1340 of file kiconloader.cpp.\index{KIconLoader@{KIcon\-Loader}!MainBarIconSet@{MainBarIconSet}}
\index{MainBarIconSet@{MainBarIconSet}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QIcon\-Set} Main\-Bar\-Icon\-Set (const {\bf QString} \& {\em name}, int {\em size} = {\tt 0}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m11}


Load a main toolbar icon, and apply the effects to get an Icon\-Set. 



Definition at line 1345 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon\-Set().\index{KIconLoader@{KIcon\-Loader}!UserIcon@{UserIcon}}
\index{UserIcon@{UserIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} User\-Icon (const {\bf QString} \& {\em name}, int {\em state} = {\tt KIcon::DefaultState}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m12}


Load a user icon. 

User icons are searched in \$appdir/pics. 

Definition at line 1351 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon().\index{KIconLoader@{KIcon\-Loader}!UserIcon@{UserIcon}}
\index{UserIcon@{UserIcon}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QPixmap} User\-Icon (const {\bf QString} \& {\em name}, {\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m13}


Load a user icon. 

User icons are searched in \$appdir/pics. 

Definition at line 1357 of file kiconloader.cpp.\index{KIconLoader@{KIcon\-Loader}!UserIconSet@{UserIconSet}}
\index{UserIconSet@{UserIconSet}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT {\bf QIcon\-Set} User\-Icon\-Set (const {\bf QString} \& {\em name}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m14}


Load a user icon, and apply the effects to get an Icon\-Set. 



Definition at line 1362 of file kiconloader.cpp.

References KInstance::icon\-Loader(), and load\-Icon\-Set().\index{KIconLoader@{KIcon\-Loader}!IconSize@{IconSize}}
\index{IconSize@{IconSize}!KIconLoader@{KIcon\-Loader}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDECORE\_\-EXPORT int Icon\-Size ({\bf KIcon::Group} {\em group}, {\bf KInstance} $\ast$ {\em instance} = {\tt KGlobal::instance()})\hspace{0.3cm}{\tt  [related]}}\label{classKIconLoader_m15}


Returns the current icon size for a specific group. 



Definition at line 1368 of file kiconloader.cpp.

References current\-Size(), and KInstance::icon\-Loader().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kiconloader.h\item 
kiconloader.cpp\end{CompactItemize}
