\section{KMdi\-Task\-Bar Class Reference}
\label{classKMdiTaskBar}\index{KMdiTaskBar@{KMdiTaskBar}}
Internal class.  


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

Collaboration diagram for KMdi\-Task\-Bar:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=231pt]{classKMdiTaskBar__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf set\-Active\-Button} ({\bf KMdi\-Child\-View} $\ast$win\_\-ptr)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KMdi\-Task\-Bar} ({\bf KMdi\-Main\-Frm} $\ast$parent, QMain\-Window::Tool\-Bar\-Dock dock)
\item 
{\bf $\sim$KMdi\-Task\-Bar} ()
\item 
{\bf KMdi\-Task\-Bar\-Button} $\ast$ {\bf add\-Win\-Button} ({\bf KMdi\-Child\-View} $\ast$win\_\-ptr)
\item 
void {\bf remove\-Win\-Button} ({\bf KMdi\-Child\-View} $\ast$win\_\-ptr, bool have\-To\-Layout\-Task\-Bar=true)
\item 
{\bf KMdi\-Task\-Bar\-Button} $\ast$ {\bf get\-Next\-Window\-Button} (bool b\-Right, {\bf KMdi\-Child\-View} $\ast$win\_\-ptr)
\item 
{\bf KMdi\-Task\-Bar\-Button} $\ast$ {\bf get\-Button} ({\bf KMdi\-Child\-View} $\ast$win\_\-ptr)
\item 
void {\bf switch\-On} (bool b\-On)
\item 
bool {\bf is\-Switched\-On} () const 
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf layout\-Task\-Bar} (int task\-Bar\-Width=0)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf resize\-Event} ({\bf QResize\-Event} $\ast$)
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
{\bf QPtr\-List}$<$ {\bf KMdi\-Task\-Bar\-Button} $>$ $\ast$ {\bf m\_\-p\-Button\-List}
\item 
{\bf KMdi\-Main\-Frm} $\ast$ {\bf m\_\-p\-Frm}
\item 
{\bf KMdi\-Child\-View} $\ast$ {\bf m\_\-p\-Current\-Focused\-Window}
\item 
{\bf QLabel} $\ast$ {\bf m\_\-p\-Stretch\-Space}
\item 
bool {\bf m\_\-layout\-Is\-Pending}\label{classKMdiTaskBar_p4}

\item 
bool {\bf m\_\-b\-Switched\-On}\label{classKMdiTaskBar_p5}

\end{CompactItemize}


\subsection{Detailed Description}
Internal class. 

It's a special kind of {\bf QTool\-Bar} that acts as taskbar for child views. KMdi\-Task\-Bar\-Buttons can be added or removed dynamically.\par
 The button sizes are adjusted dynamically, as well. 



Definition at line 129 of file kmditaskbar.h.

\subsection{Constructor \& Destructor Documentation}
\index{KMdiTaskBar@{KMdi\-Task\-Bar}!KMdiTaskBar@{KMdiTaskBar}}
\index{KMdiTaskBar@{KMdiTaskBar}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KMdi\-Task\-Bar::KMdi\-Task\-Bar ({\bf KMdi\-Main\-Frm} $\ast$ {\em parent}, QMain\-Window::Tool\-Bar\-Dock {\em dock})}\label{classKMdiTaskBar_a0}


Constructor (No\-Focus, minimum width = 1, an internal {\bf QPtr\-List} of taskbar buttons (autodelete)). 



Definition at line 143 of file kmditaskbar.cpp.

References m\_\-p\-Button\-List, m\_\-p\-Frm, and QPtr\-List::set\-Auto\-Delete().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!~KMdiTaskBar@{$\sim$KMdiTaskBar}}
\index{~KMdiTaskBar@{$\sim$KMdiTaskBar}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KMdi\-Task\-Bar::$\sim${\bf KMdi\-Task\-Bar} ()}\label{classKMdiTaskBar_a1}


Destructor (deletes the taskbar button list). 



Definition at line 159 of file kmditaskbar.cpp.

References m\_\-p\-Button\-List.

\subsection{Member Function Documentation}
\index{KMdiTaskBar@{KMdi\-Task\-Bar}!addWinButton@{addWinButton}}
\index{addWinButton@{addWinButton}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KMdi\-Task\-Bar\-Button} $\ast$ KMdi\-Task\-Bar::add\-Win\-Button ({\bf KMdi\-Child\-View} $\ast$ {\em win\_\-ptr})}\label{classKMdiTaskBar_a2}


Add a new {\bf KMdi\-Task\-Bar\-Button}{\rm (p.\,\pageref{classKMdiTaskBarButton})} . 

The width doesn't change. If there's not enough space, all taskbar buttons will be resized to a new smaller size. Probably button texts must be abbreviated now.

