\section{KJanus\-Widget Class Reference}
\label{classKJanusWidget}\index{KJanusWidget@{KJanusWidget}}
Easy to use widget with many layouts.  


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

Inheritance diagram for KJanus\-Widget:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=58pt]{classKJanusWidget__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KJanus\-Widget:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=266pt]{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} ()
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf about\-To\-Show\-Page} ({\bf QWidget} $\ast$page)
\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)
\item 
{\bf $\sim$KJanus\-Widget} ()
\item 
virtual bool {\bf show\-Page} (int index)
\item 
virtual int {\bf active\-Page\-Index} () const 
\item 
virtual bool {\bf is\-Valid} () const 
\item 
virtual int {\bf face} () const 
\item 
virtual {\bf QSize} {\bf minimum\-Size\-Hint} () const 
\item 
virtual {\bf QSize} {\bf size\-Hint} () const 
\item 
virtual {\bf QFrame} $\ast$ {\bf plain\-Page} ()
\item 
virtual {\bf QFrame} $\ast$ {\bf add\-Page} (const {\bf QString} \&item, const {\bf QString} \&header=QString::null, const {\bf QPixmap} \&pixmap={\bf QPixmap}())
\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}())
\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}())
\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}())
\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}())
\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}())
\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}())
\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}())
\item 
void {\bf remove\-Page} ({\bf QWidget} $\ast$page)
\item 
virtual int {\bf page\-Index} ({\bf QWidget} $\ast$widget) const 
\item 
virtual bool {\bf set\-Swallowed\-Widget} ({\bf QWidget} $\ast$widget)
\item 
virtual void {\bf set\-Tree\-List\-Auto\-Resize} (bool state)
\item 
virtual void {\bf set\-Show\-Icons\-In\-Tree\-List} (bool state)
\item 
virtual void {\bf set\-Root\-Is\-Decorated} (bool state)
\item 
void {\bf unfold\-Tree\-List} (bool persist=false)
\item 
void {\bf add\-Widget\-Below\-List} ({\bf QWidget} $\ast$widget)
\item 
void {\bf add\-Button\-Below\-List} (const {\bf QString} \&text, {\bf QObject} $\ast$recv, const char $\ast$slot)
\item 
void {\bf add\-Button\-Below\-List} (const {\bf KGui\-Item} \&guiitem, {\bf QObject} $\ast$recv, const char $\ast$slot)
\item 
virtual void {\bf set\-Icon\-List\-All\-Visible} (bool state)
\item 
virtual void {\bf set\-Folder\-Icon} (const {\bf QString\-List} \&path, const {\bf QPixmap} \&pixmap)
\item 
{\bf QString} {\bf page\-Title} (int index) const 
\item 
{\bf QWidget} $\ast$ {\bf page\-Widget} (int index) const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf show\-Event} ({\bf QShow\-Event} $\ast$)
\item 
virtual bool {\bf event\-Filter} ({\bf QObject} $\ast$o, {\bf QEvent} $\ast$e)
\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}
Easy to use widget with many layouts. 

Provides a number of ready to use layouts (faces). 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.

This class provides {\bf KJanus\-Widget::Tree\-List}{\rm (p.\,\pageref{classKJanusWidget_w5w0})}, {\bf KJanus\-Widget::Icon\-List}{\rm (p.\,\pageref{classKJanusWidget_w5w4})}, {\bf KJanus\-Widget::Tabbed}{\rm (p.\,\pageref{classKJanusWidget_w5w1})}, {\bf KJanus\-Widget::Plain}{\rm (p.\,\pageref{classKJanusWidget_w5w2})} and {\bf KJanus\-Widget::Swallow}{\rm (p.\,\pageref{classKJanusWidget_w5w3})} layouts.

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. However, it would be preferable to use the {\bf QObject::delete\-Later()} function on the page as the main event loop may have optimized UI update events of the page by scheduling them for later.

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




Definition at line 67 of file kjanuswidget.h.

\subsection{Member Enumeration Documentation}
\index{KJanusWidget@{KJanus\-Widget}!Face@{Face}}
\index{Face@{Face}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf enum} {\bf KJanus\-Widget::Face}}\label{classKJanusWidget_w5}


