\section{KWindow\-Info Class Reference}
\label{classKWindowInfo}\index{KWindowInfo@{KWindowInfo}}
Displays messages in the window icon and title.  


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

Inheritance diagram for KWindow\-Info:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=60pt]{classKWindowInfo__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KWindow\-Info:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=177pt]{classKWindowInfo__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf message} (const  {\bf QString} \&text)
\begin{CompactList}\small\item\em Shows the specified text in the window title. \item\end{CompactList}\item 
void {\bf message} (const  {\bf QString} \&text, const  {\bf QPixmap} \&pix)
\begin{CompactList}\small\item\em Shows the specified text in the window title, and sets the window icon. \item\end{CompactList}\item 
void {\bf message} (const  {\bf QString} \&text, int timeout)
\begin{CompactList}\small\item\em Shows the specified text in the window title for the specified time. \item\end{CompactList}\item 
void {\bf message} (const  {\bf QString} \&text, const  {\bf QPixmap} \&pix, int timeout)
\begin{CompactList}\small\item\em Shows the specified icon and text in the window title and WM icon, for the specified time. \item\end{CompactList}\item 
void {\bf permanent} (const  {\bf QString} \&text)
\begin{CompactList}\small\item\em Shows the specified text in the window title with no timeout. \item\end{CompactList}\item 
void {\bf permanent} (const  {\bf QString} \&text, const  {\bf QPixmap} \&pix)
\begin{CompactList}\small\item\em Shows the specified text and icon in the window title with no timeout. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KWindow\-Info} ({\bf QWidget} $\ast${\bf parent}, const  char $\ast${\bf name}=0)
\begin{CompactList}\small\item\em Creates a KWindow\-Info with the specified parent. \item\end{CompactList}\item 
virtual {\bf $\sim$KWindow\-Info} ()
\begin{CompactList}\small\item\em Cleans up. \item\end{CompactList}\item 
bool {\bf auto\-Delete} () const 
\begin{CompactList}\small\item\em Returns true iff the object should delete itself when it resets. \item\end{CompactList}\item 
void {\bf set\-Auto\-Delete} (bool enable)
\begin{CompactList}\small\item\em Set to true if you want the object to delete itself when the message timeout occurs. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf show\-Message} ({\bf QWidget} $\ast$window, const  {\bf QString} \&text, int timeout=-1)
\begin{CompactList}\small\item\em Utility method to display a title bar message for the specified window. \item\end{CompactList}\item 
void {\bf show\-Message} ({\bf QWidget} $\ast$window, const  {\bf QString} \&text, const  {\bf QPixmap} \&pix, int timeout=-1)
\begin{CompactList}\small\item\em Utility method to display a title bar message and icon for the specified window. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf save} ()
\begin{CompactList}\small\item\em Saves the window title and icon. \item\end{CompactList}\item 
virtual void {\bf restore} ()
\begin{CompactList}\small\item\em Resets the window title and icon to the saved values. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf display} (const  {\bf QString} \&text, const  {\bf QPixmap} \&pix)
\begin{CompactList}\small\item\em Displays the message in the titlebar/icon. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Displays messages in the window icon and title. 

The message is usually transient with the original title and icon being restored automatically after a specified time. The simplest use displays a text message in the window title: \small\begin{alltt}
    {\bf KWindowInfo::showMessage}{\rm (p.\,\pageref{classKWindowInfo_e0})}( this, ''Message Body'' );
 \end{alltt}\normalsize 
 This more complex example changes the window icon, as well as displaying the text. In addition, this example overrides the default timeout to ensure the message is only displayed for 1 second. \small\begin{alltt}
    {\bf QPixmap} px;
    px.load( ''lo16-app-logtracker.png'' );
    {\bf KWindowInfo::showMessage}{\rm (p.\,\pageref{classKWindowInfo_e0})}( this, ''Message Body'', px, 1000 );
 \end{alltt}\normalsize 
 If the parent window inherits {\bf KSystem\-Tray}{\rm (p.\,\pageref{classKSystemTray})} then KWindow\-Info changes the pixmap and tooltip of the system window to display the message.

\begin{Desc}
\item[Author:]Richard Moore, {\tt rich@kde.org} \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kwindowinfo.h}{\rm (p.\,\pageref{kwindowinfo_8h})},v 1.5 2002/09/28 15:16:22 tjansen Exp \end{Desc}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 40 of file kwindowinfo.h.

\subsection{Constructor \& Destructor Documentation}
\index{KWindowInfo@{KWindow\-Info}!KWindowInfo@{KWindowInfo}}
\index{KWindowInfo@{KWindowInfo}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KWindow\-Info::KWindow\-Info ({\bf QWidget} $\ast$ {\em parent}, const char $\ast$ {\em name} = 0)}\label{classKWindowInfo_a0}


Creates a KWindow\-Info with the specified parent. 



Definition at line 20 of file kwindowinfo.cpp.

References KStd\-Accel::name().

Referenced by show\-Message().\index{KWindowInfo@{KWindow\-Info}!~KWindowInfo@{$\sim$KWindowInfo}}
\index{~KWindowInfo@{$\sim$KWindowInfo}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KWindow\-Info::$\sim${\bf KWindow\-Info} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKWindowInfo_a1}


Cleans up. 



Definition at line 25 of file kwindowinfo.cpp.

\subsection{Member Function Documentation}
\index{KWindowInfo@{KWindow\-Info}!autoDelete@{autoDelete}}
\index{autoDelete@{autoDelete}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KWindow\-Info::auto\-Delete () const\hspace{0.3cm}{\tt  [inline]}}\label{classKWindowInfo_a2}


Returns true iff the object should delete itself when it resets. 



Definition at line 58 of file kwindowinfo.h.\index{KWindowInfo@{KWindow\-Info}!setAutoDelete@{setAutoDelete}}
\index{setAutoDelete@{setAutoDelete}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::set\-Auto\-Delete (bool {\em enable})\hspace{0.3cm}{\tt  [inline]}}\label{classKWindowInfo_a3}


Set to true if you want the object to delete itself when the message timeout occurs. 



Definition at line 64 of file kwindowinfo.h.\index{KWindowInfo@{KWindow\-Info}!showMessage@{showMessage}}
\index{showMessage@{showMessage}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::show\-Message ({\bf QWidget} $\ast$ {\em window}, const {\bf QString} \& {\em text}, int {\em timeout} = -1)\hspace{0.3cm}{\tt  [static]}}\label{classKWindowInfo_e0}


Utility method to display a title bar message for the specified window. 



Definition at line 29 of file kwindowinfo.cpp.

References auto\-Del, KWindow\-Info(), and message().\index{KWindowInfo@{KWindow\-Info}!showMessage@{showMessage}}
\index{showMessage@{showMessage}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::show\-Message ({\bf QWidget} $\ast$ {\em window}, const {\bf QString} \& {\em text}, const {\bf QPixmap} \& {\em pix}, int {\em timeout} = -1)\hspace{0.3cm}{\tt  [static]}}\label{classKWindowInfo_e1}


Utility method to display a title bar message and icon for the specified window. 



Definition at line 38 of file kwindowinfo.cpp.

References auto\-Del, KWindow\-Info(), and message().\index{KWindowInfo@{KWindow\-Info}!message@{message}}
\index{message@{message}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::message (const {\bf QString} \& {\em text})\hspace{0.3cm}{\tt  [slot]}}\label{classKWindowInfo_i0}


Shows the specified text in the window title. 



Definition at line 45 of file kwindowinfo.cpp.

Referenced by message(), and show\-Message().\index{KWindowInfo@{KWindow\-Info}!message@{message}}
\index{message@{message}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::message (const {\bf QString} \& {\em text}, const {\bf QPixmap} \& {\em pix})\hspace{0.3cm}{\tt  [slot]}}\label{classKWindowInfo_i1}


