kdeui
KWindowInfo Class Reference
Displays messages in the window icon and title. More...
#include <kwindowinfo.h>
Public Slots | |
void | message (const QString &text, const QPixmap &pix, int timeout) |
void | message (const QString &text, int timeout) |
void | message (const QString &text, const QPixmap &pix) |
void | message (const QString &text) |
void | permanent (const QString &text, const QPixmap &pix) |
void | permanent (const QString &text) |
Public Member Functions | |
bool | autoDelete () const |
KWindowInfo (QWidget *parent, const char *name=0) | |
void | setAutoDelete (bool enable) |
virtual | ~KWindowInfo () |
Static Public Member Functions | |
static void | showMessage (QWidget *window, const QString &text, const QPixmap &pix, int timeout=-1) |
static void | showMessage (QWidget *window, const QString &text, int timeout=-1) |
Protected Slots | |
virtual void | restore () |
virtual void | save () |
Protected Member Functions | |
virtual void | display (const QString &text, const QPixmap &pix) |
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:
KWindowInfo::showMessage( this, i18n("Message Body") );
QPixmap px; px.load( "lo16-app-logtracker.png" ); KWindowInfo::showMessage( this, i18n("Message Body"), px, 1000 );
- Since:
- 3.1
Definition at line 41 of file kwindowinfo.h.
Constructor & Destructor Documentation
KWindowInfo::KWindowInfo | ( | QWidget * | parent, | |
const char * | name = 0 | |||
) |
KWindowInfo::~KWindowInfo | ( | ) | [virtual] |
Member Function Documentation
bool KWindowInfo::autoDelete | ( | ) | const [inline] |
Returns true iff the object should delete itself when it resets.
Definition at line 59 of file kwindowinfo.h.
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.
void KWindowInfo::message | ( | const QString & | text, | |
int | timeout | |||
) | [slot] |
Shows the specified text in the window title for the specified time.
Definition at line 55 of file kwindowinfo.cpp.
Shows the specified text in the window title, and sets the window icon.
Definition at line 50 of file kwindowinfo.cpp.
void KWindowInfo::message | ( | const QString & | text | ) | [slot] |
Shows the specified text and icon in the window title with no timeout.
Definition at line 85 of file kwindowinfo.cpp.
void KWindowInfo::permanent | ( | const QString & | text | ) | [slot] |
Shows the specified text in the window title with no timeout.
Definition at line 73 of file kwindowinfo.cpp.
void KWindowInfo::restore | ( | ) | [protected, virtual, slot] |
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.
void KWindowInfo::save | ( | ) | [protected, virtual, slot] |
void KWindowInfo::setAutoDelete | ( | bool | enable | ) | [inline] |
Set to true if you want the object to delete itself when the message timeout occurs.
Definition at line 65 of file kwindowinfo.h.
void KWindowInfo::showMessage | ( | QWidget * | window, | |
const QString & | text, | |||
const QPixmap & | pix, | |||
int | timeout = -1 | |||
) | [static] |
Utility method to display a title bar message and icon for the specified window.
Definition at line 38 of file kwindowinfo.cpp.
Utility method to display a title bar message for the specified window.
Definition at line 29 of file kwindowinfo.cpp.
The documentation for this class was generated from the following files: