\section{KIcon\-Dialog Class Reference}
\label{classKIconDialog}\index{KIconDialog@{KIconDialog}}
Dialog for interactive selection of icons. An icon selection dialog.  


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

Inheritance diagram for KIcon\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=55pt]{classKIconDialog__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KIcon\-Dialog:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=250pt]{classKIconDialog__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KIcon\-Dialog} ({\bf QWidget} $\ast$parent=0L, const  char $\ast$name=0L)
\begin{CompactList}\small\item\em Constructs an icon selection dialog using the global iconloader. \item\end{CompactList}\item 
{\bf KIcon\-Dialog} ({\bf KIcon\-Loader} $\ast$loader, {\bf QWidget} $\ast$parent=0, const  char $\ast$name=0)
\begin{CompactList}\small\item\em Constructs an icon selection dialog using a specific iconloader. \item\end{CompactList}\item 
{\bf $\sim$KIcon\-Dialog} ()
\begin{CompactList}\small\item\em Destructs the dialog. \item\end{CompactList}\item 
void {\bf set\-Strict\-Icon\-Size} (bool b)
\begin{CompactList}\small\item\em Sets a strict icon size policy for allowed icons. \item\end{CompactList}\item 
bool {\bf strict\-Icon\-Size} () const 
\begin{CompactList}\small\item\em Returns true if a strict icon size policy is set. \item\end{CompactList}\item 
void {\bf set\-Custom\-Location} (const  {\bf QString} \&location)
\begin{CompactList}\small\item\em sets a custom icon directory \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
void {\bf set\-Icon\-Size} (int size)
\begin{CompactList}\small\item\em Sets the size of the icons to be shown / selected. \item\end{CompactList}\item 
int {\bf icon\-Size} () const 
\begin{CompactList}\small\item\em Returns the iconsize set via {\bf set\-Icon\-Size}{\rm (p.\,\pageref{classKIconDialog_a6})}() or 0, if the default iconsize will be used. \item\end{CompactList}\item 
{\bf QString} {\bf select\-Icon} ({\bf KIcon::Group} group=KIcon::Desktop, {\bf KIcon::Context} context={\bf KIcon::Application}, bool user=false)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} in {\bf KDE} 3.0, use the static method get\-Icon instead. \item\end{CompactList}\item 
void {\bf setup} ({\bf KIcon::Group} group, {\bf KIcon::Context} context={\bf KIcon::Application}, bool strict\-Icon\-Size=false, int icon\-Size=0, bool user=false)
\begin{CompactList}\small\item\em Allows you to set the same parameters as in the class method {\bf get\-Icon}{\rm (p.\,\pageref{classKIconDialog_e0})}(). \item\end{CompactList}\item 
{\bf QString} {\bf open\-Dialog} ()
\begin{CompactList}\small\item\em {\bf exec()}utes this modal dialog and returns the name of the selected icon, or QString::null if the dialog was aborted. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf QString} {\bf get\-Icon} ({\bf KIcon::Group} group=KIcon::Desktop, {\bf KIcon::Context} context={\bf KIcon::Application}, bool strict\-Icon\-Size=false, int icon\-Size=0, bool user=false, {\bf QWidget} $\ast$parent=0, const  {\bf QString} \&caption=QString::null)
\begin{CompactList}\small\item\em Pops up the dialog an lets the user select an icon. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKIconDialog_b0}

\end{CompactItemize}


\subsection{Detailed Description}
Dialog for interactive selection of icons. An icon selection dialog. 

Use the function {\bf get\-Icon()}{\rm (p.\,\pageref{classKIconDialog_e0})} let the user select an icon.



Definition at line 92 of file kicondialog.h.

\subsection{Constructor \& Destructor Documentation}
\index{KIconDialog@{KIcon\-Dialog}!KIconDialog@{KIconDialog}}
\index{KIconDialog@{KIconDialog}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIcon\-Dialog::KIcon\-Dialog ({\bf QWidget} $\ast$ {\em parent} = 0L, const char $\ast$ {\em name} = 0L)}\label{classKIconDialog_a0}


Constructs an icon selection dialog using the global iconloader. 



Definition at line 198 of file kicondialog.cpp.

References KGlobal::icon\-Loader(), and KStd\-Accel::name().\index{KIconDialog@{KIcon\-Dialog}!KIconDialog@{KIconDialog}}
\index{KIconDialog@{KIconDialog}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIcon\-Dialog::KIcon\-Dialog ({\bf KIcon\-Loader} $\ast$ {\em loader}, {\bf QWidget} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0)}\label{classKIconDialog_a1}


Constructs an icon selection dialog using a specific iconloader. 



Definition at line 206 of file kicondialog.cpp.

References KStd\-Accel::name().\index{KIconDialog@{KIcon\-Dialog}!~KIconDialog@{$\sim$KIconDialog}}
\index{~KIconDialog@{$\sim$KIconDialog}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KIcon\-Dialog::$\sim${\bf KIcon\-Dialog} ()}\label{classKIconDialog_a2}


Destructs the dialog. 



Definition at line 271 of file kicondialog.cpp.

\subsection{Member Function Documentation}
\index{KIconDialog@{KIcon\-Dialog}!setStrictIconSize@{setStrictIconSize}}
\index{setStrictIconSize@{setStrictIconSize}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIcon\-Dialog::set\-Strict\-Icon\-Size (bool {\em b})}\label{classKIconDialog_a3}


Sets a strict icon size policy for allowed icons. 

When true, only icons of the specified group's size in {\bf get\-Icon}{\rm (p.\,\pageref{classKIconDialog_e0})}() are shown. When false, icons not available at the desired group's size will also be selectable. 

