\section{KJanus\-Widget Class Reference}
\label{classKJanusWidget}\index{KJanusWidget@{KJanusWidget}}
Provides a number of ready to use layouts (faces). Easy to use widget with many layouts.  


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

Inheritance diagram for KJanus\-Widget:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=59pt]{classKJanusWidget__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KJanus\-Widget:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=295pt]{classKJanusWidget__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Face} \{ \par
{\bf Tree\-List} =  0, 
{\bf Tabbed}, 
{\bf Plain}, 
{\bf Swallow}, 
\par
{\bf Icon\-List}
 \}
\end{CompactItemize}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
virtual void {\bf set\-Focus} ()
\begin{CompactList}\small\item\em Give the keyboard input focus to the widget. \item\end{CompactList}\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf about\-To\-Show\-Page} ({\bf QWidget} $\ast$page)\label{classKJanusWidget_l0}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KJanus\-Widget} ({\bf QWidget} $\ast$parent=0, const  char $\ast$name=0, int face=Plain)
\begin{CompactList}\small\item\em Constructor where you specify the face. \item\end{CompactList}\item 
{\bf $\sim$KJanus\-Widget} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
virtual bool {\bf show\-Page} (int index)
\begin{CompactList}\small\item\em Raises the page which was added by {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})}(). \item\end{CompactList}\item 
virtual int {\bf active\-Page\-Index} () const 
\begin{CompactList}\small\item\em Returns the index of the page that are currently displayed. \item\end{CompactList}\item 
virtual bool {\bf is\-Valid} () const 
\begin{CompactList}\small\item\em Use this to verify that no memory allocation failed. \item\end{CompactList}\item 
virtual int {\bf face} () const 
\begin{CompactList}\small\item\em Returns the face type. \item\end{CompactList}\item 
virtual {\bf QSize} {\bf minimum\-Size\-Hint} () const 
\begin{CompactList}\small\item\em Returns the minimum size that must be made available for the widget so that UIs can be displayed properly. \item\end{CompactList}\item 
virtual {\bf QSize} {\bf size\-Hint} () const 
\begin{CompactList}\small\item\em Returns the recommended size for the widget in order to be displayed properly. \item\end{CompactList}\item 
virtual {\bf QFrame} $\ast$ {\bf plain\-Page} ()
\begin{CompactList}\small\item\em Returns the empty widget that is available in Plain mode. \item\end{CompactList}\item 
virtual {\bf QFrame} $\ast$ {\bf add\-Page} (const  {\bf QString} \&item, const  {\bf QString} \&header=QString::null, const  {\bf QPixmap} \&pixmap={\bf QPixmap}())
\begin{CompactList}\small\item\em Add a new page when the class is used in Tree\-List, Icon\-List or Tabbed mode. \item\end{CompactList}\item 
virtual {\bf QFrame} $\ast$ {\bf add\-Page} (const  {\bf QString\-List} \&items, const  {\bf QString} \&header=QString::null, const  {\bf QPixmap} \&pixmap={\bf QPixmap}())
\begin{CompactList}\small\item\em This is like add\-Page just above, with the difference that the first element is a list of strings. \item\end{CompactList}\item 
virtual {\bf QVBox} $\ast$ {\bf add\-VBox\-Page} (const  {\bf QString} \&item, const  {\bf QString} \&header=QString::null, const  {\bf QPixmap} \&pixmap={\bf QPixmap}())
\begin{CompactList}\small\item\em Add a new page when the class is used in Tree\-List, Icon\-List or Tabbed mode. \item\end{CompactList}\item 
virtual {\bf QVBox} $\ast$ {\bf add\-VBox\-Page} (const  {\bf QString\-List} \&items, const  {\bf QString} \&header=QString::null, const  {\bf QPixmap} \&pixmap={\bf QPixmap}())
\begin{CompactList}\small\item\em This is like add\-VBox\-Page just above, with the difference that the first element is a list of strings. \item\end{CompactList}\item 
virtual {\bf QHBox} $\ast$ {\bf add\-HBox\-Page} (const  {\bf QString} \&item\-Name, const  {\bf QString} \&header=QString::null, const  {\bf QPixmap} \&pixmap={\bf QPixmap}())
\begin{CompactList}\small\item\em Add a new page when the class is used in Tree\-List, Icon\-List or Tabbed mode. \item\end{CompactList}\item 
virtual {\bf QHBox} $\ast$ {\bf add\-HBox\-Page} (const  {\bf QString\-List} \&items, const  {\bf QString} \&header=QString::null, const  {\bf QPixmap} \&pixmap={\bf QPixmap}())
\begin{CompactList}\small\item\em This is like add\-HBox\-Page just above, with the difference that the first element is a list of strings. \item\end{CompactList}\item 
virtual {\bf QGrid} $\ast$ {\bf add\-Grid\-Page} (int n, Orientation dir, const  {\bf QString} \&item\-Name, const  {\bf QString} \&header=QString::null, const  {\bf QPixmap} \&pixmap={\bf QPixmap}())
\begin{CompactList}\small\item\em Add a new page when the class is used in either Tree\-List or Tabbed mode. \item\end{CompactList}\item 
virtual {\bf QGrid} $\ast$ {\bf add\-Grid\-Page} (int n, Orientation dir, const  {\bf QString\-List} \&items, const  {\bf QString} \&header=QString::null, const  {\bf QPixmap} \&pixmap={\bf QPixmap}())
\begin{CompactList}\small\item\em This is like add\-Grid\-Page just above, with the difference that the first element is a list of strings. \item\end{CompactList}\item 
void {\bf remove\-Page} ({\bf QWidget} $\ast$page)
\begin{CompactList}\small\item\em Removes a page created with {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})}, {\bf add\-VBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a11})}, {\bf add\-HBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a13})} or {\bf add\-Grid\-Page}{\rm (p.\,\pageref{classKJanusWidget_a15})}. If the page has already been deleted or has already been removed, nothing happens. The widget itself is not deleted. \item\end{CompactList}\item 
virtual int {\bf page\-Index} ({\bf QWidget} $\ast$widget) const 
\begin{CompactList}\small\item\em Returns the index of a page created with {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})} , {\bf add\-VBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a11})} , {\bf add\-HBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a13})} or {\bf add\-Grid\-Page}{\rm (p.\,\pageref{classKJanusWidget_a15})} . \item\end{CompactList}\item 
virtual bool {\bf set\-Swallowed\-Widget} ({\bf QWidget} $\ast$widget)
\begin{CompactList}\small\item\em Defines the widget to be swallowed. \item\end{CompactList}\item 
virtual void {\bf set\-Tree\-List\-Auto\-Resize} (bool state)
\begin{CompactList}\small\item\em This function has only effect in Tree\-List mode. \item\end{CompactList}\item 
virtual void {\bf set\-Show\-Icons\-In\-Tree\-List} (bool state)
\begin{CompactList}\small\item\em This function has only effect in Tree\-List mode. \item\end{CompactList}\item 
virtual void {\bf set\-Root\-Is\-Decorated} (bool state)
\begin{CompactList}\small\item\em This function has only effect in Tree\-List mode. \item\end{CompactList}\item 
virtual void {\bf set\-Icon\-List\-All\-Visible} (bool state)
\begin{CompactList}\small\item\em This function has only effect in Icon\-List mode. \item\end{CompactList}\item 
virtual void {\bf set\-Folder\-Icon} (const  {\bf QString\-List} \&path, const  {\bf QPixmap} \&pixmap)
\begin{CompactList}\small\item\em Sets the icon used in Tree\-List Mode for the given path. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf show\-Event} ({\bf QShow\-Event} $\ast$)
\begin{CompactList}\small\item\em Reimplemented to handle the splitter width when the the face is Tree\-List. \item\end{CompactList}\item 
virtual bool {\bf event\-Filter} ({\bf QObject} $\ast$o, {\bf QEvent} $\ast$e)
\begin{CompactList}\small\item\em This function is used internally when in Icon\-List mode. \item\end{CompactList}\item 
bool {\bf show\-Page} ({\bf QWidget} $\ast$w)\label{classKJanusWidget_b2}