\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{TreeList@{TreeList}!KJanusWidget@{KJanusWidget}}\index{KJanusWidget@{KJanusWidget}!TreeList@{TreeList}}\item[{\em 
Tree\-List\label{classKJanusWidget_w5w0}
}]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. \index{Tabbed@{Tabbed}!KJanusWidget@{KJanusWidget}}\index{KJanusWidget@{KJanusWidget}!Tabbed@{Tabbed}}\item[{\em 
Tabbed\label{classKJanusWidget_w5w1}
}]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 {\bf KJanus\-Widget::Tree\-List}{\rm (p.\,\pageref{classKJanusWidget_w5w0})} and you have a tree list layout instead. \index{Plain@{Plain}!KJanusWidget@{KJanusWidget}}\index{KJanusWidget@{KJanusWidget}!Plain@{Plain}}\item[{\em 
Plain\label{classKJanusWidget_w5w2}
}]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. \index{Swallow@{Swallow}!KJanusWidget@{KJanusWidget}}\index{KJanusWidget@{KJanusWidget}!Swallow@{Swallow}}\item[{\em 
Swallow\label{classKJanusWidget_w5w3}
}]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. \index{IconList@{IconList}!KJanusWidget@{KJanusWidget}}\index{KJanusWidget@{KJanusWidget}!IconList@{IconList}}\item[{\em 
Icon\-List\label{classKJanusWidget_w5w4}
}]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. \end{description}
\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} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0}, int {\em face} = {\tt 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 face}]The kind of dialog, Use Tree\-List, Tabbed, Plain or Swallow. \end{description}
\end{Desc}


Definition at line 87 of file kjanuswidget.cpp.

References about\-To\-Show\-Page(), KList\-View::add\-Column(), QList\-View::header(), Icon\-List, Plain, QWidget::QWidget(), QLabel::set\-Font(), QFrame::set\-Frame\-Style(), QTab\-Widget::set\-Margin(), QList\-View::set\-Root\-Is\-Decorated(), KList\-View::set\-Sorting(), set\-Swallowed\-Widget(), Swallow, Tabbed, and Tree\-List.\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 203 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 576 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 642 of file kjanuswidget.cpp.

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

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 209 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 221 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 751 of file kjanuswidget.cpp.

References QSize::height(), Icon\-List, QWidget::minimum\-Size(), Plain, QSize::rheight(), QSize::rwidth(), QWidget::style(), Swallow, Tabbed, Tree\-List, 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 806 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 215 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} = {\tt QString::null}, const {\bf QPixmap} \& {\em pixmap} = {\tt {\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 262 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} = {\tt QString::null}, const {\bf QPixmap} \& {\em pixmap} = {\tt {\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 236 of file kjanuswidget.cpp.

References endl(), and kd\-Debug().\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} = {\tt QString::null}, const {\bf QPixmap} \& {\em pixmap} = {\tt {\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 289 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} = {\tt QString::null}, const {\bf QPixmap} \& {\em pixmap} = {\tt {\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 272 of file kjanuswidget.cpp.

References endl(), and kd\-Debug().\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} = {\tt QString::null}, const {\bf QPixmap} \& {\em pixmap} = {\tt {\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\-Name}]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 314 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} = {\tt QString::null}, const {\bf QPixmap} \& {\em pixmap} = {\tt {\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 298 of file kjanuswidget.cpp.

References endl(), kd\-Debug(), and QHBox::set\-Spacing().\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} = {\tt QString::null}, const {\bf QPixmap} \& {\em pixmap} = {\tt {\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\-Name}]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 342 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} = {\tt QString::null}, const {\bf QPixmap} \& {\em pixmap} = {\tt {\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 323 of file kjanuswidget.cpp.

References endl(), kd\-Debug(), and QGrid::set\-Spacing().\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 add\-Page, add\-VBox\-Page, add\-HBox\-Page or add\-Grid\-Page. 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 add\-Page , add\-VBox\-Page , add\-HBox\-Page or add\-Grid\-Page . \end{description}
\end{Desc}


Definition at line 1088 of file kjanuswidget.cpp.

References QMap::begin(), QMap::end(), Icon\-List, QMap::remove(), QTab\-Widget::remove\-Page(), QWidget\-Stack::remove\-Widget(), and Tree\-List.\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 add\-Page , add\-VBox\-Page , add\-HBox\-Page or add\-Grid\-Page . 

You can can compare this index with the value returned from active\-Page\-Index 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 add\-Page , add\-VBox\-Page , add\-HBox\-Page or add\-Grid\-Page .\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 666 of file kjanuswidget.cpp.

References Icon\-List, Tabbed, and Tree\-List.

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 497 of file kjanuswidget.cpp.

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

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 812 of file kjanuswidget.cpp.

References Tree\-List.

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 add\-Page, add\-VBox\-Page, add\-HBox\-Page, or add\-Grid\-Page 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 832 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 837 of file kjanuswidget.cpp.

References QList\-View::set\-Root\-Is\-Decorated(), and Tree\-List.

Referenced by KDialog\-Base::set\-Root\-Is\-Decorated().\index{KJanusWidget@{KJanus\-Widget}!unfoldTreeList@{unfoldTreeList}}
\index{unfoldTreeList@{unfoldTreeList}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::unfold\-Tree\-List (bool {\em persist} = {\tt false})}\label{classKJanusWidget_a23}


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

This tells the Tree\-List to unfold the whole tree so that all entries are visible.

If the list is empty when you call this method newly created entries will not automatically be opened. If the {\tt persist} flag is set opened entries cannot be closed again, though.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em persist}]If true the tree always stays unfolded. \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 844 of file kjanuswidget.cpp.

References QList\-View::first\-Child(), QList\-View\-Item::item\-Below(), QList\-View\-Item::set\-Open(), and Tree\-List.

Referenced by KDialog\-Base::unfold\-Tree\-List().\index{KJanusWidget@{KJanus\-Widget}!addWidgetBelowList@{addWidgetBelowList}}
\index{addWidgetBelowList@{addWidgetBelowList}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::add\-Widget\-Below\-List ({\bf QWidget} $\ast$ {\em widget})}\label{classKJanusWidget_a24}


Add a widget at the bottom of the Tree\-List/Icon\-List. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em widget}]The widget to be added. It will be reparented into the KJanus\-Widget, therefor it will be deleted with the KJanus\-Widget, too. To be on the save side just don't keep the pointer to this widget. \end{description}
\end{Desc}


Definition at line 858 of file kjanuswidget.cpp.

References Icon\-List, and Tree\-List.

Referenced by KDialog\-Base::add\-Widget\-Below\-List().\index{KJanusWidget@{KJanus\-Widget}!addButtonBelowList@{addButtonBelowList}}
\index{addButtonBelowList@{addButtonBelowList}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::add\-Button\-Below\-List (const {\bf QString} \& {\em text}, {\bf QObject} $\ast$ {\em recv}, const char $\ast$ {\em slot})}\label{classKJanusWidget_a25}


Add a button at the bottom of the Tree\-List/Icon\-List. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text on the Push\-Button. \item[{\em recv}]The object that is to receive the signal when the button is clicked. \item[{\em slot}]The slot to connect to the clicked signal of the button.\end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 866 of file kjanuswidget.cpp.

References Icon\-List, and Tree\-List.

Referenced by KDialog\-Base::add\-Button\-Below\-List().\index{KJanusWidget@{KJanus\-Widget}!addButtonBelowList@{addButtonBelowList}}
\index{addButtonBelowList@{addButtonBelowList}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::add\-Button\-Below\-List (const {\bf KGui\-Item} \& {\em guiitem}, {\bf QObject} $\ast$ {\em recv}, const char $\ast$ {\em slot})}\label{classKJanusWidget_a26}


The same as the above function, but with a {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})} providing the text and icon for the button at the bottom of the Tree\-List/Icon\-List. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em guiitem}]The text and icon on the Push\-Button. \item[{\em recv}]The object that is to receive the signal when the button is clicked. \item[{\em slot}]The slot to connect to the clicked signal of the button.\end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 875 of file kjanuswidget.cpp.