Shows the specified text in the window title, and sets the window icon. 



Definition at line 50 of file kwindowinfo.cpp.

References message().\index{KWindowInfo@{KWindow\-Info}!message@{message}}
\index{message@{message}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::message (const {\bf QString} \& {\em text}, int {\em timeout})\hspace{0.3cm}{\tt  [slot]}}\label{classKWindowInfo_i2}


Shows the specified text in the window title for the specified time. 



Definition at line 55 of file kwindowinfo.cpp.

References message().\index{KWindowInfo@{KWindow\-Info}!message@{message}}
\index{message@{message}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::message (const {\bf QString} \& {\em text}, const {\bf QPixmap} \& {\em pix}, int {\em timeout})\hspace{0.3cm}{\tt  [slot]}}\label{classKWindowInfo_i3}


Shows the specified icon and text in the window title and WM icon, for the specified time. 

The time is a delay specified in milliseconds, or one of the two special values. The special values are -1 which means the default timeout should be used, and 0 which means the message is permanent. 

Definition at line 60 of file kwindowinfo.cpp.

References display(), restore(), save(), and QTimer::single\-Shot().\index{KWindowInfo@{KWindow\-Info}!permanent@{permanent}}
\index{permanent@{permanent}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::permanent (const {\bf QString} \& {\em text})\hspace{0.3cm}{\tt  [slot]}}\label{classKWindowInfo_i4}


Shows the specified text in the window title with no timeout. 



Definition at line 73 of file kwindowinfo.cpp.

References KWin::icon(), QPixmap::is\-Null(), and QWidget::win\-Id().\index{KWindowInfo@{KWindow\-Info}!permanent@{permanent}}
\index{permanent@{permanent}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::permanent (const {\bf QString} \& {\em text}, const {\bf QPixmap} \& {\em pix})\hspace{0.3cm}{\tt  [slot]}}\label{classKWindowInfo_i5}


Shows the specified text and icon in the window title with no timeout. 



Definition at line 83 of file kwindowinfo.cpp.

References display(), QString::is\-Null(), and QObject::query\-List().\index{KWindowInfo@{KWindow\-Info}!display@{display}}
\index{display@{display}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::display (const {\bf QString} \& {\em text}, const {\bf QPixmap} \& {\em pix})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKWindowInfo_b0}


Displays the message in the titlebar/icon. 



Definition at line 101 of file kwindowinfo.cpp.

References QTool\-Tip::add(), QPixmap::is\-Null(), QPixmap::load(), QWidget::set\-Caption(), QWidget::set\-Icon(), KWin::set\-Icons(), QLabel::set\-Pixmap(), and QWidget::win\-Id().

Referenced by message(), and permanent().\index{KWindowInfo@{KWindow\-Info}!save@{save}}
\index{save@{save}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::save ()\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKWindowInfo_j0}


Saves the window title and icon. 



Definition at line 121 of file kwindowinfo.cpp.

References QWidget::caption(), QWidget::icon(), KWin::icon(), QPixmap::is\-Null(), QString::is\-Null(), QLabel::pixmap(), QPixmap::resize(), QTool\-Tip::text\-For(), and QWidget::win\-Id().

Referenced by message().\index{KWindowInfo@{KWindow\-Info}!restore@{restore}}
\index{restore@{restore}!KWindowInfo@{KWindow\-Info}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWindow\-Info::restore ()\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKWindowInfo_j1}


Resets the window title and icon to the saved values. 

If auto-delete is enabled then the object is deleted. 

Definition at line 148 of file kwindowinfo.cpp.

References QTool\-Tip::add(), QWidget::set\-Caption(), QWidget::set\-Icon(), KWin::set\-Icons(), QLabel::set\-Pixmap(), and QWidget::win\-Id().

Referenced by message().

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