\item 
void {\bf add\-Page\-Widget} ({\bf QFrame} $\ast$page, const  {\bf QString\-List} \&items, const  {\bf QString} \&header, const  {\bf QPixmap} \&pixmap)\label{classKJanusWidget_b3}

\item 
void {\bf Insert\-Tree\-List\-Item} (const  {\bf QString\-List} \&items, const  {\bf QPixmap} \&pixmap, {\bf QFrame} $\ast$page)\label{classKJanusWidget_b4}

\item 
{\bf QWidget} $\ast$ {\bf Find\-Parent} ()\label{classKJanusWidget_b5}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKJanusWidget_b6}

\end{CompactItemize}


\subsection{Detailed Description}
Provides a number of ready to use layouts (faces). Easy to use widget with many layouts. 

It is used as an internal widget in {\bf KDialog\-Base}{\rm (p.\,\pageref{classKDialogBase})}, but can also used as a widget of its own.

It provides Tree\-List, Icon\-List, Tabbed, Plain and Swallow layouts.

The Tree\-List face provides a list in the left area and pages in the right. The area are separated by a movable splitter. The style is somewhat similar to the layout in the Control Center. A page is raised by selecting the corresponding tree list item.

The Icon\-List face provides an icon list in the left area and pages in the right. For each entry the Icon is on top with the text below. The style is somewhat similar to the layout of the Eudora configuation dialog box. A page is raised by selecting the corresponding icon list item. The preferred icon size is 32x32 pixels.