Definition at line 311 of file kicondialog.cpp.\index{KIconDialog@{KIcon\-Dialog}!strictIconSize@{strictIconSize}}
\index{strictIconSize@{strictIconSize}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIcon\-Dialog::strict\-Icon\-Size () const}\label{classKIconDialog_a4}


Returns true if a strict icon size policy is set. 



Definition at line 316 of file kicondialog.cpp.\index{KIconDialog@{KIcon\-Dialog}!setCustomLocation@{setCustomLocation}}
\index{setCustomLocation@{setCustomLocation}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIcon\-Dialog::set\-Custom\-Location (const {\bf QString} \& {\em location})}\label{classKIconDialog_a5}


sets a custom icon directory \begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 358 of file kicondialog.cpp.

Referenced by KIcon\-Button::set\-Icon().\index{KIconDialog@{KIcon\-Dialog}!setIconSize@{setIconSize}}
\index{setIconSize@{setIconSize}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIcon\-Dialog::set\-Icon\-Size (int {\em size})}\label{classKIconDialog_a6}


Sets the size of the icons to be shown / selected. 

\begin{Desc}
\item[See also:]{\bf KIcon::Std\-Sizes} 

{\bf icon\-Size}{\rm (p.\,\pageref{classKIconDialog_a7})} \end{Desc}


Definition at line 321 of file kicondialog.cpp.\index{KIconDialog@{KIcon\-Dialog}!iconSize@{iconSize}}
\index{iconSize@{iconSize}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KIcon\-Dialog::icon\-Size () const}\label{classKIconDialog_a7}


Returns the iconsize set via {\bf set\-Icon\-Size}{\rm (p.\,\pageref{classKIconDialog_a6})}() or 0, if the default iconsize will be used. 



Definition at line 330 of file kicondialog.cpp.\index{KIconDialog@{KIcon\-Dialog}!selectIcon@{selectIcon}}
\index{selectIcon@{selectIcon}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KIcon\-Dialog::select\-Icon ({\bf KIcon::Group} {\em group} = KIcon::Desktop, {\bf KIcon::Context} {\em context} = {\bf KIcon::Application}, bool {\em user} = false)}\label{classKIconDialog_a8}


{\bf This class or method is obsolete, it is provided for compatibility only.} in {\bf KDE} 3.0, use the static method get\-Icon instead. 



Definition at line 337 of file kicondialog.cpp.

References open\-Dialog(), and setup().\index{KIconDialog@{KIcon\-Dialog}!setup@{setup}}
\index{setup@{setup}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIcon\-Dialog::setup ({\bf KIcon::Group} {\em group}, {\bf KIcon::Context} {\em context} = {\bf KIcon::Application}, bool {\em strict\-Icon\-Size} = false, int {\em icon\-Size} = 0, bool {\em user} = false)}\label{classKIconDialog_a9}


Allows you to set the same parameters as in the class method {\bf get\-Icon}{\rm (p.\,\pageref{classKIconDialog_e0})}(). 



Definition at line 344 of file kicondialog.cpp.

References QRadio\-Button::set\-Checked(), and QCombo\-Box::set\-Current\-Item().

Referenced by get\-Icon(), and select\-Icon().\index{KIconDialog@{KIcon\-Dialog}!openDialog@{openDialog}}
\index{openDialog@{openDialog}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KIcon\-Dialog::open\-Dialog ()}\label{classKIconDialog_a10}


{\bf exec()}utes this modal dialog and returns the name of the selected icon, or QString::null if the dialog was aborted. 

\begin{Desc}
\item[Returns:]the name of the icon, suitable for loading with {\bf KIcon\-Loader}. \end{Desc}
\begin{Desc}
\item[See also:]{\bf get\-Icon}{\rm (p.\,\pageref{classKIconDialog_e0})} \end{Desc}


Definition at line 363 of file kicondialog.cpp.

References QFile\-Info::base\-Name(), QDialog::exec(), KIcon\-Canvas::get\-Current(), QString::is\-Empty(), and KStd\-Accel::name().

Referenced by get\-Icon(), and select\-Icon().\index{KIconDialog@{KIcon\-Dialog}!getIcon@{getIcon}}
\index{getIcon@{getIcon}!KIconDialog@{KIcon\-Dialog}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KIcon\-Dialog::get\-Icon ({\bf KIcon::Group} {\em group} = KIcon::Desktop, {\bf KIcon::Context} {\em context} = {\bf KIcon::Application}, bool {\em strict\-Icon\-Size} = false, int {\em icon\-Size} = 0, bool {\em user} = false, {\bf QWidget} $\ast$ {\em parent} = 0, const {\bf QString} \& {\em caption} = QString::null)\hspace{0.3cm}{\tt  [static]}}\label{classKIconDialog_e0}


Pops up the dialog an lets the user select an icon. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em 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. \item[{\em context}]The initial icon context. Initially, the icons having this context are shown in the dialog. The user can change this. \item[{\em strict\-Icon\-Size}]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. \item[{\em icon\-Size}]the size of the icons -- the default of the icongroup if set to 0 \item[{\em user}]Begin with the \char`\"{}user icons\char`\"{} instead of \char`\"{}system icons\char`\"{}. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The name of the icon, suitable for loading with {\bf KIcon\-Loader}. \end{Desc}
\begin{Desc}
\item[Version:]New in 3.0 \end{Desc}


Definition at line 380 of file kicondialog.cpp.

References QString::is\-Null(), open\-Dialog(), KDialog::set\-Caption(), and setup().

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