References Icon\-List, and Tree\-List.\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_a27}


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 824 of file kjanuswidget.cpp.

References Icon\-List.

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_a28}


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 489 of file kjanuswidget.cpp.

References QMap::insert().

Referenced by KDialog\-Base::set\-Folder\-Icon().\index{KJanusWidget@{KJanus\-Widget}!pageTitle@{pageTitle}}
\index{pageTitle@{pageTitle}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KJanus\-Widget::page\-Title (int {\em index}) const}\label{classKJanusWidget_a29}


Returns the title string associated with a page index in Tree\-List or Icon\-List mode. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]The index of the page or null if there is no such page. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf page\-Index()}{\rm (p.\,\pageref{classKJanusWidget_a18})} \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 1133 of file kjanuswidget.cpp.\index{KJanusWidget@{KJanus\-Widget}!pageWidget@{pageWidget}}
\index{pageWidget@{pageWidget}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QWidget} $\ast$ KJanus\-Widget::page\-Widget (int {\em index}) const}\label{classKJanusWidget_a30}


Returns the page widget associated with a page index or null if there is no such page. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em index}]The index of the page. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf page\-Index()}{\rm (p.\,\pageref{classKJanusWidget_a18})} \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 1141 of file kjanuswidget.cpp.\index{KJanusWidget@{KJanus\-Widget}!aboutToShowPage@{aboutToShowPage}}
\index{aboutToShowPage@{aboutToShowPage}!KJanusWidget@{KJanus\-Widget}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KJanus\-Widget::about\-To\-Show\-Page ({\bf QWidget} $\ast$ {\em page})\hspace{0.3cm}{\tt  [signal]}}\label{classKJanusWidget_l0}


This signal is emitted whenever the current page changes. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em page}]the new page. \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.4 \end{Desc}


Referenced by KJanus\-Widget().\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 725 of file kjanuswidget.cpp.

References Icon\-List, Plain, QWidget::set\-Focus(), Swallow, Tabbed, and Tree\-List.\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 884 of file kjanuswidget.cpp.

References Tree\-List.\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 899 of file kjanuswidget.cpp.

References QList\-View\-Item::width().

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