The Tabbed face is a common tabbed widget. The procedure for creating a page is similar for creating a Tree\-List. This has the advantage that if your widget contain too many pages it is trivial to convert it into a Tree\-List. Just change the face in the KJanus\-Widget constructor to KJanus\-Widget::Tree\-List and you have a tree list layout instead.

The Plain face provides an empty widget ({\bf QFrame}) where you can place your widgets. The KJanus\-Widget makes no assumptions regarding the contents so you are free to add whatever you want.

The Swallow face is provided in order to simplify the usage of existing widgets and to allow changing the visible widget. You specify the widget to be displayed by {\bf set\-Swallowed\-Widget}{\rm (p.\,\pageref{classKJanusWidget_a19})}(). Your widget will be reparented inside the widget. You can specify a Null (0) widget. A empty space is then displayed.

For all modes it is important that you specify the {\bf QWidget::minimum\-Size}() on the page, plain widget or the swallowed widget. If you use a {\bf QLayout} on the page, plain widget or the swallowed widget this will be taken care of automatically. The size is used when the KJanus\-Widget determines its own minimum size. You get the minimum size by using the {\bf minimum\-Size\-Hint}{\rm (p.\,\pageref{classKJanusWidget_a6})}() or {\bf size\-Hint}{\rm (p.\,\pageref{classKJanusWidget_a7})}() methods.

Pages that have been added in Tree\-List, Icon\-List or Tabbed mode can be removed by simply deleting the page.

\begin{Desc}
\item[Author:]Espen Sand ({\tt espen@kde.org}) \end{Desc}




Definition at line 89 of file kjanuswidget.h.

\subsection{Constructor \& Destructor Documentation}
\index{KJanusWidget@{KJanus\-Widget}!KJanusWidget@{KJanusWidget}}
\index{KJanusWidget@{KJanusWidget}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KJanus\-Widget::KJanus\-Widget ({\bf QWidget} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0, int {\em face} = Plain)}\label{classKJanusWidget_a0}


Constructor where you specify the face. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]Parent of the widget. \item[{\em name}]Widget name. \item[{\em int}]face The kind of dialog, Use Tree\-List, Tabbed, Plain or Swallow. \end{description}
\end{Desc}


Definition at line 84 of file kjanuswidget.cpp.

References KList\-View::add\-Column(), QString::from\-Latin1(), QList\-View::header(), KDialog::margin\-Hint(), KStd\-Accel::name(), QWidget::QWidget(), QFont::set\-Bold(), QLabel::set\-Font(), QFrame::set\-Frame\-Style(), QTab\-Widget::set\-Margin(), QList\-View::set\-Root\-Is\-Decorated(), KList\-View::set\-Sorting(), set\-Swallowed\-Widget(), and KDialog::spacing\-Hint().\index{KJanusWidget@{KJanus\-Widget}!~KJanusWidget@{$\sim$KJanusWidget}}
\index{~KJanusWidget@{$\sim$KJanusWidget}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KJanus\-Widget::$\sim${\bf KJanus\-Widget} ()}\label{classKJanusWidget_a1}