Definition at line 164 of file kmditaskbar.cpp.

References QPtr\-List::append(), QObject::connect(), layout\-Task\-Bar(), m\_\-p\-Button\-List, m\_\-p\-Frm, m\_\-p\-Stretch\-Space, set\-Active\-Button(), QLabel::set\-Text(), KMdi\-Task\-Bar\-Button::set\-Text(), and QPush\-Button::set\-Toggle\-Button().

Referenced by KMdi\-Main\-Frm::add\-Window().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!removeWinButton@{removeWinButton}}
\index{removeWinButton@{removeWinButton}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMdi\-Task\-Bar::remove\-Win\-Button ({\bf KMdi\-Child\-View} $\ast$ {\em win\_\-ptr}, bool {\em have\-To\-Layout\-Task\-Bar} = {\tt true})}\label{classKMdiTaskBar_a3}


Removes a {\bf KMdi\-Task\-Bar\-Button}{\rm (p.\,\pageref{classKMdiTaskBarButton})} and deletes it. 

If the rest of the buttons are smaller than they usually are, all those buttons will be resized in a way that the new free size is used as well.

Definition at line 198 of file kmditaskbar.cpp.

References QPtr\-List::count(), get\-Button(), layout\-Task\-Bar(), m\_\-p\-Button\-List, m\_\-p\-Stretch\-Space, and QPtr\-List::remove\-Ref().

Referenced by KMdi\-Main\-Frm::close\-Window(), and KMdi\-Main\-Frm::remove\-Window\-From\-Mdi().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!getNextWindowButton@{getNextWindowButton}}
\index{getNextWindowButton@{getNextWindowButton}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KMdi\-Task\-Bar\-Button} $\ast$ KMdi\-Task\-Bar::get\-Next\-Window\-Button (bool {\em b\-Right}, {\bf KMdi\-Child\-View} $\ast$ {\em win\_\-ptr})}\label{classKMdiTaskBar_a4}


Returns the neighbor taskbar button of the taskbar button of the MDI view given by parameter b\-Right specifies the side, of course left is used if b\-Right is false. 



Definition at line 248 of file kmditaskbar.cpp.

References QPtr\-List::first(), QPtr\-List::last(), m\_\-p\-Button\-List, QPtr\-List::next(), and QPtr\-List::prev().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!getButton@{getButton}}
\index{getButton@{getButton}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KMdi\-Task\-Bar\-Button} $\ast$ KMdi\-Task\-Bar::get\-Button ({\bf KMdi\-Child\-View} $\ast$ {\em win\_\-ptr})}\label{classKMdiTaskBar_a5}


Get the button belonging to the MDI view given as parameter. 



Definition at line 238 of file kmditaskbar.cpp.

References QPtr\-List::first(), m\_\-p\-Button\-List, and QPtr\-List::next().

Referenced by remove\-Win\-Button(), and KMdi\-Main\-Frm::remove\-Window\-From\-Mdi().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!switchOn@{switchOn}}
\index{switchOn@{switchOn}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMdi\-Task\-Bar::switch\-On (bool {\em b\-On})}\label{classKMdiTaskBar_a6}


Switch it on or off. 



Definition at line 218 of file kmditaskbar.cpp.

References QPtr\-List::count(), and m\_\-p\-Button\-List.

Referenced by KMdi\-Main\-Frm::hide\-View\-Task\-Bar(), KMdi\-Main\-Frm::show\-View\-Task\-Bar(), KMdi\-Main\-Frm::slot\_\-toggle\-Task\-Bar(), KMdi\-Main\-Frm::switch\-To\-IDEAl\-Mode(), and KMdi\-Main\-Frm::switch\-To\-Tab\-Page\-Mode().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!isSwitchedOn@{isSwitchedOn}}
\index{isSwitchedOn@{isSwitchedOn}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KMdi\-Task\-Bar::is\-Switched\-On () const\hspace{0.3cm}{\tt  [inline]}}\label{classKMdiTaskBar_a7}


\begin{Desc}
\item[Returns:]whether switched on or off.\end{Desc}


Definition at line 168 of file kmditaskbar.h.

Referenced by KMdi\-Main\-Frm::is\-View\-Task\-Bar\-On(), and KMdi\-Main\-Frm::slot\_\-toggle\-Task\-Bar().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!resizeEvent@{resizeEvent}}
\index{resizeEvent@{resizeEvent}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMdi\-Task\-Bar::resize\-Event ({\bf QResize\-Event} $\ast$)\hspace{0.3cm}{\tt  [protected]}}\label{classKMdiTaskBar_b0}


Reimplemented from its base class to call layout\-Task\-Bar, additionally. 



Definition at line 378 of file kmditaskbar.cpp.

