\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=55pt]{classKWindowInfo__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KWindow\-Info:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=162pt]{classKWindowInfo__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf message} (const {\bf QString} \&text)
\item 
void {\bf message} (const {\bf QString} \&text, const {\bf QPixmap} \&pix)
\item 
void {\bf message} (const {\bf QString} \&text, int timeout)
\item 
void {\bf message} (const {\bf QString} \&text, const {\bf QPixmap} \&pix, int timeout)
\item 
void {\bf permanent} (const {\bf QString} \&text)
\item 
void {\bf permanent} (const {\bf QString} \&text, const {\bf QPixmap} \&pix)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KWindow\-Info} ({\bf QWidget} $\ast${\bf parent}, const char $\ast${\bf name}=0)
\item 
virtual {\bf $\sim$KWindow\-Info} ()
\item 
bool {\bf auto\-Delete} () const 
\item 
void {\bf set\-Auto\-Delete} (bool enable)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static void {\bf show\-Message} ({\bf QWidget} $\ast$window, const {\bf QString} \&text, int timeout=-1)
\item 
static void {\bf show\-Message} ({\bf QWidget} $\ast$window, const {\bf QString} \&text, const {\bf QPixmap} \&pix, int timeout=-1)
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf save} ()
\item 
virtual void {\bf restore} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf display} (const {\bf QString} \&text, const {\bf QPixmap} \&pix)
\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: 

\footnotesize\begin{verbatim}    KWindowInfo::showMessage( this, &quot;Message Body&quot; );
\end{verbatim}
\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. 

\footnotesize\begin{verbatim}    QPixmap px;
    px.load( &quot;lo16-app-logtracker.png&quot; );
    KWindowInfo::showMessage( this, &quot;Message Body&quot;, px, 1000 );
\end{verbatim}
\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[Since:]3.1 \end{Desc}




Definition at line 41 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} = {\tt 0})}\label{classKWindowInfo_a0}


Creates a KWindow\-Info with the specified parent. 



Definition at line 20 of file kwindowinfo.cpp.

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 59 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 65 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} = {\tt -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} = {\tt -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 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 85 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 103 of file kwindowinfo.cpp.

References QTool\-Tip::add(), QPixmap::load(), QWidget::set\-Caption(), QWidget::set\-Icon(), KSystem\-Tray::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 125 of file kwindowinfo.cpp.

References QWidget::caption(), QWidget::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 154 of file kwindowinfo.cpp.

References QTool\-Tip::add(), QWidget::set\-Caption(), QWidget::set\-Icon(), KSystem\-Tray::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}
