\section{KStatus\-Bar Class Reference}
\label{classKStatusBar}\index{KStatusBar@{KStatusBar}}
KDE statusbar widget  


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

Inheritance diagram for KStatus\-Bar:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=52pt]{classKStatusBar__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KStatus\-Bar:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=143pt]{classKStatusBar__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Bar\-Status} \{ {\bf Toggle}, 
{\bf Show}, 
{\bf Hide}
 \}
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf pressed} (int)
\item 
void {\bf released} (int)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KStatus\-Bar} ({\bf QWidget} $\ast$parent=0L, const char $\ast$name=0L)
\item 
{\bf $\sim$KStatus\-Bar} ()
\item 
void {\bf insert\-Item} (const {\bf QString} \&text, int id, int stretch=0, bool permanent=false)
\item 
void {\bf insert\-Fixed\-Item} (const {\bf QString} \&text, int id, bool permanent=false)
\item 
void {\bf remove\-Item} (int id)
\item 
bool {\bf has\-Item} (int id) const 
\item 
void {\bf change\-Item} (const {\bf QString} \&text, int id)
\item 
void {\bf set\-Item\-Alignment} (int id, int align)
\item 
void {\bf set\-Item\-Fixed} (int id, int width=-1)
\end{CompactItemize}


\subsection{Detailed Description}
KDE statusbar widget 

Display status messages.

You can insert text labels or custom widgets. Their geometry is managed internally. KStatus\-Bar resizes itself, but positioning is left to {\bf KMain\-Window}{\rm (p.\,\pageref{classKMainWindow})} (or to you, if you don't use {\bf KMain\-Window}{\rm (p.\,\pageref{classKMainWindow})} ).

A special type of item is a message which is a temporary text-message displayed on top of other items in full-width. Messages are visible for specified time, or until you call the slot {\bf QStatus\-Bar::clear()}. See {\bf QStatus\-Bar::message} for details.

It is useful to connect the {\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})} signals to the {\bf QStatus\-Bar::message} slots.

KStatus\-Bar inherits {\bf QStatus\-Bar}, you can freely use all {\bf QStatus\-Bar} methods.

Empty text items are not visible. They will become visible when you change (add) text.

\begin{Desc}
\item[Author:]Mark Donohoe ({\tt donohoe@kde.org}) Maintained by Sven Radej $<${\tt radej@kde.org}$>$\end{Desc}
\begin{Desc}
\item[See also:]{\bf KAction\-Collection}{\rm (p.\,\pageref{classKActionCollection})} \end{Desc}




Definition at line 87 of file kstatusbar.h.

\subsection{Member Enumeration Documentation}
\index{KStatusBar@{KStatus\-Bar}!BarStatus@{BarStatus}}
\index{BarStatus@{BarStatus}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KStatus\-Bar::Bar\-Status}}\label{classKStatusBar_w3}


\begin{Desc}
\item[{\bf Deprecated}]WARNING: This enum is only for backward compatibility and it may be removed. No method here uses it. \end{Desc}


Definition at line 97 of file kstatusbar.h.

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


Constructs a status bar. 

{\tt parent} is usually {\bf KMain\-Window}{\rm (p.\,\pageref{classKMainWindow})}. 

Definition at line 61 of file kstatusbar.cpp.

References KGlobal::config(), KConfig\-Base::group(), KConfig\-Base::read\-Bool\-Entry(), KConfig\-Base::set\-Group(), and QStatus\-Bar::set\-Size\-Grip\-Enabled().\index{KStatusBar@{KStatus\-Bar}!~KStatusBar@{$\sim$KStatusBar}}
\index{~KStatusBar@{$\sim$KStatusBar}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KStatus\-Bar::$\sim${\bf KStatus\-Bar} ()}\label{classKStatusBar_a1}


Destructor. 

Deletes all internal objects. 

Definition at line 74 of file kstatusbar.cpp.

\subsection{Member Function Documentation}
\index{KStatusBar@{KStatus\-Bar}!insertItem@{insertItem}}
\index{insertItem@{insertItem}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KStatus\-Bar::insert\-Item (const {\bf QString} \& {\em text}, int {\em id}, int {\em stretch} = {\tt 0}, bool {\em permanent} = {\tt false})}\label{classKStatusBar_a2}


Inserts a text label into the status bar. 

Paremeters {\tt stretch} and {\tt permanent} are passed to {\bf QStatus\-Bar::add\-Widget} .