Destructor. 



Definition at line 191 of file kjanuswidget.cpp.

\subsection{Member Function Documentation}
\index{KJanusWidget@{KJanus\-Widget}!showPage@{showPage}}
\index{showPage@{showPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KJanus\-Widget::show\-Page (int {\em index})\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a2}


Raises the page which was added by {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})}(). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]The index of the page you want to raise. \end{description}
\end{Desc}


Definition at line 565 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::show\-Page().\index{KJanusWidget@{KJanus\-Widget}!activePageIndex@{activePageIndex}}
\index{activePageIndex@{activePageIndex}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KJanus\-Widget::active\-Page\-Index () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a3}


Returns the index of the page that are currently displayed. 

\begin{Desc}
\item[Returns:]The index or -1 if the face is not Tabbed, Tree\-List or Icon\-List. \end{Desc}


Definition at line 631 of file kjanuswidget.cpp.

References QTab\-Widget::current\-Page(), and QList\-View::selected\-Item().

Referenced by KDialog\-Base::active\-Page\-Index().\index{KJanusWidget@{KJanus\-Widget}!isValid@{isValid}}
\index{isValid@{isValid}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KJanus\-Widget::is\-Valid () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a4}


Use this to verify that no memory allocation failed. 

\begin{Desc}
\item[Returns:]true if the widget was properly created. \end{Desc}


Definition at line 197 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::KDialog\-Base().\index{KJanusWidget@{KJanus\-Widget}!face@{face}}
\index{face@{face}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KJanus\-Widget::face () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a5}


Returns the face type. 

\begin{Desc}
\item[Returns:]The face type. \end{Desc}


Definition at line 209 of file kjanuswidget.cpp.\index{KJanusWidget@{KJanus\-Widget}!minimumSizeHint@{minimumSizeHint}}
\index{minimumSizeHint@{minimumSizeHint}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} KJanus\-Widget::minimum\-Size\-Hint () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a6}


Returns the minimum size that must be made available for the widget so that UIs can be displayed properly. 

\begin{Desc}
\item[Returns:]The minimum size. \end{Desc}


Reimplemented from {\bf QWidget}.

Definition at line 740 of file kjanuswidget.cpp.

References QSize::height(), QWidget::minimum\-Size(), QSize::rheight(), QSize::rwidth(), KDialog::spacing\-Hint(), QWidget::style(), and QSize::width().

Referenced by size\-Hint().\index{KJanusWidget@{KJanus\-Widget}!sizeHint@{sizeHint}}
\index{sizeHint@{sizeHint}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSize} KJanus\-Widget::size\-Hint () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a7}


Returns the recommended size for the widget in order to be displayed properly. 

\begin{Desc}
\item[Returns:]The recommended size. \end{Desc}


Reimplemented from {\bf QWidget}.

Definition at line 799 of file kjanuswidget.cpp.

References minimum\-Size\-Hint().\index{KJanusWidget@{KJanus\-Widget}!plainPage@{plainPage}}
\index{plainPage@{plainPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QFrame} $\ast$ KJanus\-Widget::plain\-Page ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a8}


Returns the empty widget that is available in Plain mode. 

\begin{Desc}
\item[Returns:]The widget or 0 if the face in not Plain. \end{Desc}


Definition at line 203 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::plain\-Page().\index{KJanusWidget@{KJanus\-Widget}!addPage@{addPage}}
\index{addPage@{addPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QFrame} $\ast$ KJanus\-Widget::add\-Page (const {\bf QString} \& {\em item}, const {\bf QString} \& {\em header} = QString::null, const {\bf QPixmap} \& {\em pixmap} = {\bf QPixmap}())\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a9}


Add a new page when the class is used in Tree\-List, Icon\-List or Tabbed mode. 

The returned widget is empty and you must add your widgets as children to this widget. In most cases you must create a layout manager and associate it with this widget as well.

Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]String used in the list or Tab item. \item[{\em header}]A longer string used in Tree\-List and Icon\-List mode to describe the contents of a page. If empty, the item string will be used instead. \item[{\em pixmap}]Used in Icon\-List mode or in Tree\-List mode. You should prefer a pixmap with size 32x32 pixels.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The empty page or 0 if the face is not Tree\-List, Icon\-List or Tabbed. \end{Desc}


Definition at line 244 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::add\-Page().\index{KJanusWidget@{KJanus\-Widget}!addPage@{addPage}}
\index{addPage@{addPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QFrame} $\ast$ KJanus\-Widget::add\-Page (const {\bf QString\-List} \& {\em items}, const {\bf QString} \& {\em header} = QString::null, const {\bf QPixmap} \& {\em pixmap} = {\bf QPixmap}())\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a10}


This is like add\-Page just above, with the difference that the first element is a list of strings. 

These strings are used to form a path of folders down to the given page. The initial elements are names for the folders, while the last element is the name of the page. Note: This does yet only work for the Tree\-List face. Later this may be added for the Icon\-List face too. In other faces than the Tree\-List, all the strings except the last one is ignored. Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later.

Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later. 

Definition at line 224 of file kjanuswidget.cpp.\index{KJanusWidget@{KJanus\-Widget}!addVBoxPage@{addVBoxPage}}
\index{addVBoxPage@{addVBoxPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QVBox} $\ast$ KJanus\-Widget::add\-VBox\-Page (const {\bf QString} \& {\em item}, const {\bf QString} \& {\em header} = QString::null, const {\bf QPixmap} \& {\em pixmap} = {\bf QPixmap}())\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a11}


Add a new page when the class is used in Tree\-List, Icon\-List or Tabbed mode. 

The returned widget is empty and you must add your widgets as children to this widget. The returned widget is a {\bf QVBox} so it contains a {\bf QVBox\-Layout} layout that lines up the child widgets are vertically.

Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]String used in the list or Tab item. \item[{\em header}]A longer string used in Tree\-List and Icon\-List mode to describe the contents of a page. If empty, the item string will be used instead. \item[{\em pixmap}]Used in Icon\-List mode or in Tree\-List mode. You should prefer a pixmap with size 32x32 pixels.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The empty page or 0 if the face is not Tree\-List, Icon\-List or Tabbed. \end{Desc}


Definition at line 271 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::add\-VBox\-Page().\index{KJanusWidget@{KJanus\-Widget}!addVBoxPage@{addVBoxPage}}
\index{addVBoxPage@{addVBoxPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QVBox} $\ast$ KJanus\-Widget::add\-VBox\-Page (const {\bf QString\-List} \& {\em items}, const {\bf QString} \& {\em header} = QString::null, const {\bf QPixmap} \& {\em pixmap} = {\bf QPixmap}())\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a12}


This is like add\-VBox\-Page just above, with the difference that the first element is a list of strings. 

These strings are used to form a path of folders down to the given page. The initial elements are names for the folders, while the last element is the name of the page. Note: This does yet only work for the Tree\-List face. Later this may be added for the Icon\-List face too. In other faces than the Tree\-List, all the strings except the last one is ignored.

Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later. 

Definition at line 254 of file kjanuswidget.cpp.

References KDialog::spacing\-Hint().\index{KJanusWidget@{KJanus\-Widget}!addHBoxPage@{addHBoxPage}}
\index{addHBoxPage@{addHBoxPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QHBox} $\ast$ KJanus\-Widget::add\-HBox\-Page (const {\bf QString} \& {\em item\-Name}, const {\bf QString} \& {\em header} = QString::null, const {\bf QPixmap} \& {\em pixmap} = {\bf QPixmap}())\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a13}


Add a new page when the class is used in Tree\-List, Icon\-List or Tabbed mode. 

The returned widget is empty and you must add your widgets as children to this widget. The returned widget is a {\bf QHBox} so it contains a {\bf QHBox\-Layout} layout that lines up the child widgets are horizontally.

Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]String used in the list or Tab item. \item[{\em header}]A longer string used in Tree\-List and Icon\-List mode to describe the contents of a page. If empty, the item string will be used instead. \item[{\em pixmap}]Used in Icon\-List mode or in Tree\-List mode. You should prefer a pixmap with size 32x32 pixels.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The empty page or 0 if the face is not Tree\-List, Icon\-List or Tabbed. \end{Desc}