References QPtr\-List::count(), layout\-Task\-Bar(), and m\_\-p\-Button\-List.\index{KMdiTaskBar@{KMdi\-Task\-Bar}!layoutTaskBar@{layoutTaskBar}}
\index{layoutTaskBar@{layoutTaskBar}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMdi\-Task\-Bar::layout\-Task\-Bar (int {\em task\-Bar\-Width} = {\tt 0})\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKMdiTaskBar_j0}


Checks if all buttons fits into this. 

If not, it recalculates all button widths in a way that all buttons fits into the taskbar and have got equal width. The text of the buttons will be abbreviated when nessecary, all buttons get a fixed width and show() is called for each one. If one drags the taskbar to a vertical orientation, the button width is set to 80 pixel.

Definition at line 306 of file kmditaskbar.cpp.

References KMdi\-Task\-Bar\-Button::actual\-Text(), QPtr\-List::count(), QPtr\-List::first(), KMdi\-Task\-Bar\-Button::fit\-Text(), QSize::height(), m\_\-p\-Button\-List, QPtr\-List::next(), KMdi\-Task\-Bar\-Button::set\-Text(), QFont\-Metrics::size(), and QSize::width().

Referenced by add\-Win\-Button(), remove\-Win\-Button(), and resize\-Event().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!setActiveButton@{setActiveButton}}
\index{setActiveButton@{setActiveButton}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMdi\-Task\-Bar::set\-Active\-Button ({\bf KMdi\-Child\-View} $\ast$ {\em win\_\-ptr})\hspace{0.3cm}{\tt  [slot]}}\label{classKMdiTaskBar_i0}


Pushes the desired taskbar button down (switch on), the old one is released (switched off). 

Actually it's a radiobutton group behavior.

Definition at line 285 of file kmditaskbar.cpp.

References QPtr\-List::first(), m\_\-p\-Button\-List, m\_\-p\-Current\-Focused\-Window, QPtr\-List::next(), and QPush\-Button::toggle().

Referenced by KMdi\-Main\-Frm::activate\-View(), and add\-Win\-Button().

\subsection{Member Data Documentation}
\index{KMdiTaskBar@{KMdi\-Task\-Bar}!m_pButtonList@{m\_\-pButtonList}}
\index{m_pButtonList@{m\_\-pButtonList}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPtr\-List}$<${\bf KMdi\-Task\-Bar\-Button}$>$$\ast$ {\bf KMdi\-Task\-Bar::m\_\-p\-Button\-List}\hspace{0.3cm}{\tt  [protected]}}\label{classKMdiTaskBar_p0}


A list of taskbar buttons. 

Note: Each button stands for one MDI view (toolviews doesn't have got a taskbar button).

Definition at line 197 of file kmditaskbar.h.

Referenced by add\-Win\-Button(), get\-Button(), get\-Next\-Window\-Button(), KMdi\-Task\-Bar(), layout\-Task\-Bar(), remove\-Win\-Button(), resize\-Event(), set\-Active\-Button(), switch\-On(), and $\sim$KMdi\-Task\-Bar().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!m_pFrm@{m\_\-pFrm}}
\index{m_pFrm@{m\_\-pFrm}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KMdi\-Main\-Frm}$\ast$ {\bf KMdi\-Task\-Bar::m\_\-p\-Frm}\hspace{0.3cm}{\tt  [protected]}}\label{classKMdiTaskBar_p1}


The belonging MDI mainframe (parent widget of this). 



Definition at line 201 of file kmditaskbar.h.

Referenced by add\-Win\-Button(), and KMdi\-Task\-Bar().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!m_pCurrentFocusedWindow@{m\_\-pCurrentFocusedWindow}}
\index{m_pCurrentFocusedWindow@{m\_\-pCurrentFocusedWindow}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KMdi\-Child\-View}$\ast$ {\bf KMdi\-Task\-Bar::m\_\-p\-Current\-Focused\-Window}\hspace{0.3cm}{\tt  [protected]}}\label{classKMdiTaskBar_p2}


The MDI view belonging to the currently pressed taskbar button. 



Definition at line 205 of file kmditaskbar.h.

Referenced by set\-Active\-Button().\index{KMdiTaskBar@{KMdi\-Task\-Bar}!m_pStretchSpace@{m\_\-pStretchSpace}}
\index{m_pStretchSpace@{m\_\-pStretchSpace}!KMdiTaskBar@{KMdi\-Task\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QLabel}$\ast$ {\bf KMdi\-Task\-Bar::m\_\-p\-Stretch\-Space}\hspace{0.3cm}{\tt  [protected]}}\label{classKMdiTaskBar_p3}


A stretchable widget used as 'space' at the end of a half filled taskbar. 



Definition at line 209 of file kmditaskbar.h.

Referenced by add\-Win\-Button(), and remove\-Win\-Button().

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