KDECore
Enumerations | |
enum | MessageType { Error, Information, Warning, Sorry, Fatal } |
Functions | |
void | message (KMessage::MessageType messageType, const QString &text, const QString &caption=QString()) |
void | setMessageHandler (KMessageHandler *handler) |
Detailed Description
Display an informative message using a KMessageHandler.
This class does not define how to display a message, it is just a clean interface for developers to use. The job is done by the current KMessageHandler set in the class.
If no KMessageHandler is currently registered in KMessage, the message will be outputed to stderr.
Use KMessage::setMessageHandler() to use a KMessageHandler.
Some KMessageHandler are already done such as KMessageBoxMessageHandler and KPassivePopupMessageHandler.
Enumeration Type Documentation
Definition at line 51 of file kmessage.h.
Function Documentation
void KMessage::message | ( | KMessage::MessageType | messageType, |
const QString & | text, | ||
const QString & | caption = QString() |
||
) |
Display a long message of a certain type.
A long message span on multiple lines and can have a caption.
- Parameters
-
messageType Currrent type of message. See MessageType enum. text Long message to be displayed. caption Caption to be used. This is optional.
Definition at line 92 of file kmessage.cpp.
void KMessage::setMessageHandler | ( | KMessageHandler * | handler | ) |
Set the current KMessageHandler Note that this method takes ownership of the KMessageHandler.
- Parameters
-
handler Instance of a real KMessageHandler.
- Warning
- This function isn't thread-safe. You don't want to change the message handler during the program's execution anyways. Do so only at start-up.
Definition at line 86 of file kmessage.cpp.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.