Definition at line 296 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::add\-HBox\-Page().\index{KJanusWidget@{KJanus\-Widget}!addHBoxPage@{addHBoxPage}}
\index{addHBoxPage@{addHBoxPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QHBox} $\ast$ KJanus\-Widget::add\-HBox\-Page (const {\bf QString\-List} \& {\em items}, const {\bf QString} \& {\em header} = QString::null, const {\bf QPixmap} \& {\em pixmap} = {\bf QPixmap}())\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a14}


This is like add\-HBox\-Page just above, with the difference that the first element is a list of strings. 

These strings are used to form a path of folders down to the given page. The initial elements are names for the folders, while the last element is the name of the page. Note: This does yet only work for the Tree\-List face. Later this may be added for the Icon\-List face too. In other faces than the Tree\-List, all the strings except the last one is ignored.

Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later. 

Definition at line 280 of file kjanuswidget.cpp.

References QHBox::set\-Spacing(), and KDialog::spacing\-Hint().\index{KJanusWidget@{KJanus\-Widget}!addGridPage@{addGridPage}}
\index{addGridPage@{addGridPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QGrid} $\ast$ KJanus\-Widget::add\-Grid\-Page (int {\em n}, Orientation {\em dir}, const {\bf QString} \& {\em item\-Name}, const {\bf QString} \& {\em header} = QString::null, const {\bf QPixmap} \& {\em pixmap} = {\bf QPixmap}())\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a15}


Add a new page when the class is used in either Tree\-List or Tabbed mode. 

The returned widget is empty and you must add your widgets as children to this widget. The returned widget is a {\bf QGrid} so it contains a {\bf QGrid\-Layout} layout that places up the child widgets in a grid.

Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em n}]Specifies the number of columns if 'dir' is QGrid::Horizontal or the number of rows if 'dir' is QGrid::Vertical. \item[{\em dir}]Can be QGrid::Horizontal or QGrid::Vertical. \item[{\em item}]String used in the list or Tab item. \item[{\em header}]A longer string used in Tree\-List and Icon\-List mode to describe the contents of a page. If empty, the item string will be used instead. \item[{\em pixmap}]Used in Icon\-List mode or in Tree\-List mode. You should prefer a pixmap with size 32x32 pixels.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The empty page or 0 if the face is not Tree\-List, Icon\-List or Tabbed. \end{Desc}


Definition at line 324 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::add\-Grid\-Page().\index{KJanusWidget@{KJanus\-Widget}!addGridPage@{addGridPage}}
\index{addGridPage@{addGridPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QGrid} $\ast$ KJanus\-Widget::add\-Grid\-Page (int {\em n}, Orientation {\em dir}, const {\bf QString\-List} \& {\em items}, const {\bf QString} \& {\em header} = QString::null, const {\bf QPixmap} \& {\em pixmap} = {\bf QPixmap}())\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a16}


This is like add\-Grid\-Page just above, with the difference that the first element is a list of strings. 

These strings are used to form a path of folders down to the given page. The initial elements are names for the folders, while the last element is the name of the page. Note: This does yet only work for the Tree\-List face. Later this may be added for the Icon\-List face too. In other faces than the Tree\-List, all the strings except the last one is ignored.

Deleting the returned frame will cause the listitem or tab to be removed (you can re-add a page with the same name later. 

Definition at line 305 of file kjanuswidget.cpp.

References QGrid::set\-Spacing(), and KDialog::spacing\-Hint().\index{KJanusWidget@{KJanus\-Widget}!removePage@{removePage}}
\index{removePage@{removePage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::remove\-Page ({\bf QWidget} $\ast$ {\em page})}\label{classKJanusWidget_a17}


Removes a page created with {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})}, {\bf add\-VBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a11})}, {\bf add\-HBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a13})} or {\bf add\-Grid\-Page}{\rm (p.\,\pageref{classKJanusWidget_a15})}. If the page has already been deleted or has already been removed, nothing happens. The widget itself is not deleted. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em page}]The widget returned by {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})} , {\bf add\-VBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a11})} , {\bf add\-HBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a13})} or {\bf add\-Grid\-Page}{\rm (p.\,\pageref{classKJanusWidget_a15})} . \end{description}
\end{Desc}