If {\tt permanent} is true, then item will be placed on the far right of the statusbar and will never be hidden by {\bf QStatus\-Bar::message}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The label's text string. \item[{\em id}]id of item \item[{\em stretch}]stretch passed to {\bf QStatus\-Bar::add\-Widget} \item[{\em permanent}]is item permanent or not (passed to {\bf QStatus\-Bar::add\-Widget} )\end{description}
\end{Desc}
\begin{Desc}
\item[See also:]QStatusbar::add\-Widget \end{Desc}


Definition at line 78 of file kstatusbar.cpp.

References QStatus\-Bar::add\-Widget(), endl(), QInt\-Dict::insert(), and kd\-Debug().\index{KStatusBar@{KStatus\-Bar}!insertFixedItem@{insertFixedItem}}
\index{insertFixedItem@{insertFixedItem}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KStatus\-Bar::insert\-Fixed\-Item (const {\bf QString} \& {\em text}, int {\em id}, bool {\em permanent} = {\tt false})\hspace{0.3cm}{\tt  [inline]}}\label{classKStatusBar_a3}


Inserts a fixed width text label into status bar. 

The width will be set according to {\tt text}, but will remain fixed even if you change text. You can change fixed width by calling set\-Item\-Fixed.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The label's text string \item[{\em id}]id of item \item[{\em permanent}]permanent flag passed to {\bf QStatus\-Bar::add\-Widget} \end{description}
\end{Desc}


Definition at line 138 of file kstatusbar.h.\index{KStatusBar@{KStatus\-Bar}!removeItem@{removeItem}}
\index{removeItem@{removeItem}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KStatus\-Bar::remove\-Item (int {\em id})}\label{classKStatusBar_a4}


Removes an item. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The item to remove. \end{description}
\end{Desc}


Definition at line 90 of file kstatusbar.cpp.

References endl(), kd\-Debug(), QInt\-Dict::remove(), and QStatus\-Bar::remove\-Widget().

Referenced by KXMLGUIBuilder::remove\-Container().\index{KStatusBar@{KStatus\-Bar}!hasItem@{hasItem}}
\index{hasItem@{hasItem}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KStatus\-Bar::has\-Item (int {\em id}) const}\label{classKStatusBar_a5}


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


Returns true if an item with {\tt id} exists already in KStatus\-Bar, otherwise returns false.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]id of the item \end{description}
\end{Desc}


Definition at line 103 of file kstatusbar.cpp.\index{KStatusBar@{KStatus\-Bar}!changeItem@{changeItem}}
\index{changeItem@{changeItem}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KStatus\-Bar::change\-Item (const {\bf QString} \& {\em text}, int {\em id})}\label{classKStatusBar_a6}


Changes the text in a status bar field. 

The item will be resized to fit the text. If you change text to be empty, item will not be visible (untill you add some text).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The label's text string \item[{\em id}]The id of item. \end{description}
\end{Desc}


Definition at line 112 of file kstatusbar.cpp.

References endl(), kd\-Debug(), QStatus\-Bar::reformat(), and QLabel::set\-Text().\index{KStatusBar@{KStatus\-Bar}!setItemAlignment@{setItemAlignment}}
\index{setItemAlignment@{setItemAlignment}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KStatus\-Bar::set\-Item\-Alignment (int {\em id}, int {\em align})}\label{classKStatusBar_a7}


Sets the alignment of item {\tt id}. 

By default all fields are aligned {\tt Align\-HCenter} $|$ {\tt Align\-VCenter}. See {\bf QLabel::set\-Alignment} for details. 

Definition at line 127 of file kstatusbar.cpp.

References endl(), kd\-Debug(), and QLabel::set\-Alignment().\index{KStatusBar@{KStatus\-Bar}!setItemFixed@{setItemFixed}}
\index{setItemFixed@{setItemFixed}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KStatus\-Bar::set\-Item\-Fixed (int {\em id}, int {\em width} = {\tt -1})}\label{classKStatusBar_a8}


Sets item {\tt id} to have fixed width. 

This cannot be undone, but you can always set new fixed width.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]id of item \item[{\em width}]fixed width in pixels. Default -1 is to adapt to text width. \end{description}
\end{Desc}


Definition at line 138 of file kstatusbar.cpp.

References endl(), kd\-Debug(), and QLabel::text().\index{KStatusBar@{KStatus\-Bar}!pressed@{pressed}}
\index{pressed@{pressed}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KStatus\-Bar::pressed (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKStatusBar_l0}


Emitted when mouse is pressed over item {\tt id}. 

Connect to this signal if you want to respond to mouse press events. \index{KStatusBar@{KStatus\-Bar}!released@{released}}
\index{released@{released}!KStatusBar@{KStatus\-Bar}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KStatus\-Bar::released (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKStatusBar_l1}


Emitted when mouse is released over item {\tt id}. 

Connect to this signal if you want to respond to mouse release events (clicks). 

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