.TH "KWindowInfo" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KWindowInfo \- Displays messages in the window icon and title.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kwindowinfo.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBmessage\fP (const \fBQString\fP &text)"
.br
.ti -1c
.RI "void \fBmessage\fP (const \fBQString\fP &text, const \fBQPixmap\fP &pix)"
.br
.ti -1c
.RI "void \fBmessage\fP (const \fBQString\fP &text, int timeout)"
.br
.ti -1c
.RI "void \fBmessage\fP (const \fBQString\fP &text, const \fBQPixmap\fP &pix, int timeout)"
.br
.ti -1c
.RI "void \fBpermanent\fP (const \fBQString\fP &text)"
.br
.ti -1c
.RI "void \fBpermanent\fP (const \fBQString\fP &text, const \fBQPixmap\fP &pix)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKWindowInfo\fP (\fBQWidget\fP *\fBparent\fP, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "virtual \fB~KWindowInfo\fP ()"
.br
.ti -1c
.RI "bool \fBautoDelete\fP () const "
.br
.ti -1c
.RI "void \fBsetAutoDelete\fP (bool enable)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static void \fBshowMessage\fP (\fBQWidget\fP *window, const \fBQString\fP &text, int timeout=-1)"
.br
.ti -1c
.RI "static void \fBshowMessage\fP (\fBQWidget\fP *window, const \fBQString\fP &text, const \fBQPixmap\fP &pix, int timeout=-1)"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBsave\fP ()"
.br
.ti -1c
.RI "virtual void \fBrestore\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBdisplay\fP (const \fBQString\fP &text, const \fBQPixmap\fP &pix)"
.br
.in -1c
.SH "Detailed Description"
.PP 
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: 
.PP
.nf
    KWindowInfo::showMessage( this, &quot;Message Body&quot; );

.fi
.PP
 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. 
.PP
.nf
    QPixmap px;
    px.load( &quot;lo16-app-logtracker.png&quot; );
    KWindowInfo::showMessage( this, &quot;Message Body&quot;, px, 1000 );

.fi
.PP
 If the parent window inherits \fBKSystemTray\fP then KWindowInfo changes the pixmap and tooltip of the system window to display the message.
.PP
\fBAuthor:\fP
.RS 4
Richard Moore, rich@kde.org 
.RE
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 41 of file kwindowinfo.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KWindowInfo::KWindowInfo (\fBQWidget\fP * parent, const char * name = \fC0\fP)"
.PP
Creates a KWindowInfo with the specified parent. 
.PP
Definition at line 20 of file kwindowinfo.cpp.
.PP
Referenced by showMessage().
.SS "KWindowInfo::~\fBKWindowInfo\fP ()\fC [virtual]\fP"
.PP
Cleans up. 
.PP
Definition at line 25 of file kwindowinfo.cpp.
.SH "Member Function Documentation"
.PP 
.SS "bool KWindowInfo::autoDelete () const\fC [inline]\fP"
.PP
Returns true iff the object should delete itself when it resets. 
.PP
Definition at line 59 of file kwindowinfo.h.
.SS "void KWindowInfo::setAutoDelete (bool enable)\fC [inline]\fP"
.PP
Set to true if you want the object to delete itself when the message timeout occurs. 
.PP
Definition at line 65 of file kwindowinfo.h.
.SS "void KWindowInfo::showMessage (\fBQWidget\fP * window, const \fBQString\fP & text, int timeout = \fC-1\fP)\fC [static]\fP"
.PP
Utility method to display a title bar message for the specified window. 
.PP
Definition at line 29 of file kwindowinfo.cpp.
.PP
References autoDel, KWindowInfo(), and message().
.SS "void KWindowInfo::showMessage (\fBQWidget\fP * window, const \fBQString\fP & text, const \fBQPixmap\fP & pix, int timeout = \fC-1\fP)\fC [static]\fP"
.PP
Utility method to display a title bar message and icon for the specified window. 
.PP
Definition at line 38 of file kwindowinfo.cpp.
.PP
References autoDel, KWindowInfo(), and message().
.SS "void KWindowInfo::message (const \fBQString\fP & text)\fC [slot]\fP"
.PP
Shows the specified text in the window title. 
.PP
Definition at line 45 of file kwindowinfo.cpp.
.PP
Referenced by message(), and showMessage().
.SS "void KWindowInfo::message (const \fBQString\fP & text, const \fBQPixmap\fP & pix)\fC [slot]\fP"
.PP
Shows the specified text in the window title, and sets the window icon. 
.PP
Definition at line 50 of file kwindowinfo.cpp.
.PP
References message().
.SS "void KWindowInfo::message (const \fBQString\fP & text, int timeout)\fC [slot]\fP"
.PP
Shows the specified text in the window title for the specified time. 
.PP
Definition at line 55 of file kwindowinfo.cpp.
.PP
References message().
.SS "void KWindowInfo::message (const \fBQString\fP & text, const \fBQPixmap\fP & pix, int timeout)\fC [slot]\fP"
.PP
Shows the specified icon and text in the window title and WM icon, for the specified time. 
.PP
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. 
.PP
Definition at line 60 of file kwindowinfo.cpp.
.PP
References display(), restore(), save(), and QTimer::singleShot().
.SS "void KWindowInfo::permanent (const \fBQString\fP & text)\fC [slot]\fP"
.PP
Shows the specified text in the window title with no timeout. 
.PP
Definition at line 73 of file kwindowinfo.cpp.
.PP
References QPixmap::isNull(), and QWidget::winId().
.SS "void KWindowInfo::permanent (const \fBQString\fP & text, const \fBQPixmap\fP & pix)\fC [slot]\fP"
.PP
Shows the specified text and icon in the window title with no timeout. 
.PP
Definition at line 85 of file kwindowinfo.cpp.
.PP
References display(), QString::isNull(), and QObject::queryList().
.SS "void KWindowInfo::display (const \fBQString\fP & text, const \fBQPixmap\fP & pix)\fC [protected, virtual]\fP"
.PP
Displays the message in the titlebar/icon. 
.PP
Definition at line 103 of file kwindowinfo.cpp.
.PP
References QToolTip::add(), QPixmap::load(), QWidget::setCaption(), QWidget::setIcon(), KSystemTray::setPixmap(), and QWidget::winId().
.PP
Referenced by message(), and permanent().
.SS "void KWindowInfo::save ()\fC [protected, virtual, slot]\fP"
.PP
Saves the window title and icon. 
.PP
Definition at line 125 of file kwindowinfo.cpp.
.PP
References QWidget::caption(), QWidget::icon(), QPixmap::isNull(), QString::isNull(), QLabel::pixmap(), QPixmap::resize(), QToolTip::textFor(), and QWidget::winId().
.PP
Referenced by message().
.SS "void KWindowInfo::restore ()\fC [protected, virtual, slot]\fP"
.PP
Resets the window title and icon to the saved values. 
.PP
If auto-delete is enabled then the object is deleted. 
.PP
Definition at line 154 of file kwindowinfo.cpp.
.PP
References QToolTip::add(), QWidget::setCaption(), QWidget::setIcon(), KSystemTray::setPixmap(), and QWidget::winId().
.PP
Referenced by message().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