Definition at line 1044 of file kjanuswidget.cpp.

References QMap$<$ QList\-Box\-Item $\ast$, QWidget $\ast$ $>$::begin(), QMap$<$ QList\-View\-Item $\ast$, QWidget $\ast$ $>$::begin(), QMap$<$ QList\-Box\-Item $\ast$, QWidget $\ast$ $>$::end(), QMap$<$ QList\-View\-Item $\ast$, QWidget $\ast$ $>$::end(), QMap$<$ QList\-Box\-Item $\ast$, QWidget $\ast$ $>$::remove(), QMap$<$ QList\-View\-Item $\ast$, QWidget $\ast$ $>$::remove(), QTab\-Widget::remove\-Page(), and QWidget\-Stack::remove\-Widget().\index{KJanusWidget@{KJanus\-Widget}!pageIndex@{pageIndex}}
\index{pageIndex@{pageIndex}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KJanus\-Widget::page\-Index ({\bf QWidget} $\ast$ {\em widget}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a18}


Returns the index of a page created with {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})} , {\bf add\-VBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a11})} , {\bf add\-HBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a13})} or {\bf add\-Grid\-Page}{\rm (p.\,\pageref{classKJanusWidget_a15})} . 

You can can compare this index with the value returned from {\bf active\-Page\-Index}{\rm (p.\,\pageref{classKJanusWidget_a3})} if you need to do some page specific actions in your code.

The returned index will never change so you can safely use this function once and save the value.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em widget}]The widget returned by {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})} , {\bf add\-VBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a11})} , {\bf add\-HBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a13})} or {\bf add\-Grid\-Page}{\rm (p.\,\pageref{classKJanusWidget_a15})} .\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The index or -1 if the face is not Tabbed, Tree\-List or Icon\-List \end{Desc}


Definition at line 655 of file kjanuswidget.cpp.

References QWidget::parent\-Widget().

Referenced by KDialog\-Base::page\-Index().\index{KJanusWidget@{KJanus\-Widget}!setSwallowedWidget@{setSwallowedWidget}}
\index{setSwallowedWidget@{setSwallowedWidget}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KJanus\-Widget::set\-Swallowed\-Widget ({\bf QWidget} $\ast$ {\em widget})\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a19}


Defines the widget to be swallowed. 

This method can be used several times. Only the latest defined widget will be shown.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em widget}]The widget to be swallowed. If 0, then an empty rectangle is displayed. \end{description}
\end{Desc}


Definition at line 486 of file kjanuswidget.cpp.

References QGrid\-Layout::add\-Widget(), QObject::is\-Widget\-Type(), QWidget::layout(), QWidget::minimum\-Size(), QWidget::reparent(), and QWidget::set\-Minimum\-Size().

Referenced by KJanus\-Widget(), and KDialog\-Base::set\-Main\-Widget().\index{KJanusWidget@{KJanus\-Widget}!setTreeListAutoResize@{setTreeListAutoResize}}
\index{setTreeListAutoResize@{setTreeListAutoResize}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::set\-Tree\-List\-Auto\-Resize (bool {\em state})\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a20}


This function has only effect in Tree\-List mode. 

Defines how the tree list is resized when the widget is resized horizontally. By default the tree list keeps its width when the widget becomes wider.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em state}]The resize mode. If false (default) the Tree\-List keeps its current width when the widget becomes wider. \end{description}
\end{Desc}


Definition at line 805 of file kjanuswidget.cpp.

References QSplitter::set\-Resize\-Mode().

Referenced by KDialog\-Base::set\-Tree\-List\-Auto\-Resize().\index{KJanusWidget@{KJanus\-Widget}!setShowIconsInTreeList@{setShowIconsInTreeList}}
\index{setShowIconsInTreeList@{setShowIconsInTreeList}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::set\-Show\-Icons\-In\-Tree\-List (bool {\em state})\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a21}


This function has only effect in Tree\-List mode. 

This tells the widgets whether the icons given in the {\bf add\-Page}{\rm (p.\,\pageref{classKJanusWidget_a9})}, {\bf add\-VBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a11})}, {\bf add\-HBox\-Page}{\rm (p.\,\pageref{classKJanusWidget_a13})}, or {\bf add\-Grid\-Page}{\rm (p.\,\pageref{classKJanusWidget_a15})} methods should be shown in the Tree\-List.

Note: This method must be called before calling any of the methods which add icons to the page.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em state}]If true the icons are shown. \end{description}
\end{Desc}


Definition at line 825 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::set\-Show\-Icons\-In\-Tree\-List().\index{KJanusWidget@{KJanus\-Widget}!setRootIsDecorated@{setRootIsDecorated}}
\index{setRootIsDecorated@{setRootIsDecorated}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::set\-Root\-Is\-Decorated (bool {\em state})\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a22}


This function has only effect in Tree\-List mode. 

This tells the widgets whether the root should be decorated. For details see {\bf QList\-View::set\-Root\-Is\-Decorated}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em state}]Root will be decorated if true. \end{description}
\end{Desc}


Definition at line 830 of file kjanuswidget.cpp.

References QList\-View::set\-Root\-Is\-Decorated().

Referenced by KDialog\-Base::set\-Root\-Is\-Decorated().\index{KJanusWidget@{KJanus\-Widget}!setIconListAllVisible@{setIconListAllVisible}}
\index{setIconListAllVisible@{setIconListAllVisible}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::set\-Icon\-List\-All\-Visible (bool {\em state})\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a23}


This function has only effect in Icon\-List mode. 

Defines how the icon list widget is displayed. By default it is the widgets in the pages that decide the minimum height of the toplevel widget. A vertical scrollbar can be used in the icon list area.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em state}]The visibility mode. If true, the minimum height is adjusted so that every icon in the list is visible at the same time. The vertical scrollbar will never be visible. \end{description}
\end{Desc}


Definition at line 817 of file kjanuswidget.cpp.

Referenced by KDialog\-Base::set\-Icon\-List\-All\-Visible().\index{KJanusWidget@{KJanus\-Widget}!setFolderIcon@{setFolderIcon}}
\index{setFolderIcon@{setFolderIcon}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::set\-Folder\-Icon (const {\bf QString\-List} \& {\em path}, const {\bf QPixmap} \& {\em pixmap})\hspace{0.3cm}{\tt  [virtual]}}\label{classKJanusWidget_a24}


Sets the icon used in Tree\-List Mode for the given path. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em path}]The path for which this icon should be shown. \item[{\em pixmap}]The icon used. \end{description}
\end{Desc}


Definition at line 478 of file kjanuswidget.cpp.

References QMap$<$ QString, QPixmap $>$::insert(), QString\-List::join(), and KStd\-Accel::key().

Referenced by KDialog\-Base::set\-Folder\-Icon().\index{KJanusWidget@{KJanus\-Widget}!setFocus@{setFocus}}
\index{setFocus@{setFocus}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::set\-Focus ()\hspace{0.3cm}{\tt  [virtual, slot]}}\label{classKJanusWidget_i0}


Give the keyboard input focus to the widget. 



Reimplemented from {\bf QWidget}.

Definition at line 714 of file kjanuswidget.cpp.

References QWidget::set\-Focus().\index{KJanusWidget@{KJanus\-Widget}!showEvent@{showEvent}}
\index{showEvent@{showEvent}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::show\-Event ({\bf QShow\-Event} $\ast$)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKJanusWidget_b0}


Reimplemented to handle the splitter width when the the face is Tree\-List. 



Reimplemented from {\bf QWidget}.

Definition at line 838 of file kjanuswidget.cpp.

References QSplitter::set\-Resize\-Mode().\index{KJanusWidget@{KJanus\-Widget}!eventFilter@{eventFilter}}
\index{eventFilter@{eventFilter}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KJanus\-Widget::event\-Filter ({\bf QObject} $\ast$ {\em o}, {\bf QEvent} $\ast$ {\em e})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKJanusWidget_b1}


This function is used internally when in Icon\-List mode. 

If you reimplement this class a make your own event filter, make sure to call this function from your filter.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em o}]Object that has received an event. \item[{\em e}]The event. \end{description}
\end{Desc}


Definition at line 853 of file kjanuswidget.cpp.

References QEvent::type().

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